mac80211: support secondary channel offset in CSA
authorJohannes Berg <johannes.berg@intel.com>
Mon, 25 Mar 2013 17:29:27 +0000 (18:29 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 31 May 2013 15:27:42 +0000 (17:27 +0200)
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>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h

index efb19c6222fba2c8e7b1ac452be0288866819372..5d7b15fc77b0b5f7d59d10b3459ce1a9abfa3f5f 100644 (file)
@@ -692,6 +692,16 @@ struct ieee80211_ext_chansw_ie {
        u8 count;
 } __packed;
 
+/**
+ * struct ieee80211_sec_chan_offs_ie - secondary channel offset IE
+ * @sec_chan_offs: secondary channel offset, uses IEEE80211_HT_PARAM_CHA_SEC_*
+ *     values here
+ * This structure represents the "Secondary Channel Offset element"
+ */
+struct ieee80211_sec_chan_offs_ie {
+       u8 sec_chan_offs;
+} __packed;
+
 /**
  * struct ieee80211_tim
  *
@@ -1641,6 +1651,7 @@ enum ieee80211_eid {
 
        WLAN_EID_HT_CAPABILITY = 45,
        WLAN_EID_HT_OPERATION = 61,
+       WLAN_EID_SECONDARY_CHANNEL_OFFSET = 62,
 
        WLAN_EID_RSN = 48,
        WLAN_EID_MMIE = 76,