diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-05-15 05:52:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-20 14:46:25 -0400 |
commit | cc32abd494c0a8f76f2638e3f3a76e01c68bc9ea (patch) | |
tree | 02e6870c634e637c7082596f4e3d23804285c8de /net/mac80211/rx.c | |
parent | 9f26a952210e44691f784b77bf1f83a500d63f58 (diff) |
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.c | 5 |
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) | |||
1846 | sizeof(mgmt->u.action.u.chan_switch))) | 1846 | sizeof(mgmt->u.action.u.chan_switch))) |
1847 | return RX_DROP_MONITOR; | 1847 | return RX_DROP_MONITOR; |
1848 | 1848 | ||
1849 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
1850 | return RX_DROP_MONITOR; | ||
1851 | |||
1849 | if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN)) | 1852 | if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN)) |
1850 | return RX_DROP_MONITOR; | 1853 | return RX_DROP_MONITOR; |
1851 | 1854 | ||
@@ -1856,7 +1859,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1856 | if (!bss) | 1859 | if (!bss) |
1857 | return RX_DROP_MONITOR; | 1860 | return RX_DROP_MONITOR; |
1858 | 1861 | ||
1859 | ieee80211_process_chanswitch(sdata, | 1862 | ieee80211_sta_process_chanswitch(sdata, |
1860 | &mgmt->u.action.u.chan_switch.sw_elem, bss); | 1863 | &mgmt->u.action.u.chan_switch.sw_elem, bss); |
1861 | ieee80211_rx_bss_put(local, bss); | 1864 | ieee80211_rx_bss_put(local, bss); |
1862 | break; | 1865 | break; |