mac80211: use RX status band instead of current band

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:45 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4797c7ba93e4049cdda18045c01bbe563aafff69
Commit:     4797c7ba93e4049cdda18045c01bbe563aafff69
Parent:     3d01be72e6fe372a0602221090707a1f04c44646
Author:     Johannes Berg <johannes.berg at intel.com>
AuthorDate: Thu Jul 26 14:31:19 2012 +0200
Committer:  Johannes Berg <johannes.berg at intel.com>
CommitDate: Mon Aug 20 14:13:43 2012 +0200

    mac80211: use RX status band instead of current band
    
    Even for single-channel devices it is possible that we
    switch the channel temporarily (e.g. for scanning) but
    while doing so process a received frame that was still
    received on the old channel, so checking the current
    band is racy. Use the band from status instead.
    
    Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 net/mac80211/rx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index f5258eb..b382605 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2308,7 +2308,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
 
 		goto queue;
 	case WLAN_CATEGORY_SPECTRUM_MGMT:
-		if (local->hw.conf.channel->band != IEEE80211_BAND_5GHZ)
+		if (status->band != IEEE80211_BAND_5GHZ)
 			break;
 
 		if (sdata->vif.type != NL80211_IFTYPE_STATION)



More information about the linux-mtd-cvs mailing list