aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-06-17 16:21:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-17 16:21:14 -0400
commitabf52f86aa0a49a7377350cafa8f218c4cd227e7 (patch)
treedd9549023a99d37fb1bbcbaad9c10ae102a1882e /net/mac80211/mlme.c
parent6a0076e02a884e86c762a7b63cb50c2e30067491 (diff)
parent021570e55b7152843376b9d9f60624e3e05ac054 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts: net/mac80211/mlme.c
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 637b22411d41..85c3ca33333e 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)