[SAE] Add support to add SAE Authentication algorithm

Add support to add SAE Authentication algorithm in the
framework (public API), and in the Supplicant HAL.

Bug: 147253259
Test: Manual connection to SAE, PSK, OWE and Open APs
Test: atest WifiConfigurationTest
Test: Explicitly set the Auth Algorithm, observe that wpa_supplicant
sets correctly and associates.
Change-Id: I788823d920588ad3ded2971229d07bfb277f69e5
diff --git a/wpa_supplicant/hidl/1.3/sta_network.cpp b/wpa_supplicant/hidl/1.3/sta_network.cpp
index ba04388..c807c52 100644
--- a/wpa_supplicant/hidl/1.3/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.3/sta_network.cpp
@@ -48,7 +48,8 @@
 constexpr uint32_t kAllowedAuthAlgMask =
     (static_cast<uint32_t>(ISupplicantStaNetwork::AuthAlgMask::OPEN) |
      static_cast<uint32_t>(ISupplicantStaNetwork::AuthAlgMask::SHARED) |
-     static_cast<uint32_t>(ISupplicantStaNetwork::AuthAlgMask::LEAP));
+     static_cast<uint32_t>(ISupplicantStaNetwork::AuthAlgMask::LEAP) |
+	 static_cast<uint32_t>(ISupplicantStaNetworkV1_3::AuthAlgMask::SAE));
 constexpr uint32_t kAllowedGroupCipherMask =
     (static_cast<uint32_t>(ISupplicantStaNetwork::GroupCipherMask::WEP40) |
      static_cast<uint32_t>(ISupplicantStaNetwork::GroupCipherMask::WEP104) |
@@ -901,6 +902,22 @@
 	    &StaNetwork::getPairwiseCipher_1_3Internal, _hidl_cb);
 }
 
+Return<void> StaNetwork::getAuthAlg_1_3(getAuthAlg_cb _hidl_cb)
+{
+	return validateAndCall(
+	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    &StaNetwork::getAuthAlgInternal, _hidl_cb);
+}
+
+Return<void> StaNetwork::setAuthAlg_1_3(
+    uint32_t auth_alg_mask,
+    std::function<void(const SupplicantStatus &status)> _hidl_cb)
+{
+	return validateAndCall(
+	    this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+	    &StaNetwork::setAuthAlgInternal, _hidl_cb, auth_alg_mask);
+}
+
 std::pair<SupplicantStatus, uint32_t> StaNetwork::getIdInternal()
 {
 	return {{SupplicantStatusCode::SUCCESS, ""}, network_id_};
diff --git a/wpa_supplicant/hidl/1.3/sta_network.h b/wpa_supplicant/hidl/1.3/sta_network.h
index e1a74fe..279b327 100644
--- a/wpa_supplicant/hidl/1.3/sta_network.h
+++ b/wpa_supplicant/hidl/1.3/sta_network.h
@@ -251,6 +251,10 @@
 	Return<void> setWapiCertSuite(
 	    const hidl_string& suite, setWapiCertSuite_cb _hidl_cb) override;
 	Return<void> getWapiCertSuite(getWapiCertSuite_cb _hidl_cb) override;
+	Return<void> getAuthAlg_1_3(getAuthAlg_cb _hidl_cb) override;
+	Return<void> setAuthAlg_1_3(uint32_t auth_alg_mask,
+			std::function<void(const SupplicantStatus &status)> _hidl_cb)
+					override;
 
 private:
 	// Corresponding worker functions for the HIDL methods.