aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 42c5f981c715..82c598a83687 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1275,6 +1275,23 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1275 sdata->dev->name, reassoc ? "Rea" : "A", mgmt->sa, 1275 sdata->dev->name, reassoc ? "Rea" : "A", mgmt->sa,
1276 capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); 1276 capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14))));
1277 1277
1278 pos = mgmt->u.assoc_resp.variable;
1279 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems);
1280
1281 if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY &&
1282 elems.assoc_comeback && elems.assoc_comeback_len == 4) {
1283 u32 tu, ms;
1284 tu = get_unaligned_le32(elems.assoc_comeback);
1285 ms = tu * 1024 / 1000;
1286 printk(KERN_DEBUG "%s: AP rejected association temporarily; "
1287 "comeback duration %u TU (%u ms)\n",
1288 sdata->dev->name, tu, ms);
1289 if (ms > IEEE80211_ASSOC_TIMEOUT)
1290 mod_timer(&ifsta->timer,
1291 jiffies + msecs_to_jiffies(ms));
1292 return;
1293 }
1294
1278 if (status_code != WLAN_STATUS_SUCCESS) { 1295 if (status_code != WLAN_STATUS_SUCCESS) {
1279 printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", 1296 printk(KERN_DEBUG "%s: AP denied association (code=%d)\n",
1280 sdata->dev->name, status_code); 1297 sdata->dev->name, status_code);
@@ -1290,9 +1307,6 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1290 "set\n", sdata->dev->name, aid); 1307 "set\n", sdata->dev->name, aid);
1291 aid &= ~(BIT(15) | BIT(14)); 1308 aid &= ~(BIT(15) | BIT(14));
1292 1309
1293 pos = mgmt->u.assoc_resp.variable;
1294 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems);
1295
1296 if (!elems.supp_rates) { 1310 if (!elems.supp_rates) {
1297 printk(KERN_DEBUG "%s: no SuppRates element in AssocResp\n", 1311 printk(KERN_DEBUG "%s: no SuppRates element in AssocResp\n",
1298 sdata->dev->name); 1312 sdata->dev->name);