diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-09-09 14:49:03 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-11 15:53:39 -0400 |
commit | 39192c0bcf556c8521dcf0203714e9d48ac0b9f6 (patch) | |
tree | bb3ca5d74f06b2357644a5f1270924ca3bee02e9 /net/mac80211/rx.c | |
parent | de1ede7ac3bd300f9aa565d0f93f6cf9ba74bb1a (diff) | |
download | lwn-39192c0bcf556c8521dcf0203714e9d48ac0b9f6.tar.gz lwn-39192c0bcf556c8521dcf0203714e9d48ac0b9f6.zip |
mac80211: move spectrum management code out
Like the HT code, this doesn't depend on the STA-mode implementation
and can be handled entirely independently. There's only stub code
for now, but when it gets filled having it in its own file will be
beneficial.
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 | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 71cce0bcc5be..d00ace78bf8d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1561,12 +1561,26 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) ieee80211_process_delba(sdata, rx->sta, mgmt, len); break; } - rx->sta->rx_packets++; - dev_kfree_skb(rx->skb); - return RX_QUEUED; + break; + case WLAN_CATEGORY_SPECTRUM_MGMT: + if (local->hw.conf.channel->band != IEEE80211_BAND_5GHZ) + return RX_DROP_MONITOR; + switch (mgmt->u.action.u.measurement.action_code) { + case WLAN_ACTION_SPCT_MSR_REQ: + if (len < (IEEE80211_MIN_ACTION_SIZE + + sizeof(mgmt->u.action.u.measurement))) + return RX_DROP_MONITOR; + ieee80211_process_measurement_req(sdata, mgmt, len); + break; + } + break; + default: + return RX_CONTINUE; } - return RX_CONTINUE; + rx->sta->rx_packets++; + dev_kfree_skb(rx->skb); + return RX_QUEUED; } static ieee80211_rx_result debug_noinline |