blob: 1bac1e7897b9fb0687699d639695141d9a01b2b4 [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;
24
25/**
26 * Top-level object for managing SoftAPs.
27 */
28interface IHostapd extends @1.1::IHostapd {
29 /**
Ahmed ElArabawyc828cff2019-11-15 19:36:03 -080030 * Band bitmMask to use for the SoftAp operations.
31 * A combinatoin of these bits are used to identify the allowed bands
32 * to start the softAp
33 */
34 enum BandMask : uint32_t {
35 /**
36 * 2.4 GHz band.
37 */
38 BAND_2_GHZ = 1 << 0,
39 /**
40 * 5 GHz band.
41 */
42 BAND_5_GHZ = 1 << 1,
43 /**
44 * 6 GHz band.
45 */
46 BAND_6_GHZ = 1 << 2,
47 };
48
49 /**
50 * Parameters to control the HW mode for the interface.
51 */
52 struct HwModeParams {
53 /**
54 * Whether IEEE 802.11ax (HE) is enabled or not.
55 * Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
56 * used with HE.
57 */
58 bool enable80211AX;
59 /**
60 * Whether 6GHz band enabled or not on softAp.
61 * Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
62 * used.
63 */
64 bool enable6GhzBand;
65 };
66
67 /**
68 * Parameters to control the channel selection for the interface.
69 */
70 struct ChannelParams {
71 /**
72 * Band to use for the SoftAp operations.
73 */
74 bitfield<BandMask> bandMask;
75 };
76
77 /**
78 * Parameters to use for setting up the access point interface.
79 */
80 struct IfaceParams {
81 /**
82 * Baseline information as defined in HAL 1.1.
83 */
84 @1.1::IHostapd.IfaceParams V1_1;
85 /** Additional Hw mode params for the interface */
86 HwModeParams hwModeParams;
87 /** Additional Channel params for the interface */
88 ChannelParams channelParams;
89 };
90
91 /**
92 * Adds a new access point for hostapd to control.
93 *
94 * This should trigger the setup of an access point with the specified
95 * interface and network params.
96 *
97 * @param ifaceParams AccessPoint Params for the access point.
98 * @param nwParams Network Params for the access point.
99 * @return status Status of the operation.
100 * Possible status codes:
101 * |HostapdStatusCode.SUCCESS|,
102 * |HostapdStatusCode.FAILURE_ARGS_INVALID|,
103 * |HostapdStatusCode.FAILURE_UNKNOWN|,
104 * |HostapdStatusCode.FAILURE_IFACE_EXISTS|
105 */
106 addAccessPoint_1_2(IfaceParams ifaceParams, NetworkParams nwParams)
107 generates(HostapdStatus status);
108
109 /**
lesl0bad28f2019-12-02 23:48:58 +0800110 * force one of the hotspot clients disconnect..
111 *
112 * @param ifaceName Name of the interface.
113 * @param clientAddress Mac Address of the hotspot client.
114 * @param reasonCode One of disconnect reason code which defined by 802.11.
115 * @return status Status of the operation.
116 * Possible status codes:
117 * |HostapdStatusCode.SUCCESS|,
118 * |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|
119 * |HostapdStatusCode.FAILURE_CLIENT_UNKNOWN|
120 */
121 forceClientDisconnect(string ifaceName, MacAddress clientAddress,
122 Ieee80211ReasonCode reasonCode) generates (HostapdStatus status);
123};