blob: be6fe59a29869dcce12e6275237f510fc88b88d2 [file] [log] [blame]
lesldf75bc12020-08-04 17:04:57 +08001/*
2 * Copyright 2020 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.3;
18
lesldf75bc12020-08-04 17:04:57 +080019import @1.2::HostapdStatus;
leslc9d109f2020-09-16 22:45:00 +080020import @1.2::IHostapd.IfaceParams;
21import @1.2::IHostapd.NetworkParams;
22import @1.2::IHostapd;
lesldf75bc12020-08-04 17:04:57 +080023import IHostapdCallback;
lesld91c5402020-08-10 13:23:29 +080024
lesldf75bc12020-08-04 17:04:57 +080025/**
26 * Top-level object for managing SoftAPs.
27 */
28interface IHostapd extends @1.2::IHostapd {
lesl65caf762020-10-30 16:45:25 +080029
30 /**
31 * Parameters to control the channel selection for the interface.
32 */
33 struct ChannelParams {
34 /**
35 * Baseline information as defined in HAL 1.2.
36 *
37 * Includes bandMask and acsChannelFreqRangesMhz
38 */
39 @1.2::IHostapd.ChannelParams V1_2;
40
41 /**
42 * Whether to enable ACS (Automatic Channel Selection) or not.
43 * The channel can be selected automatically at run time by setting
44 * this flag, which must enable the ACS survey based algorithm.
45 *
46 * Note: It is used instead of V1_0::ChannelParams.enableAcs inside
47 * V1_3::IfaceParams.V1_2.V1_1.V1_0.
48 */
49 bool enableAcs;
50
51 /**
52 * Channel number (IEEE 802.11) to use for the interface.
53 * If ACS is enabled, this field is ignored.
54 *
55 * Note: It is used instead of V1_0::ChannelParams.channel inside
56 * V1_3::IfaceParams.V1_2.V1_1.V1_0.
57 */
58 uint32_t channel;
59 };
60
61 /**
62 * Parameters to use for setting up the dual access point interfaces.
63 */
64 struct IfaceParams {
65 /**
66 * Baseline information as defined in HAL 1.2.
67 */
68 @1.2::IHostapd.IfaceParams V1_2;
69
70 /**
71 * The list of the channel params for the dual interfaces.
72 */
73 vec<ChannelParams> channelParamsList;
74 };
75
lesldf75bc12020-08-04 17:04:57 +080076 /**
leslc9d109f2020-09-16 22:45:00 +080077 * Parameters to use for setting up the access point network.
78 */
79 struct NetworkParams {
80 /**
81 * Baseline information as defined in HAL 1.2.
82 */
83 @1.2::IHostapd.NetworkParams V1_2;
84
85 /**
86 * Enable the interworking service and set access network type to
87 * CHARGEABLE_PUBLIC_NETWORK when set to true.
88 */
89 bool isMetered;
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 */
lesl65caf762020-10-30 16:45:25 +0800107 addAccessPoint_1_3(IfaceParams ifaceParams, NetworkParams nwParams)
leslc9d109f2020-09-16 22:45:00 +0800108 generates (HostapdStatus status);
109
110 /**
lesldf75bc12020-08-04 17:04:57 +0800111 * Register for callbacks from the hostapd service.
112 *
113 * These callbacks are invoked for global events that are not specific
114 * to any interface or network. Registration of multiple callback
115 * objects is supported. These objects must be deleted when the corresponding
116 * client process is dead.
117 *
118 * @param callback An instance of the |IHostapdCallback| HIDL interface
119 * object.
120 * @return status Status of the operation.
121 * Possible status codes:
122 * |HostapdStatusCode.SUCCESS|,
123 * |HostapdStatusCode.FAILURE_UNKNOWN|
124 */
lesld91c5402020-08-10 13:23:29 +0800125 registerCallback_1_3(IHostapdCallback callback) generates (HostapdStatus status);
lesldf75bc12020-08-04 17:04:57 +0800126};