blob: c144f6a03e8c8b5b691ed0ef86188d71abfa13a2 [file] [log] [blame]
Roshan Piusc6dd6012018-08-17 08:32:07 -07001/*
2 * Copyright 2018 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.1;
18
19import @1.0::IHostapd;
20import @1.0::HostapdStatus;
21
22import IHostapdCallback;
23
24/**
25 * Top-level object for managing SoftAPs.
26 */
27interface IHostapd extends @1.0::IHostapd {
28 /**
Daichi Ueurab8907852018-10-17 22:47:21 +090029 * Parameters to specify the channel range for ACS.
30 */
31 struct AcsChannelRange {
32 /**
33 * Channel number (IEEE 802.11) at the start of the range.
34 */
35 uint32_t start;
36 /**
37 * Channel number (IEEE 802.11) at the end of the range.
38 */
39 uint32_t end;
40 };
41
42 /**
43 * Parameters to control the channel selection for the interface.
44 */
45 struct ChannelParams {
46 /**
47 * This option can be used to specify the channels selected by ACS.
48 * If this is an empty list, all channels allowed in selected HW mode
49 * are specified implicitly.
50 * Note: channels may be overridden by firmware.
51 * Note: this option is ignored if ACS is disabled.
52 */
53 vec<AcsChannelRange> acsChannelRanges;
54 };
55
56 /**
57 * Parameters to use for setting up the access point interface.
58 */
59 struct IfaceParams {
60 /**
61 * Baseline information as defined in HAL 1.0.
62 */
63 @1.0::IHostapd.IfaceParams V1_0;
64 /** Additional Channel params for the interface */
65 ChannelParams channelParams;
66 };
67
68 /**
69 * Adds a new access point for hostapd to control.
70 *
71 * This should trigger the setup of an access point with the specified
72 * interface and network params.
73 *
74 * @param ifaceParams AccessPoint Params for the access point.
75 * @param nwParams Network Params for the access point.
76 * @return status Status of the operation.
77 * Possible status codes:
78 * |HostapdStatusCode.SUCCESS|,
79 * |HostapdStatusCode.FAILURE_ARGS_INVALID|,
80 * |HostapdStatusCode.FAILURE_UNKNOWN|,
81 * |HostapdStatusCode.FAILURE_IFACE_EXISTS|
82 */
83 addAccessPoint_1_1(IfaceParams ifaceParams, NetworkParams nwParams)
84 generates(HostapdStatus status);
85
86 /**
Roshan Piusc6dd6012018-08-17 08:32:07 -070087 * Register for callbacks from the hostapd service.
88 *
89 * These callbacks are invoked for global events that are not specific
90 * to any interface or network. Registration of multiple callback
91 * objects is supported. These objects must be deleted when the corresponding
92 * client process is dead.
93 *
94 * @param callback An instance of the |IHostapdCallback| HIDL interface
95 * object.
96 * @return status Status of the operation.
97 * Possible status codes:
98 * |HostapdStatusCode.SUCCESS|,
99 * |HostapdStatusCode.FAILURE_UNKNOWN|
100 */
101 registerCallback(IHostapdCallback callback)
102 generates (HostapdStatus status);
103};