aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-01-05 22:58:37 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:50 -0500
commitc481ec9705d4a5d566393bc17374cfd82c870715 (patch)
tree383b90aa8cf172ee81a7e91c49440cf75c8c0278 /net/mac80211/rx.c
parentb522ed56ef90f5078a2a1253e390299723510a89 (diff)
mac80211: Add 802.11h CSA support
Move to the advertised channel on reception of a CSA element. This is needed for 802.11h compliance. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Acked-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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 7175ae80c36a..ddb966f58882 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1552,7 +1552,9 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
1552{ 1552{
1553 struct ieee80211_local *local = rx->local; 1553 struct ieee80211_local *local = rx->local;
1554 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); 1554 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev);
1555 struct ieee80211_if_sta *ifsta = &sdata->u.sta;
1555 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data; 1556 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
1557 struct ieee80211_bss *bss;
1556 int len = rx->skb->len; 1558 int len = rx->skb->len;
1557 1559
1558 if (!ieee80211_is_action(mgmt->frame_control)) 1560 if (!ieee80211_is_action(mgmt->frame_control))
@@ -1601,6 +1603,24 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
1601 return RX_DROP_MONITOR; 1603 return RX_DROP_MONITOR;
1602 ieee80211_process_measurement_req(sdata, mgmt, len); 1604 ieee80211_process_measurement_req(sdata, mgmt, len);
1603 break; 1605 break;
1606 case WLAN_ACTION_SPCT_CHL_SWITCH:
1607 if (len < (IEEE80211_MIN_ACTION_SIZE +
1608 sizeof(mgmt->u.action.u.chan_switch)))
1609 return RX_DROP_MONITOR;
1610
1611 if (memcmp(mgmt->bssid, ifsta->bssid, ETH_ALEN) != 0)
1612 return RX_DROP_MONITOR;
1613
1614 bss = ieee80211_rx_bss_get(local, ifsta->bssid,
1615 local->hw.conf.channel->center_freq,
1616 ifsta->ssid, ifsta->ssid_len);
1617 if (!bss)
1618 return RX_DROP_MONITOR;
1619
1620 ieee80211_process_chanswitch(sdata,
1621 &mgmt->u.action.u.chan_switch.sw_elem, bss);
1622 ieee80211_rx_bss_put(local, bss);
1623 break;
1604 } 1624 }
1605 break; 1625 break;
1606 default: 1626 default: