From: John W. Linville Date: Thu, 17 Jun 2010 20:21:14 +0000 (-0400) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel... X-Git-Tag: upstream/snapshot3+hdmi~13787^2~107^2~194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abf52f86aa0a49a7377350cafa8f218c4cd227e7;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6 Conflicts: net/mac80211/mlme.c --- abf52f86aa0a49a7377350cafa8f218c4cd227e7 diff --cc net/mac80211/mlme.c index 637b224,f803f8b..85c3ca3 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@@ -1704,8 -1760,47 +1704,45 @@@ void ieee80211_sta_rx_queued_mgmt(struc mutex_unlock(&ifmgd->mtx); if (skb->len >= 24 + 2 /* mgmt + deauth reason */ && - (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) + (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); } static void ieee80211_sta_timer(unsigned long data)