blob: c296cd54b46190a72624c6a2d084b04b1733c4f1 [file] [log] [blame]
lesl0bad28f2019-12-02 23:48:58 +08001/*
2 * Copyright 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.wifi.hostapd@1.2;
18
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -080019import @1.0::IHostapd.NetworkParams;
lesl0bad28f2019-12-02 23:48:58 +080020import @1.1::IHostapd;
21import HostapdStatus;
22import MacAddress;
23import Ieee80211ReasonCode;
Roger Wang9e002932019-12-30 12:58:18 +080024import DebugLevel;
lesl0bad28f2019-12-02 23:48:58 +080025
26/**
27 * Top-level object for managing SoftAPs.
28 */
29interface IHostapd extends @1.1::IHostapd {
30 /**
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -080031 * Band bitmMask to use for the SoftAp operations.
32 * A combinatoin of these bits are used to identify the allowed bands
33 * to start the softAp
34 */
35 enum BandMask : uint32_t {
36 /**
37 * 2.4 GHz band.
38 */
39 BAND_2_GHZ = 1 << 0,
40 /**
41 * 5 GHz band.
42 */
43 BAND_5_GHZ = 1 << 1,
44 /**
45 * 6 GHz band.
46 */
47 BAND_6_GHZ = 1 << 2,
48 };
49
50 /**
51 * Parameters to control the HW mode for the interface.
52 */
53 struct HwModeParams {
54 /**
55 * Whether IEEE 802.11ax (HE) is enabled or not.
56 * Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
57 * used with HE.
58 */
59 bool enable80211AX;
60 /**
61 * Whether 6GHz band enabled or not on softAp.
62 * Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
63 * used.
64 */
65 bool enable6GhzBand;
66 };
67
68 /**
69 * Parameters to control the channel selection for the interface.
70 */
71 struct ChannelParams {
72 /**
73 * Band to use for the SoftAp operations.
74 */
75 bitfield<BandMask> bandMask;
76 };
77
78 /**
79 * Parameters to use for setting up the access point interface.
80 */
81 struct IfaceParams {
82 /**
83 * Baseline information as defined in HAL 1.1.
84 */
85 @1.1::IHostapd.IfaceParams V1_1;
86 /** Additional Hw mode params for the interface */
87 HwModeParams hwModeParams;
88 /** Additional Channel params for the interface */
89 ChannelParams channelParams;
90 };
91
92 /**
93 * Adds a new access point for hostapd to control.
94 *
95 * This should trigger the setup of an access point with the specified
96 * interface and network params.
97 *
98 * @param ifaceParams AccessPoint Params for the access point.
99 * @param nwParams Network Params for the access point.
100 * @return status Status of the operation.
101 * Possible status codes:
102 * |HostapdStatusCode.SUCCESS|,
103 * |HostapdStatusCode.FAILURE_ARGS_INVALID|,
104 * |HostapdStatusCode.FAILURE_UNKNOWN|,
105 * |HostapdStatusCode.FAILURE_IFACE_EXISTS|
106 */
107 addAccessPoint_1_2(IfaceParams ifaceParams, NetworkParams nwParams)
108 generates(HostapdStatus status);
109
110 /**
lesl0bad28f2019-12-02 23:48:58 +0800111 * force one of the hotspot clients disconnect..
112 *
113 * @param ifaceName Name of the interface.
114 * @param clientAddress Mac Address of the hotspot client.
115 * @param reasonCode One of disconnect reason code which defined by 802.11.
116 * @return status Status of the operation.
117 * Possible status codes:
118 * |HostapdStatusCode.SUCCESS|,
119 * |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|
120 * |HostapdStatusCode.FAILURE_CLIENT_UNKNOWN|
121 */
122 forceClientDisconnect(string ifaceName, MacAddress clientAddress,
123 Ieee80211ReasonCode reasonCode) generates (HostapdStatus status);
Roger Wang9e002932019-12-30 12:58:18 +0800124
125 /**
126 * Set debug parameters for the hostapd.
127 *
128 * @param level Debug logging level for the hostapd.
129 * (one of |DebugLevel| values).
130 * @return status Status of the operation.
131 * Possible status codes:
132 * |HostapdStatusCode.SUCCESS|,
133 * |HostapdStatusCode.FAILURE_UNKNOWN|
134 */
135 setDebugParams(DebugLevel level)
136 generates (HostapdStatus status);
lesl0bad28f2019-12-02 23:48:58 +0800137};