Bug fix for SAP in 6G/WPA3_SAE mode

To enable SAP properly at 6G:
1) enable 11AX compilation flag if WIFI_FEATURE_HOSTAPD_11AX is set
(will be set on a per device basis)
2) set sae_pwe = 1 (hash-to-element only) for 6G band only mode and
sae_pwe = 2 for other modes (both hunting-and-pecking loop and
hash-to-element enabled) when WPA3_SAE mode is enabled

Bug: 168348861
Test: manual test with SAP and clients in 6G/WPA3_SAE mode, 5G/OPEN, 5G/WPA2, 5G/WPA3_SAE modes.
Change-Id: I9b72f98a9da96a4814f45f3df2dfcb0dd71e3a6f
diff --git a/hostapd/android.config b/hostapd/android.config
index bf21fc6..be56ad5 100644
--- a/hostapd/android.config
+++ b/hostapd/android.config
@@ -132,6 +132,11 @@
 # IEEE 802.11ac (Very High Throughput) support
 CONFIG_IEEE80211AC=y
 
+# IEEE 802.11ax (High Efficiency) support
+ifeq ($(WIFI_FEATURE_HOSTAPD_11AX), true)
+CONFIG_IEEE80211AX=y
+endif
+
 # Remove debugging code that is printing out debug messages to stdout.
 # This can be used to reduce the size of the hostapd considerably if debugging
 # code is not needed.
diff --git a/hostapd/hidl/1.3/hostapd.cpp b/hostapd/hidl/1.3/hostapd.cpp
index b68ddc7..17dd7f5 100644
--- a/hostapd/hidl/1.3/hostapd.cpp
+++ b/hostapd/hidl/1.3/hostapd.cpp
@@ -239,6 +239,9 @@
 	const std::string ssid_as_string = ss.str();
 
 	// Encryption config string
+	uint32_t band = 0;
+	band |= iface_params.channelParams.bandMask;
+	bool is_6Ghz_band_only = band == static_cast<uint32_t>(IHostapd::BandMask::BAND_6_GHZ);
 	std::string encryption_config_as_string;
 	switch (nw_params.V1_2.encryptionType) {
 	case IHostapd::EncryptionType::NONE:
@@ -304,7 +307,9 @@
 		    "wpa_key_mgmt=SAE\n"
 		    "ieee80211w=2\n"
 		    "sae_require_mfp=2\n"
+		    "sae_pwe=%d\n"
 		    "sae_password=%s",
+		    is_6Ghz_band_only ? 1 : 2,
 		    nw_params.V1_2.passphrase.c_str());
 		break;
 	default:
@@ -312,9 +317,6 @@
 		return "";
 	}
 
-	unsigned int band = 0;
-	band |= iface_params.channelParams.bandMask;
-
 	std::string channel_config_as_string;
 	bool isFirst = true;
 	if (iface_params.V1_1.V1_0.channelParams.enableAcs) {