]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Disconnect STA when it fails to get added in kernel driver/firmware
authorYogesh Ashok Powar <yogeshp@marvell.com>
Sat, 15 Oct 2011 09:41:28 +0000 (12:41 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 15 Oct 2011 09:41:28 +0000 (12:41 +0300)
Data path for stations that get successfully associated to the
hostapd but fail to get added in the driver/firmware, will not
work. In such cases, hostapd should deauth and disconnect such
stations. In such scenario, hostapd should disconnect the STAs.

Sample output with following patch
wlan0: STA 0c:74:c2:9a:4c:59 IEEE 802.11: authenticated
wlan0: STA 0c:74:c2:9a:4c:59 IEEE 802.11: associated (aid 1)
wlan0: AP-STA-CONNECTED 0c:74:c2:9a:4c:59
wlan0: STA 0c:74:c2:9a:4c:59 IEEE 802.11: Could not add STA to kernel driver
wlan0: STA 0c:74:c2:9a:4c:59 IEEE 802.11: deauthenticated due to local deauth request

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
src/ap/ieee802_11.c

index e5a0a85f318be04c81ed4e2a0106c962d2085743..7293957a4ada61c236f04cbb66495b5403691d4f 100644 (file)
@@ -1714,6 +1714,11 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
                hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
                               HOSTAPD_LEVEL_NOTICE,
                               "Could not add STA to kernel driver");
+
+               ap_sta_disconnect(hapd, sta, sta->addr,
+                                 WLAN_REASON_DISASSOC_AP_BUSY);
+
+               goto fail;
        }
 
        if (sta->flags & WLAN_STA_WDS)