Add VTS tests for Vendor HAL and Hostapd structures
which were extended to include vendor data.
Bug: 322815584
Test: atest VtsHalWifiRttControllerTargetTest \
VtsHalWifiNanIfaceTargetTest \
VtsHalHostapdTargetTest
Change-Id: I7be5207aa5f6e49863ba516bed1cbba3fdfaa271
diff --git a/wifi/hostapd/aidl/vts/functional/Android.bp b/wifi/hostapd/aidl/vts/functional/Android.bp
index 9fbbf4b..f614679 100644
--- a/wifi/hostapd/aidl/vts/functional/Android.bp
+++ b/wifi/hostapd/aidl/vts/functional/Android.bp
@@ -21,7 +21,7 @@
"libvndksupport",
],
static_libs: [
- "android.hardware.wifi.hostapd-V1-ndk",
+ "android.hardware.wifi.hostapd-V2-ndk",
"VtsHalWifiV1_0TargetTestUtil",
"VtsHalWifiV1_5TargetTestUtil",
"VtsHalWifiV1_6TargetTestUtil",
diff --git a/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp b/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp
index 137537d..590c58b 100644
--- a/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp
+++ b/wifi/hostapd/aidl/vts/functional/VtsHalHostapdTargetTest.cpp
@@ -58,6 +58,7 @@
const int kIfaceInvalidChannel = 567;
const std::vector<uint8_t> kTestZeroMacAddr(6, 0x0);
const Ieee80211ReasonCode kTestDisconnectReasonCode = Ieee80211ReasonCode::WLAN_REASON_UNSPECIFIED;
+const auto& kTestVendorDataOptional = generateOuiKeyedDataListOptional(5);
inline BandMask operator|(BandMask a, BandMask b) {
return static_cast<BandMask>(static_cast<int32_t>(a) |
@@ -74,6 +75,7 @@
hostapd = getHostapd(GetParam());
ASSERT_NE(hostapd, nullptr);
EXPECT_TRUE(hostapd->setDebugParams(DebugLevel::EXCESSIVE).isOk());
+ EXPECT_TRUE(hostapd->getInterfaceVersion(&interface_version_).isOk());
isAcsSupport = testing::checkSubstringInCommandOutput(
"/system/bin/cmd wifi get-softap-supported-features",
@@ -98,6 +100,7 @@
bool isAcsSupport;
bool isWpa3SaeSupport;
bool isBridgedSupport;
+ int interface_version_;
IfaceParams getIfaceParamsWithoutAcs(std::string iface_name) {
IfaceParams iface_params;
@@ -343,6 +346,22 @@
}
/**
+ * Adds an access point with Open network config & ACS disabled.
+ * IfaceParams will also include vendor data.
+ * Access point creation should pass.
+ */
+TEST_P(HostapdAidl, AddOpenAccessPointWithVendorData) {
+ if (interface_version_ < 2) {
+ GTEST_SKIP() << "Vendor data is available in IfaceParams as of Hostapd V2";
+ }
+ std::string ifname = setupApIfaceAndGetName(false);
+ IfaceParams params = getIfaceParamsWithoutAcs(ifname);
+ params.vendorData = kTestVendorDataOptional;
+ auto status = hostapd->addAccessPoint(params, getOpenNwParams());
+ EXPECT_TRUE(status.isOk());
+}
+
+/**
* Adds an access point with SAE Transition network config & ACS disabled.
* Access point creation should pass.
*/