mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Add Wifi HAL hostapd AIDL interface definitions." am: 7218fea0eb am: 279105a643 am: 0eba61dbbb am: 9672ab0f81
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1811377 Change-Id: Ib253e67146ceb660f24b3edd36c91c94df7b80bd
This commit is contained in:
@@ -640,6 +640,14 @@
|
|||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
</interface>
|
</interface>
|
||||||
</hal>
|
</hal>
|
||||||
|
<hal format="aidl" optional="true">
|
||||||
|
<name>android.hardware.wifi.hostapd</name>
|
||||||
|
<version>1</version>
|
||||||
|
<interface>
|
||||||
|
<name>IHostapd</name>
|
||||||
|
<instance>default</instance>
|
||||||
|
</interface>
|
||||||
|
</hal>
|
||||||
<hal format="hidl" optional="true">
|
<hal format="hidl" optional="true">
|
||||||
<name>android.hardware.wifi.supplicant</name>
|
<name>android.hardware.wifi.supplicant</name>
|
||||||
<version>1.2-4</version>
|
<version>1.2-4</version>
|
||||||
|
|||||||
37
wifi/hostapd/aidl/Android.bp
Normal file
37
wifi/hostapd/aidl/Android.bp
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
// Copyright (C) 2021 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.
|
||||||
|
|
||||||
|
aidl_interface {
|
||||||
|
name: "android.hardware.wifi.hostapd",
|
||||||
|
vendor_available: true,
|
||||||
|
srcs: [
|
||||||
|
"android/hardware/wifi/hostapd/*.aidl",
|
||||||
|
],
|
||||||
|
stability: "vintf",
|
||||||
|
backend: {
|
||||||
|
java: {
|
||||||
|
sdk_version: "module_current",
|
||||||
|
apex_available: [
|
||||||
|
"//apex_available:platform",
|
||||||
|
"com.android.wifi",
|
||||||
|
],
|
||||||
|
min_sdk_version: "30",
|
||||||
|
},
|
||||||
|
ndk: {
|
||||||
|
vndk: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
parcelable ApInfo {
|
||||||
|
String ifaceName;
|
||||||
|
String apIfaceInstance;
|
||||||
|
int freqMhz;
|
||||||
|
android.hardware.wifi.hostapd.Bandwidth bandwidth;
|
||||||
|
android.hardware.wifi.hostapd.Generation generation;
|
||||||
|
byte[] apIfaceInstanceMacAddress;
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum BandMask {
|
||||||
|
BAND_2_GHZ = 1,
|
||||||
|
BAND_5_GHZ = 2,
|
||||||
|
BAND_6_GHZ = 4,
|
||||||
|
BAND_60_GHZ = 8,
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum Bandwidth {
|
||||||
|
BANDWIDTH_INVALID = 0,
|
||||||
|
BANDWIDTH_20_NOHT = 1,
|
||||||
|
BANDWIDTH_20 = 2,
|
||||||
|
BANDWIDTH_40 = 3,
|
||||||
|
BANDWIDTH_80 = 4,
|
||||||
|
BANDWIDTH_80P80 = 5,
|
||||||
|
BANDWIDTH_160 = 6,
|
||||||
|
BANDWIDTH_2160 = 7,
|
||||||
|
BANDWIDTH_4320 = 8,
|
||||||
|
BANDWIDTH_6480 = 9,
|
||||||
|
BANDWIDTH_8640 = 10,
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
parcelable ChannelParams {
|
||||||
|
android.hardware.wifi.hostapd.BandMask bandMask;
|
||||||
|
android.hardware.wifi.hostapd.FrequencyRange[] acsChannelFreqRangesMhz;
|
||||||
|
boolean enableAcs;
|
||||||
|
boolean acsShouldExcludeDfs;
|
||||||
|
int channel;
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
parcelable ClientInfo {
|
||||||
|
String ifaceName;
|
||||||
|
String apIfaceInstance;
|
||||||
|
byte[] clientAddress;
|
||||||
|
boolean isConnected;
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum DebugLevel {
|
||||||
|
EXCESSIVE = 0,
|
||||||
|
MSGDUMP = 1,
|
||||||
|
DEBUG = 2,
|
||||||
|
INFO = 3,
|
||||||
|
WARNING = 4,
|
||||||
|
ERROR = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum EncryptionType {
|
||||||
|
NONE = 0,
|
||||||
|
WPA = 1,
|
||||||
|
WPA2 = 2,
|
||||||
|
WPA3_SAE_TRANSITION = 3,
|
||||||
|
WPA3_SAE = 4,
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
parcelable FrequencyRange {
|
||||||
|
int startMhz;
|
||||||
|
int endMhz;
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum Generation {
|
||||||
|
WIFI_STANDARD_UNKNOWN = -1,
|
||||||
|
WIFI_STANDARD_LEGACY = 0,
|
||||||
|
WIFI_STANDARD_11N = 1,
|
||||||
|
WIFI_STANDARD_11AC = 2,
|
||||||
|
WIFI_STANDARD_11AX = 3,
|
||||||
|
WIFI_STANDARD_11AD = 4,
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum HostapdStatusCode {
|
||||||
|
SUCCESS = 0,
|
||||||
|
FAILURE_UNKNOWN = 1,
|
||||||
|
FAILURE_ARGS_INVALID = 2,
|
||||||
|
FAILURE_IFACE_UNKNOWN = 3,
|
||||||
|
FAILURE_IFACE_EXISTS = 4,
|
||||||
|
FAILURE_CLIENT_UNKNOWN = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
parcelable HwModeParams {
|
||||||
|
boolean enable80211N;
|
||||||
|
boolean enable80211AC;
|
||||||
|
boolean enable80211AX;
|
||||||
|
boolean enable6GhzBand;
|
||||||
|
boolean enableHeSingleUserBeamformer;
|
||||||
|
boolean enableHeSingleUserBeamformee;
|
||||||
|
boolean enableHeMultiUserBeamformer;
|
||||||
|
boolean enableHeTargetWakeTime;
|
||||||
|
boolean enableEdmg;
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
interface IHostapd {
|
||||||
|
void addAccessPoint(in android.hardware.wifi.hostapd.IfaceParams ifaceParams, in android.hardware.wifi.hostapd.NetworkParams nwParams);
|
||||||
|
void forceClientDisconnect(in String ifaceName, in byte[] clientAddress, in android.hardware.wifi.hostapd.Ieee80211ReasonCode reasonCode);
|
||||||
|
void registerCallback(in android.hardware.wifi.hostapd.IHostapdCallback callback);
|
||||||
|
void removeAccessPoint(in String ifaceName);
|
||||||
|
void setDebugParams(in android.hardware.wifi.hostapd.DebugLevel level);
|
||||||
|
oneway void terminate();
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
interface IHostapdCallback {
|
||||||
|
oneway void onApInstanceInfoChanged(in android.hardware.wifi.hostapd.ApInfo apInfo);
|
||||||
|
oneway void onConnectedClientsChanged(in android.hardware.wifi.hostapd.ClientInfo clientInfo);
|
||||||
|
oneway void onFailure(in String ifaceName);
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum Ieee80211ReasonCode {
|
||||||
|
WLAN_REASON_UNSPECIFIED = 1,
|
||||||
|
WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
|
||||||
|
WLAN_REASON_DISASSOC_AP_BUSY = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
parcelable IfaceParams {
|
||||||
|
String name;
|
||||||
|
android.hardware.wifi.hostapd.HwModeParams hwModeParams;
|
||||||
|
android.hardware.wifi.hostapd.ChannelParams[] channelParams;
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@VintfStability
|
||||||
|
parcelable NetworkParams {
|
||||||
|
byte[] ssid;
|
||||||
|
boolean isHidden;
|
||||||
|
android.hardware.wifi.hostapd.EncryptionType encryptionType;
|
||||||
|
String passphrase;
|
||||||
|
boolean isMetered;
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
|
||||||
|
// two cases:
|
||||||
|
// 1). this is a frozen version file - do not edit this in any case.
|
||||||
|
// 2). this is a 'current' file. If you make a backwards compatible change to
|
||||||
|
// the interface (from the latest frozen version), the build system will
|
||||||
|
// prompt you to update this file with `m <name>-update-api`.
|
||||||
|
//
|
||||||
|
// You must not make a backward incompatible change to any AIDL file built
|
||||||
|
// with the aidl_interface module type with versions property set. The module
|
||||||
|
// type is used to build AIDL files in a way that they can be used across
|
||||||
|
// independently updatable components of the system. If a device is shipped
|
||||||
|
// with such a backward incompatible change, it has a high risk of breaking
|
||||||
|
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||||
|
|
||||||
|
package android.hardware.wifi.hostapd;
|
||||||
|
@Backing(type="int") @VintfStability
|
||||||
|
enum ParamSizeLimits {
|
||||||
|
SSID_MAX_LEN_IN_BYTES = 32,
|
||||||
|
WPA2_PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8,
|
||||||
|
WPA2_PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63,
|
||||||
|
}
|
||||||
60
wifi/hostapd/aidl/android/hardware/wifi/hostapd/ApInfo.aidl
Normal file
60
wifi/hostapd/aidl/android/hardware/wifi/hostapd/ApInfo.aidl
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
import android.hardware.wifi.hostapd.Bandwidth;
|
||||||
|
import android.hardware.wifi.hostapd.Generation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters to control the channel selection for the interface.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
parcelable ApInfo {
|
||||||
|
/**
|
||||||
|
* Name of the interface which was added via |IHostapd.addAccessPoint|.
|
||||||
|
*/
|
||||||
|
String ifaceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identity of the AP instance. The interface will have two instances
|
||||||
|
* (e.g. 2.4 Ghz AP and 5 GHz AP) in dual AP mode.
|
||||||
|
* The apIfaceInstance can be used to identify which instance the callback
|
||||||
|
* is from.
|
||||||
|
* Note: The apIfaceInstance must be same as ifaceName in single AP mode.
|
||||||
|
*/
|
||||||
|
String apIfaceInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The operational frequency of the AP in Mhz.
|
||||||
|
*/
|
||||||
|
int freqMhz;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The operational bandwidth of the AP.
|
||||||
|
*/
|
||||||
|
Bandwidth bandwidth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The operational mode of the AP (e.g. 11ac, 11ax).
|
||||||
|
*/
|
||||||
|
Generation generation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MAC Address of the apIfaceInstance.
|
||||||
|
*/
|
||||||
|
byte[] apIfaceInstanceMacAddress;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum BandMask {
|
||||||
|
/**
|
||||||
|
* 2.4 GHz band.
|
||||||
|
*/
|
||||||
|
BAND_2_GHZ = 1 << 0,
|
||||||
|
/**
|
||||||
|
* 5 GHz band.
|
||||||
|
*/
|
||||||
|
BAND_5_GHZ = 1 << 1,
|
||||||
|
/**
|
||||||
|
* 6 GHz band.
|
||||||
|
*/
|
||||||
|
BAND_6_GHZ = 1 << 2,
|
||||||
|
/**
|
||||||
|
* 60 GHz band.
|
||||||
|
*/
|
||||||
|
BAND_60_GHZ = 1 << 3,
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The channel bandwidth of the AP.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum Bandwidth {
|
||||||
|
BANDWIDTH_INVALID = 0,
|
||||||
|
BANDWIDTH_20_NOHT = 1,
|
||||||
|
BANDWIDTH_20 = 2,
|
||||||
|
BANDWIDTH_40 = 3,
|
||||||
|
BANDWIDTH_80 = 4,
|
||||||
|
BANDWIDTH_80P80 = 5,
|
||||||
|
BANDWIDTH_160 = 6,
|
||||||
|
BANDWIDTH_2160 = 7,
|
||||||
|
BANDWIDTH_4320 = 8,
|
||||||
|
BANDWIDTH_6480 = 9,
|
||||||
|
BANDWIDTH_8640 = 10,
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
import android.hardware.wifi.hostapd.BandMask;
|
||||||
|
import android.hardware.wifi.hostapd.FrequencyRange;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters to control the channel selection for the interface.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
parcelable ChannelParams {
|
||||||
|
/**
|
||||||
|
* Band to use for the SoftAp operations.
|
||||||
|
*/
|
||||||
|
BandMask bandMask;
|
||||||
|
/**
|
||||||
|
* This option can be used to specify the channel frequencies (in MHz) selected by ACS.
|
||||||
|
* If this is an empty list, all channels allowed in selected HW mode
|
||||||
|
* are specified implicitly.
|
||||||
|
* Note: channels may be overridden by firmware.
|
||||||
|
* Note: this option is ignored if ACS is disabled.
|
||||||
|
*/
|
||||||
|
FrequencyRange[] acsChannelFreqRangesMhz;
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
boolean enableAcs;
|
||||||
|
/**
|
||||||
|
* This option can be used to exclude all DFS channels from the ACS
|
||||||
|
* channel list in cases where the driver supports DFS channels.
|
||||||
|
**/
|
||||||
|
boolean acsShouldExcludeDfs;
|
||||||
|
/**
|
||||||
|
* Channel number (IEEE 802.11) to use for the interface.
|
||||||
|
* If ACS is enabled, this field is ignored.
|
||||||
|
*
|
||||||
|
* If |enableEdmg| is true, the channel must be set. Refer to
|
||||||
|
* P802.11ay_D4.0 29.3.4.
|
||||||
|
*/
|
||||||
|
int channel;
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters to control the channel selection for the interface.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
parcelable ClientInfo {
|
||||||
|
/**
|
||||||
|
* Name of the interface which was added via |IHostapd.addAccessPoint|.
|
||||||
|
*/
|
||||||
|
String ifaceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identity of the AP instance. The interface will have two instances in dual AP mode.
|
||||||
|
* The apIfaceInstance can be used to identify which instance the callback is from.
|
||||||
|
* Note: The apIfaceInstance must be same as ifaceName in single AP mode.
|
||||||
|
*/
|
||||||
|
String apIfaceInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MAC Address of hotspot client.
|
||||||
|
*/
|
||||||
|
byte[] clientAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True when client connected, false when client disconnected.
|
||||||
|
*/
|
||||||
|
boolean isConnected;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug levels for the hostapd.
|
||||||
|
* Only log messages with a level greater than the set level
|
||||||
|
* (via |setDebugParams|) will be logged.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum DebugLevel {
|
||||||
|
EXCESSIVE = 0,
|
||||||
|
MSGDUMP = 1,
|
||||||
|
DEBUG = 2,
|
||||||
|
INFO = 3,
|
||||||
|
WARNING = 4,
|
||||||
|
ERROR = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
import android.hardware.wifi.hostapd.EncryptionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Possible Security types.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum EncryptionType {
|
||||||
|
NONE,
|
||||||
|
WPA,
|
||||||
|
WPA2,
|
||||||
|
WPA3_SAE_TRANSITION,
|
||||||
|
WPA3_SAE,
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters to specify the channel frequency range.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
parcelable FrequencyRange {
|
||||||
|
/**
|
||||||
|
* Channel Frequency (in MHz) at the start of the range.
|
||||||
|
*/
|
||||||
|
int startMhz;
|
||||||
|
/**
|
||||||
|
* Channel Frequency (in MHz) at the end of the range.
|
||||||
|
*/
|
||||||
|
int endMhz;
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The wifi operational mode of the AP.
|
||||||
|
* It depends on hw mode and HT/VHT capabilities in hostapd.
|
||||||
|
*
|
||||||
|
* WIFI_STANDARD_LEGACY = (hw_mode is HOSTAPD_MODE_IEEE80211B) or
|
||||||
|
* (hw_mode is HOSTAPD_MODE_IEEE80211G and HT is 0).
|
||||||
|
* WIFI_STANDARD_11N = [hw_mode is HOSTAPD_MODE_IEEE80211G and (HT is 1 or HT40 is 1)] or
|
||||||
|
* [hw_mode is HOSTAPD_MODE_IEEE80211A and VHT is 0].
|
||||||
|
* WIFI_STANDARD_11AC = hw_mode is HOSTAPD_MODE_IEEE80211A and VHT is 1.
|
||||||
|
* WIFI_STANDARD_11AX = hw_mode is HOSTAPD_MODE_IEEE80211A and High Efficiency supported.
|
||||||
|
* WIFI_STANDARD_11AD = hw_mode is HOSTAPD_MODE_IEEE80211AD.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum Generation {
|
||||||
|
WIFI_STANDARD_UNKNOWN = -1,
|
||||||
|
WIFI_STANDARD_LEGACY = 0,
|
||||||
|
WIFI_STANDARD_11N = 1,
|
||||||
|
WIFI_STANDARD_11AC = 2,
|
||||||
|
WIFI_STANDARD_11AX = 3,
|
||||||
|
WIFI_STANDARD_11AD = 4,
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enum values indicating the status of any hostapd operation.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum HostapdStatusCode {
|
||||||
|
/**
|
||||||
|
* No errors.
|
||||||
|
*/
|
||||||
|
SUCCESS,
|
||||||
|
/**
|
||||||
|
* Unknown failure occurred.
|
||||||
|
*/
|
||||||
|
FAILURE_UNKNOWN,
|
||||||
|
/**
|
||||||
|
* One or more of the incoming args is invalid.
|
||||||
|
*/
|
||||||
|
FAILURE_ARGS_INVALID,
|
||||||
|
/**
|
||||||
|
* Interface with the provided name does not exist.
|
||||||
|
*/
|
||||||
|
FAILURE_IFACE_UNKNOWN,
|
||||||
|
/**
|
||||||
|
* Interface with the provided name already exists.
|
||||||
|
*/
|
||||||
|
FAILURE_IFACE_EXISTS,
|
||||||
|
/**
|
||||||
|
* Failure because the client is unknown.
|
||||||
|
*/
|
||||||
|
FAILURE_CLIENT_UNKNOWN,
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters to control the HW mode for the interface.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
parcelable HwModeParams {
|
||||||
|
/**
|
||||||
|
* Whether IEEE 802.11n (HT) is enabled or not.
|
||||||
|
* Note: hwMode=G (2.4 GHz) and hwMode=A (5 GHz) is used to specify
|
||||||
|
* the band.
|
||||||
|
*/
|
||||||
|
boolean enable80211N;
|
||||||
|
/**
|
||||||
|
* Whether IEEE 802.11ac (VHT) is enabled or not.
|
||||||
|
* Note: hw_mode=a is used to specify that 5 GHz band is used with VHT.
|
||||||
|
*/
|
||||||
|
boolean enable80211AC;
|
||||||
|
/**
|
||||||
|
* Whether IEEE 802.11ax (High Efficiency) is enabled or not.
|
||||||
|
* Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
|
||||||
|
* used with High Efficiency.
|
||||||
|
*/
|
||||||
|
boolean enable80211AX;
|
||||||
|
/**
|
||||||
|
* Whether 6GHz band enabled or not on softAp.
|
||||||
|
* Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
|
||||||
|
* used.
|
||||||
|
*/
|
||||||
|
boolean enable6GhzBand;
|
||||||
|
/**
|
||||||
|
* Whether High Efficiency single user beamformer in enabled or not on softAp.
|
||||||
|
* Note: this is only applicable if 802.11ax is supported for softAp
|
||||||
|
*/
|
||||||
|
boolean enableHeSingleUserBeamformer;
|
||||||
|
/**
|
||||||
|
* Whether High Efficiency single user beamformee is enabled or not on softAp.
|
||||||
|
* Note: this is only applicable if 802.11ax is supported for softAp
|
||||||
|
*/
|
||||||
|
boolean enableHeSingleUserBeamformee;
|
||||||
|
/**
|
||||||
|
* Whether High Efficiency multiple user beamformer is enabled or not on softAp.
|
||||||
|
* Note: this is only applicable if 802.11ax is supported for softAp
|
||||||
|
*/
|
||||||
|
boolean enableHeMultiUserBeamformer;
|
||||||
|
/**
|
||||||
|
* Whether High Efficiency Target Wait Time (TWT) is enabled or not on softAp.
|
||||||
|
* Note: this is only applicable if 802.11ax is supported for softAp
|
||||||
|
*/
|
||||||
|
boolean enableHeTargetWakeTime;
|
||||||
|
/**
|
||||||
|
* Enable EDMG (802.11ay), this option is only allowed for the 60GHz band.
|
||||||
|
*/
|
||||||
|
boolean enableEdmg;
|
||||||
|
}
|
||||||
106
wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapd.aidl
Normal file
106
wifi/hostapd/aidl/android/hardware/wifi/hostapd/IHostapd.aidl
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
import android.hardware.wifi.hostapd.BandMask;
|
||||||
|
import android.hardware.wifi.hostapd.ChannelParams;
|
||||||
|
import android.hardware.wifi.hostapd.DebugLevel;
|
||||||
|
import android.hardware.wifi.hostapd.HwModeParams;
|
||||||
|
import android.hardware.wifi.hostapd.IHostapdCallback;
|
||||||
|
import android.hardware.wifi.hostapd.Ieee80211ReasonCode;
|
||||||
|
import android.hardware.wifi.hostapd.IfaceParams;
|
||||||
|
import android.hardware.wifi.hostapd.NetworkParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Top-level interface for managing SoftAPs.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
interface IHostapd {
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
* @throws ServiceSpecificException with one of the following values:
|
||||||
|
* |HostapdStatusCode.FAILURE_ARGS_INVALID|,
|
||||||
|
* |HostapdStatusCode.FAILURE_UNKNOWN|,
|
||||||
|
* |HostapdStatusCode.FAILURE_IFACE_EXISTS|
|
||||||
|
*/
|
||||||
|
void addAccessPoint(in IfaceParams ifaceParams, in NetworkParams nwParams);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force one of the hotspot clients to disconnect.
|
||||||
|
*
|
||||||
|
* @param ifaceName Name of the interface.
|
||||||
|
* @param clientAddress MAC Address of the hotspot client.
|
||||||
|
* @param reasonCode One of disconnect reason code defined by 802.11.
|
||||||
|
* @throws ServiceSpecificException with one of the following values:
|
||||||
|
* |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|,
|
||||||
|
* |HostapdStatusCode.FAILURE_CLIENT_UNKNOWN|
|
||||||
|
*/
|
||||||
|
void forceClientDisconnect(
|
||||||
|
in String ifaceName, in byte[] clientAddress, in Ieee80211ReasonCode reasonCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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| AIDL interface
|
||||||
|
* object.
|
||||||
|
* @throws ServiceSpecificException with one of the following values:
|
||||||
|
* |HostapdStatusCode.FAILURE_UNKNOWN|
|
||||||
|
*/
|
||||||
|
void registerCallback(in IHostapdCallback callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes an existing access point from hostapd.
|
||||||
|
*
|
||||||
|
* This must bring down the access point previously set up on the
|
||||||
|
* interface.
|
||||||
|
*
|
||||||
|
* @param ifaceName Name of the interface.
|
||||||
|
* @throws ServiceSpecificException with one of the following values:
|
||||||
|
* |HostapdStatusCode.FAILURE_UNKNOWN|,
|
||||||
|
* |HostapdStatusCode.FAILURE_IFACE_UNKNOWN|
|
||||||
|
*/
|
||||||
|
void removeAccessPoint(in String ifaceName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set debug parameters for the hostapd.
|
||||||
|
*
|
||||||
|
* @param level Debug logging level for the hostapd.
|
||||||
|
* (one of |DebugLevel| values).
|
||||||
|
* @throws ServiceSpecificException with one of the following values:
|
||||||
|
* |HostapdStatusCode.FAILURE_UNKNOWN|
|
||||||
|
*/
|
||||||
|
void setDebugParams(in DebugLevel level);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Terminate the service.
|
||||||
|
* This must de-register the service and clear all states. If this HAL
|
||||||
|
* supports the lazy HAL protocol, then this may trigger daemon to exit and
|
||||||
|
* wait to be restarted.
|
||||||
|
*/
|
||||||
|
oneway void terminate();
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
import android.hardware.wifi.hostapd.ApInfo;
|
||||||
|
import android.hardware.wifi.hostapd.ClientInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Top-level callback interface for managing SoftAPs.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
interface IHostapdCallback {
|
||||||
|
/**
|
||||||
|
* Invoked when information changes for one of the AP instances.
|
||||||
|
*
|
||||||
|
* @param apInfo AP information of the instance changed.
|
||||||
|
*/
|
||||||
|
oneway void onApInstanceInfoChanged(in ApInfo apInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when a client connects/disconnects from the hotspot.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
oneway void onConnectedClientsChanged(in ClientInfo clientInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when an asynchronous failure is encountered in one of the access
|
||||||
|
* points added via |IHostapd.addAccessPoint|.
|
||||||
|
*
|
||||||
|
* @param ifaceName Name of the interface.
|
||||||
|
*/
|
||||||
|
oneway void onFailure(in String ifaceName);
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enum values indicating the reason code for disconnect packet.
|
||||||
|
* Reason codes (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45).
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum Ieee80211ReasonCode {
|
||||||
|
WLAN_REASON_UNSPECIFIED = 1,
|
||||||
|
WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
|
||||||
|
WLAN_REASON_DISASSOC_AP_BUSY = 5,
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
import android.hardware.wifi.hostapd.ChannelParams;
|
||||||
|
import android.hardware.wifi.hostapd.HwModeParams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters to use for setting up the dual access point interfaces.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
parcelable IfaceParams {
|
||||||
|
/**
|
||||||
|
* Name of the interface
|
||||||
|
*/
|
||||||
|
String name;
|
||||||
|
/**
|
||||||
|
* Additional hardware mode params for the interface
|
||||||
|
*/
|
||||||
|
HwModeParams hwModeParams;
|
||||||
|
/**
|
||||||
|
* The list of the channel params for the dual interfaces.
|
||||||
|
*/
|
||||||
|
ChannelParams[] channelParams;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
import android.hardware.wifi.hostapd.EncryptionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters to use for setting up the access point network.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
parcelable NetworkParams {
|
||||||
|
/**
|
||||||
|
* SSID to set for the network
|
||||||
|
*/
|
||||||
|
byte[] ssid;
|
||||||
|
/**
|
||||||
|
* Whether the network needs to be hidden or not.
|
||||||
|
*/
|
||||||
|
boolean isHidden;
|
||||||
|
/**
|
||||||
|
* Key management mask for the replace encryptionType.
|
||||||
|
*/
|
||||||
|
EncryptionType encryptionType;
|
||||||
|
/**
|
||||||
|
* Passphrase for WPA3_SAE network, WPA3_SAE_TRANSITION and WPA2_PSK.
|
||||||
|
*/
|
||||||
|
String passphrase;
|
||||||
|
/**
|
||||||
|
* Enable the interworking service and set access network type to
|
||||||
|
* CHARGEABLE_PUBLIC_NETWORK when set to true.
|
||||||
|
*/
|
||||||
|
boolean isMetered;
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Size limits for some of the params used in this interface.
|
||||||
|
*/
|
||||||
|
@VintfStability
|
||||||
|
@Backing(type="int")
|
||||||
|
enum ParamSizeLimits {
|
||||||
|
/**
|
||||||
|
* Max length of SSID param.
|
||||||
|
*/
|
||||||
|
SSID_MAX_LEN_IN_BYTES = 32,
|
||||||
|
/**
|
||||||
|
* Min length of PSK passphrase param.
|
||||||
|
*/
|
||||||
|
WPA2_PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8,
|
||||||
|
/**
|
||||||
|
* Max length of PSK passphrase param.
|
||||||
|
*/
|
||||||
|
WPA2_PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63,
|
||||||
|
}
|
||||||
2
wifi/hostapd/aidl/vts/OWNERS
Normal file
2
wifi/hostapd/aidl/vts/OWNERS
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
etancohen@google.com
|
||||||
|
lzye@google.com
|
||||||
27
wifi/hostapd/aidl/vts/functional/Android.bp
Normal file
27
wifi/hostapd/aidl/vts/functional/Android.bp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package {
|
||||||
|
// See: http://go/android-license-faq
|
||||||
|
// A large-scale-change added 'default_applicable_licenses' to import
|
||||||
|
// all of the 'license_kinds' from "hardware_interfaces_license"
|
||||||
|
// to get the below license kinds:
|
||||||
|
// SPDX-license-identifier-Apache-2.0
|
||||||
|
default_applicable_licenses: ["hardware_interfaces_license"],
|
||||||
|
}
|
||||||
|
|
||||||
|
cc_test {
|
||||||
|
name: "VtsHalHostapdTargetTest",
|
||||||
|
defaults: [
|
||||||
|
"VtsHalTargetTestDefaults",
|
||||||
|
"use_libaidlvintf_gtest_helper_static",
|
||||||
|
],
|
||||||
|
srcs: ["VtsHalHostapdTargetTest.cpp"],
|
||||||
|
shared_libs: [
|
||||||
|
"libbinder",
|
||||||
|
],
|
||||||
|
static_libs: [
|
||||||
|
"android.hardware.wifi.hostapd-V1-cpp",
|
||||||
|
],
|
||||||
|
test_suites: [
|
||||||
|
"general-tests",
|
||||||
|
"vts",
|
||||||
|
],
|
||||||
|
}
|
||||||
417
wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp
Normal file
417
wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp
Normal file
@@ -0,0 +1,417 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
#include <VtsCoreUtil.h>
|
||||||
|
|
||||||
|
#include <aidl/Gtest.h>
|
||||||
|
#include <aidl/Vintf.h>
|
||||||
|
#include <android/hardware/wifi/hostapd/BnHostapd.h>
|
||||||
|
#include <binder/IServiceManager.h>
|
||||||
|
#include <binder/ProcessState.h>
|
||||||
|
|
||||||
|
using android::ProcessState;
|
||||||
|
using android::sp;
|
||||||
|
using android::String16;
|
||||||
|
using android::hardware::wifi::hostapd::BandMask;
|
||||||
|
using android::hardware::wifi::hostapd::ChannelParams;
|
||||||
|
using android::hardware::wifi::hostapd::DebugLevel;
|
||||||
|
using android::hardware::wifi::hostapd::EncryptionType;
|
||||||
|
using android::hardware::wifi::hostapd::FrequencyRange;
|
||||||
|
using android::hardware::wifi::hostapd::Ieee80211ReasonCode;
|
||||||
|
using android::hardware::wifi::hostapd::IfaceParams;
|
||||||
|
using android::hardware::wifi::hostapd::IHostapd;
|
||||||
|
using android::hardware::wifi::hostapd::NetworkParams;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const unsigned char kNwSsid[] = {'t', 'e', 's', 't', '1', '2', '3', '4', '5'};
|
||||||
|
const String16 kIfaceName = String16("wlan0");
|
||||||
|
const String16 kPassphrase = String16("test12345");
|
||||||
|
const String16 kInvalidMinPassphrase = String16("test");
|
||||||
|
const String16 kInvalidMaxPassphrase = String16(
|
||||||
|
"0123456789012345678901234567890123456789012345678901234567890123456789");
|
||||||
|
const int kIfaceChannel = 6;
|
||||||
|
const int kIfaceInvalidChannel = 567;
|
||||||
|
const std::vector<uint8_t> kTestZeroMacAddr(6, 0x0);
|
||||||
|
const Ieee80211ReasonCode kTestDisconnectReasonCode =
|
||||||
|
Ieee80211ReasonCode::WLAN_REASON_UNSPECIFIED;
|
||||||
|
|
||||||
|
inline BandMask operator|(BandMask a, BandMask b) {
|
||||||
|
return static_cast<BandMask>(static_cast<int32_t>(a) |
|
||||||
|
static_cast<int32_t>(b));
|
||||||
|
}
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
class HostapdAidl : public testing::TestWithParam<std::string> {
|
||||||
|
public:
|
||||||
|
virtual void SetUp() override {
|
||||||
|
hostapd = android::waitForDeclaredService<IHostapd>(
|
||||||
|
String16(GetParam().c_str()));
|
||||||
|
ASSERT_NE(hostapd, nullptr);
|
||||||
|
EXPECT_TRUE(hostapd->setDebugParams(DebugLevel::EXCESSIVE).isOk());
|
||||||
|
isAcsSupport = testing::checkSubstringInCommandOutput(
|
||||||
|
"/system/bin/cmd wifi get-softap-supported-features",
|
||||||
|
"wifi_softap_acs_supported");
|
||||||
|
isWpa3SaeSupport = testing::checkSubstringInCommandOutput(
|
||||||
|
"/system/bin/cmd wifi get-softap-supported-features",
|
||||||
|
"wifi_softap_wpa3_sae_supported");
|
||||||
|
isBridgedSupport = testing::checkSubstringInCommandOutput(
|
||||||
|
"/system/bin/cmd wifi get-softap-supported-features",
|
||||||
|
"wifi_softap_bridged_ap_supported");
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void TearDown() override {
|
||||||
|
hostapd->terminate();
|
||||||
|
// Wait 3 seconds to allow terminate to complete
|
||||||
|
sleep(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
sp<IHostapd> hostapd;
|
||||||
|
bool isAcsSupport;
|
||||||
|
bool isWpa3SaeSupport;
|
||||||
|
bool isBridgedSupport;
|
||||||
|
|
||||||
|
IfaceParams getIfaceParamsWithoutAcs(String16 iface_name) {
|
||||||
|
IfaceParams iface_params;
|
||||||
|
ChannelParams channelParams;
|
||||||
|
std::vector<ChannelParams> vec_channelParams;
|
||||||
|
|
||||||
|
iface_params.name = iface_name;
|
||||||
|
iface_params.hwModeParams.enable80211N = true;
|
||||||
|
iface_params.hwModeParams.enable80211AC = false;
|
||||||
|
iface_params.hwModeParams.enable80211AX = false;
|
||||||
|
iface_params.hwModeParams.enable6GhzBand = false;
|
||||||
|
|
||||||
|
channelParams.enableAcs = false;
|
||||||
|
channelParams.acsShouldExcludeDfs = false;
|
||||||
|
channelParams.channel = kIfaceChannel;
|
||||||
|
channelParams.bandMask = BandMask::BAND_2_GHZ;
|
||||||
|
|
||||||
|
vec_channelParams.push_back(channelParams);
|
||||||
|
iface_params.channelParams = vec_channelParams;
|
||||||
|
return iface_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
IfaceParams getIfaceParamsWithBridgedModeACS(String16 iface_name) {
|
||||||
|
IfaceParams iface_params = getIfaceParamsWithoutAcs(iface_name);
|
||||||
|
iface_params.channelParams[0].enableAcs = true;
|
||||||
|
iface_params.channelParams[0].acsShouldExcludeDfs = true;
|
||||||
|
|
||||||
|
std::vector<ChannelParams> vec_channelParams;
|
||||||
|
vec_channelParams.push_back(iface_params.channelParams[0]);
|
||||||
|
|
||||||
|
ChannelParams second_channelParams;
|
||||||
|
second_channelParams.channel = 0;
|
||||||
|
second_channelParams.enableAcs = true;
|
||||||
|
second_channelParams.bandMask = BandMask::BAND_5_GHZ;
|
||||||
|
vec_channelParams.push_back(second_channelParams);
|
||||||
|
|
||||||
|
iface_params.channelParams = vec_channelParams;
|
||||||
|
return iface_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
IfaceParams getIfaceParamsWithAcs(String16 iface_name) {
|
||||||
|
IfaceParams iface_params = getIfaceParamsWithoutAcs(iface_name);
|
||||||
|
iface_params.channelParams[0].enableAcs = true;
|
||||||
|
iface_params.channelParams[0].acsShouldExcludeDfs = true;
|
||||||
|
iface_params.channelParams[0].channel = 0;
|
||||||
|
iface_params.channelParams[0].bandMask =
|
||||||
|
iface_params.channelParams[0].bandMask | BandMask::BAND_5_GHZ;
|
||||||
|
return iface_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
IfaceParams getIfaceParamsWithAcsAndFreqRange(String16 iface_name) {
|
||||||
|
IfaceParams iface_params = getIfaceParamsWithAcs(iface_name);
|
||||||
|
FrequencyRange freqRange;
|
||||||
|
freqRange.startMhz = 2412;
|
||||||
|
freqRange.endMhz = 2462;
|
||||||
|
std::vector<FrequencyRange> vec_FrequencyRange;
|
||||||
|
vec_FrequencyRange.push_back(freqRange);
|
||||||
|
iface_params.channelParams[0].acsChannelFreqRangesMhz =
|
||||||
|
vec_FrequencyRange;
|
||||||
|
return iface_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
IfaceParams getIfaceParamsWithAcsAndInvalidFreqRange(String16 iface_name) {
|
||||||
|
IfaceParams iface_params =
|
||||||
|
getIfaceParamsWithAcsAndFreqRange(iface_name);
|
||||||
|
iface_params.channelParams[0].acsChannelFreqRangesMhz[0].startMhz =
|
||||||
|
222;
|
||||||
|
iface_params.channelParams[0].acsChannelFreqRangesMhz[0].endMhz =
|
||||||
|
999;
|
||||||
|
return iface_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
IfaceParams getIfaceParamsWithInvalidChannel(String16 iface_name) {
|
||||||
|
IfaceParams iface_params = getIfaceParamsWithoutAcs(iface_name);
|
||||||
|
iface_params.channelParams[0].channel = kIfaceInvalidChannel;
|
||||||
|
return iface_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getOpenNwParams() {
|
||||||
|
NetworkParams nw_params;
|
||||||
|
nw_params.ssid =
|
||||||
|
std::vector<uint8_t>(kNwSsid, kNwSsid + sizeof(kNwSsid));
|
||||||
|
nw_params.isHidden = false;
|
||||||
|
nw_params.encryptionType = EncryptionType::NONE;
|
||||||
|
nw_params.isMetered = true;
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getPskNwParamsWithNonMetered() {
|
||||||
|
NetworkParams nw_params = getOpenNwParams();
|
||||||
|
nw_params.encryptionType = EncryptionType::WPA2;
|
||||||
|
nw_params.passphrase = kPassphrase;
|
||||||
|
nw_params.isMetered = false;
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getPskNwParams() {
|
||||||
|
NetworkParams nw_params = getOpenNwParams();
|
||||||
|
nw_params.encryptionType = EncryptionType::WPA2;
|
||||||
|
nw_params.passphrase = kPassphrase;
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getInvalidPskNwParams() {
|
||||||
|
NetworkParams nw_params = getOpenNwParams();
|
||||||
|
nw_params.encryptionType = EncryptionType::WPA2;
|
||||||
|
nw_params.passphrase = kInvalidMaxPassphrase;
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getSaeTransitionNwParams() {
|
||||||
|
NetworkParams nw_params = getOpenNwParams();
|
||||||
|
nw_params.encryptionType = EncryptionType::WPA3_SAE_TRANSITION;
|
||||||
|
nw_params.passphrase = kPassphrase;
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getInvalidSaeTransitionNwParams() {
|
||||||
|
NetworkParams nw_params = getOpenNwParams();
|
||||||
|
nw_params.encryptionType = EncryptionType::WPA2;
|
||||||
|
nw_params.passphrase = kInvalidMinPassphrase;
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getSaeNwParams() {
|
||||||
|
NetworkParams nw_params = getOpenNwParams();
|
||||||
|
nw_params.encryptionType = EncryptionType::WPA3_SAE;
|
||||||
|
nw_params.passphrase = kPassphrase;
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkParams getInvalidSaeNwParams() {
|
||||||
|
NetworkParams nw_params = getOpenNwParams();
|
||||||
|
nw_params.encryptionType = EncryptionType::WPA3_SAE;
|
||||||
|
nw_params.passphrase = String16("");
|
||||||
|
return nw_params;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with PSK network config & ACS enabled.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddPskAccessPointWithAcs) {
|
||||||
|
if (!isAcsSupport) GTEST_SKIP() << "Missing ACS support";
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithAcs(kIfaceName),
|
||||||
|
getPskNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with PSK network config, ACS enabled & frequency Range.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddPskAccessPointWithAcsAndFreqRange) {
|
||||||
|
if (!isAcsSupport) GTEST_SKIP() << "Missing ACS support";
|
||||||
|
auto status = hostapd->addAccessPoint(
|
||||||
|
getIfaceParamsWithAcsAndFreqRange(kIfaceName), getPskNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with invalid channel range.
|
||||||
|
* Access point creation should fail.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddPskAccessPointWithAcsAndInvalidFreqRange) {
|
||||||
|
if (!isAcsSupport) GTEST_SKIP() << "Missing ACS support";
|
||||||
|
auto status = hostapd->addAccessPoint(
|
||||||
|
getIfaceParamsWithAcsAndInvalidFreqRange(kIfaceName), getPskNwParams());
|
||||||
|
EXPECT_FALSE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with Open network config & ACS enabled.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddOpenAccessPointWithAcs) {
|
||||||
|
if (!isAcsSupport) GTEST_SKIP() << "Missing ACS support";
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithAcs(kIfaceName),
|
||||||
|
getOpenNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with PSK network config & ACS disabled.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddPskAccessPointWithoutAcs) {
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getPskNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with PSK network config, ACS disabled & Non metered.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddPskAccessPointWithoutAcsAndNonMetered) {
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getPskNwParamsWithNonMetered());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with Open network config & ACS disabled.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddOpenAccessPointWithoutAcs) {
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getOpenNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with SAE Transition network config & ACS disabled.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddSaeTransitionAccessPointWithoutAcs) {
|
||||||
|
if (!isWpa3SaeSupport) GTEST_SKIP() << "Missing SAE support";
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getSaeTransitionNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with SAE network config & ACS disabled.
|
||||||
|
* Access point creation should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddSAEAccessPointWithoutAcs) {
|
||||||
|
if (!isWpa3SaeSupport) GTEST_SKIP() << "Missing SAE support";
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getSaeNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds & then removes an access point with PSK network config & ACS enabled.
|
||||||
|
* Access point creation & removal should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, RemoveAccessPointWithAcs) {
|
||||||
|
if (!isAcsSupport) GTEST_SKIP() << "Missing ACS support";
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithAcs(kIfaceName),
|
||||||
|
getPskNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
EXPECT_TRUE(hostapd->removeAccessPoint(kIfaceName).isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds & then removes an access point with PSK network config & ACS disabled.
|
||||||
|
* Access point creation & removal should pass.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, RemoveAccessPointWithoutAcs) {
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getPskNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
EXPECT_TRUE(hostapd->removeAccessPoint(kIfaceName).isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with invalid channel.
|
||||||
|
* Access point creation should fail.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddPskAccessPointWithInvalidChannel) {
|
||||||
|
auto status = hostapd->addAccessPoint(
|
||||||
|
getIfaceParamsWithInvalidChannel(kIfaceName), getPskNwParams());
|
||||||
|
EXPECT_FALSE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with invalid PSK network config.
|
||||||
|
* Access point creation should fail.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddInvalidPskAccessPointWithoutAcs) {
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getInvalidPskNwParams());
|
||||||
|
EXPECT_FALSE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with invalid SAE transition network config.
|
||||||
|
* Access point creation should fail.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddInvalidSaeTransitionAccessPointWithoutAcs) {
|
||||||
|
if (!isWpa3SaeSupport) GTEST_SKIP() << "Missing SAE support";
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getInvalidSaeTransitionNwParams());
|
||||||
|
EXPECT_FALSE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an access point with invalid SAE network config.
|
||||||
|
* Access point creation should fail.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddInvalidSaeAccessPointWithoutAcs) {
|
||||||
|
if (!isWpa3SaeSupport) GTEST_SKIP() << "Missing SAE support";
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getInvalidSaeNwParams());
|
||||||
|
EXPECT_FALSE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* forceClientDisconnect should fail when hotspot interface available.
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, DisconnectClientWhenIfacAvailable) {
|
||||||
|
auto status = hostapd->addAccessPoint(getIfaceParamsWithoutAcs(kIfaceName),
|
||||||
|
getOpenNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
|
||||||
|
status = hostapd->forceClientDisconnect(kIfaceName, kTestZeroMacAddr,
|
||||||
|
kTestDisconnectReasonCode);
|
||||||
|
EXPECT_FALSE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AddAccessPointWithDualBandConfig should pass
|
||||||
|
*/
|
||||||
|
TEST_P(HostapdAidl, AddAccessPointWithDualBandConfig) {
|
||||||
|
if (!isBridgedSupport) GTEST_SKIP() << "Missing Bridged AP support";
|
||||||
|
auto status = hostapd->addAccessPoint(
|
||||||
|
getIfaceParamsWithBridgedModeACS(kIfaceName), getOpenNwParams());
|
||||||
|
EXPECT_TRUE(status.isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
|
Hostapd, HostapdAidl,
|
||||||
|
testing::ValuesIn(android::getAidlHalInstanceNames(IHostapd::descriptor)),
|
||||||
|
android::PrintInstanceNameToString);
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
|
ProcessState::self()->setThreadPoolMaxThreadCount(1);
|
||||||
|
ProcessState::self()->startThreadPool();
|
||||||
|
return RUN_ALL_TESTS();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user