blob: 5e6d80a616312c31d29dc87a7447cdd3708aca2e [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;
Ahmed ElArabawy0e991482019-12-21 12:56:47 -080060
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -080061 /**
62 * Whether 6GHz band enabled or not on softAp.
63 * Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
64 * used.
65 */
66 bool enable6GhzBand;
Ahmed ElArabawyc4af97a2020-01-02 14:23:02 -080067
68 /**
69 * Whether HE single user beamformer in enabled or not on softAp.
70 * Note: this is only applicable if 802.11ax is supported for softAp
71 */
72 bool enableHeSingleUserBeamformer;
73
74 /**
75 * Whether HE single user beamformee is enabled or not on softAp.
76 * Note: this is only applicable if 802.11ax is supported for softAp
77 */
78 bool enableHeSingleUserBeamformee;
79
80 /**
81 * Whether HE multiple user beamformer is enabled or not on softAp.
82 * Note: this is only applicable if 802.11ax is supported for softAp
83 */
84 bool enableHeMultiUserBeamformer;
85
86 /**
87 * Used BSS Color for softAp running in 802.11ax mode
88 * Note: this is only applicable if 802.11ax is supported for softAp
89 */
90 uint32_t heBssColor;
91
92 /**
93 * Whether HE Target Wait Time (TWT) is enabled or not on softAp.
94 * Note: this is only applicable if 802.11ax is supported for softAp
95 */
96 bool enableHeTargetWakeTime;
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -080097 };
98
99 /**
Ahmed ElArabawy0e991482019-12-21 12:56:47 -0800100 * Parameters to specify the channel frequency range for ACS.
101 */
102 struct AcsFrequencyRange {
103 /**
104 * Channel Frequency (in MHz) at the start of the range.
105 */
106 uint32_t start;
107
108 /**
109 * Channel Frequency (in MHz) at the end of the range.
110 */
111 uint32_t end;
112 };
113
114 /**
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -0800115 * Parameters to control the channel selection for the interface.
116 */
117 struct ChannelParams {
118 /**
119 * Band to use for the SoftAp operations.
120 */
121 bitfield<BandMask> bandMask;
Ahmed ElArabawy0e991482019-12-21 12:56:47 -0800122
123 /**
124 * This option can be used to specify the channel frequencies (in MHz) selected by ACS.
125 * If this is an empty list, all channels allowed in selected HW mode
126 * are specified implicitly.
127 * Note: channels may be overridden by firmware.
128 * Note: this option is ignored if ACS is disabled.
129 */
130 vec<AcsFrequencyRange> acsChannelFreqRangesMhz;
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -0800131 };
132
133 /**
134 * Parameters to use for setting up the access point interface.
135 */
136 struct IfaceParams {
137 /**
138 * Baseline information as defined in HAL 1.1.
139 */
140 @1.1::IHostapd.IfaceParams V1_1;
Ahmed ElArabawy0e991482019-12-21 12:56:47 -0800141
142 /**
143 * Additional Hw mode params for the interface
144 */
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -0800145 HwModeParams hwModeParams;
Ahmed ElArabawy0e991482019-12-21 12:56:47 -0800146
147 /**
148 * Additional Channel params for the interface
149 */
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -0800150 ChannelParams channelParams;
151 };
152
153 /**
154 * Adds a new access point for hostapd to control.
155 *
156 * This should trigger the setup of an access point with the specified
157 * interface and network params.
158 *
159 * @param ifaceParams AccessPoint Params for the access point.
160 * @param nwParams Network Params for the access point.
161 * @return status Status of the operation.
162 * Possible status codes:
163 * |HostapdStatusCode.SUCCESS|,
164 * |HostapdStatusCode.FAILURE_ARGS_INVALID|,
165 * |HostapdStatusCode.FAILURE_UNKNOWN|,
166 * |HostapdStatusCode.FAILURE_IFACE_EXISTS|
167 */
168 addAccessPoint_1_2(IfaceParams ifaceParams, NetworkParams nwParams)
Ahmed ElArabawy0e991482019-12-21 12:56:47 -0800169 generates (HostapdStatus status);
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -0800170
171 /**
lesl0bad28f2019-12-02 23:48:58 +0800172 * force one of the hotspot clients disconnect..
173 *
174 * @param ifaceName Name of the interface.
175 * @param clientAddress Mac Address of the hotspot client.
176 * @param reasonCode One of disconnect reason code which defined by 802.11.
177 * @return status Status of the operation.
178 * Possible status codes:
179 * |HostapdStatusCode.SUCCESS|,
180 * |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|
181 * |HostapdStatusCode.FAILURE_CLIENT_UNKNOWN|
182 */
183 forceClientDisconnect(string ifaceName, MacAddress clientAddress,
184 Ieee80211ReasonCode reasonCode) generates (HostapdStatus status);
Roger Wang9e002932019-12-30 12:58:18 +0800185
186 /**
187 * Set debug parameters for the hostapd.
188 *
189 * @param level Debug logging level for the hostapd.
190 * (one of |DebugLevel| values).
191 * @return status Status of the operation.
192 * Possible status codes:
193 * |HostapdStatusCode.SUCCESS|,
194 * |HostapdStatusCode.FAILURE_UNKNOWN|
195 */
196 setDebugParams(DebugLevel level)
197 generates (HostapdStatus status);
lesl0bad28f2019-12-02 23:48:58 +0800198};