Support for Wi-Fi Direct R2
This CL includes the stub functions for,
1. API support for USD based P2P service discovery
2. API support for Wi-Fi Direct R2 pairing protocol
Bug: 341971059
Test: Manual - Basic P2P connect/disconnect tests
Test: TH Presubmit tests
Test: atest VtsHalWifiSupplicantStaIfaceTargetTest \
VtsHalWifiSupplicantStaNetworkTargetTest \
VtsHalWifiSupplicantP2pIfaceTargetTest
Change-Id: If708e06af2327bdbad154908fc6432a37576fbbc
diff --git a/hostapd/aidl/hostapd.cpp b/hostapd/aidl/hostapd.cpp
index 9c485e7..ce32564 100644
--- a/hostapd/aidl/hostapd.cpp
+++ b/hostapd/aidl/hostapd.cpp
@@ -79,6 +79,12 @@
return expected_version <= aidl_client_version;
}
+inline int32_t areAidlServiceAndClientAtLeastVersion(int32_t expected_version)
+{
+ return isAidlServiceVersionAtLeast(expected_version)
+ && isAidlClientVersionAtLeast(expected_version);
+}
+
#define MAX_PORTS 1024
bool GetInterfacesInBridge(std::string br_name,
std::vector<std::string>* interfaces) {
@@ -593,7 +599,7 @@
#ifdef CONFIG_IEEE80211BE
if (iface_params.hwModeParams.enable80211BE && !is_60Ghz_used) {
eht_params_as_string = "ieee80211be=1\n";
- if (isAidlServiceVersionAtLeast(2) && isAidlClientVersionAtLeast(2)) {
+ if (areAidlServiceAndClientAtLeastVersion(2)) {
std::string interface_mac_addr = getInterfaceMacAddress(
iface_params.usesMlo ? br_name : iface_params.name);
if (interface_mac_addr.empty()) {