wifi: Correct check condition for SAP 11AX mode.
Current hostapd doesn't support mode: HOSTAPD_MODE_IEEE80211AX.
Using he_capabilies->he_supported to identify if the current mode is
AX.
Bug: 162484222
Test: Enable SAP on P21 (supported AX) and check the wifistandard is
AX mode.
Change-Id: Ic2f57be652c9407f0f7b8b150f9ae8b4e640848d
diff --git a/hostapd/hidl/1.3/hostapd.cpp b/hostapd/hidl/1.3/hostapd.cpp
index 1a342e5..0d01da3 100644
--- a/hostapd/hidl/1.3/hostapd.cpp
+++ b/hostapd/hidl/1.3/hostapd.cpp
@@ -535,9 +535,10 @@
Generation getGeneration(hostapd_hw_modes *current_mode)
{
- wpa_printf(MSG_DEBUG, "getGeneration hwmode=%d, ht_enabled=%d, vht_enabled=%d",
+ wpa_printf(MSG_DEBUG, "getGeneration hwmode=%d, ht_enabled=%d,"
+ " vht_enabled=%d, he_supported=%d",
current_mode->mode, current_mode->ht_capab != 0,
- current_mode->vht_capab != 0);
+ current_mode->vht_capab != 0, current_mode->he_capab->he_supported);
switch (current_mode->mode) {
case HOSTAPD_MODE_IEEE80211B:
return Generation::WIFI_STANDARD_LEGACY;
@@ -545,11 +546,13 @@
return current_mode->ht_capab == 0 ?
Generation::WIFI_STANDARD_LEGACY : Generation::WIFI_STANDARD_11N;
case HOSTAPD_MODE_IEEE80211A:
+ if (current_mode->he_capab->he_supported) {
+ return Generation::WIFI_STANDARD_11AX;
+ }
return current_mode->vht_capab == 0 ?
Generation::WIFI_STANDARD_11N : Generation::WIFI_STANDARD_11AC;
case HOSTAPD_MODE_IEEE80211AD:
return Generation::WIFI_STANDARD_11AD;
- // TODO: b/162484222 miss HOSTAPD_MODE_IEEE80211AX definition.
default:
return Generation::WIFI_STANDARD_UNKNOWN;
}