summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg2009-05-15 11:52:31 +0200
committerJohn W. Linville2009-05-20 20:46:25 +0200
commitcc32abd494c0a8f76f2638e3f3a76e01c68bc9ea (patch)
tree02e6870c634e637c7082596f4e3d23804285c8de /net/mac80211/rx.c
parentnl80211: Validate NL80211_ATTR_KEY_SEQ length (diff)
downloadkernel-qcow2-linux-cc32abd494c0a8f76f2638e3f3a76e01c68bc9ea.tar.gz
kernel-qcow2-linux-cc32abd494c0a8f76f2638e3f3a76e01c68bc9ea.tar.xz
kernel-qcow2-linux-cc32abd494c0a8f76f2638e3f3a76e01c68bc9ea.zip
mac80211: move channel switch code
The channel switch code is currently in the spectrum management file, where arguably it belongs. However, it is for managed mode only and uses the structures for that mode only so having it in a more generic file can be confusing. Additionally, my next patch gets simpler with the code here. When/if we ever implement this for IBSS or mesh then we will need to rework the structures it uses anyway at which point we could move the code back. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index f962bd1b16e2..f3a041cc5dcf 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1846,6 +1846,9 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
sizeof(mgmt->u.action.u.chan_switch)))
return RX_DROP_MONITOR;
+ if (sdata->vif.type != NL80211_IFTYPE_STATION)
+ return RX_DROP_MONITOR;
+
if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN))
return RX_DROP_MONITOR;
@@ -1856,7 +1859,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
if (!bss)
return RX_DROP_MONITOR;
- ieee80211_process_chanswitch(sdata,
+ ieee80211_sta_process_chanswitch(sdata,
&mgmt->u.action.u.chan_switch.sw_elem, bss);
ieee80211_rx_bss_put(local, bss);
break;