From: Jouni Malinen Date: Mon, 5 Jan 2015 10:21:12 +0000 (+0200) Subject: nl80211: Remove cfg80211 state mismatch workaround for authentication X-Git-Tag: hostap_2_4~545 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38751d8bd573f520a6a8622d2598e4f7c1bd0ce7;p=thirdparty%2Fhostap.git nl80211: Remove cfg80211 state mismatch workaround for authentication cfg80211 dropped support for tracking BSS authentication state and setting NL80211_BSS_STATUS_AUTHENTICATED in 'cfg80211: stop tracking authenticated state' three years ago (starting in Linux 3.4). As such, this workaround code in wpa_supplicant cannot be reached anymore. There is no real need for maintaining it for older kernels either, since there are other ways of detecting and working around state mismatches with the actual authentication operations failing. Signed-off-by: Jouni Malinen --- diff --git a/src/drivers/driver.h b/src/drivers/driver.h index eeaba6680..8cdef8d38 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -198,7 +198,6 @@ struct hostapd_hw_modes { #define WPA_SCAN_NOISE_INVALID BIT(1) #define WPA_SCAN_LEVEL_INVALID BIT(2) #define WPA_SCAN_LEVEL_DBM BIT(3) -#define WPA_SCAN_AUTHENTICATED BIT(4) #define WPA_SCAN_ASSOCIATED BIT(5) /** diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index 7538d6024..c35b4d7ef 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -599,9 +599,6 @@ int bss_info_handler(struct nl_msg *msg, void *arg) enum nl80211_bss_status status; status = nla_get_u32(bss[NL80211_BSS_STATUS]); switch (status) { - case NL80211_BSS_STATUS_AUTHENTICATED: - r->flags |= WPA_SCAN_AUTHENTICATED; - break; case NL80211_BSS_STATUS_ASSOCIATED: r->flags |= WPA_SCAN_ASSOCIATED; break; @@ -677,23 +674,6 @@ static void wpa_driver_nl80211_check_bss_status( for (i = 0; i < res->num; i++) { struct wpa_scan_res *r = res->res[i]; - if (r->flags & WPA_SCAN_AUTHENTICATED) { - wpa_printf(MSG_DEBUG, "nl80211: Scan results " - "indicates BSS status with " MACSTR - " as authenticated", - MAC2STR(r->bssid)); - if (is_sta_interface(drv->nlmode) && - os_memcmp(r->bssid, drv->bssid, ETH_ALEN) != 0 && - os_memcmp(r->bssid, drv->auth_bssid, ETH_ALEN) != - 0) { - wpa_printf(MSG_DEBUG, "nl80211: Unknown BSSID" - " in local state (auth=" MACSTR - " assoc=" MACSTR ")", - MAC2STR(drv->auth_bssid), - MAC2STR(drv->bssid)); - clear_state_mismatch(drv, r->bssid); - } - } if (r->flags & WPA_SCAN_ASSOCIATED) { wpa_printf(MSG_DEBUG, "nl80211: Scan results " @@ -786,9 +766,8 @@ void nl80211_dump_scan(struct wpa_driver_nl80211_data *drv) wpa_printf(MSG_DEBUG, "nl80211: Scan result dump"); for (i = 0; i < res->num; i++) { struct wpa_scan_res *r = res->res[i]; - wpa_printf(MSG_DEBUG, "nl80211: %d/%d " MACSTR "%s%s", + wpa_printf(MSG_DEBUG, "nl80211: %d/%d " MACSTR "%s", (int) i, (int) res->num, MAC2STR(r->bssid), - r->flags & WPA_SCAN_AUTHENTICATED ? " [auth]" : "", r->flags & WPA_SCAN_ASSOCIATED ? " [assoc]" : ""); }