mac80211: use RX status band instead of current band
authorJohannes Berg <johannes.berg@intel.com>
Thu, 26 Jul 2012 12:31:19 +0000 (14:31 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 20 Aug 2012 12:13:43 +0000 (14:13 +0200)
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@intel.com>
net/mac80211/rx.c

index f5258ebc15be3c13cea889e52328fce893e740ad..b382605c57339c5c4c36cbb8b0699748947da10a 100644 (file)
@@ -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)