aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Ravi <sunilravi@google.com>2020-06-16 14:44:13 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-16 14:44:13 +0000
commit9ce298901fba55d10d552d2c203a0eac7e03d1a8 (patch)
treef30f872f1c961954866e092b74ec1387fe04da60
parent9c24927de38494d494477604f97c0570bbc1ca54 (diff)
parent2db03fe1a40a68f884f09b5c072d0b0bae602b06 (diff)
downloadwpa_supplicant_8-9ce298901fba55d10d552d2c203a0eac7e03d1a8.tar.gz
hidl/1.3: Add WPA_KEY_MGMT_FT_SAE key management. am: 2db03fe1a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/wpa_supplicant_8/+/11870031 Change-Id: Ia868045fe80c3676961b0ac312e6eca205234ae4
-rw-r--r--wpa_supplicant/hidl/1.3/sta_network.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/wpa_supplicant/hidl/1.3/sta_network.cpp b/wpa_supplicant/hidl/1.3/sta_network.cpp
index d3b120dc..925a093f 100644
--- a/wpa_supplicant/hidl/1.3/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.3/sta_network.cpp
@@ -2434,6 +2434,10 @@ int StaNetwork::setByteArrayKeyFieldAndResetState(
*/
void StaNetwork::setFastTransitionKeyMgmt(uint32_t &key_mgmt_mask)
{
+ struct wpa_supplicant *wpa_s = retrieveIfacePtr();
+ int res;
+ struct wpa_driver_capa capa;
+
if (key_mgmt_mask & WPA_KEY_MGMT_PSK) {
key_mgmt_mask |= WPA_KEY_MGMT_FT_PSK;
}
@@ -2441,6 +2445,18 @@ void StaNetwork::setFastTransitionKeyMgmt(uint32_t &key_mgmt_mask)
if (key_mgmt_mask & WPA_KEY_MGMT_IEEE8021X) {
key_mgmt_mask |= WPA_KEY_MGMT_FT_IEEE8021X;
}
+
+ res = wpa_drv_get_capa(wpa_s, &capa);
+ if (res == 0) {
+#ifdef CONFIG_IEEE80211R
+#ifdef CONFIG_SAE
+ if (capa.key_mgmt_iftype[WPA_IF_STATION] & WPA_DRIVER_CAPA_KEY_MGMT_FT_SAE) {
+ key_mgmt_mask |= WPA_KEY_MGMT_FT_SAE;
+ }
+#endif
+#endif
+ }
+
}
/**
@@ -2456,6 +2472,13 @@ void StaNetwork::resetFastTransitionKeyMgmt(uint32_t &key_mgmt_mask)
if (key_mgmt_mask & WPA_KEY_MGMT_IEEE8021X) {
key_mgmt_mask &= ~WPA_KEY_MGMT_FT_IEEE8021X;
}
+#ifdef CONFIG_IEEE80211R
+#ifdef CONFIG_SAE
+ if (key_mgmt_mask & WPA_KEY_MGMT_SAE) {
+ key_mgmt_mask &= ~WPA_KEY_MGMT_FT_SAE;
+ }
+#endif
+#endif
}
/**