Skip to content

Commit

Permalink
mac80211: use RX status band instead of current band
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jmberg-intel committed Aug 20, 2012
1 parent 3d01be7 commit 4797c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4797c7b

Please sign in to comment.