diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-06-17 16:21:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-17 16:21:14 -0400 |
commit | abf52f86aa0a49a7377350cafa8f218c4cd227e7 (patch) | |
tree | dd9549023a99d37fb1bbcbaad9c10ae102a1882e /net | |
parent | 6a0076e02a884e86c762a7b63cb50c2e30067491 (diff) | |
parent | 021570e55b7152843376b9d9f60624e3e05ac054 (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')
-rw-r--r-- | net/mac80211/mlme.c | 39 | ||||
-rw-r--r-- | net/mac80211/work.c | 2 |
2 files changed, 39 insertions, 2 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 | ||
1711 | static void ieee80211_sta_timer(unsigned long data) | 1748 | static void ieee80211_sta_timer(unsigned long data) |
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 4157717ed786..c22a71c5cb45 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c | |||
@@ -715,7 +715,7 @@ static void ieee80211_work_rx_queued_mgmt(struct ieee80211_local *local, | |||
715 | struct ieee80211_rx_status *rx_status; | 715 | struct ieee80211_rx_status *rx_status; |
716 | struct ieee80211_mgmt *mgmt; | 716 | struct ieee80211_mgmt *mgmt; |
717 | struct ieee80211_work *wk; | 717 | struct ieee80211_work *wk; |
718 | enum work_action rma; | 718 | enum work_action rma = WORK_ACT_NONE; |
719 | u16 fc; | 719 | u16 fc; |
720 | 720 | ||
721 | rx_status = (struct ieee80211_rx_status *) skb->cb; | 721 | rx_status = (struct ieee80211_rx_status *) skb->cb; |