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.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 637b22411d4..85c3ca33333 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1704,8 +1704,45 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
1704 mutex_unlock(&ifmgd->mtx); 1704 mutex_unlock(&ifmgd->mtx);
1705 1705
1706 if (skb->len >= 24 + 2 /* mgmt + deauth reason */ && 1706 if (skb->len >= 24 + 2 /* mgmt + deauth reason */ &&
1707 (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) 1707 (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) {
1708 struct ieee80211_local *local = sdata->local;
1709 struct ieee80211_work *wk;
1710
1711 mutex_lock(&local->work_mtx);
1712 list_for_each_entry(wk, &local->work_list, list) {
1713 if (wk->sdata != sdata)
1714 continue;
1715
1716 if (wk->type != IEEE80211_WORK_ASSOC)
1717 continue;
1718
1719 if (memcmp(mgmt->bssid, wk->filter_ta, ETH_ALEN))
1720 continue;
1721 if (memcmp(mgmt->sa, wk->filter_ta, ETH_ALEN))
1722 continue;
1723
1724 /*
1725 * Printing the message only here means we can't
1726 * spuriously print it, but it also means that it
1727 * won't be printed when the frame comes in before
1728 * we even tried to associate or in similar cases.
1729 *
1730 * Ultimately, I suspect cfg80211 should print the
1731 * messages instead.
1732 */
1733 printk(KERN_DEBUG
1734 "%s: deauthenticated from %pM (Reason: %u)\n",
1735 sdata->name, mgmt->bssid,
1736 le16_to_cpu(mgmt->u.deauth.reason_code));
1737
1738 list_del_rcu(&wk->list);
1739 free_work(wk);
1740 break;
1741 }
1742 mutex_unlock(&local->work_mtx);
1743
1708 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); 1744 cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
1745 }
1709} 1746}
1710 1747
1711static void ieee80211_sta_timer(unsigned long data) 1748static void ieee80211_sta_timer(unsigned long data)