Hostapd: redefine data structure to avoid dependency on IHostapd@1.2
This commit is to remove dependency on IHostapdHal@1.2 by re-defining
structures that were imported earlier. This allows support on targets
where IHotapdHal@1.2 is not present
Additionally, this commit adds following vendor network params:
- enableOCV
- enableBeaconProtection
Change-Id: I6b9645a1defcdb8eac5178cee39ead1f8299b325
CRs-Fixed: 2673976
diff --git a/wifi/hostapd/1.2/IHostapdVendor.hal b/wifi/hostapd/1.2/IHostapdVendor.hal
index 4a7110a..1568f66 100644
--- a/wifi/hostapd/1.2/IHostapdVendor.hal
+++ b/wifi/hostapd/1.2/IHostapdVendor.hal
@@ -31,7 +31,6 @@
import android.hardware.wifi.hostapd@1.0::IHostapd;
import android.hardware.wifi.hostapd@1.0::types;
-import android.hardware.wifi.hostapd@1.2::IHostapd;
import @1.0::IHostapdVendor;
import @1.1::IHostapdVendor;
@@ -47,6 +46,103 @@
SAE_TRANSITION,
};
+ /**
+ * Band bitmMask to use for the SoftAp operations.
+ * A combinatoin of these bits are used to identify the allowed bands
+ * to start the softAp
+ */
+ enum BandMask : uint32_t {
+ /**
+ * 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,
+ };
+
+ /**
+ * Parameters to control the HW mode for the interface.
+ */
+ struct HwModeParams {
+ /**
+ * Whether IEEE 802.11ax (HE) is enabled or not.
+ * Note: hw_mode=a is used to specify that 5 GHz band or 6 GHz band is
+ * used with HE.
+ */
+ bool 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.
+ */
+ bool enable6GhzBand;
+
+ /**
+ * Whether HE single user beamformer in enabled or not on softAp.
+ * Note: this is only applicable if 802.11ax is supported for softAp
+ */
+ bool enableHeSingleUserBeamformer;
+
+ /**
+ * Whether HE single user beamformee is enabled or not on softAp.
+ * Note: this is only applicable if 802.11ax is supported for softAp
+ */
+ bool enableHeSingleUserBeamformee;
+
+ /**
+ * Whether HE multiple user beamformer is enabled or not on softAp.
+ * Note: this is only applicable if 802.11ax is supported for softAp
+ */
+ bool enableHeMultiUserBeamformer;
+
+ /**
+ * Whether HE Target Wait Time (TWT) is enabled or not on softAp.
+ * Note: this is only applicable if 802.11ax is supported for softAp
+ */
+ bool enableHeTargetWakeTime;
+ };
+
+ /**
+ * Parameters to specify the channel frequency range for ACS.
+ */
+ struct AcsFrequencyRange {
+ /**
+ * Channel Frequency (in MHz) at the start of the range.
+ */
+ uint32_t start;
+
+ /**
+ * Channel Frequency (in MHz) at the end of the range.
+ */
+ uint32_t end;
+ };
+
+ /**
+ * Parameters to control the channel selection for the interface.
+ */
+ struct ChannelParams {
+ /**
+ * Band to use for the SoftAp operations.
+ */
+ bitfield<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.
+ */
+ vec<AcsFrequencyRange> acsChannelFreqRangesMhz;
+ };
+
/**
* Parameters to use for setting up the access point interface.
@@ -58,14 +154,14 @@
@1.1::IHostapdVendor.VendorIfaceParams VendorV1_1;
/**
- * Additional Channel params for the interface from 1.2::IHostapd HAL
+ * Additional Hw mode params for the interface
*/
- @1.2::IHostapd.ChannelParams channelParams;
+ HwModeParams hwModeParams;
/**
- * Additional Hw mode params for the interface from 1.2::IHostapd HAL
+ * Additional Channel params for the interface
*/
- @1.2::IHostapd.HwModeParams hwModeParams;
+ ChannelParams channelParams;
};
/**
@@ -73,14 +169,31 @@
*/
struct VendorNetworkParams {
/**
- * Baseline information as defined in HAL 1.2::IHostapd.
+ * Baseline information as defined in HAL 1.0.
*/
- @1.2::IHostapd.NetworkParams V1_2;
+ @1.0::IHostapd.NetworkParams V1_0;
+
+ /**
+ * Passphrase for WPA3_SAE network, WPA3_SAE_TRANSITION and
+ * WPA2_PSK. Replaces @1.0::IHostapd.NetworkParams.pskPassphrase.
+ */
+ string passphrase;
/**
* Key management mask for the network. overrides NetworkParams.encryptionType
*/
VendorEncryptionType vendorEncryptionType;
+
+ /**
+ * ocv: Operating Channel Validation
+ * This is a countermeasure against multi-channel man-in-the-middle attacks.
+ */
+ bool enableOCV;
+
+ /**
+ * Beacon Protection (management frame protection for Beacon frames)
+ */
+ bool enableBeaconProtection;
};
diff --git a/wifi/hostapd/1.2/hidl_gen_version b/wifi/hostapd/1.2/hidl_gen_version
index 9e7c0da..badc32f 100644
--- a/wifi/hostapd/1.2/hidl_gen_version
+++ b/wifi/hostapd/1.2/hidl_gen_version
@@ -1 +1 @@
-version=3
+version=2