From 39192c0bcf556c8521dcf0203714e9d48ac0b9f6 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 9 Sep 2008 14:49:03 +0200 Subject: 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 Signed-off-by: John W. Linville --- net/mac80211/rx.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'net/mac80211/rx.c') 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 -- cgit v1.2.3