]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ieee80211.h
x86: Add UV partition call v4
[linux-2.6-omap-h63xx.git] / include / linux / ieee80211.h
index 2998e3b5f166bd245132d44578708ea3dd42c518..14126bc36641df1d654102136aa8903d2859d994 100644 (file)
@@ -99,6 +99,8 @@
 #define IEEE80211_MAX_SSID_LEN         32
 #define IEEE80211_MAX_MESH_ID_LEN      32
 #define IEEE80211_QOS_CTL_LEN          2
+#define IEEE80211_QOS_CTL_TID_MASK     0x000F
+#define IEEE80211_QOS_CTL_TAG1D_MASK   0x0007
 
 struct ieee80211_hdr {
        __le16 frame_control;
@@ -469,6 +471,58 @@ struct ieee80211s_hdr {
        u8 eaddr3[6];
 } __attribute__ ((packed));
 
+/* Mesh flags */
+#define MESH_FLAGS_AE_A4       0x1
+#define MESH_FLAGS_AE_A5_A6    0x2
+#define MESH_FLAGS_PS_DEEP     0x4
+
+/**
+ * struct ieee80211_quiet_ie
+ *
+ * This structure refers to "Quiet information element"
+ */
+struct ieee80211_quiet_ie {
+       u8 count;
+       u8 period;
+       __le16 duration;
+       __le16 offset;
+} __attribute__ ((packed));
+
+/**
+ * struct ieee80211_msrment_ie
+ *
+ * This structure refers to "Measurement Request/Report information element"
+ */
+struct ieee80211_msrment_ie {
+       u8 token;
+       u8 mode;
+       u8 type;
+       u8 request[0];
+} __attribute__ ((packed));
+
+/**
+ * struct ieee80211_channel_sw_ie
+ *
+ * This structure refers to "Channel Switch Announcement information element"
+ */
+struct ieee80211_channel_sw_ie {
+       u8 mode;
+       u8 new_ch_num;
+       u8 count;
+} __attribute__ ((packed));
+
+/**
+ * struct ieee80211_tim
+ *
+ * This structure refers to "Traffic Indication Map information element"
+ */
+struct ieee80211_tim_ie {
+       u8 dtim_count;
+       u8 dtim_period;
+       u8 bitmap_ctrl;
+       /* variable size: 1 - 251 bytes */
+       u8 virtual_map[0];
+} __attribute__ ((packed));
 
 struct ieee80211_mgmt {
        __le16 frame_control;
@@ -544,10 +598,15 @@ struct ieee80211_mgmt {
                                        u8 action_code;
                                        u8 element_id;
                                        u8 length;
-                                       u8 switch_mode;
-                                       u8 new_chan;
-                                       u8 switch_count;
+                                       struct ieee80211_channel_sw_ie sw_elem;
                                } __attribute__((packed)) chan_switch;
+                               struct{
+                                       u8 action_code;
+                                       u8 dialog_token;
+                                       u8 element_id;
+                                       u8 length;
+                                       struct ieee80211_msrment_ie msr_elem;
+                               } __attribute__((packed)) measurement;
                                struct{
                                        u8 action_code;
                                        u8 dialog_token;
@@ -589,6 +648,9 @@ struct ieee80211_mgmt {
        } u;
 } __attribute__ ((packed));
 
+/* mgmt header + 1 byte category code */
+#define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)
+
 
 /* Control frames */
 struct ieee80211_rts {
@@ -619,6 +681,10 @@ struct ieee80211_bar {
        __le16 start_seq_num;
 } __attribute__((packed));
 
+/* 802.11 BAR control masks */
+#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL     0x0000
+#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA  0x0004
+
 /**
  * struct ieee80211_ht_cap - HT capabilities
  *
@@ -650,12 +716,13 @@ struct ieee80211_ht_addt_info {
 
 /* 802.11n HT capabilities masks */
 #define IEEE80211_HT_CAP_SUP_WIDTH             0x0002
-#define IEEE80211_HT_CAP_MIMO_PS               0x000C
+#define IEEE80211_HT_CAP_SM_PS                 0x000C
 #define IEEE80211_HT_CAP_GRN_FLD               0x0010
 #define IEEE80211_HT_CAP_SGI_20                        0x0020
 #define IEEE80211_HT_CAP_SGI_40                        0x0040
 #define IEEE80211_HT_CAP_DELAY_BA              0x0400
 #define IEEE80211_HT_CAP_MAX_AMSDU             0x0800
+#define IEEE80211_HT_CAP_DSSSCCK40             0x1000
 /* 802.11n HT capability AMPDU settings */
 #define IEEE80211_HT_CAP_AMPDU_FACTOR          0x03
 #define IEEE80211_HT_CAP_AMPDU_DENSITY         0x1C
@@ -678,11 +745,26 @@ struct ieee80211_ht_addt_info {
 #define IEEE80211_HT_IE_NON_GF_STA_PRSNT       0x0004
 #define IEEE80211_HT_IE_NON_HT_STA_PRSNT       0x0010
 
-/* MIMO Power Save Modes */
-#define WLAN_HT_CAP_MIMO_PS_STATIC     0
-#define WLAN_HT_CAP_MIMO_PS_DYNAMIC    1
-#define WLAN_HT_CAP_MIMO_PS_INVALID    2
-#define WLAN_HT_CAP_MIMO_PS_DISABLED   3
+/* block-ack parameters */
+#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
+#define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C
+#define IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFA0
+#define IEEE80211_DELBA_PARAM_TID_MASK 0xF000
+#define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800
+
+/*
+ * A-PMDU buffer sizes
+ * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2)
+ */
+#define IEEE80211_MIN_AMPDU_BUF 0x8
+#define IEEE80211_MAX_AMPDU_BUF 0x40
+
+
+/* Spatial Multiplexing Power Save Modes */
+#define WLAN_HT_CAP_SM_PS_STATIC       0
+#define WLAN_HT_CAP_SM_PS_DYNAMIC      1
+#define WLAN_HT_CAP_SM_PS_INVALID      2
+#define WLAN_HT_CAP_SM_PS_DISABLED     3
 
 /* Authentication algorithms */
 #define WLAN_AUTH_OPEN 0
@@ -700,11 +782,21 @@ struct ieee80211_ht_addt_info {
 #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
 #define WLAN_CAPABILITY_PBCC           (1<<6)
 #define WLAN_CAPABILITY_CHANNEL_AGILITY        (1<<7)
+
 /* 802.11h */
 #define WLAN_CAPABILITY_SPECTRUM_MGMT  (1<<8)
 #define WLAN_CAPABILITY_QOS            (1<<9)
 #define WLAN_CAPABILITY_SHORT_SLOT_TIME        (1<<10)
 #define WLAN_CAPABILITY_DSSS_OFDM      (1<<13)
+/* measurement */
+#define IEEE80211_SPCT_MSR_RPRT_MODE_LATE      (1<<0)
+#define IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE (1<<1)
+#define IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED   (1<<2)
+
+#define IEEE80211_SPCT_MSR_RPRT_TYPE_BASIC     0
+#define IEEE80211_SPCT_MSR_RPRT_TYPE_CCA       1
+#define IEEE80211_SPCT_MSR_RPRT_TYPE_RPI       2
+
 
 /* 802.11g ERP information element */
 #define WLAN_ERP_NON_ERP_PRESENT (1<<0)
@@ -875,6 +967,15 @@ enum ieee80211_category {
        WLAN_CATEGORY_WMM = 17,
 };
 
+/* SPECTRUM_MGMT action code */
+enum ieee80211_spectrum_mgmt_actioncode {
+       WLAN_ACTION_SPCT_MSR_REQ = 0,
+       WLAN_ACTION_SPCT_MSR_RPRT = 1,
+       WLAN_ACTION_SPCT_TPC_REQ = 2,
+       WLAN_ACTION_SPCT_TPC_RPRT = 3,
+       WLAN_ACTION_SPCT_CHL_SWITCH = 4,
+};
+
 /* BACK action code */
 enum ieee80211_back_actioncode {
        WLAN_ACTION_ADDBA_REQ = 0,