65caf76788
1. Add new 1.3::IfaceParams to support AP+AP. 2. Fix vts to match use the 1.3::IfaceParams But the test on dual APs mode needs to add after vendor Hal ready to create two interfaces. AP+AP Part 1 includes: 1. HIDL: Hostapd support dual bands/channels configuration 2. Framework: HostapdHal support only 3. Hostapd deamon: a. Support briged interface query b. Support config dual bands/channel c. Callback use bridge interface in dual APs mode. Bug: 162686273 Test: atest -c VtsHalWifiHostapdV1_3TargetTest Test: atest -c VtsHalWifiHostapdV1_2TargetTest Test: atest -c VtsHalWifiHostapdV1_1TargetTest Test: atest -c VtsHalWifiHostapdV1_0TargetTest Change-Id: I621b303c1e1f36996ca9b7720242f134bbe5fd75
126 lines
4 KiB
Text
126 lines
4 KiB
Text
/*
|
|
* Copyright 2020 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package android.hardware.wifi.hostapd@1.3;
|
|
|
|
import @1.2::HostapdStatus;
|
|
import @1.2::IHostapd.IfaceParams;
|
|
import @1.2::IHostapd.NetworkParams;
|
|
import @1.2::IHostapd;
|
|
import IHostapdCallback;
|
|
|
|
/**
|
|
* Top-level object for managing SoftAPs.
|
|
*/
|
|
interface IHostapd extends @1.2::IHostapd {
|
|
|
|
/**
|
|
* Parameters to control the channel selection for the interface.
|
|
*/
|
|
struct ChannelParams {
|
|
/**
|
|
* Baseline information as defined in HAL 1.2.
|
|
*
|
|
* Includes bandMask and acsChannelFreqRangesMhz
|
|
*/
|
|
@1.2::IHostapd.ChannelParams V1_2;
|
|
|
|
/**
|
|
* Whether to enable ACS (Automatic Channel Selection) or not.
|
|
* The channel can be selected automatically at run time by setting
|
|
* this flag, which must enable the ACS survey based algorithm.
|
|
*
|
|
* Note: It is used instead of V1_0::ChannelParams.enableAcs inside
|
|
* V1_3::IfaceParams.V1_2.V1_1.V1_0.
|
|
*/
|
|
bool enableAcs;
|
|
|
|
/**
|
|
* Channel number (IEEE 802.11) to use for the interface.
|
|
* If ACS is enabled, this field is ignored.
|
|
*
|
|
* Note: It is used instead of V1_0::ChannelParams.channel inside
|
|
* V1_3::IfaceParams.V1_2.V1_1.V1_0.
|
|
*/
|
|
uint32_t channel;
|
|
};
|
|
|
|
/**
|
|
* Parameters to use for setting up the dual access point interfaces.
|
|
*/
|
|
struct IfaceParams {
|
|
/**
|
|
* Baseline information as defined in HAL 1.2.
|
|
*/
|
|
@1.2::IHostapd.IfaceParams V1_2;
|
|
|
|
/**
|
|
* The list of the channel params for the dual interfaces.
|
|
*/
|
|
vec<ChannelParams> channelParamsList;
|
|
};
|
|
|
|
/**
|
|
* Parameters to use for setting up the access point network.
|
|
*/
|
|
struct NetworkParams {
|
|
/**
|
|
* Baseline information as defined in HAL 1.2.
|
|
*/
|
|
@1.2::IHostapd.NetworkParams V1_2;
|
|
|
|
/**
|
|
* Enable the interworking service and set access network type to
|
|
* CHARGEABLE_PUBLIC_NETWORK when set to true.
|
|
*/
|
|
bool isMetered;
|
|
};
|
|
|
|
/**
|
|
* Adds a new access point for hostapd to control.
|
|
*
|
|
* This should trigger the setup of an access point with the specified
|
|
* interface and network params.
|
|
*
|
|
* @param ifaceParams AccessPoint Params for the access point.
|
|
* @param nwParams Network Params for the access point.
|
|
* @return status Status of the operation.
|
|
* Possible status codes:
|
|
* |HostapdStatusCode.SUCCESS|,
|
|
* |HostapdStatusCode.FAILURE_ARGS_INVALID|,
|
|
* |HostapdStatusCode.FAILURE_UNKNOWN|,
|
|
* |HostapdStatusCode.FAILURE_IFACE_EXISTS|
|
|
*/
|
|
addAccessPoint_1_3(IfaceParams ifaceParams, NetworkParams nwParams)
|
|
generates (HostapdStatus status);
|
|
|
|
/**
|
|
* Register for callbacks from the hostapd service.
|
|
*
|
|
* These callbacks are invoked for global events that are not specific
|
|
* to any interface or network. Registration of multiple callback
|
|
* objects is supported. These objects must be deleted when the corresponding
|
|
* client process is dead.
|
|
*
|
|
* @param callback An instance of the |IHostapdCallback| HIDL interface
|
|
* object.
|
|
* @return status Status of the operation.
|
|
* Possible status codes:
|
|
* |HostapdStatusCode.SUCCESS|,
|
|
* |HostapdStatusCode.FAILURE_UNKNOWN|
|
|
*/
|
|
registerCallback_1_3(IHostapdCallback callback) generates (HostapdStatus status);
|
|
};
|