aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-05-27 21:21:37 -0700
committerJouni Malinen <j@w1.fi>2012-05-27 21:21:37 -0700
commit8bd0fc0e0c72f1736f615d93f920433b37c4af0c (patch)
tree0d75563e6e6d8b6245298c6ff305865324aac7af /src/ap
parent597c7a8dd8e15793a9961482c9e8022794c65605 (diff)
downloadexternal_wpa_supplicant_8_ti-8bd0fc0e0c72f1736f615d93f920433b37c4af0c.zip
external_wpa_supplicant_8_ti-8bd0fc0e0c72f1736f615d93f920433b37c4af0c.tar.gz
external_wpa_supplicant_8_ti-8bd0fc0e0c72f1736f615d93f920433b37c4af0c.tar.bz2
Force driver to disassociate STA if no room for the STA entry
When hostapd (or wpa_supplicant AP mode) limits the maximum number of STA entries with a driver that implements SME, the driver needs to be notified of the failed STA addition. Disassociate the STA if the driver notifies of an association that would go beyond the maximum number of STAs. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/drv_callbacks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 8d24e08..4c0d0ab 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -86,8 +86,11 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
sta->timeout_next = STA_NULLFUNC;
} else {
sta = ap_sta_add(hapd, addr);
- if (sta == NULL)
+ if (sta == NULL) {
+ hostapd_drv_sta_disassoc(hapd, addr,
+ WLAN_REASON_DISASSOC_AP_BUSY);
return -1;
+ }
}
sta->flags &= ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS | WLAN_STA_WPS2);