CHROMIUM: wpa_supplicant: check for driver SME support when selecting FT suites
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.
BUG=chromium:874063, chromium:791202
TEST=1) With a Kevin, which does not support SME, ran network_WiFi_RoamFT. Test
fails with "Association timed out", and logs say "Failed to select key
management type". Modified the test so that the AP supports both
WPA-PSK and FT-PSK, and the test passed (prior to the change, supplicant
would still select FT-PSK despite lack of driver support, and test would
proceed to fail).
2) With a Caroline, which supports SME, replicate above tests to make sure
that suite selection logic remains intact. supplicant should default to
FT-PSK and tests should pass in all circumstances.
Change-Id: Ida22f31a7bccc1e9f673c4b14ad80cd4d18d3a07
Reviewed-on: https://chromium-review.googlesource.com/1042869
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Matthew Wang <matthewmwang@chromium.org>
Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 7e44bd6..d426152 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1268,10 +1268,12 @@
"WPA: using KEY_MGMT 802.1X with Suite B");
#endif /* CONFIG_SUITEB */
#ifdef CONFIG_IEEE80211R
- } 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");
- } 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 */