Permalink
Browse files

mac80211: retry auth and assoc on error 17 (INTERNAL)

In some congested environments APs return
WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA on auth/assoc
attempt. Instead of failing immediately, retry again
in 200 msec.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information...
1 parent 9f4ddb5 commit 24144ed28a1a1710f8b154596ec6f2ad995dff20 @elp elp committed with ariknem May 15, 2012
Showing with 24 additions and 0 deletions.
  1. +24 −0 net/mac80211/mlme.c
View
24 net/mac80211/mlme.c
@@ -1807,6 +1807,19 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
if (status_code != WLAN_STATUS_SUCCESS) {
sdata_info(sdata, "%pM denied authentication (status %d)\n",
mgmt->sa, status_code);
+
+ if (status_code == WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA) {
+ /* can't auth right now, try again in 200 ms */
+ u32 ms = 200;
+ printk(KERN_DEBUG "%s: %pM rejected authentication; "
+ "try again in %u ms\n",
+ sdata->name, mgmt->sa, ms);
+ ifmgd->auth_data->timeout = jiffies +
+ msecs_to_jiffies(ms);
+ run_again(ifmgd, ifmgd->auth_data->timeout);
+ return RX_MGMT_NONE;
+ }
+
ieee80211_destroy_auth_data(sdata, false);
return RX_MGMT_CFG80211_RX_AUTH;
}
@@ -2165,6 +2178,17 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
return RX_MGMT_NONE;
}
+ if (status_code == WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA) {
+ /* can't assoc us right now, try again in 200 ms */
+ u32 ms = 200;
+ printk(KERN_DEBUG "%s: %pM rejected association; "
+ "try again in %u ms\n",
+ sdata->name, mgmt->sa, ms);
+ assoc_data->timeout = jiffies + msecs_to_jiffies(ms);
+ run_again(ifmgd, assoc_data->timeout);
+ return RX_MGMT_NONE;
+ }
+
*bss = assoc_data->bss;
if (status_code != WLAN_STATUS_SUCCESS) {

0 comments on commit 24144ed

Please sign in to comment.