Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200281
b: refs/heads/master
c: b054b74
h: refs/heads/master
i:
  200279: 71c7730
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 8, 2010
1 parent 35f67c7 commit c643b42
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6db6340c42d027b6364d49fa99d69019aca24de4
refs/heads/master: b054b747a694927879c94dd11af54d04346aed7d
40 changes: 38 additions & 2 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,9 +1760,45 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
mutex_unlock(&ifmgd->mtx);

if (skb->len >= 24 + 2 /* mgmt + deauth reason */ &&
(fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH)
cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
(fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) {
struct ieee80211_local *local = sdata->local;
struct ieee80211_work *wk;

mutex_lock(&local->work_mtx);
list_for_each_entry(wk, &local->work_list, list) {
if (wk->sdata != sdata)
continue;

if (wk->type != IEEE80211_WORK_ASSOC)
continue;

if (memcmp(mgmt->bssid, wk->filter_ta, ETH_ALEN))
continue;
if (memcmp(mgmt->sa, wk->filter_ta, ETH_ALEN))
continue;

/*
* Printing the message only here means we can't
* spuriously print it, but it also means that it
* won't be printed when the frame comes in before
* we even tried to associate or in similar cases.
*
* Ultimately, I suspect cfg80211 should print the
* messages instead.
*/
printk(KERN_DEBUG
"%s: deauthenticated from %pM (Reason: %u)\n",
sdata->name, mgmt->bssid,
le16_to_cpu(mgmt->u.deauth.reason_code));

list_del_rcu(&wk->list);
free_work(wk);
break;
}
mutex_unlock(&local->work_mtx);

cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
}
out:
kfree_skb(skb);
}
Expand Down

0 comments on commit c643b42

Please sign in to comment.