[RESEND] check for driver SME support when selecting FT suites
diff mbox series

Message ID 20190416000551.39874-1-matthewmwang@chromium.org
State New
Headers show
Series
  • [RESEND] check for driver SME support when selecting FT suites
Related show

Commit Message

Matthew Wang April 16, 2019, 12:05 a.m. UTC
Fast BSS Transition (802.11r) cannot be performed without driver support for
Station Management Entity (SME). However, wpa_supplicant will select FT suites
(FT-PSK and FT-EAP) even when the driver does not support it. This change has
wpa_supplicant select the FT suites only if the driver supports SME.

Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
---
 wpa_supplicant/wpa_supplicant.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 20ae588ad..0a758f840 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1440,7 +1440,8 @@  int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
 			pmksa_cache_clear_current(wpa_s->wpa);
 		}
 #endif /* CONFIG_SHA384 */
-	} else if (sel & WPA_KEY_MGMT_FT_IEEE8021X) {
+	} else if ((sel & WPA_KEY_MGMT_FT_IEEE8021X) &&
+		   (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) {
 		wpa_s->key_mgmt = WPA_KEY_MGMT_FT_IEEE8021X;
 		wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT/802.1X");
 		if (pmksa_cache_get_current(wpa_s->wpa)) {
@@ -1450,7 +1451,8 @@  int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
 				"WPA: Disable PMKSA caching for FT/802.1X connection");
 			pmksa_cache_clear_current(wpa_s->wpa);
 		}
-	} else if (sel & WPA_KEY_MGMT_FT_PSK) {
+	} else if ((sel & WPA_KEY_MGMT_FT_PSK) &&
+		   (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) {
 		wpa_s->key_mgmt = WPA_KEY_MGMT_FT_PSK;
 		wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT/PSK");
 #endif /* CONFIG_IEEE80211R */