aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-25 13:29:27 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-16 09:29:44 -0400
commit85220d71bf3ca1ba9129e0744247ae5f61bec559 (patch)
tree5bdabc71bc5da27ee71fb1272b86809ac2f95b0d /net/mac80211/util.c
parentb4f286a1c0ad0b84c2d502b354d4d98d5a86c64b (diff)
mac80211: support secondary channel offset in CSA
Add support for the secondary channel offset IE in channel switch announcements. This is necessary for proper handling of CSA on HT access points. For this to work it is also necessary to convert everything here to use chandef structs instead of just channels. The driver updates aren't really correct though. In particular, the TI wl18xx driver update can't possibly be right since it just ignores the new channel width for lack of firmware API. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index e4a6d559372d..155056c90edf 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -716,6 +716,7 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
716 case WLAN_EID_COUNTRY: 716 case WLAN_EID_COUNTRY:
717 case WLAN_EID_PWR_CONSTRAINT: 717 case WLAN_EID_PWR_CONSTRAINT:
718 case WLAN_EID_TIMEOUT_INTERVAL: 718 case WLAN_EID_TIMEOUT_INTERVAL:
719 case WLAN_EID_SECONDARY_CHANNEL_OFFSET:
719 if (test_bit(id, seen_elems)) { 720 if (test_bit(id, seen_elems)) {
720 elems->parse_error = true; 721 elems->parse_error = true;
721 left -= elen; 722 left -= elen;
@@ -870,6 +871,13 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
870 } 871 }
871 elems->ext_chansw_ie = (void *)pos; 872 elems->ext_chansw_ie = (void *)pos;
872 break; 873 break;
874 case WLAN_EID_SECONDARY_CHANNEL_OFFSET:
875 if (elen != sizeof(struct ieee80211_sec_chan_offs_ie)) {
876 elem_parse_failed = true;
877 break;
878 }
879 elems->sec_chan_offs = (void *)pos;
880 break;
873 case WLAN_EID_COUNTRY: 881 case WLAN_EID_COUNTRY:
874 elems->country_elem = pos; 882 elems->country_elem = pos;
875 elems->country_elem_len = elen; 883 elems->country_elem_len = elen;