Merge "Wifi: add maximum channel bandwidth limit to softAp"

This commit is contained in:
Ahmed ElArabawy
2022-02-09 03:34:07 +00:00
committed by Android (Google) Code Review
7 changed files with 102 additions and 53 deletions

View File

@@ -37,7 +37,7 @@ parcelable ApInfo {
String ifaceName;
String apIfaceInstance;
int freqMhz;
android.hardware.wifi.hostapd.Bandwidth bandwidth;
android.hardware.wifi.hostapd.ChannelBandwidth channelBandwidth;
android.hardware.wifi.hostapd.Generation generation;
byte[] apIfaceInstanceMacAddress;
}

View File

@@ -33,17 +33,18 @@
package android.hardware.wifi.hostapd;
@Backing(type="int") @VintfStability
enum Bandwidth {
enum ChannelBandwidth {
BANDWIDTH_INVALID = 0,
BANDWIDTH_20_NOHT = 1,
BANDWIDTH_20 = 2,
BANDWIDTH_40 = 3,
BANDWIDTH_80 = 4,
BANDWIDTH_80P80 = 5,
BANDWIDTH_160 = 6,
BANDWIDTH_320 = 7,
BANDWIDTH_2160 = 8,
BANDWIDTH_4320 = 9,
BANDWIDTH_6480 = 10,
BANDWIDTH_8640 = 11,
BANDWIDTH_AUTO = 1,
BANDWIDTH_20_NOHT = 2,
BANDWIDTH_20 = 3,
BANDWIDTH_40 = 4,
BANDWIDTH_80 = 5,
BANDWIDTH_80P80 = 6,
BANDWIDTH_160 = 7,
BANDWIDTH_320 = 8,
BANDWIDTH_2160 = 9,
BANDWIDTH_4320 = 10,
BANDWIDTH_6480 = 11,
BANDWIDTH_8640 = 12,
}

View File

@@ -44,4 +44,5 @@ parcelable HwModeParams {
boolean enableHeTargetWakeTime;
boolean enableEdmg;
boolean enable80211BE;
android.hardware.wifi.hostapd.ChannelBandwidth maximumChannelBandwidth;
}

View File

@@ -16,7 +16,7 @@
package android.hardware.wifi.hostapd;
import android.hardware.wifi.hostapd.Bandwidth;
import android.hardware.wifi.hostapd.ChannelBandwidth;
import android.hardware.wifi.hostapd.Generation;
/**
@@ -44,9 +44,9 @@ parcelable ApInfo {
int freqMhz;
/**
* The operational bandwidth of the AP.
* The operational channel bandwidth of the AP.
*/
Bandwidth bandwidth;
ChannelBandwidth channelBandwidth;
/**
* The operational mode of the AP (e.g. 11ac, 11ax).

View File

@@ -1,37 +0,0 @@
/*
* 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_320 = 7,
BANDWIDTH_2160 = 8,
BANDWIDTH_4320 = 9,
BANDWIDTH_6480 = 10,
BANDWIDTH_8640 = 11,
}

View File

@@ -0,0 +1,77 @@
/*
* 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 ChannelBandwidth {
/**
* Invalid bandwidth value for AP
*/
BANDWIDTH_INVALID = 0,
/**
* Channel bandwidth is auto-selected by the chip
*/
BANDWIDTH_AUTO = 1,
/**
* AP channel bandwidth is 20 MHz but not HT
*/
BANDWIDTH_20_NOHT = 2,
/**
* AP channel bandwidth is 20 MHz
*/
BANDWIDTH_20 = 3,
/**
* AP channel bandwidth is 40 MHz
*/
BANDWIDTH_40 = 4,
/**
* AP channel bandwidth is 80 MHz
*/
BANDWIDTH_80 = 5,
/**
* AP channel bandwidth is 80+80 MHz
*/
BANDWIDTH_80P80 = 6,
/**
* AP channel bandwidth is 160 MHz
*/
BANDWIDTH_160 = 7,
/**
* AP channel bandwidth is 320 MHz
*/
BANDWIDTH_320 = 8,
/**
* AP channel bandwidth is 2160 MHz
*/
BANDWIDTH_2160 = 9,
/**
* AP channel bandwidth is 4320 MHz
*/
BANDWIDTH_4320 = 10,
/**
* AP channel bandwidth is 6480 MHz
*/
BANDWIDTH_6480 = 11,
/**
* AP channel bandwidth is 8640 MHz
*/
BANDWIDTH_8640 = 12,
}

View File

@@ -16,6 +16,8 @@
package android.hardware.wifi.hostapd;
import android.hardware.wifi.hostapd.ChannelBandwidth;
/**
* Parameters to control the HW mode for the interface.
*/
@@ -74,4 +76,9 @@ parcelable HwModeParams {
* used with Extreme High Throughput.
*/
boolean enable80211BE;
/**
* Limit on maximum channel bandwidth for the softAp.
* For automatic selection with no limit use BANDWIDTH_AUTO
*/
ChannelBandwidth maximumChannelBandwidth;
}