blob: b25ea97a8759828b3147003647cca88c01e2e4f5 [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;
Ahmed ElArabawyc4af97a2020-01-02 14:23:02 -080066
67 /**
68 * Whether HE single user beamformer in enabled or not on softAp.
69 * Note: this is only applicable if 802.11ax is supported for softAp
70 */
71 bool enableHeSingleUserBeamformer;
72
73 /**
74 * Whether HE single user beamformee is enabled or not on softAp.
75 * Note: this is only applicable if 802.11ax is supported for softAp
76 */
77 bool enableHeSingleUserBeamformee;
78
79 /**
80 * Whether HE multiple user beamformer is enabled or not on softAp.
81 * Note: this is only applicable if 802.11ax is supported for softAp
82 */
83 bool enableHeMultiUserBeamformer;
84
85 /**
86 * Used BSS Color for softAp running in 802.11ax mode
87 * Note: this is only applicable if 802.11ax is supported for softAp
88 */
89 uint32_t heBssColor;
90
91 /**
92 * Whether HE Target Wait Time (TWT) is enabled or not on softAp.
93 * Note: this is only applicable if 802.11ax is supported for softAp
94 */
95 bool enableHeTargetWakeTime;
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -080096 };
97
98 /**
99 * Parameters to control the channel selection for the interface.
100 */
101 struct ChannelParams {
102 /**
103 * Band to use for the SoftAp operations.
104 */
105 bitfield<BandMask> bandMask;
106 };
107
108 /**
109 * Parameters to use for setting up the access point interface.
110 */
111 struct IfaceParams {
112 /**
113 * Baseline information as defined in HAL 1.1.
114 */
115 @1.1::IHostapd.IfaceParams V1_1;
116 /** Additional Hw mode params for the interface */
117 HwModeParams hwModeParams;
118 /** Additional Channel params for the interface */
119 ChannelParams channelParams;
120 };
121
122 /**
123 * Adds a new access point for hostapd to control.
124 *
125 * This should trigger the setup of an access point with the specified
126 * interface and network params.
127 *
128 * @param ifaceParams AccessPoint Params for the access point.
129 * @param nwParams Network Params for the access point.
130 * @return status Status of the operation.
131 * Possible status codes:
132 * |HostapdStatusCode.SUCCESS|,
133 * |HostapdStatusCode.FAILURE_ARGS_INVALID|,
134 * |HostapdStatusCode.FAILURE_UNKNOWN|,
135 * |HostapdStatusCode.FAILURE_IFACE_EXISTS|
136 */
137 addAccessPoint_1_2(IfaceParams ifaceParams, NetworkParams nwParams)
138 generates(HostapdStatus status);
139
140 /**
lesl0bad28f2019-12-02 23:48:58 +0800141 * force one of the hotspot clients disconnect..
142 *
143 * @param ifaceName Name of the interface.
144 * @param clientAddress Mac Address of the hotspot client.
145 * @param reasonCode One of disconnect reason code which defined by 802.11.
146 * @return status Status of the operation.
147 * Possible status codes:
148 * |HostapdStatusCode.SUCCESS|,
149 * |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|
150 * |HostapdStatusCode.FAILURE_CLIENT_UNKNOWN|
151 */
152 forceClientDisconnect(string ifaceName, MacAddress clientAddress,
153 Ieee80211ReasonCode reasonCode) generates (HostapdStatus status);
Roger Wang9e002932019-12-30 12:58:18 +0800154
155 /**
156 * Set debug parameters for the hostapd.
157 *
158 * @param level Debug logging level for the hostapd.
159 * (one of |DebugLevel| values).
160 * @return status Status of the operation.
161 * Possible status codes:
162 * |HostapdStatusCode.SUCCESS|,
163 * |HostapdStatusCode.FAILURE_UNKNOWN|
164 */
165 setDebugParams(DebugLevel level)
166 generates (HostapdStatus status);
lesl0bad28f2019-12-02 23:48:58 +0800167};