Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4797c7ba authored by Johannes Berg's avatar Johannes Berg
Browse files

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: default avatarJohannes Berg <johannes.berg@intel.com>
parent 3d01be72
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)