mac80211: support extended channel switch
[carl9170fw.git] / include / linux / ieee80211.h
index 5567dc173fde920675aa7ffd86e9702ad0251337..efb19c6222fba2c8e7b1ac452be0288866819372 100644 (file)
@@ -680,6 +680,18 @@ struct ieee80211_channel_sw_ie {
        u8 count;
 } __packed;
 
+/**
+ * struct ieee80211_ext_chansw_ie
+ *
+ * This structure represents the "Extended Channel Switch Announcement element"
+ */
+struct ieee80211_ext_chansw_ie {
+       u8 mode;
+       u8 new_operating_class;
+       u8 new_ch_num;
+       u8 count;
+} __packed;
+
 /**
  * struct ieee80211_tim
  *
@@ -821,9 +833,7 @@ struct ieee80211_mgmt {
                                } __packed wme_action;
                                struct{
                                        u8 action_code;
-                                       u8 element_id;
-                                       u8 length;
-                                       struct ieee80211_channel_sw_ie sw_elem;
+                                       u8 variable[0];
                                } __packed chan_switch;
                                struct{
                                        u8 action_code;
@@ -1004,6 +1014,26 @@ enum ieee80211_p2p_attr_id {
        IEEE80211_P2P_ATTR_MAX
 };
 
+/* Notice of Absence attribute - described in P2P spec 4.1.14 */
+/* Typical max value used here */
+#define IEEE80211_P2P_NOA_DESC_MAX     4
+
+struct ieee80211_p2p_noa_desc {
+       u8 count;
+       __le32 duration;
+       __le32 interval;
+       __le32 start_time;
+} __packed;
+
+struct ieee80211_p2p_noa_attr {
+       u8 index;
+       u8 oppps_ctwindow;
+       struct ieee80211_p2p_noa_desc desc[IEEE80211_P2P_NOA_DESC_MAX];
+} __packed;
+
+#define IEEE80211_P2P_OPPPS_ENABLE_BIT         BIT(7)
+#define IEEE80211_P2P_OPPPS_CTWINDOW_MASK      0x7F
+
 /**
  * struct ieee80211_bar - HT Block Ack Request
  *
@@ -1919,6 +1949,16 @@ enum ieee80211_timeout_interval_type {
        WLAN_TIMEOUT_ASSOC_COMEBACK = 3 /* 802.11w */,
 };
 
+/**
+ * struct ieee80211_timeout_interval_ie - Timeout Interval element
+ * @type: type, see &enum ieee80211_timeout_interval_type
+ * @value: timeout interval value
+ */
+struct ieee80211_timeout_interval_ie {
+       u8 type;
+       __le32 value;
+} __packed;
+
 /* BACK action code */
 enum ieee80211_back_actioncode {
        WLAN_ACTION_ADDBA_REQ = 0,