summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/bcmdhd/include/proto
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@stericsson.com>2012-03-22 08:35:11 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-03-22 08:35:11 +0100
commit0131b19470d25050892c5e91993a9bbaf2033bc7 (patch)
tree1b88e3339620cc9d43ff38c54bb3b0808f795027 /drivers/net/wireless/bcmdhd/include/proto
parent77e19ebf618f63d3e71b16e94e7291bc0bd37e90 (diff)
parent1df760f233995de856f6a54326267d0987fdb85d (diff)
Merge remote-tracking branch 'jstultz/linaro-android-3.3' into stable-android-ux500-3.3
Diffstat (limited to 'drivers/net/wireless/bcmdhd/include/proto')
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/802.11.h2282
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/802.11_bta.h6
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/802.11e.h6
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/802.1d.h7
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/bcmeth.h7
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/bcmevent.h49
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/bcmip.h64
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/bcmipv6.h104
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h7
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/eapol.h26
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/ethernet.h25
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/p2p.h634
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/sdspi.h7
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/vlan.h7
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/wpa.h45
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/wps.h379
16 files changed, 2219 insertions, 1436 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/proto/802.11.h b/drivers/net/wireless/bcmdhd/include/proto/802.11.h
index fd69aac4130..e367493e9c5 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/802.11.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/802.11.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,10 +21,9 @@
*
* Fundamental types and constants relating to 802.11
*
- * $Id: 802.11.h 304058 2011-12-21 00:39:12Z $
+ * $Id: 802.11.h 309193 2012-01-19 00:03:57Z $
*/
-
#ifndef _802_11_H_
#define _802_11_H_
@@ -42,255 +41,261 @@
#include <packed_section_start.h>
-#define DOT11_TU_TO_US 1024
+#define DOT11_TU_TO_US 1024
-#define DOT11_A3_HDR_LEN 24
-#define DOT11_A4_HDR_LEN 30
-#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN
-#define DOT11_FCS_LEN 4
-#define DOT11_ICV_LEN 4
-#define DOT11_ICV_AES_LEN 8
-#define DOT11_QOS_LEN 2
-#define DOT11_HTC_LEN 4
+#define DOT11_A3_HDR_LEN 24
+#define DOT11_A4_HDR_LEN 30
+#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN
+#define DOT11_FCS_LEN 4
+#define DOT11_ICV_LEN 4
+#define DOT11_ICV_AES_LEN 8
+#define DOT11_QOS_LEN 2
+#define DOT11_HTC_LEN 4
-#define DOT11_KEY_INDEX_SHIFT 6
-#define DOT11_IV_LEN 4
-#define DOT11_IV_TKIP_LEN 8
-#define DOT11_IV_AES_OCB_LEN 4
-#define DOT11_IV_AES_CCM_LEN 8
-#define DOT11_IV_MAX_LEN 8
+#define DOT11_KEY_INDEX_SHIFT 6
+#define DOT11_IV_LEN 4
+#define DOT11_IV_TKIP_LEN 8
+#define DOT11_IV_AES_OCB_LEN 4
+#define DOT11_IV_AES_CCM_LEN 8
+#define DOT11_IV_MAX_LEN 8
-#define DOT11_MAX_MPDU_BODY_LEN 2304
+#define DOT11_MAX_MPDU_BODY_LEN 2304
-#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \
+#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \
DOT11_QOS_LEN + \
DOT11_IV_AES_CCM_LEN + \
DOT11_MAX_MPDU_BODY_LEN + \
DOT11_ICV_LEN + \
- DOT11_FCS_LEN)
+ DOT11_FCS_LEN)
-#define DOT11_MAX_SSID_LEN 32
+#define DOT11_MAX_SSID_LEN 32
-#define DOT11_DEFAULT_RTS_LEN 2347
-#define DOT11_MAX_RTS_LEN 2347
+#define DOT11_DEFAULT_RTS_LEN 2347
+#define DOT11_MAX_RTS_LEN 2347
-#define DOT11_MIN_FRAG_LEN 256
-#define DOT11_MAX_FRAG_LEN 2346
-#define DOT11_DEFAULT_FRAG_LEN 2346
+#define DOT11_MIN_FRAG_LEN 256
+#define DOT11_MAX_FRAG_LEN 2346
+#define DOT11_DEFAULT_FRAG_LEN 2346
-#define DOT11_MIN_BEACON_PERIOD 1
-#define DOT11_MAX_BEACON_PERIOD 0xFFFF
+#define DOT11_MIN_BEACON_PERIOD 1
+#define DOT11_MAX_BEACON_PERIOD 0xFFFF
-#define DOT11_MIN_DTIM_PERIOD 1
-#define DOT11_MAX_DTIM_PERIOD 0xFF
+#define DOT11_MIN_DTIM_PERIOD 1
+#define DOT11_MAX_DTIM_PERIOD 0xFF
-#define DOT11_LLC_SNAP_HDR_LEN 8
-#define DOT11_OUI_LEN 3
+#define DOT11_LLC_SNAP_HDR_LEN 8
+#define DOT11_OUI_LEN 3
BWL_PRE_PACKED_STRUCT struct dot11_llc_snap_header {
- uint8 dsap;
- uint8 ssap;
- uint8 ctl;
- uint8 oui[DOT11_OUI_LEN];
- uint16 type;
+ uint8 dsap;
+ uint8 ssap;
+ uint8 ctl;
+ uint8 oui[DOT11_OUI_LEN];
+ uint16 type;
} BWL_POST_PACKED_STRUCT;
-#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN)
+#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN)
BWL_PRE_PACKED_STRUCT struct dot11_header {
- uint16 fc;
- uint16 durid;
- struct ether_addr a1;
- struct ether_addr a2;
- struct ether_addr a3;
- uint16 seq;
- struct ether_addr a4;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr a1;
+ struct ether_addr a2;
+ struct ether_addr a3;
+ uint16 seq;
+ struct ether_addr a4;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct dot11_rts_frame {
- uint16 fc;
- uint16 durid;
- struct ether_addr ra;
- struct ether_addr ta;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr ra;
+ struct ether_addr ta;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_RTS_LEN 16
+#define DOT11_RTS_LEN 16
BWL_PRE_PACKED_STRUCT struct dot11_cts_frame {
- uint16 fc;
- uint16 durid;
- struct ether_addr ra;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr ra;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_CTS_LEN 10
+#define DOT11_CTS_LEN 10
BWL_PRE_PACKED_STRUCT struct dot11_ack_frame {
- uint16 fc;
- uint16 durid;
- struct ether_addr ra;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr ra;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_ACK_LEN 10
+#define DOT11_ACK_LEN 10
BWL_PRE_PACKED_STRUCT struct dot11_ps_poll_frame {
- uint16 fc;
- uint16 durid;
- struct ether_addr bssid;
- struct ether_addr ta;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr bssid;
+ struct ether_addr ta;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_PS_POLL_LEN 16
+#define DOT11_PS_POLL_LEN 16
BWL_PRE_PACKED_STRUCT struct dot11_cf_end_frame {
- uint16 fc;
- uint16 durid;
- struct ether_addr ra;
- struct ether_addr bssid;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr ra;
+ struct ether_addr bssid;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_CS_END_LEN 16
+#define DOT11_CS_END_LEN 16
BWL_PRE_PACKED_STRUCT struct dot11_action_wifi_vendor_specific {
- uint8 category;
- uint8 OUI[3];
- uint8 type;
- uint8 subtype;
- uint8 data[1040];
+ uint8 category;
+ uint8 OUI[3];
+ uint8 type;
+ uint8 subtype;
+ uint8 data[1040];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_action_wifi_vendor_specific dot11_action_wifi_vendor_specific_t;
BWL_PRE_PACKED_STRUCT struct dot11_action_vs_frmhdr {
- uint8 category;
- uint8 OUI[3];
- uint8 type;
- uint8 subtype;
- uint8 data[1];
+ uint8 category;
+ uint8 OUI[3];
+ uint8 type;
+ uint8 subtype;
+ uint8 data[1];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_action_vs_frmhdr dot11_action_vs_frmhdr_t;
-#define DOT11_ACTION_VS_HDR_LEN 6
+#define DOT11_ACTION_VS_HDR_LEN 6
-#define BCM_ACTION_OUI_BYTE0 0x00
-#define BCM_ACTION_OUI_BYTE1 0x90
-#define BCM_ACTION_OUI_BYTE2 0x4c
+#define BCM_ACTION_OUI_BYTE0 0x00
+#define BCM_ACTION_OUI_BYTE1 0x90
+#define BCM_ACTION_OUI_BYTE2 0x4c
-#define DOT11_BA_CTL_POLICY_NORMAL 0x0000
-#define DOT11_BA_CTL_POLICY_NOACK 0x0001
-#define DOT11_BA_CTL_POLICY_MASK 0x0001
+#define DOT11_BA_CTL_POLICY_NORMAL 0x0000
+#define DOT11_BA_CTL_POLICY_NOACK 0x0001
+#define DOT11_BA_CTL_POLICY_MASK 0x0001
-#define DOT11_BA_CTL_MTID 0x0002
-#define DOT11_BA_CTL_COMPRESSED 0x0004
+#define DOT11_BA_CTL_MTID 0x0002
+#define DOT11_BA_CTL_COMPRESSED 0x0004
-#define DOT11_BA_CTL_NUMMSDU_MASK 0x0FC0
-#define DOT11_BA_CTL_NUMMSDU_SHIFT 6
+#define DOT11_BA_CTL_NUMMSDU_MASK 0x0FC0
+#define DOT11_BA_CTL_NUMMSDU_SHIFT 6
-#define DOT11_BA_CTL_TID_MASK 0xF000
-#define DOT11_BA_CTL_TID_SHIFT 12
+#define DOT11_BA_CTL_TID_MASK 0xF000
+#define DOT11_BA_CTL_TID_SHIFT 12
BWL_PRE_PACKED_STRUCT struct dot11_ctl_header {
- uint16 fc;
- uint16 durid;
- struct ether_addr ra;
- struct ether_addr ta;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr ra;
+ struct ether_addr ta;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_CTL_HDR_LEN 16
+#define DOT11_CTL_HDR_LEN 16
BWL_PRE_PACKED_STRUCT struct dot11_bar {
- uint16 bar_control;
- uint16 seqnum;
+ uint16 bar_control;
+ uint16 seqnum;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_BAR_LEN 4
+#define DOT11_BAR_LEN 4
-#define DOT11_BA_BITMAP_LEN 128
-#define DOT11_BA_CMP_BITMAP_LEN 8
+#define DOT11_BA_BITMAP_LEN 128
+#define DOT11_BA_CMP_BITMAP_LEN 8
BWL_PRE_PACKED_STRUCT struct dot11_ba {
- uint16 ba_control;
- uint16 seqnum;
- uint8 bitmap[DOT11_BA_BITMAP_LEN];
+ uint16 ba_control;
+ uint16 seqnum;
+ uint8 bitmap[DOT11_BA_BITMAP_LEN];
} BWL_POST_PACKED_STRUCT;
-#define DOT11_BA_LEN 4
+#define DOT11_BA_LEN 4
BWL_PRE_PACKED_STRUCT struct dot11_management_header {
- uint16 fc;
- uint16 durid;
- struct ether_addr da;
- struct ether_addr sa;
- struct ether_addr bssid;
- uint16 seq;
+ uint16 fc;
+ uint16 durid;
+ struct ether_addr da;
+ struct ether_addr sa;
+ struct ether_addr bssid;
+ uint16 seq;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_MGMT_HDR_LEN 24
+#define DOT11_MGMT_HDR_LEN 24
BWL_PRE_PACKED_STRUCT struct dot11_bcn_prb {
- uint32 timestamp[2];
- uint16 beacon_interval;
- uint16 capability;
+ uint32 timestamp[2];
+ uint16 beacon_interval;
+ uint16 capability;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_BCN_PRB_LEN 12
-#define DOT11_BCN_PRB_FIXED_LEN 12
+#define DOT11_BCN_PRB_LEN 12
+#define DOT11_BCN_PRB_FIXED_LEN 12
BWL_PRE_PACKED_STRUCT struct dot11_auth {
- uint16 alg;
- uint16 seq;
- uint16 status;
+ uint16 alg;
+ uint16 seq;
+ uint16 status;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_AUTH_FIXED_LEN 6
+#define DOT11_AUTH_FIXED_LEN 6
BWL_PRE_PACKED_STRUCT struct dot11_assoc_req {
- uint16 capability;
- uint16 listen;
+ uint16 capability;
+ uint16 listen;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_ASSOC_REQ_FIXED_LEN 4
+#define DOT11_ASSOC_REQ_FIXED_LEN 4
BWL_PRE_PACKED_STRUCT struct dot11_reassoc_req {
- uint16 capability;
- uint16 listen;
- struct ether_addr ap;
+ uint16 capability;
+ uint16 listen;
+ struct ether_addr ap;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_REASSOC_REQ_FIXED_LEN 10
+#define DOT11_REASSOC_REQ_FIXED_LEN 10
BWL_PRE_PACKED_STRUCT struct dot11_assoc_resp {
- uint16 capability;
- uint16 status;
- uint16 aid;
+ uint16 capability;
+ uint16 status;
+ uint16 aid;
} BWL_POST_PACKED_STRUCT;
-#define DOT11_ASSOC_RESP_FIXED_LEN 6
+#define DOT11_ASSOC_RESP_FIXED_LEN 6
BWL_PRE_PACKED_STRUCT struct dot11_action_measure {
- uint8 category;
- uint8 action;
- uint8 token;
- uint8 data[1];
+ uint8 category;
+ uint8 action;
+ uint8 token;
+ uint8 data[1];
} BWL_POST_PACKED_STRUCT;
-#define DOT11_ACTION_MEASURE_LEN 3
+#define DOT11_ACTION_MEASURE_LEN 3
BWL_PRE_PACKED_STRUCT struct dot11_action_ht_ch_width {
- uint8 category;
- uint8 action;
- uint8 ch_width;
+ uint8 category;
+ uint8 action;
+ uint8 ch_width;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct dot11_action_ht_mimops {
- uint8 category;
- uint8 action;
- uint8 control;
+ uint8 category;
+ uint8 action;
+ uint8 control;
+} BWL_POST_PACKED_STRUCT;
+
+BWL_PRE_PACKED_STRUCT struct dot11_action_sa_query {
+ uint8 category;
+ uint8 action;
+ uint16 id;
} BWL_POST_PACKED_STRUCT;
-#define SM_PWRSAVE_ENABLE 1
-#define SM_PWRSAVE_MODE 2
+#define SM_PWRSAVE_ENABLE 1
+#define SM_PWRSAVE_MODE 2
BWL_PRE_PACKED_STRUCT struct dot11_power_cnst {
@@ -313,7 +318,7 @@ BWL_PRE_PACKED_STRUCT struct dot11_tpc_rep {
uint8 margin;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_tpc_rep dot11_tpc_rep_t;
-#define DOT11_MNG_IE_TPC_REPORT_LEN 2
+#define DOT11_MNG_IE_TPC_REPORT_LEN 2
BWL_PRE_PACKED_STRUCT struct dot11_supp_channels {
uint8 id;
@@ -325,106 +330,106 @@ typedef struct dot11_supp_channels dot11_supp_channels_t;
BWL_PRE_PACKED_STRUCT struct dot11_extch {
- uint8 id;
- uint8 len;
- uint8 extch;
+ uint8 id;
+ uint8 len;
+ uint8 extch;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_extch dot11_extch_ie_t;
BWL_PRE_PACKED_STRUCT struct dot11_brcm_extch {
- uint8 id;
- uint8 len;
- uint8 oui[3];
- uint8 type;
- uint8 extch;
+ uint8 id;
+ uint8 len;
+ uint8 oui[3];
+ uint8 type;
+ uint8 extch;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_brcm_extch dot11_brcm_extch_ie_t;
-#define BRCM_EXTCH_IE_LEN 5
-#define BRCM_EXTCH_IE_TYPE 53
-#define DOT11_EXTCH_IE_LEN 1
-#define DOT11_EXT_CH_MASK 0x03
-#define DOT11_EXT_CH_UPPER 0x01
-#define DOT11_EXT_CH_LOWER 0x03
-#define DOT11_EXT_CH_NONE 0x00
+#define BRCM_EXTCH_IE_LEN 5
+#define BRCM_EXTCH_IE_TYPE 53
+#define DOT11_EXTCH_IE_LEN 1
+#define DOT11_EXT_CH_MASK 0x03
+#define DOT11_EXT_CH_UPPER 0x01
+#define DOT11_EXT_CH_LOWER 0x03
+#define DOT11_EXT_CH_NONE 0x00
BWL_PRE_PACKED_STRUCT struct dot11_action_frmhdr {
- uint8 category;
- uint8 action;
- uint8 data[1];
+ uint8 category;
+ uint8 action;
+ uint8 data[1];
} BWL_POST_PACKED_STRUCT;
-#define DOT11_ACTION_FRMHDR_LEN 2
+#define DOT11_ACTION_FRMHDR_LEN 2
BWL_PRE_PACKED_STRUCT struct dot11_channel_switch {
- uint8 id;
- uint8 len;
- uint8 mode;
- uint8 channel;
- uint8 count;
+ uint8 id;
+ uint8 len;
+ uint8 mode;
+ uint8 channel;
+ uint8 count;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_channel_switch dot11_chan_switch_ie_t;
-#define DOT11_SWITCH_IE_LEN 3
+#define DOT11_SWITCH_IE_LEN 3
-#define DOT11_CSA_MODE_ADVISORY 0
-#define DOT11_CSA_MODE_NO_TX 1
+#define DOT11_CSA_MODE_ADVISORY 0
+#define DOT11_CSA_MODE_NO_TX 1
BWL_PRE_PACKED_STRUCT struct dot11_action_switch_channel {
- uint8 category;
- uint8 action;
- dot11_chan_switch_ie_t chan_switch_ie;
- dot11_brcm_extch_ie_t extch_ie;
+ uint8 category;
+ uint8 action;
+ dot11_chan_switch_ie_t chan_switch_ie;
+ dot11_brcm_extch_ie_t extch_ie;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct dot11_csa_body {
- uint8 mode;
- uint8 reg;
- uint8 channel;
- uint8 count;
+ uint8 mode;
+ uint8 reg;
+ uint8 channel;
+ uint8 count;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct dot11_ext_csa {
- uint8 id;
- uint8 len;
- struct dot11_csa_body b;
+ uint8 id;
+ uint8 len;
+ struct dot11_csa_body b;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_ext_csa dot11_ext_csa_ie_t;
-#define DOT11_EXT_CSA_IE_LEN 4
+#define DOT11_EXT_CSA_IE_LEN 4
BWL_PRE_PACKED_STRUCT struct dot11_action_ext_csa {
- uint8 category;
- uint8 action;
- dot11_ext_csa_ie_t chan_switch_ie;
+ uint8 category;
+ uint8 action;
+ dot11_ext_csa_ie_t chan_switch_ie;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct dot11y_action_ext_csa {
- uint8 category;
- uint8 action;
- struct dot11_csa_body b;
+ uint8 category;
+ uint8 action;
+ struct dot11_csa_body b;
} BWL_POST_PACKED_STRUCT;
BWL_PRE_PACKED_STRUCT struct dot11_obss_coex {
- uint8 id;
- uint8 len;
- uint8 info;
+ uint8 id;
+ uint8 len;
+ uint8 info;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_obss_coex dot11_obss_coex_t;
-#define DOT11_OBSS_COEXINFO_LEN 1
+#define DOT11_OBSS_COEXINFO_LEN 1
-#define DOT11_OBSS_COEX_INFO_REQ 0x01
-#define DOT11_OBSS_COEX_40MHZ_INTOLERANT 0x02
-#define DOT11_OBSS_COEX_20MHZ_WIDTH_REQ 0x04
+#define DOT11_OBSS_COEX_INFO_REQ 0x01
+#define DOT11_OBSS_COEX_40MHZ_INTOLERANT 0x02
+#define DOT11_OBSS_COEX_20MHZ_WIDTH_REQ 0x04
BWL_PRE_PACKED_STRUCT struct dot11_obss_chanlist {
- uint8 id;
- uint8 len;
- uint8 regclass;
- uint8 chanlist[1];
+ uint8 id;
+ uint8 len;
+ uint8 regclass;
+ uint8 chanlist[1];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_obss_chanlist dot11_obss_chanlist_t;
-#define DOT11_OBSS_CHANLIST_FIXED_LEN 1
+#define DOT11_OBSS_CHANLIST_FIXED_LEN 1
BWL_PRE_PACKED_STRUCT struct dot11_extcap_ie {
uint8 id;
@@ -432,9 +437,14 @@ BWL_PRE_PACKED_STRUCT struct dot11_extcap_ie {
uint8 cap[1];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_extcap_ie dot11_extcap_ie_t;
-#define DOT11_EXTCAP_LEN 1
-#define DOT11_EXTCAP_LEN_TDLS 5
+#define DOT11_EXTCAP_LEN_MAX 7
+#define DOT11_EXTCAP_LEN_COEX 1
+#define DOT11_EXTCAP_LEN_BT 3
+#define DOT11_EXTCAP_LEN_IW 4
+#define DOT11_EXTCAP_LEN_SI 6
+
+#define DOT11_EXTCAP_LEN_TDLS 5
BWL_PRE_PACKED_STRUCT struct dot11_extcap {
uint8 extcap[DOT11_EXTCAP_LEN_TDLS];
} BWL_POST_PACKED_STRUCT;
@@ -452,34 +462,34 @@ typedef struct dot11_extcap dot11_extcap_t;
-#define DOT11_MEASURE_TYPE_BASIC 0
-#define DOT11_MEASURE_TYPE_CCA 1
-#define DOT11_MEASURE_TYPE_RPI 2
-#define DOT11_MEASURE_TYPE_CHLOAD 3
-#define DOT11_MEASURE_TYPE_NOISE 4
-#define DOT11_MEASURE_TYPE_BEACON 5
-#define DOT11_MEASURE_TYPE_FRAME 6
-#define DOT11_MEASURE_TYPE_STATS 7
-#define DOT11_MEASURE_TYPE_LCI 8
-#define DOT11_MEASURE_TYPE_TXSTREAM 9
-#define DOT11_MEASURE_TYPE_PAUSE 255
+#define DOT11_MEASURE_TYPE_BASIC 0
+#define DOT11_MEASURE_TYPE_CCA 1
+#define DOT11_MEASURE_TYPE_RPI 2
+#define DOT11_MEASURE_TYPE_CHLOAD 3
+#define DOT11_MEASURE_TYPE_NOISE 4
+#define DOT11_MEASURE_TYPE_BEACON 5
+#define DOT11_MEASURE_TYPE_FRAME 6
+#define DOT11_MEASURE_TYPE_STATS 7
+#define DOT11_MEASURE_TYPE_LCI 8
+#define DOT11_MEASURE_TYPE_TXSTREAM 9
+#define DOT11_MEASURE_TYPE_PAUSE 255
-#define DOT11_MEASURE_MODE_PARALLEL (1<<0)
-#define DOT11_MEASURE_MODE_ENABLE (1<<1)
-#define DOT11_MEASURE_MODE_REQUEST (1<<2)
-#define DOT11_MEASURE_MODE_REPORT (1<<3)
-#define DOT11_MEASURE_MODE_DUR (1<<4)
+#define DOT11_MEASURE_MODE_PARALLEL (1<<0)
+#define DOT11_MEASURE_MODE_ENABLE (1<<1)
+#define DOT11_MEASURE_MODE_REQUEST (1<<2)
+#define DOT11_MEASURE_MODE_REPORT (1<<3)
+#define DOT11_MEASURE_MODE_DUR (1<<4)
-#define DOT11_MEASURE_MODE_LATE (1<<0)
-#define DOT11_MEASURE_MODE_INCAPABLE (1<<1)
-#define DOT11_MEASURE_MODE_REFUSED (1<<2)
+#define DOT11_MEASURE_MODE_LATE (1<<0)
+#define DOT11_MEASURE_MODE_INCAPABLE (1<<1)
+#define DOT11_MEASURE_MODE_REFUSED (1<<2)
-#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0))
-#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1))
-#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2))
-#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3))
-#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4))
+#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0))
+#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1))
+#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2))
+#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3))
+#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4))
BWL_PRE_PACKED_STRUCT struct dot11_meas_req {
uint8 id;
@@ -492,9 +502,9 @@ BWL_PRE_PACKED_STRUCT struct dot11_meas_req {
uint16 duration;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_meas_req dot11_meas_req_t;
-#define DOT11_MNG_IE_MREQ_LEN 14
+#define DOT11_MNG_IE_MREQ_LEN 14
-#define DOT11_MNG_IE_MREQ_FIXED_LEN 3
+#define DOT11_MNG_IE_MREQ_FIXED_LEN 3
BWL_PRE_PACKED_STRUCT struct dot11_meas_rep {
uint8 id;
@@ -516,7 +526,7 @@ BWL_PRE_PACKED_STRUCT struct dot11_meas_rep {
typedef struct dot11_meas_rep dot11_meas_rep_t;
-#define DOT11_MNG_IE_MREP_FIXED_LEN 3
+#define DOT11_MNG_IE_MREP_FIXED_LEN 3
BWL_PRE_PACKED_STRUCT struct dot11_meas_rep_basic {
uint8 channel;
@@ -525,15 +535,15 @@ BWL_PRE_PACKED_STRUCT struct dot11_meas_rep_basic {
uint8 map;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t;
-#define DOT11_MEASURE_BASIC_REP_LEN 12
+#define DOT11_MEASURE_BASIC_REP_LEN 12
BWL_PRE_PACKED_STRUCT struct dot11_quiet {
uint8 id;
uint8 len;
- uint8 count;
- uint8 period;
- uint16 duration;
- uint16 offset;
+ uint8 count;
+ uint8 period;
+ uint16 duration;
+ uint16 offset;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_quiet dot11_quiet_t;
@@ -553,31 +563,28 @@ BWL_PRE_PACKED_STRUCT struct dot11_ibss_dfs {
typedef struct dot11_ibss_dfs dot11_ibss_dfs_t;
-#define WME_OUI "\x00\x50\xf2"
-#define WME_OUI_LEN 3
-#define WME_OUI_TYPE 2
-#define WME_VER 1
-#define WME_TYPE 2
-#define WME_SUBTYPE_IE 0
-#define WME_SUBTYPE_PARAM_IE 1
-#define WME_SUBTYPE_TSPEC 2
-#define WME_VERSION_LEN 1
-#define WME_PARAMETER_IE_LEN 24
+#define WME_OUI "\x00\x50\xf2"
+#define WME_OUI_LEN 3
+#define WME_OUI_TYPE 2
+#define WME_TYPE 2
+#define WME_SUBTYPE_IE 0
+#define WME_SUBTYPE_PARAM_IE 1
+#define WME_SUBTYPE_TSPEC 2
+#define WME_VER 1
+#define AC_BE 0
+#define AC_BK 1
+#define AC_VI 2
+#define AC_VO 3
+#define AC_COUNT 4
-#define AC_BE 0
-#define AC_BK 1
-#define AC_VI 2
-#define AC_VO 3
-#define AC_COUNT 4
+typedef uint8 ac_bitmap_t;
-typedef uint8 ac_bitmap_t;
-
-#define AC_BITMAP_NONE 0x0
-#define AC_BITMAP_ALL 0xf
-#define AC_BITMAP_TST(ab, ac) (((ab) & (1 << (ac))) != 0)
-#define AC_BITMAP_SET(ab, ac) (((ab) |= (1 << (ac))))
+#define AC_BITMAP_NONE 0x0
+#define AC_BITMAP_ALL 0xf
+#define AC_BITMAP_TST(ab, ac) (((ab) & (1 << (ac))) != 0)
+#define AC_BITMAP_SET(ab, ac) (((ab) |= (1 << (ac))))
#define AC_BITMAP_RESET(ab, ac) (((ab) &= ~(1 << (ac))))
@@ -589,12 +596,12 @@ BWL_PRE_PACKED_STRUCT struct wme_ie {
uint8 qosinfo;
} BWL_POST_PACKED_STRUCT;
typedef struct wme_ie wme_ie_t;
-#define WME_IE_LEN 7
+#define WME_IE_LEN 7
BWL_PRE_PACKED_STRUCT struct edcf_acparam {
- uint8 ACI;
- uint8 ECW;
- uint16 TXOP;
+ uint8 ACI;
+ uint8 ECW;
+ uint16 TXOP;
} BWL_POST_PACKED_STRUCT;
typedef struct edcf_acparam edcf_acparam_t;
@@ -657,32 +664,32 @@ typedef struct wme_param_ie wme_param_ie_t;
#define NON_EDCF_AC_BE_ACI_STA 0x02
-#define EDCF_AC_BE_ACI_STA 0x03
-#define EDCF_AC_BE_ECW_STA 0xA4
-#define EDCF_AC_BE_TXOP_STA 0x0000
-#define EDCF_AC_BK_ACI_STA 0x27
-#define EDCF_AC_BK_ECW_STA 0xA4
-#define EDCF_AC_BK_TXOP_STA 0x0000
-#define EDCF_AC_VI_ACI_STA 0x42
-#define EDCF_AC_VI_ECW_STA 0x43
-#define EDCF_AC_VI_TXOP_STA 0x005e
-#define EDCF_AC_VO_ACI_STA 0x62
-#define EDCF_AC_VO_ECW_STA 0x32
-#define EDCF_AC_VO_TXOP_STA 0x002f
-
-
-#define EDCF_AC_BE_ACI_AP 0x03
-#define EDCF_AC_BE_ECW_AP 0x64
-#define EDCF_AC_BE_TXOP_AP 0x0000
-#define EDCF_AC_BK_ACI_AP 0x27
-#define EDCF_AC_BK_ECW_AP 0xA4
-#define EDCF_AC_BK_TXOP_AP 0x0000
-#define EDCF_AC_VI_ACI_AP 0x41
-#define EDCF_AC_VI_ECW_AP 0x43
-#define EDCF_AC_VI_TXOP_AP 0x005e
-#define EDCF_AC_VO_ACI_AP 0x61
-#define EDCF_AC_VO_ECW_AP 0x32
-#define EDCF_AC_VO_TXOP_AP 0x002f
+#define EDCF_AC_BE_ACI_STA 0x03
+#define EDCF_AC_BE_ECW_STA 0xA4
+#define EDCF_AC_BE_TXOP_STA 0x0000
+#define EDCF_AC_BK_ACI_STA 0x27
+#define EDCF_AC_BK_ECW_STA 0xA4
+#define EDCF_AC_BK_TXOP_STA 0x0000
+#define EDCF_AC_VI_ACI_STA 0x42
+#define EDCF_AC_VI_ECW_STA 0x43
+#define EDCF_AC_VI_TXOP_STA 0x005e
+#define EDCF_AC_VO_ACI_STA 0x62
+#define EDCF_AC_VO_ECW_STA 0x32
+#define EDCF_AC_VO_TXOP_STA 0x002f
+
+
+#define EDCF_AC_BE_ACI_AP 0x03
+#define EDCF_AC_BE_ECW_AP 0x64
+#define EDCF_AC_BE_TXOP_AP 0x0000
+#define EDCF_AC_BK_ACI_AP 0x27
+#define EDCF_AC_BK_ECW_AP 0xA4
+#define EDCF_AC_BK_TXOP_AP 0x0000
+#define EDCF_AC_VI_ACI_AP 0x41
+#define EDCF_AC_VI_ECW_AP 0x43
+#define EDCF_AC_VI_TXOP_AP 0x005e
+#define EDCF_AC_VO_ACI_AP 0x61
+#define EDCF_AC_VO_ECW_AP 0x32
+#define EDCF_AC_VO_TXOP_AP 0x002f
BWL_PRE_PACKED_STRUCT struct edca_param_ie {
@@ -700,32 +707,33 @@ BWL_PRE_PACKED_STRUCT struct qos_cap_ie {
typedef struct qos_cap_ie qos_cap_ie_t;
BWL_PRE_PACKED_STRUCT struct dot11_qbss_load_ie {
- uint8 id;
+ uint8 id;
uint8 length;
- uint16 station_count;
- uint8 channel_utilization;
- uint16 aac;
+ uint16 station_count;
+ uint8 channel_utilization;
+ uint16 aac;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_qbss_load_ie dot11_qbss_load_ie_t;
+#define BSS_LOAD_IE_SIZE 7
-#define FIXED_MSDU_SIZE 0x8000
-#define MSDU_SIZE_MASK 0x7fff
+#define FIXED_MSDU_SIZE 0x8000
+#define MSDU_SIZE_MASK 0x7fff
-#define INTEGER_SHIFT 13
-#define FRACTION_MASK 0x1FFF
+#define INTEGER_SHIFT 13
+#define FRACTION_MASK 0x1FFF
BWL_PRE_PACKED_STRUCT struct dot11_management_notification {
- uint8 category;
+ uint8 category;
uint8 action;
uint8 token;
uint8 status;
- uint8 data[1];
+ uint8 data[1];
} BWL_POST_PACKED_STRUCT;
-#define DOT11_MGMT_NOTIFICATION_LEN 4
+#define DOT11_MGMT_NOTIFICATION_LEN 4
BWL_PRE_PACKED_STRUCT struct ti_ie {
@@ -737,252 +745,252 @@ typedef struct ti_ie ti_ie_t;
#define TI_TYPE_KEY_LIFETIME 2
-#define WME_ADDTS_REQUEST 0
-#define WME_ADDTS_RESPONSE 1
-#define WME_DELTS_REQUEST 2
+#define WME_ADDTS_REQUEST 0
+#define WME_ADDTS_RESPONSE 1
+#define WME_DELTS_REQUEST 2
-#define WME_ADMISSION_ACCEPTED 0
-#define WME_INVALID_PARAMETERS 1
-#define WME_ADMISSION_REFUSED 3
+#define WME_ADMISSION_ACCEPTED 0
+#define WME_INVALID_PARAMETERS 1
+#define WME_ADMISSION_REFUSED 3
#define BCN_PRB_SSID(body) ((char*)(body) + DOT11_BCN_PRB_LEN)
-#define DOT11_OPEN_SYSTEM 0
-#define DOT11_SHARED_KEY 1
+#define DOT11_OPEN_SYSTEM 0
+#define DOT11_SHARED_KEY 1
#define DOT11_FAST_BSS 2
-#define DOT11_CHALLENGE_LEN 128
-
-
-#define FC_PVER_MASK 0x3
-#define FC_PVER_SHIFT 0
-#define FC_TYPE_MASK 0xC
-#define FC_TYPE_SHIFT 2
-#define FC_SUBTYPE_MASK 0xF0
-#define FC_SUBTYPE_SHIFT 4
-#define FC_TODS 0x100
-#define FC_TODS_SHIFT 8
-#define FC_FROMDS 0x200
-#define FC_FROMDS_SHIFT 9
-#define FC_MOREFRAG 0x400
-#define FC_MOREFRAG_SHIFT 10
-#define FC_RETRY 0x800
-#define FC_RETRY_SHIFT 11
-#define FC_PM 0x1000
-#define FC_PM_SHIFT 12
-#define FC_MOREDATA 0x2000
-#define FC_MOREDATA_SHIFT 13
-#define FC_WEP 0x4000
-#define FC_WEP_SHIFT 14
-#define FC_ORDER 0x8000
-#define FC_ORDER_SHIFT 15
-
-
-#define SEQNUM_SHIFT 4
-#define SEQNUM_MAX 0x1000
-#define FRAGNUM_MASK 0xF
-
-
-
-
-#define FC_TYPE_MNG 0
-#define FC_TYPE_CTL 1
-#define FC_TYPE_DATA 2
-
-
-#define FC_SUBTYPE_ASSOC_REQ 0
-#define FC_SUBTYPE_ASSOC_RESP 1
-#define FC_SUBTYPE_REASSOC_REQ 2
-#define FC_SUBTYPE_REASSOC_RESP 3
-#define FC_SUBTYPE_PROBE_REQ 4
-#define FC_SUBTYPE_PROBE_RESP 5
-#define FC_SUBTYPE_BEACON 8
-#define FC_SUBTYPE_ATIM 9
-#define FC_SUBTYPE_DISASSOC 10
-#define FC_SUBTYPE_AUTH 11
-#define FC_SUBTYPE_DEAUTH 12
-#define FC_SUBTYPE_ACTION 13
-#define FC_SUBTYPE_ACTION_NOACK 14
-
-
-#define FC_SUBTYPE_CTL_WRAPPER 7
-#define FC_SUBTYPE_BLOCKACK_REQ 8
-#define FC_SUBTYPE_BLOCKACK 9
-#define FC_SUBTYPE_PS_POLL 10
-#define FC_SUBTYPE_RTS 11
-#define FC_SUBTYPE_CTS 12
-#define FC_SUBTYPE_ACK 13
-#define FC_SUBTYPE_CF_END 14
-#define FC_SUBTYPE_CF_END_ACK 15
+#define DOT11_CHALLENGE_LEN 128
+
+
+#define FC_PVER_MASK 0x3
+#define FC_PVER_SHIFT 0
+#define FC_TYPE_MASK 0xC
+#define FC_TYPE_SHIFT 2
+#define FC_SUBTYPE_MASK 0xF0
+#define FC_SUBTYPE_SHIFT 4
+#define FC_TODS 0x100
+#define FC_TODS_SHIFT 8
+#define FC_FROMDS 0x200
+#define FC_FROMDS_SHIFT 9
+#define FC_MOREFRAG 0x400
+#define FC_MOREFRAG_SHIFT 10
+#define FC_RETRY 0x800
+#define FC_RETRY_SHIFT 11
+#define FC_PM 0x1000
+#define FC_PM_SHIFT 12
+#define FC_MOREDATA 0x2000
+#define FC_MOREDATA_SHIFT 13
+#define FC_WEP 0x4000
+#define FC_WEP_SHIFT 14
+#define FC_ORDER 0x8000
+#define FC_ORDER_SHIFT 15
+
+
+#define SEQNUM_SHIFT 4
+#define SEQNUM_MAX 0x1000
+#define FRAGNUM_MASK 0xF
+
+
+
+
+#define FC_TYPE_MNG 0
+#define FC_TYPE_CTL 1
+#define FC_TYPE_DATA 2
+
+
+#define FC_SUBTYPE_ASSOC_REQ 0
+#define FC_SUBTYPE_ASSOC_RESP 1
+#define FC_SUBTYPE_REASSOC_REQ 2
+#define FC_SUBTYPE_REASSOC_RESP 3
+#define FC_SUBTYPE_PROBE_REQ 4
+#define FC_SUBTYPE_PROBE_RESP 5
+#define FC_SUBTYPE_BEACON 8
+#define FC_SUBTYPE_ATIM 9
+#define FC_SUBTYPE_DISASSOC 10
+#define FC_SUBTYPE_AUTH 11
+#define FC_SUBTYPE_DEAUTH 12
+#define FC_SUBTYPE_ACTION 13
+#define FC_SUBTYPE_ACTION_NOACK 14
+
+
+#define FC_SUBTYPE_CTL_WRAPPER 7
+#define FC_SUBTYPE_BLOCKACK_REQ 8
+#define FC_SUBTYPE_BLOCKACK 9
+#define FC_SUBTYPE_PS_POLL 10
+#define FC_SUBTYPE_RTS 11
+#define FC_SUBTYPE_CTS 12
+#define FC_SUBTYPE_ACK 13
+#define FC_SUBTYPE_CF_END 14
+#define FC_SUBTYPE_CF_END_ACK 15
-#define FC_SUBTYPE_DATA 0
-#define FC_SUBTYPE_DATA_CF_ACK 1
-#define FC_SUBTYPE_DATA_CF_POLL 2
-#define FC_SUBTYPE_DATA_CF_ACK_POLL 3
-#define FC_SUBTYPE_NULL 4
-#define FC_SUBTYPE_CF_ACK 5
-#define FC_SUBTYPE_CF_POLL 6
-#define FC_SUBTYPE_CF_ACK_POLL 7
-#define FC_SUBTYPE_QOS_DATA 8
-#define FC_SUBTYPE_QOS_DATA_CF_ACK 9
-#define FC_SUBTYPE_QOS_DATA_CF_POLL 10
-#define FC_SUBTYPE_QOS_DATA_CF_ACK_POLL 11
-#define FC_SUBTYPE_QOS_NULL 12
-#define FC_SUBTYPE_QOS_CF_POLL 14
-#define FC_SUBTYPE_QOS_CF_ACK_POLL 15
+#define FC_SUBTYPE_DATA 0
+#define FC_SUBTYPE_DATA_CF_ACK 1
+#define FC_SUBTYPE_DATA_CF_POLL 2
+#define FC_SUBTYPE_DATA_CF_ACK_POLL 3
+#define FC_SUBTYPE_NULL 4
+#define FC_SUBTYPE_CF_ACK 5
+#define FC_SUBTYPE_CF_POLL 6
+#define FC_SUBTYPE_CF_ACK_POLL 7
+#define FC_SUBTYPE_QOS_DATA 8
+#define FC_SUBTYPE_QOS_DATA_CF_ACK 9
+#define FC_SUBTYPE_QOS_DATA_CF_POLL 10
+#define FC_SUBTYPE_QOS_DATA_CF_ACK_POLL 11
+#define FC_SUBTYPE_QOS_NULL 12
+#define FC_SUBTYPE_QOS_CF_POLL 14
+#define FC_SUBTYPE_QOS_CF_ACK_POLL 15
-#define FC_SUBTYPE_ANY_QOS(s) (((s) & 8) != 0)
-#define FC_SUBTYPE_ANY_NULL(s) (((s) & 4) != 0)
-#define FC_SUBTYPE_ANY_CF_POLL(s) (((s) & 2) != 0)
-#define FC_SUBTYPE_ANY_CF_ACK(s) (((s) & 1) != 0)
+#define FC_SUBTYPE_ANY_QOS(s) (((s) & 8) != 0)
+#define FC_SUBTYPE_ANY_NULL(s) (((s) & 4) != 0)
+#define FC_SUBTYPE_ANY_CF_POLL(s) (((s) & 2) != 0)
+#define FC_SUBTYPE_ANY_CF_ACK(s) (((s) & 1) != 0)
-#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK)
+#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK)
-#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT))
+#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT))
-#define FC_SUBTYPE(fc) (((fc) & FC_SUBTYPE_MASK) >> FC_SUBTYPE_SHIFT)
-#define FC_TYPE(fc) (((fc) & FC_TYPE_MASK) >> FC_TYPE_SHIFT)
+#define FC_SUBTYPE(fc) (((fc) & FC_SUBTYPE_MASK) >> FC_SUBTYPE_SHIFT)
+#define FC_TYPE(fc) (((fc) & FC_TYPE_MASK) >> FC_TYPE_SHIFT)
-#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ)
-#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP)
-#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ)
-#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP)
-#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ)
-#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP)
-#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON)
-#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC)
-#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH)
-#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH)
-#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION)
-#define FC_ACTION_NOACK FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION_NOACK)
+#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ)
+#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP)
+#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ)
+#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP)
+#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ)
+#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP)
+#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON)
+#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC)
+#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH)
+#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH)
+#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION)
+#define FC_ACTION_NOACK FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION_NOACK)
-#define FC_CTL_WRAPPER FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTL_WRAPPER)
-#define FC_BLOCKACK_REQ FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_BLOCKACK_REQ)
-#define FC_BLOCKACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_BLOCKACK)
-#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL)
-#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS)
-#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS)
-#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK)
-#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END)
-#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK)
+#define FC_CTL_WRAPPER FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTL_WRAPPER)
+#define FC_BLOCKACK_REQ FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_BLOCKACK_REQ)
+#define FC_BLOCKACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_BLOCKACK)
+#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL)
+#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS)
+#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS)
+#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK)
+#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END)
+#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK)
-#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA)
-#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL)
-#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK)
-#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA)
-#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL)
+#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA)
+#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL)
+#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK)
+#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA)
+#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL)
-#define QOS_PRIO_SHIFT 0
-#define QOS_PRIO_MASK 0x0007
-#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT)
+#define QOS_PRIO_SHIFT 0
+#define QOS_PRIO_MASK 0x0007
+#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT)
-#define QOS_TID_SHIFT 0
-#define QOS_TID_MASK 0x000f
-#define QOS_TID(qos) (((qos) & QOS_TID_MASK) >> QOS_TID_SHIFT)
+#define QOS_TID_SHIFT 0
+#define QOS_TID_MASK 0x000f
+#define QOS_TID(qos) (((qos) & QOS_TID_MASK) >> QOS_TID_SHIFT)
-#define QOS_EOSP_SHIFT 4
-#define QOS_EOSP_MASK 0x0010
-#define QOS_EOSP(qos) (((qos) & QOS_EOSP_MASK) >> QOS_EOSP_SHIFT)
+#define QOS_EOSP_SHIFT 4
+#define QOS_EOSP_MASK 0x0010
+#define QOS_EOSP(qos) (((qos) & QOS_EOSP_MASK) >> QOS_EOSP_SHIFT)
-#define QOS_ACK_NORMAL_ACK 0
-#define QOS_ACK_NO_ACK 1
-#define QOS_ACK_NO_EXP_ACK 2
-#define QOS_ACK_BLOCK_ACK 3
-#define QOS_ACK_SHIFT 5
-#define QOS_ACK_MASK 0x0060
-#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT)
+#define QOS_ACK_NORMAL_ACK 0
+#define QOS_ACK_NO_ACK 1
+#define QOS_ACK_NO_EXP_ACK 2
+#define QOS_ACK_BLOCK_ACK 3
+#define QOS_ACK_SHIFT 5
+#define QOS_ACK_MASK 0x0060
+#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT)
-#define QOS_AMSDU_SHIFT 7
-#define QOS_AMSDU_MASK 0x0080
+#define QOS_AMSDU_SHIFT 7
+#define QOS_AMSDU_MASK 0x0080
-#define DOT11_MNG_AUTH_ALGO_LEN 2
-#define DOT11_MNG_AUTH_SEQ_LEN 2
-#define DOT11_MNG_BEACON_INT_LEN 2
-#define DOT11_MNG_CAP_LEN 2
-#define DOT11_MNG_AP_ADDR_LEN 6
-#define DOT11_MNG_LISTEN_INT_LEN 2
-#define DOT11_MNG_REASON_LEN 2
-#define DOT11_MNG_AID_LEN 2
-#define DOT11_MNG_STATUS_LEN 2
-#define DOT11_MNG_TIMESTAMP_LEN 8
+#define DOT11_MNG_AUTH_ALGO_LEN 2
+#define DOT11_MNG_AUTH_SEQ_LEN 2
+#define DOT11_MNG_BEACON_INT_LEN 2
+#define DOT11_MNG_CAP_LEN 2
+#define DOT11_MNG_AP_ADDR_LEN 6
+#define DOT11_MNG_LISTEN_INT_LEN 2
+#define DOT11_MNG_REASON_LEN 2
+#define DOT11_MNG_AID_LEN 2
+#define DOT11_MNG_STATUS_LEN 2
+#define DOT11_MNG_TIMESTAMP_LEN 8
-#define DOT11_AID_MASK 0x3fff
+#define DOT11_AID_MASK 0x3fff
-#define DOT11_RC_RESERVED 0
-#define DOT11_RC_UNSPECIFIED 1
-#define DOT11_RC_AUTH_INVAL 2
-#define DOT11_RC_DEAUTH_LEAVING 3
-#define DOT11_RC_INACTIVITY 4
-#define DOT11_RC_BUSY 5
-#define DOT11_RC_INVAL_CLASS_2 6
-#define DOT11_RC_INVAL_CLASS_3 7
-#define DOT11_RC_DISASSOC_LEAVING 8
-#define DOT11_RC_NOT_AUTH 9
-#define DOT11_RC_BAD_PC 10
-#define DOT11_RC_BAD_CHANNELS 11
+#define DOT11_RC_RESERVED 0
+#define DOT11_RC_UNSPECIFIED 1
+#define DOT11_RC_AUTH_INVAL 2
+#define DOT11_RC_DEAUTH_LEAVING 3
+#define DOT11_RC_INACTIVITY 4
+#define DOT11_RC_BUSY 5
+#define DOT11_RC_INVAL_CLASS_2 6
+#define DOT11_RC_INVAL_CLASS_3 7
+#define DOT11_RC_DISASSOC_LEAVING 8
+#define DOT11_RC_NOT_AUTH 9
+#define DOT11_RC_BAD_PC 10
+#define DOT11_RC_BAD_CHANNELS 11
-#define DOT11_RC_UNSPECIFIED_QOS 32
-#define DOT11_RC_INSUFFCIENT_BW 33
-#define DOT11_RC_EXCESSIVE_FRAMES 34
-#define DOT11_RC_TX_OUTSIDE_TXOP 35
-#define DOT11_RC_LEAVING_QBSS 36
-#define DOT11_RC_BAD_MECHANISM 37
-#define DOT11_RC_SETUP_NEEDED 38
-#define DOT11_RC_TIMEOUT 39
+#define DOT11_RC_UNSPECIFIED_QOS 32
+#define DOT11_RC_INSUFFCIENT_BW 33
+#define DOT11_RC_EXCESSIVE_FRAMES 34
+#define DOT11_RC_TX_OUTSIDE_TXOP 35
+#define DOT11_RC_LEAVING_QBSS 36
+#define DOT11_RC_BAD_MECHANISM 37
+#define DOT11_RC_SETUP_NEEDED 38
+#define DOT11_RC_TIMEOUT 39
-#define DOT11_RC_MAX 23
+#define DOT11_RC_MAX 23
#define DOT11_RC_TDLS_PEER_UNREACH 25
#define DOT11_RC_TDLS_DOWN_UNSPECIFIED 26
-#define DOT11_SC_SUCCESS 0
-#define DOT11_SC_FAILURE 1
+#define DOT11_SC_SUCCESS 0
+#define DOT11_SC_FAILURE 1
#define DOT11_SC_TDLS_WAKEUP_SCH_ALT 2
#define DOT11_SC_TDLS_WAKEUP_SCH_REJ 3
#define DOT11_SC_TDLS_SEC_DISABLED 5
#define DOT11_SC_LIFETIME_REJ 6
#define DOT11_SC_NOT_SAME_BSS 7
-#define DOT11_SC_CAP_MISMATCH 10
-#define DOT11_SC_REASSOC_FAIL 11
-#define DOT11_SC_ASSOC_FAIL 12
-#define DOT11_SC_AUTH_MISMATCH 13
-#define DOT11_SC_AUTH_SEQ 14
-#define DOT11_SC_AUTH_CHALLENGE_FAIL 15
-#define DOT11_SC_AUTH_TIMEOUT 16
-#define DOT11_SC_ASSOC_BUSY_FAIL 17
-#define DOT11_SC_ASSOC_RATE_MISMATCH 18
-#define DOT11_SC_ASSOC_SHORT_REQUIRED 19
-#define DOT11_SC_ASSOC_PBCC_REQUIRED 20
-#define DOT11_SC_ASSOC_AGILITY_REQUIRED 21
-#define DOT11_SC_ASSOC_SPECTRUM_REQUIRED 22
-#define DOT11_SC_ASSOC_BAD_POWER_CAP 23
-#define DOT11_SC_ASSOC_BAD_SUP_CHANNELS 24
-#define DOT11_SC_ASSOC_SHORTSLOT_REQUIRED 25
-#define DOT11_SC_ASSOC_ERPBCC_REQUIRED 26
-#define DOT11_SC_ASSOC_DSSOFDM_REQUIRED 27
+#define DOT11_SC_CAP_MISMATCH 10
+#define DOT11_SC_REASSOC_FAIL 11
+#define DOT11_SC_ASSOC_FAIL 12
+#define DOT11_SC_AUTH_MISMATCH 13
+#define DOT11_SC_AUTH_SEQ 14
+#define DOT11_SC_AUTH_CHALLENGE_FAIL 15
+#define DOT11_SC_AUTH_TIMEOUT 16
+#define DOT11_SC_ASSOC_BUSY_FAIL 17
+#define DOT11_SC_ASSOC_RATE_MISMATCH 18
+#define DOT11_SC_ASSOC_SHORT_REQUIRED 19
+#define DOT11_SC_ASSOC_PBCC_REQUIRED 20
+#define DOT11_SC_ASSOC_AGILITY_REQUIRED 21
+#define DOT11_SC_ASSOC_SPECTRUM_REQUIRED 22
+#define DOT11_SC_ASSOC_BAD_POWER_CAP 23
+#define DOT11_SC_ASSOC_BAD_SUP_CHANNELS 24
+#define DOT11_SC_ASSOC_SHORTSLOT_REQUIRED 25
+#define DOT11_SC_ASSOC_ERPBCC_REQUIRED 26
+#define DOT11_SC_ASSOC_DSSOFDM_REQUIRED 27
#define DOT11_SC_ASSOC_R0KH_UNREACHABLE 28
#define DOT11_SC_ASSOC_TRY_LATER 30
#define DOT11_SC_ASSOC_MFP_VIOLATION 31
@@ -992,6 +1000,7 @@ typedef struct ti_ie ti_ie_t;
#define DOT11_SC_INVALID_PAIRWISE_CIPHER 42
#define DOT11_SC_INVALID_AKMP 43
#define DOT11_SC_INVALID_RSNIE_CAP 45
+#define DOT11_SC_DLS_NOT_ALLOWED 48
#define DOT11_SC_INVALID_PMKID 53
#define DOT11_SC_INVALID_MDID 54
#define DOT11_SC_INVALID_FTIE 55
@@ -1000,170 +1009,187 @@ typedef struct ti_ie ti_ie_t;
#define DOT11_SC_INVALID_SNONCE 71
#define DOT11_SC_INVALID_RSNIE 72
-#define DOT11_MNG_DS_PARAM_LEN 1
-#define DOT11_MNG_IBSS_PARAM_LEN 2
-
-
-#define DOT11_MNG_TIM_FIXED_LEN 3
-#define DOT11_MNG_TIM_DTIM_COUNT 0
-#define DOT11_MNG_TIM_DTIM_PERIOD 1
-#define DOT11_MNG_TIM_BITMAP_CTL 2
-#define DOT11_MNG_TIM_PVB 3
-
-
-#define TLV_TAG_OFF 0
-#define TLV_LEN_OFF 1
-#define TLV_HDR_LEN 2
-#define TLV_BODY_OFF 2
-
-
-#define DOT11_MNG_SSID_ID 0
-#define DOT11_MNG_RATES_ID 1
-#define DOT11_MNG_FH_PARMS_ID 2
-#define DOT11_MNG_DS_PARMS_ID 3
-#define DOT11_MNG_CF_PARMS_ID 4
-#define DOT11_MNG_TIM_ID 5
-#define DOT11_MNG_IBSS_PARMS_ID 6
-#define DOT11_MNG_COUNTRY_ID 7
-#define DOT11_MNG_HOPPING_PARMS_ID 8
-#define DOT11_MNG_HOPPING_TABLE_ID 9
-#define DOT11_MNG_REQUEST_ID 10
-#define DOT11_MNG_QBSS_LOAD_ID 11
-#define DOT11_MNG_EDCA_PARAM_ID 12
-#define DOT11_MNG_CHALLENGE_ID 16
-#define DOT11_MNG_PWR_CONSTRAINT_ID 32
-#define DOT11_MNG_PWR_CAP_ID 33
-#define DOT11_MNG_TPC_REQUEST_ID 34
-#define DOT11_MNG_TPC_REPORT_ID 35
-#define DOT11_MNG_SUPP_CHANNELS_ID 36
-#define DOT11_MNG_CHANNEL_SWITCH_ID 37
-#define DOT11_MNG_MEASURE_REQUEST_ID 38
-#define DOT11_MNG_MEASURE_REPORT_ID 39
-#define DOT11_MNG_QUIET_ID 40
-#define DOT11_MNG_IBSS_DFS_ID 41
-#define DOT11_MNG_ERP_ID 42
-#define DOT11_MNG_TS_DELAY_ID 43
-#define DOT11_MNG_HT_CAP 45
-#define DOT11_MNG_QOS_CAP_ID 46
-#define DOT11_MNG_NONERP_ID 47
-#define DOT11_MNG_RSN_ID 48
-#define DOT11_MNG_EXT_RATES_ID 50
-#define DOT11_MNG_AP_CHREP_ID 51
-#define DOT11_MNG_NBR_REP_ID 52
-#define DOT11_MNG_MDIE_ID 54
-#define DOT11_MNG_FTIE_ID 55
-#define DOT11_MNG_FT_TI_ID 56
-#define DOT11_MNG_RDE_ID 57
-#define DOT11_MNG_REGCLASS_ID 59
-#define DOT11_MNG_EXT_CSA_ID 60
-#define DOT11_MNG_HT_ADD 61
-#define DOT11_MNG_EXT_CHANNEL_OFFSET 62
-
-
-#define DOT11_MNG_RRM_CAP_ID 70
-#define DOT11_MNG_HT_BSS_COEXINFO_ID 72
-#define DOT11_MNG_HT_BSS_CHANNEL_REPORT_ID 73
-#define DOT11_MNG_HT_OBSS_ID 74
+
+#define DOT11_MNG_DS_PARAM_LEN 1
+#define DOT11_MNG_IBSS_PARAM_LEN 2
+
+
+#define DOT11_MNG_TIM_FIXED_LEN 3
+#define DOT11_MNG_TIM_DTIM_COUNT 0
+#define DOT11_MNG_TIM_DTIM_PERIOD 1
+#define DOT11_MNG_TIM_BITMAP_CTL 2
+#define DOT11_MNG_TIM_PVB 3
+
+
+#define TLV_TAG_OFF 0
+#define TLV_LEN_OFF 1
+#define TLV_HDR_LEN 2
+#define TLV_BODY_OFF 2
+
+
+#define DOT11_MNG_SSID_ID 0
+#define DOT11_MNG_RATES_ID 1
+#define DOT11_MNG_FH_PARMS_ID 2
+#define DOT11_MNG_DS_PARMS_ID 3
+#define DOT11_MNG_CF_PARMS_ID 4
+#define DOT11_MNG_TIM_ID 5
+#define DOT11_MNG_IBSS_PARMS_ID 6
+#define DOT11_MNG_COUNTRY_ID 7
+#define DOT11_MNG_HOPPING_PARMS_ID 8
+#define DOT11_MNG_HOPPING_TABLE_ID 9
+#define DOT11_MNG_REQUEST_ID 10
+#define DOT11_MNG_QBSS_LOAD_ID 11
+#define DOT11_MNG_EDCA_PARAM_ID 12
+#define DOT11_MNG_CHALLENGE_ID 16
+#define DOT11_MNG_PWR_CONSTRAINT_ID 32
+#define DOT11_MNG_PWR_CAP_ID 33
+#define DOT11_MNG_TPC_REQUEST_ID 34
+#define DOT11_MNG_TPC_REPORT_ID 35
+#define DOT11_MNG_SUPP_CHANNELS_ID 36
+#define DOT11_MNG_CHANNEL_SWITCH_ID 37
+#define DOT11_MNG_MEASURE_REQUEST_ID 38
+#define DOT11_MNG_MEASURE_REPORT_ID 39
+#define DOT11_MNG_QUIET_ID 40
+#define DOT11_MNG_IBSS_DFS_ID 41
+#define DOT11_MNG_ERP_ID 42
+#define DOT11_MNG_TS_DELAY_ID 43
+#define DOT11_MNG_HT_CAP 45
+#define DOT11_MNG_QOS_CAP_ID 46
+#define DOT11_MNG_NONERP_ID 47
+#define DOT11_MNG_RSN_ID 48
+#define DOT11_MNG_EXT_RATES_ID 50
+#define DOT11_MNG_AP_CHREP_ID 51
+#define DOT11_MNG_NBR_REP_ID 52
+#define DOT11_MNG_MDIE_ID 54
+#define DOT11_MNG_FTIE_ID 55
+#define DOT11_MNG_FT_TI_ID 56
+#define DOT11_MNG_REGCLASS_ID 59
+#define DOT11_MNG_EXT_CSA_ID 60
+#define DOT11_MNG_HT_ADD 61
+#define DOT11_MNG_EXT_CHANNEL_OFFSET 62
+#define DOT11_MNG_WAPI_ID 68
+#define DOT11_MNG_TIME_ADVERTISE_ID 69
+#define DOT11_MNG_RRM_CAP_ID 70
+#define DOT11_MNG_HT_BSS_COEXINFO_ID 72
+#define DOT11_MNG_HT_BSS_CHANNEL_REPORT_ID 73
+#define DOT11_MNG_HT_OBSS_ID 74
#define DOT11_MNG_CHANNEL_USAGE 97
+#define DOT11_MNG_TIME_ZONE_ID 98
#define DOT11_MNG_LINK_IDENTIFIER_ID 101
#define DOT11_MNG_WAKEUP_SCHEDULE_ID 102
#define DOT11_MNG_CHANNEL_SWITCH_TIMING_ID 104
#define DOT11_MNG_PTI_CONTROL_ID 105
#define DOT11_MNG_PU_BUFFER_STATUS_ID 106
-#define DOT11_MNG_EXT_CAP_ID 127
-#define DOT11_MNG_WPA_ID 221
-#define DOT11_MNG_PROPR_ID 221
+#define DOT11_MNG_INTERWORKING_ID 107
+#define DOT11_MNG_ADVERTISEMENT_ID 108
+#define DOT11_MNG_EXP_BW_REQ_ID 109
+#define DOT11_MNG_QOS_MAP_ID 110
+#define DOT11_MNG_ROAM_CONSORT_ID 111
+#define DOT11_MNG_EMERGCY_ALERT_ID 112
+#define DOT11_MNG_EXT_CAP_ID 127
+#define DOT11_MNG_VHT_CAP_ID 191
+#define DOT11_MNG_VHT_OPERATION_ID 192
+
+#define DOT11_MNG_WPA_ID 221
+#define DOT11_MNG_PROPR_ID 221
-#define DOT11_MNG_VS_ID 221
+#define DOT11_MNG_VS_ID 221
-#define DOT11_RATE_BASIC 0x80
-#define DOT11_RATE_MASK 0x7F
+#define DOT11_RATE_BASIC 0x80
+#define DOT11_RATE_MASK 0x7F
-#define DOT11_MNG_ERP_LEN 1
-#define DOT11_MNG_NONERP_PRESENT 0x01
-#define DOT11_MNG_USE_PROTECTION 0x02
-#define DOT11_MNG_BARKER_PREAMBLE 0x04
+#define DOT11_MNG_ERP_LEN 1
+#define DOT11_MNG_NONERP_PRESENT 0x01
+#define DOT11_MNG_USE_PROTECTION 0x02
+#define DOT11_MNG_BARKER_PREAMBLE 0x04
-#define DOT11_MGN_TS_DELAY_LEN 4
-#define TS_DELAY_FIELD_SIZE 4
+#define DOT11_MGN_TS_DELAY_LEN 4
+#define TS_DELAY_FIELD_SIZE 4
-#define DOT11_CAP_ESS 0x0001
-#define DOT11_CAP_IBSS 0x0002
-#define DOT11_CAP_POLLABLE 0x0004
-#define DOT11_CAP_POLL_RQ 0x0008
-#define DOT11_CAP_PRIVACY 0x0010
-#define DOT11_CAP_SHORT 0x0020
-#define DOT11_CAP_PBCC 0x0040
-#define DOT11_CAP_AGILITY 0x0080
-#define DOT11_CAP_SPECTRUM 0x0100
-#define DOT11_CAP_SHORTSLOT 0x0400
-#define DOT11_CAP_RRM 0x1000
-#define DOT11_CAP_CCK_OFDM 0x2000
+#define DOT11_CAP_ESS 0x0001
+#define DOT11_CAP_IBSS 0x0002
+#define DOT11_CAP_POLLABLE 0x0004
+#define DOT11_CAP_POLL_RQ 0x0008
+#define DOT11_CAP_PRIVACY 0x0010
+#define DOT11_CAP_SHORT 0x0020
+#define DOT11_CAP_PBCC 0x0040
+#define DOT11_CAP_AGILITY 0x0080
+#define DOT11_CAP_SPECTRUM 0x0100
+#define DOT11_CAP_SHORTSLOT 0x0400
+#define DOT11_CAP_RRM 0x1000
+#define DOT11_CAP_CCK_OFDM 0x2000
-#define DOT11_OBSS_COEX_MNG_SUPPORT 0x01
+#define DOT11_EXT_CAP_OBSS_COEX_MGMT 0
+
+#define DOT11_EXT_CAP_SPSMP 6
+
+#define DOT11_EXT_CAP_BSS_TRANSITION_MGMT 19
+
+#define DOT11_EXT_CAP_IW 31
-#define DOT11_ACTION_HDR_LEN 2
-#define DOT11_ACTION_CAT_OFF 0
-#define DOT11_ACTION_ACT_OFF 1
+#define DOT11_EXT_CAP_SI 41
+#define DOT11_EXT_CAP_SI_MASK 0x0E
-#define DOT11_ACTION_CAT_ERR_MASK 0x80
-#define DOT11_ACTION_CAT_MASK 0x7F
-#define DOT11_ACTION_CAT_SPECT_MNG 0
-#define DOT11_ACTION_CAT_QOS 1
-#define DOT11_ACTION_CAT_DLS 2
-#define DOT11_ACTION_CAT_BLOCKACK 3
-#define DOT11_ACTION_CAT_PUBLIC 4
-#define DOT11_ACTION_CAT_RRM 5
-#define DOT11_ACTION_CAT_FBT 6
-#define DOT11_ACTION_CAT_HT 7
-#if defined(MFP) || defined(WLFBT) || defined(WLWNM)
+#define DOT11_ACTION_HDR_LEN 2
+#define DOT11_ACTION_CAT_OFF 0
+#define DOT11_ACTION_ACT_OFF 1
+
+
+#define DOT11_ACTION_CAT_ERR_MASK 0x80
+#define DOT11_ACTION_CAT_MASK 0x7F
+#define DOT11_ACTION_CAT_SPECT_MNG 0
+#define DOT11_ACTION_CAT_QOS 1
+#define DOT11_ACTION_CAT_DLS 2
+#define DOT11_ACTION_CAT_BLOCKACK 3
+#define DOT11_ACTION_CAT_PUBLIC 4
+#define DOT11_ACTION_CAT_RRM 5
+#define DOT11_ACTION_CAT_FBT 6
+#define DOT11_ACTION_CAT_HT 7
#define DOT11_ACTION_CAT_SA_QUERY 8
#define DOT11_ACTION_CAT_PDPA 9
-#define DOT11_ACTION_CAT_BSSMGMT 10
-#define DOT11_ACTION_NOTIFICATION 17
-#define DOT11_ACTION_CAT_VSP 126
-#endif
+#define DOT11_ACTION_CAT_BSSMGMT 10
#define DOT11_ACTION_NOTIFICATION 17
-#define DOT11_ACTION_CAT_VS 127
+#define DOT11_ACTION_CAT_VSP 126
+#define DOT11_ACTION_CAT_VS 127
-#define DOT11_SM_ACTION_M_REQ 0
-#define DOT11_SM_ACTION_M_REP 1
-#define DOT11_SM_ACTION_TPC_REQ 2
-#define DOT11_SM_ACTION_TPC_REP 3
-#define DOT11_SM_ACTION_CHANNEL_SWITCH 4
-#define DOT11_SM_ACTION_EXT_CSA 5
+#define DOT11_SM_ACTION_M_REQ 0
+#define DOT11_SM_ACTION_M_REP 1
+#define DOT11_SM_ACTION_TPC_REQ 2
+#define DOT11_SM_ACTION_TPC_REP 3
+#define DOT11_SM_ACTION_CHANNEL_SWITCH 4
+#define DOT11_SM_ACTION_EXT_CSA 5
-#define DOT11_ACTION_ID_HT_CH_WIDTH 0
-#define DOT11_ACTION_ID_HT_MIMO_PS 1
+#define DOT11_ACTION_ID_HT_CH_WIDTH 0
+#define DOT11_ACTION_ID_HT_MIMO_PS 1
-#define DOT11_PUB_ACTION_BSS_COEX_MNG 0
-#define DOT11_PUB_ACTION_CHANNEL_SWITCH 4
+#define DOT11_PUB_ACTION_BSS_COEX_MNG 0
+#define DOT11_PUB_ACTION_CHANNEL_SWITCH 4
-#define DOT11_BA_ACTION_ADDBA_REQ 0
-#define DOT11_BA_ACTION_ADDBA_RESP 1
-#define DOT11_BA_ACTION_DELBA 2
+#define DOT11_BA_ACTION_ADDBA_REQ 0
+#define DOT11_BA_ACTION_ADDBA_RESP 1
+#define DOT11_BA_ACTION_DELBA 2
-#define DOT11_ADDBA_PARAM_AMSDU_SUP 0x0001
-#define DOT11_ADDBA_PARAM_POLICY_MASK 0x0002
-#define DOT11_ADDBA_PARAM_POLICY_SHIFT 1
-#define DOT11_ADDBA_PARAM_TID_MASK 0x003c
-#define DOT11_ADDBA_PARAM_TID_SHIFT 2
-#define DOT11_ADDBA_PARAM_BSIZE_MASK 0xffc0
-#define DOT11_ADDBA_PARAM_BSIZE_SHIFT 6
+#define DOT11_ADDBA_PARAM_AMSDU_SUP 0x0001
+#define DOT11_ADDBA_PARAM_POLICY_MASK 0x0002
+#define DOT11_ADDBA_PARAM_POLICY_SHIFT 1
+#define DOT11_ADDBA_PARAM_TID_MASK 0x003c
+#define DOT11_ADDBA_PARAM_TID_SHIFT 2
+#define DOT11_ADDBA_PARAM_BSIZE_MASK 0xffc0
+#define DOT11_ADDBA_PARAM_BSIZE_SHIFT 6
-#define DOT11_ADDBA_POLICY_DELAYED 0
-#define DOT11_ADDBA_POLICY_IMMEDIATE 1
+#define DOT11_ADDBA_POLICY_DELAYED 0
+#define DOT11_ADDBA_POLICY_IMMEDIATE 1
#define DOT11_FT_ACTION_FT_RESERVED 0
@@ -1173,6 +1199,10 @@ typedef struct ti_ie ti_ie_t;
#define DOT11_FT_ACTION_FT_ACK 4
+#define DOT11_DLS_ACTION_REQ 0
+#define DOT11_DLS_ACTION_RESP 1
+#define DOT11_DLS_ACTION_TD 2
+
#define DOT11_WNM_ACTION_EVENT_REQ 0
#define DOT11_WNM_ACTION_EVENT_REP 1
@@ -1203,6 +1233,33 @@ typedef struct ti_ie ti_ie_t;
#define DOT11_WNM_ACTION_NOTFCTN_REQ 26
#define DOT11_WNM_ACTION_NOTFCTN_RES 27
+#define DOT11_MNG_COUNTRY_ID_LEN 3
+
+
+BWL_PRE_PACKED_STRUCT struct dot11_dls_req {
+ uint8 category;
+ uint8 action;
+ struct ether_addr da;
+ struct ether_addr sa;
+ uint16 cap;
+ uint16 timeout;
+ uint8 data[1];
+} BWL_POST_PACKED_STRUCT;
+typedef struct dot11_dls_req dot11_dls_req_t;
+#define DOT11_DLS_REQ_LEN 18
+
+
+BWL_PRE_PACKED_STRUCT struct dot11_dls_resp {
+ uint8 category;
+ uint8 action;
+ uint16 status;
+ struct ether_addr da;
+ struct ether_addr sa;
+ uint8 data[1];
+} BWL_POST_PACKED_STRUCT;
+typedef struct dot11_dls_resp dot11_dls_resp_t;
+#define DOT11_DLS_RESP_LEN 16
+
BWL_PRE_PACKED_STRUCT struct dot11_bss_trans_query {
@@ -1280,42 +1337,44 @@ typedef struct dot11_bss_trans_res dot11_bss_trans_res_t;
#define DOT11_NBR_RPRT_SUBELEM_BSS_CANDDT_PREF_ID 3
+
+
BWL_PRE_PACKED_STRUCT struct dot11_addba_req {
- uint8 category;
- uint8 action;
- uint8 token;
- uint16 addba_param_set;
- uint16 timeout;
- uint16 start_seqnum;
+ uint8 category;
+ uint8 action;
+ uint8 token;
+ uint16 addba_param_set;
+ uint16 timeout;
+ uint16 start_seqnum;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_addba_req dot11_addba_req_t;
-#define DOT11_ADDBA_REQ_LEN 9
+#define DOT11_ADDBA_REQ_LEN 9
BWL_PRE_PACKED_STRUCT struct dot11_addba_resp {
- uint8 category;
- uint8 action;
- uint8 token;
- uint16 status;
- uint16 addba_param_set;
- uint16 timeout;
+ uint8 category;
+ uint8 action;
+ uint8 token;
+ uint16 status;
+ uint16 addba_param_set;
+ uint16 timeout;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_addba_resp dot11_addba_resp_t;
-#define DOT11_ADDBA_RESP_LEN 9
+#define DOT11_ADDBA_RESP_LEN 9
-#define DOT11_DELBA_PARAM_INIT_MASK 0x0800
-#define DOT11_DELBA_PARAM_INIT_SHIFT 11
-#define DOT11_DELBA_PARAM_TID_MASK 0xf000
-#define DOT11_DELBA_PARAM_TID_SHIFT 12
+#define DOT11_DELBA_PARAM_INIT_MASK 0x0800
+#define DOT11_DELBA_PARAM_INIT_SHIFT 11
+#define DOT11_DELBA_PARAM_TID_MASK 0xf000
+#define DOT11_DELBA_PARAM_TID_SHIFT 12
BWL_PRE_PACKED_STRUCT struct dot11_delba {
- uint8 category;
- uint8 action;
- uint16 delba_param_set;
- uint16 reason;
+ uint8 category;
+ uint8 action;
+ uint16 delba_param_set;
+ uint16 reason;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_delba dot11_delba_t;
-#define DOT11_DELBA_LEN 6
+#define DOT11_DELBA_LEN 6
#define SA_QUERY_REQUEST 0
@@ -1347,87 +1406,58 @@ typedef struct dot11_ft_res dot11_ft_res_t;
#define DOT11_FT_RES_FIXED_LEN 16
-BWL_PRE_PACKED_STRUCT struct dot11_rde_ie {
- uint8 id;
- uint8 length;
- uint8 rde_id;
- uint8 rd_count;
- uint16 status;
-} BWL_POST_PACKED_STRUCT;
-typedef struct dot11_rde_ie dot11_rde_ie_t;
-
-
-#define DOT11_MNG_RDE_IE_LEN sizeof(dot11_rde_ie_t)
-
-#define DOT11_RRM_CAP_LEN 5
+#define DOT11_RRM_CAP_LEN 5
BWL_PRE_PACKED_STRUCT struct dot11_rrm_cap_ie {
uint8 cap[DOT11_RRM_CAP_LEN];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_rrm_cap_ie dot11_rrm_cap_ie_t;
-#define DOT11_RRM_CAP_LINK 0
-#define DOT11_RRM_CAP_NEIGHBOR_REPORT 1
-#define DOT11_RRM_CAP_PARALLEL 2
-#define DOT11_RRM_CAP_REPEATED 3
-#define DOT11_RRM_CAP_BCN_PASSIVE 4
-#define DOT11_RRM_CAP_BCN_ACTIVE 5
-#define DOT11_RRM_CAP_BCN_TABLE 6
-#define DOT11_RRM_CAP_BCN_REP_COND 7
-#define DOT11_RRM_CAP_AP_CHANREP 16
-
+#define DOT11_RRM_CAP_LINK 0
+#define DOT11_RRM_CAP_NEIGHBOR_REPORT 1
+#define DOT11_RRM_CAP_PARALLEL 2
+#define DOT11_RRM_CAP_REPEATED 3
+#define DOT11_RRM_CAP_BCN_PASSIVE 4
+#define DOT11_RRM_CAP_BCN_ACTIVE 5
+#define DOT11_RRM_CAP_BCN_TABLE 6
+#define DOT11_RRM_CAP_BCN_REP_COND 7
+#define DOT11_RRM_CAP_AP_CHANREP 16
-#define DOT11_EXT_CAP_LEN 4
-BWL_PRE_PACKED_STRUCT struct dot11_ext_cap_ie {
- uint8 cap[DOT11_EXT_CAP_LEN];
-} BWL_POST_PACKED_STRUCT;
-typedef struct dot11_ext_cap_ie dot11_ext_cap_ie_t;
-
-
-#define DOT11_EXT_CAP_BSS_TRANSITION_MGMT 19
-
#define DOT11_OP_CLASS_NONE 255
-BWL_PRE_PACKED_STRUCT struct do11_ap_chrep {
- uint8 id;
- uint8 len;
- uint8 reg;
- uint8 chanlist[1];
-} BWL_POST_PACKED_STRUCT;
-typedef struct do11_ap_chrep dot11_ap_chrep_t;
-#define DOT11_RM_ACTION_RM_REQ 0
-#define DOT11_RM_ACTION_RM_REP 1
-#define DOT11_RM_ACTION_LM_REQ 2
-#define DOT11_RM_ACTION_LM_REP 3
-#define DOT11_RM_ACTION_NR_REQ 4
-#define DOT11_RM_ACTION_NR_REP 5
+#define DOT11_RM_ACTION_RM_REQ 0
+#define DOT11_RM_ACTION_RM_REP 1
+#define DOT11_RM_ACTION_LM_REQ 2
+#define DOT11_RM_ACTION_LM_REP 3
+#define DOT11_RM_ACTION_NR_REQ 4
+#define DOT11_RM_ACTION_NR_REP 5
BWL_PRE_PACKED_STRUCT struct dot11_rm_action {
- uint8 category;
- uint8 action;
- uint8 token;
+ uint8 category;
+ uint8 action;
+ uint8 token;
uint8 data[1];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_rm_action dot11_rm_action_t;
#define DOT11_RM_ACTION_LEN 3
BWL_PRE_PACKED_STRUCT struct dot11_rmreq {
- uint8 category;
- uint8 action;
- uint8 token;
- uint16 reps;
+ uint8 category;
+ uint8 action;
+ uint8 token;
+ uint16 reps;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_rmreq dot11_rmreq_t;
-#define DOT11_RMREQ_LEN 5
+#define DOT11_RMREQ_LEN 5
BWL_PRE_PACKED_STRUCT struct dot11_rm_ie {
uint8 id;
@@ -1437,19 +1467,19 @@ BWL_PRE_PACKED_STRUCT struct dot11_rm_ie {
uint8 type;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_rm_ie dot11_rm_ie_t;
-#define DOT11_RM_IE_LEN 5
+#define DOT11_RM_IE_LEN 5
-#define DOT11_RMREQ_MODE_PARALLEL 1
-#define DOT11_RMREQ_MODE_ENABLE 2
-#define DOT11_RMREQ_MODE_REQUEST 4
-#define DOT11_RMREQ_MODE_REPORT 8
-#define DOT11_RMREQ_MODE_DURMAND 0x10
+#define DOT11_RMREQ_MODE_PARALLEL 1
+#define DOT11_RMREQ_MODE_ENABLE 2
+#define DOT11_RMREQ_MODE_REQUEST 4
+#define DOT11_RMREQ_MODE_REPORT 8
+#define DOT11_RMREQ_MODE_DURMAND 0x10
-#define DOT11_RMREP_MODE_LATE 1
-#define DOT11_RMREP_MODE_INCAPABLE 2
-#define DOT11_RMREP_MODE_REFUSED 4
+#define DOT11_RMREP_MODE_LATE 1
+#define DOT11_RMREP_MODE_INCAPABLE 2
+#define DOT11_RMREP_MODE_REFUSED 4
BWL_PRE_PACKED_STRUCT struct dot11_rmreq_bcn {
uint8 id;
@@ -1462,10 +1492,10 @@ BWL_PRE_PACKED_STRUCT struct dot11_rmreq_bcn {
uint16 interval;
uint16 duration;
uint8 bcn_mode;
- struct ether_addr bssid;
+ struct ether_addr bssid;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_rmreq_bcn dot11_rmreq_bcn_t;
-#define DOT11_RMREQ_BCN_LEN 18
+#define DOT11_RMREQ_BCN_LEN 18
BWL_PRE_PACKED_STRUCT struct dot11_rmrep_bcn {
uint8 reg;
@@ -1475,459 +1505,607 @@ BWL_PRE_PACKED_STRUCT struct dot11_rmrep_bcn {
uint8 frame_info;
uint8 rcpi;
uint8 rsni;
- struct ether_addr bssid;
+ struct ether_addr bssid;
uint8 antenna_id;
uint32 parent_tsf;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_rmrep_bcn dot11_rmrep_bcn_t;
-#define DOT11_RMREP_BCN_LEN 26
+#define DOT11_RMREP_BCN_LEN 26
-#define DOT11_RMREQ_BCN_PASSIVE 0
-#define DOT11_RMREQ_BCN_ACTIVE 1
-#define DOT11_RMREQ_BCN_TABLE 2
+#define DOT11_RMREQ_BCN_PASSIVE 0
+#define DOT11_RMREQ_BCN_ACTIVE 1
+#define DOT11_RMREQ_BCN_TABLE 2
-#define DOT11_RMREQ_BCN_SSID_ID 0
-#define DOT11_RMREQ_BCN_REPINFO_ID 1
-#define DOT11_RMREQ_BCN_REPDET_ID 2
-#define DOT11_RMREQ_BCN_REQUEST_ID 10
-#define DOT11_RMREQ_BCN_APCHREP_ID DOT11_MNG_AP_CHREP_ID
+#define DOT11_RMREQ_BCN_SSID_ID 0
+#define DOT11_RMREQ_BCN_REPINFO_ID 1
+#define DOT11_RMREQ_BCN_REPDET_ID 2
+#define DOT11_RMREQ_BCN_REQUEST_ID 10
+#define DOT11_RMREQ_BCN_APCHREP_ID 51
-#define DOT11_RMREQ_BCN_REPDET_FIXED 0
-#define DOT11_RMREQ_BCN_REPDET_REQUEST 1
-#define DOT11_RMREQ_BCN_REPDET_ALL 2
+#define DOT11_RMREQ_BCN_REPDET_FIXED 0
+#define DOT11_RMREQ_BCN_REPDET_REQUEST 1
+#define DOT11_RMREQ_BCN_REPDET_ALL 2
-#define DOT11_RMREP_BCN_FRM_BODY 1
+#define DOT11_RMREP_BCN_FRM_BODY 1
BWL_PRE_PACKED_STRUCT struct dot11_rmrep_nbr {
- struct ether_addr bssid;
- uint32 bssid_info;
+ struct ether_addr bssid;
+ uint32 bssid_info;
uint8 reg;
uint8 channel;
uint8 phytype;
uchar sub_elements[1];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_rmrep_nbr dot11_rmrep_nbr_t;
-#define DOT11_RMREP_NBR_LEN 13
+#define DOT11_RMREP_NBR_LEN 13
-#define DOT11_BSSTYPE_INFRASTRUCTURE 0
-#define DOT11_BSSTYPE_INDEPENDENT 1
-#define DOT11_BSSTYPE_ANY 2
-#define DOT11_SCANTYPE_ACTIVE 0
-#define DOT11_SCANTYPE_PASSIVE 1
+#define DOT11_BSSTYPE_INFRASTRUCTURE 0
+#define DOT11_BSSTYPE_INDEPENDENT 1
+#define DOT11_BSSTYPE_ANY 2
+#define DOT11_SCANTYPE_ACTIVE 0
+#define DOT11_SCANTYPE_PASSIVE 1
BWL_PRE_PACKED_STRUCT struct dot11_lmreq {
- uint8 category;
- uint8 action;
- uint8 token;
- uint8 txpwr;
- uint8 maxtxpwr;
+ uint8 category;
+ uint8 action;
+ uint8 token;
+ uint8 txpwr;
+ uint8 maxtxpwr;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_lmreq dot11_lmreq_t;
-#define DOT11_LMREQ_LEN 5
+#define DOT11_LMREQ_LEN 5
BWL_PRE_PACKED_STRUCT struct dot11_lmrep {
- uint8 category;
- uint8 action;
- uint8 token;
- dot11_tpc_rep_t tpc;
- uint8 rxant;
- uint8 txant;
- uint8 rcpi;
- uint8 rsni;
+ uint8 category;
+ uint8 action;
+ uint8 token;
+ dot11_tpc_rep_t tpc;
+ uint8 rxant;
+ uint8 txant;
+ uint8 rcpi;
+ uint8 rsni;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_lmrep dot11_lmrep_t;
-#define DOT11_LMREP_LEN 11
+#define DOT11_LMREP_LEN 11
+
+
+#define PREN_PREAMBLE 24
+#define PREN_MM_EXT 12
+#define PREN_PREAMBLE_EXT 4
+
+
+#define RIFS_11N_TIME 2
+
+
+
+#define HT_SIG1_MCS_MASK 0x00007F
+#define HT_SIG1_CBW 0x000080
+#define HT_SIG1_HT_LENGTH 0xFFFF00
+
+
+#define HT_SIG2_SMOOTHING 0x000001
+#define HT_SIG2_NOT_SOUNDING 0x000002
+#define HT_SIG2_RESERVED 0x000004
+#define HT_SIG2_AGGREGATION 0x000008
+#define HT_SIG2_STBC_MASK 0x000030
+#define HT_SIG2_STBC_SHIFT 4
+#define HT_SIG2_FEC_CODING 0x000040
+#define HT_SIG2_SHORT_GI 0x000080
+#define HT_SIG2_ESS_MASK 0x000300
+#define HT_SIG2_ESS_SHIFT 8
+#define HT_SIG2_CRC 0x03FC00
+#define HT_SIG2_TAIL 0x1C0000
+
+
+#define APHY_SLOT_TIME 9
+#define APHY_SIFS_TIME 16
+#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME))
+#define APHY_PREAMBLE_TIME 16
+#define APHY_SIGNAL_TIME 4
+#define APHY_SYMBOL_TIME 4
+#define APHY_SERVICE_NBITS 16
+#define APHY_TAIL_NBITS 6
+#define APHY_CWMIN 15
+
+
+#define BPHY_SLOT_TIME 20
+#define BPHY_SIFS_TIME 10
+#define BPHY_DIFS_TIME 50
+#define BPHY_PLCP_TIME 192
+#define BPHY_PLCP_SHORT_TIME 96
+#define BPHY_CWMIN 31
+
+
+#define DOT11_OFDM_SIGNAL_EXTENSION 6
+
+#define PHY_CWMAX 1023
+#define DOT11_MAXNUMFRAGS 16
-#define PREN_PREAMBLE 24
-#define PREN_MM_EXT 12
-#define PREN_PREAMBLE_EXT 4
-#define RIFS_11N_TIME 2
+typedef int vht_group_id_t;
-#define HT_SIG1_MCS_MASK 0x00007F
-#define HT_SIG1_CBW 0x000080
-#define HT_SIG1_HT_LENGTH 0xFFFF00
+#define VHT_SIGA1_CONST_MASK 0x800004
+#define VHT_SIGA1_20MHZ_VAL 0x000000
+#define VHT_SIGA1_40MHZ_VAL 0x000001
+#define VHT_SIGA1_80MHZ_VAL 0x000002
+#define VHT_SIGA1_160MHZ_VAL 0x000003
-#define HT_SIG2_SMOOTHING 0x000001
-#define HT_SIG2_NOT_SOUNDING 0x000002
-#define HT_SIG2_RESERVED 0x000004
-#define HT_SIG2_AGGREGATION 0x000008
-#define HT_SIG2_STBC_MASK 0x000030
-#define HT_SIG2_STBC_SHIFT 4
-#define HT_SIG2_FEC_CODING 0x000040
-#define HT_SIG2_SHORT_GI 0x000080
-#define HT_SIG2_ESS_MASK 0x000300
-#define HT_SIG2_ESS_SHIFT 8
-#define HT_SIG2_CRC 0x03FC00
-#define HT_SIG2_TAIL 0x1C0000
+#define VHT_SIGA1_STBC 0x000008
+#define VHT_SIGA1_GID_MAX_GID 0x3f
+#define VHT_SIGA1_GID_SHIFT 4
+#define VHT_SIGA1_GID_TO_AP 0x00
+#define VHT_SIGA1_GID_NOT_TO_AP 0x3f
-#define APHY_SLOT_TIME 9
-#define APHY_SIFS_TIME 16
-#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME))
-#define APHY_PREAMBLE_TIME 16
-#define APHY_SIGNAL_TIME 4
-#define APHY_SYMBOL_TIME 4
-#define APHY_SERVICE_NBITS 16
-#define APHY_TAIL_NBITS 6
-#define APHY_CWMIN 15
+#define VHT_SIGA1_NSTS_SHIFT 10
+#define VHT_SIGA1_NSTS_SHIFT_MASK_USER0 0x001C00
+#define VHT_SIGA1_PARTIAL_AID_SHIFT 13
-#define BPHY_SLOT_TIME 20
-#define BPHY_SIFS_TIME 10
-#define BPHY_DIFS_TIME 50
-#define BPHY_PLCP_TIME 192
-#define BPHY_PLCP_SHORT_TIME 96
-#define BPHY_CWMIN 31
+#define VHT_SIGA2_GI_NONE 0x000000
+#define VHT_SIGA2_GI_SHORT 0x000001
+#define VHT_SIGA2_GI_W_MOD10 0x000002
+#define VHT_SIGA2_CODING_LDPC 0x000004
+#define VHT_SIGA2_BEAMFORM_ENABLE 0x000100
+#define VHT_SIGA2_MCS_SHIFT 4
-#define DOT11_OFDM_SIGNAL_EXTENSION 6
+#define VHT_SIGA2_B9_RESERVED 0x000200
+#define VHT_SIGA2_TAIL_MASK 0xfc0000
+#define VHT_SIGA2_TAIL_VALUE 0x000000
-#define PHY_CWMAX 1023
+#define VHT_SIGA2_SVC_BITS 16
+#define VHT_SIGA2_TAIL_BITS 6
-#define DOT11_MAXNUMFRAGS 16
typedef struct d11cnt {
- uint32 txfrag;
- uint32 txmulti;
- uint32 txfail;
- uint32 txretry;
- uint32 txretrie;
- uint32 rxdup;
- uint32 txrts;
- uint32 txnocts;
- uint32 txnoack;
- uint32 rxfrag;
- uint32 rxmulti;
- uint32 rxcrc;
- uint32 txfrmsnt;
- uint32 rxundec;
+ uint32 txfrag;
+ uint32 txmulti;
+ uint32 txfail;
+ uint32 txretry;
+ uint32 txretrie;
+ uint32 rxdup;
+ uint32 txrts;
+ uint32 txnocts;
+ uint32 txnoack;
+ uint32 rxfrag;
+ uint32 rxmulti;
+ uint32 rxcrc;
+ uint32 txfrmsnt;
+ uint32 rxundec;
} d11cnt_t;
-#define BRCM_PROP_OUI "\x00\x90\x4C"
+#define BRCM_PROP_OUI "\x00\x90\x4C"
-#define BRCM_OUI "\x00\x10\x18"
+#define BRCM_OUI "\x00\x10\x18"
BWL_PRE_PACKED_STRUCT struct brcm_ie {
- uint8 id;
- uint8 len;
- uint8 oui[3];
- uint8 ver;
- uint8 assoc;
- uint8 flags;
- uint8 flags1;
- uint16 amsdu_mtu_pref;
-} BWL_POST_PACKED_STRUCT;
-typedef struct brcm_ie brcm_ie_t;
-#define BRCM_IE_LEN 11
-#define BRCM_IE_VER 2
-#define BRCM_IE_LEGACY_AES_VER 1
-
-
-#ifdef WLAFTERBURNER
-#define BRF_ABCAP 0x1
-#define BRF_ABRQRD 0x2
-#define BRF_ABCOUNTER_MASK 0xf0
-#define BRF_ABCOUNTER_SHIFT 4
-#endif
-#define BRF_LZWDS 0x4
-#define BRF_BLOCKACK 0x8
+ uint8 id;
+ uint8 len;
+ uint8 oui[3];
+ uint8 ver;
+ uint8 assoc;
+ uint8 flags;
+ uint8 flags1;
+ uint16 amsdu_mtu_pref;
+} BWL_POST_PACKED_STRUCT;
+typedef struct brcm_ie brcm_ie_t;
+#define BRCM_IE_LEN 11
+#define BRCM_IE_VER 2
+#define BRCM_IE_LEGACY_AES_VER 1
-#define BRF1_AMSDU 0x1
-#define BRF1_WMEPS 0x4
-#define BRF1_PSOFIX 0x8
-#define BRF1_RX_LARGE_AGG 0x10
-#define BRF1_SOFTAP 0x40
+#define BRF_LZWDS 0x4
+#define BRF_BLOCKACK 0x8
-#ifdef WLAFTERBURNER
-#define AB_WDS_TIMEOUT_MAX 15
-#define AB_WDS_TIMEOUT_MIN 1
-#endif
-#define AB_GUARDCOUNT 10
+#define BRF1_AMSDU 0x1
+#define BRF1_WMEPS 0x4
+#define BRF1_PSOFIX 0x8
+#define BRF1_RX_LARGE_AGG 0x10
+#define BRF1_RFAWARE_DCS 0x20
+#define BRF1_SOFTAP 0x40
BWL_PRE_PACKED_STRUCT struct vndr_ie {
uchar id;
uchar len;
uchar oui [3];
- uchar data [1];
+ uchar data [1];
} BWL_POST_PACKED_STRUCT;
typedef struct vndr_ie vndr_ie_t;
-#define VNDR_IE_HDR_LEN 2
-#define VNDR_IE_MIN_LEN 3
-#define VNDR_IE_MAX_LEN 256
+#define VNDR_IE_HDR_LEN 2
+#define VNDR_IE_MIN_LEN 3
+#define VNDR_IE_MAX_LEN 256
-#define MCSSET_LEN 16
-#define MAX_MCS_NUM (128)
+#define MCSSET_LEN 16
+#define MAX_MCS_NUM (128)
BWL_PRE_PACKED_STRUCT struct ht_cap_ie {
- uint16 cap;
- uint8 params;
- uint8 supp_mcs[MCSSET_LEN];
- uint16 ext_htcap;
- uint32 txbf_cap;
- uint8 as_cap;
+ uint16 cap;
+ uint8 params;
+ uint8 supp_mcs[MCSSET_LEN];
+ uint16 ext_htcap;
+ uint32 txbf_cap;
+ uint8 as_cap;
} BWL_POST_PACKED_STRUCT;
typedef struct ht_cap_ie ht_cap_ie_t;
BWL_PRE_PACKED_STRUCT struct ht_prop_cap_ie {
- uint8 id;
- uint8 len;
- uint8 oui[3];
- uint8 type;
+ uint8 id;
+ uint8 len;
+ uint8 oui[3];
+ uint8 type;
ht_cap_ie_t cap_ie;
} BWL_POST_PACKED_STRUCT;
typedef struct ht_prop_cap_ie ht_prop_cap_ie_t;
-#define HT_PROP_IE_OVERHEAD 4
-#define HT_CAP_IE_LEN 26
-#define HT_CAP_IE_TYPE 51
-
-#define HT_CAP_LDPC_CODING 0x0001
-#define HT_CAP_40MHZ 0x0002
-#define HT_CAP_MIMO_PS_MASK 0x000C
-#define HT_CAP_MIMO_PS_SHIFT 0x0002
-#define HT_CAP_MIMO_PS_OFF 0x0003
-#define HT_CAP_MIMO_PS_RTS 0x0001
-#define HT_CAP_MIMO_PS_ON 0x0000
-#define HT_CAP_GF 0x0010
-#define HT_CAP_SHORT_GI_20 0x0020
-#define HT_CAP_SHORT_GI_40 0x0040
-#define HT_CAP_TX_STBC 0x0080
-#define HT_CAP_RX_STBC_MASK 0x0300
-#define HT_CAP_RX_STBC_SHIFT 8
-#define HT_CAP_DELAYED_BA 0x0400
-#define HT_CAP_MAX_AMSDU 0x0800
-#define HT_CAP_DSSS_CCK 0x1000
-#define HT_CAP_PSMP 0x2000
-#define HT_CAP_40MHZ_INTOLERANT 0x4000
-#define HT_CAP_LSIG_TXOP 0x8000
-
-#define HT_CAP_RX_STBC_NO 0x0
-#define HT_CAP_RX_STBC_ONE_STREAM 0x1
-#define HT_CAP_RX_STBC_TWO_STREAM 0x2
-#define HT_CAP_RX_STBC_THREE_STREAM 0x3
-
-#define HT_MAX_AMSDU 7935
-#define HT_MIN_AMSDU 3835
-
-#define HT_PARAMS_RX_FACTOR_MASK 0x03
-#define HT_PARAMS_DENSITY_MASK 0x1C
-#define HT_PARAMS_DENSITY_SHIFT 2
-
-
-#define AMPDU_MAX_MPDU_DENSITY 7
-#define AMPDU_RX_FACTOR_8K 0
-#define AMPDU_RX_FACTOR_16K 1
-#define AMPDU_RX_FACTOR_32K 2
-#define AMPDU_RX_FACTOR_64K 3
-#define AMPDU_RX_FACTOR_BASE 8*1024
-
-#define AMPDU_DELIMITER_LEN 4
-#define AMPDU_DELIMITER_LEN_MAX 63
+#define HT_PROP_IE_OVERHEAD 4
+#define HT_CAP_IE_LEN 26
+#define HT_CAP_IE_TYPE 51
+
+#define HT_CAP_LDPC_CODING 0x0001
+#define HT_CAP_40MHZ 0x0002
+#define HT_CAP_MIMO_PS_MASK 0x000C
+#define HT_CAP_MIMO_PS_SHIFT 0x0002
+#define HT_CAP_MIMO_PS_OFF 0x0003
+#define HT_CAP_MIMO_PS_RTS 0x0001
+#define HT_CAP_MIMO_PS_ON 0x0000
+#define HT_CAP_GF 0x0010
+#define HT_CAP_SHORT_GI_20 0x0020
+#define HT_CAP_SHORT_GI_40 0x0040
+#define HT_CAP_TX_STBC 0x0080
+#define HT_CAP_RX_STBC_MASK 0x0300
+#define HT_CAP_RX_STBC_SHIFT 8
+#define HT_CAP_DELAYED_BA 0x0400
+#define HT_CAP_MAX_AMSDU 0x0800
+
+#define HT_CAP_DSSS_CCK 0x1000
+#define HT_CAP_PSMP 0x2000
+#define HT_CAP_40MHZ_INTOLERANT 0x4000
+#define HT_CAP_LSIG_TXOP 0x8000
+
+#define HT_CAP_RX_STBC_NO 0x0
+#define HT_CAP_RX_STBC_ONE_STREAM 0x1
+#define HT_CAP_RX_STBC_TWO_STREAM 0x2
+#define HT_CAP_RX_STBC_THREE_STREAM 0x3
+
+#define VHT_MAX_MPDU 11454
+#define VHT_MPDU_MSDU_DELTA 56
+
+#define VHT_MAX_AMSDU (VHT_MAX_MPDU - VHT_MPDU_MSDU_DELTA)
+
+#define HT_MAX_AMSDU 7935
+#define HT_MIN_AMSDU 3835
+
+#define HT_PARAMS_RX_FACTOR_MASK 0x03
+#define HT_PARAMS_DENSITY_MASK 0x1C
+#define HT_PARAMS_DENSITY_SHIFT 2
+
+
+#define AMPDU_MAX_MPDU_DENSITY 7
+#define AMPDU_RX_FACTOR_8K 0
+#define AMPDU_RX_FACTOR_16K 1
+#define AMPDU_RX_FACTOR_32K 2
+#define AMPDU_RX_FACTOR_64K 3
+#define AMPDU_RX_FACTOR_BASE 8*1024
+
+#define AMPDU_DELIMITER_LEN 4
+#define AMPDU_DELIMITER_LEN_MAX 63
+
+#define HT_CAP_EXT_PCO 0x0001
+#define HT_CAP_EXT_PCO_TTIME_MASK 0x0006
+#define HT_CAP_EXT_PCO_TTIME_SHIFT 1
+#define HT_CAP_EXT_MCS_FEEDBACK_MASK 0x0300
+#define HT_CAP_EXT_MCS_FEEDBACK_SHIFT 8
+#define HT_CAP_EXT_HTC 0x0400
+#define HT_CAP_EXT_RD_RESP 0x0800
BWL_PRE_PACKED_STRUCT struct ht_add_ie {
- uint8 ctl_ch;
- uint8 byte1;
- uint16 opmode;
- uint16 misc_bits;
- uint8 basic_mcs[MCSSET_LEN];
+ uint8 ctl_ch;
+ uint8 byte1;
+ uint16 opmode;
+ uint16 misc_bits;
+ uint8 basic_mcs[MCSSET_LEN];
} BWL_POST_PACKED_STRUCT;
typedef struct ht_add_ie ht_add_ie_t;
BWL_PRE_PACKED_STRUCT struct ht_prop_add_ie {
- uint8 id;
- uint8 len;
- uint8 oui[3];
- uint8 type;
+ uint8 id;
+ uint8 len;
+ uint8 oui[3];
+ uint8 type;
ht_add_ie_t add_ie;
} BWL_POST_PACKED_STRUCT;
typedef struct ht_prop_add_ie ht_prop_add_ie_t;
-#define HT_ADD_IE_LEN 22
-#define HT_ADD_IE_TYPE 52
+#define HT_ADD_IE_LEN 22
+#define HT_ADD_IE_TYPE 52
-#define HT_BW_ANY 0x04
-#define HT_RIFS_PERMITTED 0x08
+#define HT_BW_ANY 0x04
+#define HT_RIFS_PERMITTED 0x08
-#define HT_OPMODE_MASK 0x0003
-#define HT_OPMODE_SHIFT 0
-#define HT_OPMODE_PURE 0x0000
-#define HT_OPMODE_OPTIONAL 0x0001
-#define HT_OPMODE_HT20IN40 0x0002
-#define HT_OPMODE_MIXED 0x0003
-#define HT_OPMODE_NONGF 0x0004
-#define DOT11N_TXBURST 0x0008
-#define DOT11N_OBSS_NONHT 0x0010
+#define HT_OPMODE_MASK 0x0003
+#define HT_OPMODE_SHIFT 0
+#define HT_OPMODE_PURE 0x0000
+#define HT_OPMODE_OPTIONAL 0x0001
+#define HT_OPMODE_HT20IN40 0x0002
+#define HT_OPMODE_MIXED 0x0003
+#define HT_OPMODE_NONGF 0x0004
+#define DOT11N_TXBURST 0x0008
+#define DOT11N_OBSS_NONHT 0x0010
-#define HT_BASIC_STBC_MCS 0x007f
-#define HT_DUAL_STBC_PROT 0x0080
-#define HT_SECOND_BCN 0x0100
-#define HT_LSIG_TXOP 0x0200
-#define HT_PCO_ACTIVE 0x0400
-#define HT_PCO_PHASE 0x0800
+#define HT_BASIC_STBC_MCS 0x007f
+#define HT_DUAL_STBC_PROT 0x0080
+#define HT_SECOND_BCN 0x0100
+#define HT_LSIG_TXOP 0x0200
+#define HT_PCO_ACTIVE 0x0400
+#define HT_PCO_PHASE 0x0800
+#define HT_DUALCTS_PROTECTION 0x0080
-#define DOT11N_2G_TXBURST_LIMIT 6160
-#define DOT11N_5G_TXBURST_LIMIT 3080
+#define DOT11N_2G_TXBURST_LIMIT 6160
+#define DOT11N_5G_TXBURST_LIMIT 3080
-#define GET_HT_OPMODE(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
+#define GET_HT_OPMODE(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
>> HT_OPMODE_SHIFT)
-#define HT_MIXEDMODE_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
- == HT_OPMODE_MIXED)
-#define HT_HT20_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
- == HT_OPMODE_HT20IN40)
-#define HT_OPTIONAL_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
- == HT_OPMODE_OPTIONAL)
-#define HT_USE_PROTECTION(add_ie) (HT_HT20_PRESENT((add_ie)) || \
+#define HT_MIXEDMODE_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
+ == HT_OPMODE_MIXED)
+#define HT_HT20_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
+ == HT_OPMODE_HT20IN40)
+#define HT_OPTIONAL_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_MASK) \
+ == HT_OPMODE_OPTIONAL)
+#define HT_USE_PROTECTION(add_ie) (HT_HT20_PRESENT((add_ie)) || \
HT_MIXEDMODE_PRESENT((add_ie)))
-#define HT_NONGF_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_NONGF) \
- == HT_OPMODE_NONGF)
-#define DOT11N_TXBURST_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & DOT11N_TXBURST) \
- == DOT11N_TXBURST)
-#define DOT11N_OBSS_NONHT_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & DOT11N_OBSS_NONHT) \
- == DOT11N_OBSS_NONHT)
+#define HT_NONGF_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & HT_OPMODE_NONGF) \
+ == HT_OPMODE_NONGF)
+#define DOT11N_TXBURST_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & DOT11N_TXBURST) \
+ == DOT11N_TXBURST)
+#define DOT11N_OBSS_NONHT_PRESENT(add_ie) ((ltoh16_ua(&add_ie->opmode) & DOT11N_OBSS_NONHT) \
+ == DOT11N_OBSS_NONHT)
BWL_PRE_PACKED_STRUCT struct obss_params {
- uint16 passive_dwell;
- uint16 active_dwell;
- uint16 bss_widthscan_interval;
- uint16 passive_total;
- uint16 active_total;
- uint16 chanwidth_transition_dly;
- uint16 activity_threshold;
+ uint16 passive_dwell;
+ uint16 active_dwell;
+ uint16 bss_widthscan_interval;
+ uint16 passive_total;
+ uint16 active_total;
+ uint16 chanwidth_transition_dly;
+ uint16 activity_threshold;
} BWL_POST_PACKED_STRUCT;
typedef struct obss_params obss_params_t;
BWL_PRE_PACKED_STRUCT struct dot11_obss_ie {
- uint8 id;
- uint8 len;
+ uint8 id;
+ uint8 len;
obss_params_t obss_params;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_obss_ie dot11_obss_ie_t;
-#define DOT11_OBSS_SCAN_IE_LEN sizeof(obss_params_t)
-
-
-#define HT_CTRL_LA_TRQ 0x00000002
-#define HT_CTRL_LA_MAI 0x0000003C
-#define HT_CTRL_LA_MAI_SHIFT 2
-#define HT_CTRL_LA_MAI_MRQ 0x00000004
-#define HT_CTRL_LA_MAI_MSI 0x00000038
-#define HT_CTRL_LA_MFSI 0x000001C0
-#define HT_CTRL_LA_MFSI_SHIFT 6
-#define HT_CTRL_LA_MFB_ASELC 0x0000FE00
-#define HT_CTRL_LA_MFB_ASELC_SH 9
-#define HT_CTRL_LA_ASELC_CMD 0x00000C00
-#define HT_CTRL_LA_ASELC_DATA 0x0000F000
-#define HT_CTRL_CAL_POS 0x00030000
-#define HT_CTRL_CAL_SEQ 0x000C0000
-#define HT_CTRL_CSI_STEERING 0x00C00000
-#define HT_CTRL_CSI_STEER_SHIFT 22
-#define HT_CTRL_CSI_STEER_NFB 0
-#define HT_CTRL_CSI_STEER_CSI 1
-#define HT_CTRL_CSI_STEER_NCOM 2
-#define HT_CTRL_CSI_STEER_COM 3
-#define HT_CTRL_NDP_ANNOUNCE 0x01000000
-#define HT_CTRL_AC_CONSTRAINT 0x40000000
-#define HT_CTRL_RDG_MOREPPDU 0x80000000
-
-#define HT_OPMODE_OPTIONAL 0x0001
-#define HT_OPMODE_HT20IN40 0x0002
-#define HT_OPMODE_MIXED 0x0003
-#define HT_OPMODE_NONGF 0x0004
-#define DOT11N_TXBURST 0x0008
-#define DOT11N_OBSS_NONHT 0x0010
-
-
-
-#define WPA_OUI "\x00\x50\xF2"
-#define WPA_OUI_LEN 3
-#define WPA_OUI_TYPE 1
-#define WPA_VERSION 1
-#define WPA2_OUI "\x00\x0F\xAC"
-#define WPA2_OUI_LEN 3
-#define WPA2_VERSION 1
-#define WPA2_VERSION_LEN 2
-
-
-#define WPS_OUI "\x00\x50\xF2"
-#define WPS_OUI_LEN 3
-#define WPS_OUI_TYPE 4
-
-
-#define WFA_OUI "\x50\x6F\x9A"
-#define WFA_OUI_LEN 3
-
-#define WFA_OUI_TYPE_WPA 1
-#define WFA_OUI_TYPE_WPS 4
-#define WFA_OUI_TYPE_TPC 8
-#define WFA_OUI_TYPE_P2P 9
-
-
-#define RSN_AKM_NONE 0
-#define RSN_AKM_UNSPECIFIED 1
-#define RSN_AKM_PSK 2
-#define RSN_AKM_FBT_1X 3
-#define RSN_AKM_FBT_PSK 4
+#define DOT11_OBSS_SCAN_IE_LEN sizeof(obss_params_t)
+
+
+#define HT_CTRL_LA_TRQ 0x00000002
+#define HT_CTRL_LA_MAI 0x0000003C
+#define HT_CTRL_LA_MAI_SHIFT 2
+#define HT_CTRL_LA_MAI_MRQ 0x00000004
+#define HT_CTRL_LA_MAI_MSI 0x00000038
+#define HT_CTRL_LA_MFSI 0x000001C0
+#define HT_CTRL_LA_MFSI_SHIFT 6
+#define HT_CTRL_LA_MFB_ASELC 0x0000FE00
+#define HT_CTRL_LA_MFB_ASELC_SH 9
+#define HT_CTRL_LA_ASELC_CMD 0x00000C00
+#define HT_CTRL_LA_ASELC_DATA 0x0000F000
+#define HT_CTRL_CAL_POS 0x00030000
+#define HT_CTRL_CAL_SEQ 0x000C0000
+#define HT_CTRL_CSI_STEERING 0x00C00000
+#define HT_CTRL_CSI_STEER_SHIFT 22
+#define HT_CTRL_CSI_STEER_NFB 0
+#define HT_CTRL_CSI_STEER_CSI 1
+#define HT_CTRL_CSI_STEER_NCOM 2
+#define HT_CTRL_CSI_STEER_COM 3
+#define HT_CTRL_NDP_ANNOUNCE 0x01000000
+#define HT_CTRL_AC_CONSTRAINT 0x40000000
+#define HT_CTRL_RDG_MOREPPDU 0x80000000
+
+#define HT_OPMODE_OPTIONAL 0x0001
+#define HT_OPMODE_HT20IN40 0x0002
+#define HT_OPMODE_MIXED 0x0003
+#define HT_OPMODE_NONGF 0x0004
+#define DOT11N_TXBURST 0x0008
+#define DOT11N_OBSS_NONHT 0x0010
+
+
+
+BWL_PRE_PACKED_STRUCT struct vht_cap_ie {
+ uint32 vht_cap_info;
+
+ uint16 rx_mcs_map;
+ uint16 rx_max_rate;
+ uint16 tx_mcs_map;
+ uint16 tx_max_rate;
+} BWL_POST_PACKED_STRUCT;
+typedef struct vht_cap_ie vht_cap_ie_t;
+
+#define VHT_CAP_IE_LEN 12
+
+#define VHT_CAP_INFO_MAX_MPDU_LEN_MASK 0x00000003
+#define VHT_CAP_INFO_SUPP_CHAN_WIDTH_MASK 0x0000000c
+#define VHT_CAP_INFO_LDPC 0x00000010
+#define VHT_CAP_INFO_SGI_80MHZ 0x00000020
+#define VHT_CAP_INFO_SGI_160MHZ 0x00000040
+#define VHT_CAP_INFO_TX_STBC 0x00000080
+
+#define VHT_CAP_INFO_RX_STBC_MASK 0x00000700
+#define VHT_CAP_INFO_RX_STBC_SHIFT 8
+#define VHT_CAP_INFO_SU_BEAMFMR 0x00000800
+#define VHT_CAP_INFO_SU_BEAMFMEE 0x00001000
+#define VHT_CAP_INFO_NUM_BMFMR_ANT_MASK 0x0000e000
+#define VHT_CAP_INFO_NUM_BMFMR_ANT_SHIFT 13
+
+#define VHT_CAP_INFO_NUM_SOUNDING_DIM_MASK 0x00070000
+#define VHT_CAP_INFO_NUM_SOUNDING_DIM_SHIFT 16
+#define VHT_CAP_INFO_MU_BEAMFMR 0x00080000
+#define VHT_CAP_INFO_MU_BEAMFMEE 0x00100000
+#define VHT_CAP_INFO_TXOPPS 0x00200000
+#define VHT_CAP_INFO_HTCVHT 0x00400000
+#define VHT_CAP_INFO_AMPDU_MAXLEN_EXP_MASK 0x03800000
+#define VHT_CAP_INFO_AMPDU_MAXLEN_EXP_SHIFT 23
+
+#define VHT_CAP_INFO_LINK_ADAPT_CAP_MASK 0x0c000000
+#define VHT_CAP_INFO_LINK_ADAPT_CAP_SHIFT 26
+
+
+#define VHT_CAP_SUPP_MCS_RX_HIGHEST_RATE_MASK 0x1fff
+#define VHT_CAP_SUPP_MCS_RX_HIGHEST_RATE_SHIFT 0
+
+#define VHT_CAP_SUPP_MCS_TX_HIGHEST_RATE_MASK 0x1fff
+#define VHT_CAP_SUPP_MCS_TX_HIGHEST_RATE_SHIFT 0
+
+#define VHT_CAP_MCS_MAP_0_7 0
+#define VHT_CAP_MCS_MAP_0_8 1
+#define VHT_CAP_MCS_MAP_0_9 2
+#define VHT_CAP_MCS_MAP_NONE 3
+
+#define VHT_CAP_MCS_MAP_NSS_MAX 8
+
+
+typedef enum vht_cap_chan_width {
+ VHT_CAP_CHAN_WIDTH_20_40 = 0x00,
+ VHT_CAP_CHAN_WIDTH_80 = 0x04,
+ VHT_CAP_CHAN_WIDTH_160 = 0x08
+} vht_cap_chan_width_t;
+
+
+typedef enum vht_cap_max_mpdu_len {
+ VHT_CAP_MPDU_MAX_4K = 0x00,
+ VHT_CAP_MPDU_MAX_8K = 0x01,
+ VHT_CAP_MPDU_MAX_11K = 0x02
+} vht_cap_max_mpdu_len_t;
+
+
+BWL_PRE_PACKED_STRUCT struct vht_op_ie {
+ uint8 chan_width;
+ uint8 chan1;
+ uint8 chan2;
+ uint16 supp_mcs;
+} BWL_POST_PACKED_STRUCT;
+typedef struct vht_op_ie vht_op_ie_t;
+
+#define VHT_OP_IE_LEN 5
+
+typedef enum vht_op_chan_width {
+ VHT_OP_CHAN_WIDTH_20_40 = 0,
+ VHT_OP_CHAN_WIDTH_80 = 1,
+ VHT_OP_CHAN_WIDTH_160 = 2,
+ VHT_OP_CHAN_WIDTH_80_80 = 3
+} vht_op_chan_width_t;
+
+
+#define VHT_MCS_MAP_GET_SS_IDX(numSpatialStreams) ((numSpatialStreams-1)*2)
+#define VHT_MCS_MAP_GET_MCS_PER_SS(numSpatialStreams, mcsMap) \
+ ((mcsMap >> VHT_MCS_MAP_GET_SS_IDX(numSpatialStreams)) & 0x3)
+#define VHT_MCS_MAP_SET_MCS_PER_SS(numSpatialStreams, numMcs, mcsMap) \
+ (mcsMap |= ((numMcs & 0x3) << VHT_MCS_MAP_GET_SS_IDX(numSpatialStreams)))
+
+
+#define WPA_OUI "\x00\x50\xF2"
+#define WPA_OUI_LEN 3
+#define WPA_OUI_TYPE 1
+#define WPA_VERSION 1
+#define WPA2_OUI "\x00\x0F\xAC"
+#define WPA2_OUI_LEN 3
+#define WPA2_VERSION 1
+#define WPA2_VERSION_LEN 2
+
+
+#define WPS_OUI "\x00\x50\xF2"
+#define WPS_OUI_LEN 3
+#define WPS_OUI_TYPE 4
+
+
+
+#ifdef P2P_IE_OVRD
+#define WFA_OUI MAC_OUI
+#else
+#define WFA_OUI "\x50\x6F\x9A"
+#endif
+#define WFA_OUI_LEN 3
+#ifdef P2P_IE_OVRD
+#define WFA_OUI_TYPE_P2P MAC_OUI_TYPE_P2P
+#else
+#define WFA_OUI_TYPE_P2P 9
+#endif
+
+#define WFA_OUI_TYPE_TPC 8
+
+
+#define RSN_AKM_NONE 0
+#define RSN_AKM_UNSPECIFIED 1
+#define RSN_AKM_PSK 2
+#define RSN_AKM_FBT_1X 3
+#define RSN_AKM_FBT_PSK 4
#define RSN_AKM_MFP_1X 5
#define RSN_AKM_MFP_PSK 6
#define RSN_AKM_TPK 7
-#define DOT11_MAX_DEFAULT_KEYS 4
-#define DOT11_MAX_KEY_SIZE 32
-#define DOT11_MAX_IV_SIZE 16
-#define DOT11_EXT_IV_FLAG (1<<5)
+#define DOT11_MAX_DEFAULT_KEYS 4
+#define DOT11_MAX_KEY_SIZE 32
+#define DOT11_MAX_IV_SIZE 16
+#define DOT11_EXT_IV_FLAG (1<<5)
#define DOT11_WPA_KEY_RSC_LEN 8
-#define WEP1_KEY_SIZE 5
-#define WEP1_KEY_HEX_SIZE 10
-#define WEP128_KEY_SIZE 13
-#define WEP128_KEY_HEX_SIZE 26
-#define TKIP_MIC_SIZE 8
-#define TKIP_EOM_SIZE 7
-#define TKIP_EOM_FLAG 0x5a
-#define TKIP_KEY_SIZE 32
-#define TKIP_MIC_AUTH_TX 16
-#define TKIP_MIC_AUTH_RX 24
-#define TKIP_MIC_SUP_RX TKIP_MIC_AUTH_TX
-#define TKIP_MIC_SUP_TX TKIP_MIC_AUTH_RX
-#define AES_KEY_SIZE 16
-#define AES_MIC_SIZE 8
-
-
-#define WCN_OUI "\x00\x50\xf2"
-#define WCN_TYPE 4
-
+#define WEP1_KEY_SIZE 5
+#define WEP1_KEY_HEX_SIZE 10
+#define WEP128_KEY_SIZE 13
+#define WEP128_KEY_HEX_SIZE 26
+#define TKIP_MIC_SIZE 8
+#define TKIP_EOM_SIZE 7
+#define TKIP_EOM_FLAG 0x5a
+#define TKIP_KEY_SIZE 32
+#define TKIP_MIC_AUTH_TX 16
+#define TKIP_MIC_AUTH_RX 24
+#define TKIP_MIC_SUP_RX TKIP_MIC_AUTH_TX
+#define TKIP_MIC_SUP_TX TKIP_MIC_AUTH_RX
+#define AES_KEY_SIZE 16
+#define AES_MIC_SIZE 8
+#define BIP_KEY_SIZE 16
+
+
+#define WCN_OUI "\x00\x50\xf2"
+#define WCN_TYPE 4
+
+#ifdef BCMWAPI_WPI
+#define SMS4_KEY_LEN 16
+#define SMS4_WPI_CBC_MAC_LEN 16
+#endif
@@ -1935,25 +2113,37 @@ typedef struct dot11_obss_ie dot11_obss_ie_t;
BWL_PRE_PACKED_STRUCT struct dot11_mdid_ie {
uint8 id;
uint8 len;
- uint16 mdid;
+ uint16 mdid;
uint8 cap;
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_mdid_ie dot11_mdid_ie_t;
-#define FBT_MDID_CAP_OVERDS 0x01
-#define FBT_MDID_CAP_RRP 0x02
+#define FBT_MDID_CAP_OVERDS 0x01
+#define FBT_MDID_CAP_RRP 0x02
BWL_PRE_PACKED_STRUCT struct dot11_ft_ie {
uint8 id;
uint8 len;
- uint16 mic_control;
+ uint16 mic_control;
uint8 mic[16];
uint8 anonce[32];
uint8 snonce[32];
} BWL_POST_PACKED_STRUCT;
typedef struct dot11_ft_ie dot11_ft_ie_t;
+#define TIE_TYPE_RESERVED 0
+#define TIE_TYPE_REASSOC_DEADLINE 1
+#define TIE_TYPE_KEY_LIEFTIME 2
+#define TIE_TYPE_ASSOC_COMEBACK 3
+BWL_PRE_PACKED_STRUCT struct dot11_timeout_ie {
+ uint8 id;
+ uint8 len;
+ uint8 type;
+ uint32 value;
+} BWL_POST_PACKED_STRUCT;
+typedef struct dot11_timeout_ie dot11_timeout_ie_t;
+
BWL_PRE_PACKED_STRUCT struct dot11_gtk_ie {
uint8 id;
@@ -1968,6 +2158,24 @@ typedef struct dot11_gtk_ie dot11_gtk_ie_t;
#define BSSID_INVALID "\x00\x00\x00\x00\x00\x00"
#define BSSID_BROADCAST "\xFF\xFF\xFF\xFF\xFF\xFF"
+#ifdef BCMWAPI_WAI
+#define WAPI_IE_MIN_LEN 20
+#define WAPI_VERSION 1
+#define WAPI_VERSION_LEN 2
+#define WAPI_OUI "\x00\x14\x72"
+#define WAPI_OUI_LEN DOT11_OUI_LEN
+#endif
+
+
+#define WMM_OUI "\x00\x50\xF2"
+#define WMM_OUI_LEN 3
+#define WMM_OUI_TYPE 2
+#define WMM_VERSION 1
+#define WMM_VERSION_LEN 1
+
+
+#define WMM_OUI_SUBTYPE_PARAMETER 1
+#define WMM_PARAMETER_IE_LEN 24
BWL_PRE_PACKED_STRUCT struct link_id_ie {
diff --git a/drivers/net/wireless/bcmdhd/include/proto/802.11_bta.h b/drivers/net/wireless/bcmdhd/include/proto/802.11_bta.h
index cbdd05e624b..3ee5a748695 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/802.11_bta.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/802.11_bta.h
@@ -1,9 +1,9 @@
/*
* BT-AMP (BlueTooth Alternate Mac and Phy) 802.11 PAL (Protocol Adaptation Layer)
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,7 +21,7 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: 802.11_bta.h 277737 2011-08-16 17:54:59Z $
+ * $Id: 802.11_bta.h 294267 2011-11-04 23:41:52Z $
*/
#ifndef _802_11_BTA_H_
diff --git a/drivers/net/wireless/bcmdhd/include/proto/802.11e.h b/drivers/net/wireless/bcmdhd/include/proto/802.11e.h
index 0e070a475b6..f391e68c110 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/802.11e.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/802.11e.h
@@ -1,9 +1,9 @@
/*
* 802.11e protocol header file
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,7 +21,7 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: 802.11e.h 277737 2011-08-16 17:54:59Z $
+ * $Id: 802.11e.h 241182 2011-02-17 21:50:03Z $
*/
#ifndef _802_11e_H_
diff --git a/drivers/net/wireless/bcmdhd/include/proto/802.1d.h b/drivers/net/wireless/bcmdhd/include/proto/802.1d.h
index c7e07bd5e7c..116a226b1b4 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/802.1d.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/802.1d.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,10 +21,9 @@
*
* Fundamental types and constants relating to 802.1D
*
- * $Id: 802.1d.h 277737 2011-08-16 17:54:59Z $
+ * $Id: 802.1d.h 241182 2011-02-17 21:50:03Z $
*/
-
#ifndef _802_1_D_
#define _802_1_D_
diff --git a/drivers/net/wireless/bcmdhd/include/proto/bcmeth.h b/drivers/net/wireless/bcmdhd/include/proto/bcmeth.h
index 0f75d3c8f1d..e54b2e38187 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/bcmeth.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/bcmeth.h
@@ -1,9 +1,9 @@
/*
* Broadcom Ethernettype protocol definitions
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,12 +21,11 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: bcmeth.h 277737 2011-08-16 17:54:59Z $
+ * $Id: bcmeth.h 294352 2011-11-06 19:23:00Z $
*/
-
#ifndef _BCMETH_H_
#define _BCMETH_H_
diff --git a/drivers/net/wireless/bcmdhd/include/proto/bcmevent.h b/drivers/net/wireless/bcmdhd/include/proto/bcmevent.h
index e8c2387dd10..0da2b76b9c2 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/bcmevent.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/bcmevent.h
@@ -1,9 +1,9 @@
/*
* Broadcom Event protocol definitions
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -23,13 +23,12 @@
*
* Dependencies: proto/bcmeth.h
*
- * $Id: bcmevent.h 288077 2011-10-06 00:08:47Z $
+ * $Id: bcmevent.h 294352 2011-11-06 19:23:00Z $
*
*/
-
#ifndef _BCMEVENT_H_
#define _BCMEVENT_H_
@@ -138,22 +137,22 @@ typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
#define WLC_E_PROBREQ_MSG 44
#define WLC_E_SCAN_CONFIRM_IND 45
#define WLC_E_PSK_SUP 46
-#define WLC_E_COUNTRY_CODE_CHANGED 47
-#define WLC_E_EXCEEDED_MEDIUM_TIME 48
+#define WLC_E_COUNTRY_CODE_CHANGED 47
+#define WLC_E_EXCEEDED_MEDIUM_TIME 48
#define WLC_E_ICV_ERROR 49
-#define WLC_E_UNICAST_DECODE_ERROR 50
-#define WLC_E_MULTICAST_DECODE_ERROR 51
+#define WLC_E_UNICAST_DECODE_ERROR 50
+#define WLC_E_MULTICAST_DECODE_ERROR 51
#define WLC_E_TRACE 52
+#ifdef WLBTAMP
#define WLC_E_BTA_HCI_EVENT 53
-#define WLC_E_IF 54
-#ifdef WLP2P
-#define WLC_E_P2P_DISC_LISTEN_COMPLETE 55
#endif
+#define WLC_E_IF 54
+#define WLC_E_P2P_DISC_LISTEN_COMPLETE 55
#define WLC_E_RSSI 56
#define WLC_E_PFN_SCAN_COMPLETE 57
#define WLC_E_EXTLOG_MSG 58
#define WLC_E_ACTION_FRAME 59
-#define WLC_E_ACTION_FRAME_COMPLETE 60
+#define WLC_E_ACTION_FRAME_COMPLETE 60
#define WLC_E_PRE_ASSOC_IND 61
#define WLC_E_PRE_REASSOC_IND 62
#define WLC_E_CHANNEL_ADOPTED 63
@@ -164,28 +163,28 @@ typedef BWL_PRE_PACKED_STRUCT struct bcm_event {
#define WLC_E_WAI_MSG 68
#define WLC_E_ESCAN_RESULT 69
#define WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE 70
-#if defined(WLP2P)
#define WLC_E_PROBRESP_MSG 71
#define WLC_E_P2P_PROBREQ_MSG 72
-#endif
-#define WLC_E_DCS_REQUEST 73
+#define WLC_E_DCS_REQUEST 73
-#define WLC_E_FIFO_CREDIT_MAP 74
+#define WLC_E_FIFO_CREDIT_MAP 74
#define WLC_E_ACTION_FRAME_RX 75
#define WLC_E_WAKE_EVENT 76
#define WLC_E_RM_COMPLETE 77
#define WLC_E_HTSFSYNC 78
#define WLC_E_OVERLAY_REQ 79
-#define WLC_E_CSA_COMPLETE_IND 80
+#define WLC_E_CSA_COMPLETE_IND 80
#define WLC_E_EXCESS_PM_WAKE_EVENT 81
#define WLC_E_PFN_SCAN_NONE 82
-#define WLC_E_PFN_SCAN_ALLGONE 83
-#define WLC_E_GTK_PLUMBED 84
-#define WLC_E_ASSOC_REQ_IE 85
-#define WLC_E_ASSOC_RESP_IE 86
-#define WLC_E_LAST 87
+#define WLC_E_PFN_SCAN_ALLGONE 83
+#define WLC_E_GTK_PLUMBED 84
+#define WLC_E_ASSOC_IND_NDIS 85
+#define WLC_E_REASSOC_IND_NDIS 86
+#define WLC_E_ASSOC_REQ_IE 87
+#define WLC_E_ASSOC_RESP_IE 88
+#define WLC_E_LAST 89
typedef struct {
@@ -280,7 +279,7 @@ typedef BWL_PRE_PACKED_STRUCT struct wl_event_rx_frame_data {
typedef struct wl_event_data_if {
- uint8 ifidx;
+ uint8 ifidx;
uint8 opcode;
uint8 reserved;
uint8 bssidx;
@@ -298,8 +297,10 @@ typedef struct wl_event_data_if {
#define WLC_E_IF_ROLE_WDS 2
#define WLC_E_IF_ROLE_P2P_GO 3
#define WLC_E_IF_ROLE_P2P_CLIENT 4
+#ifdef WLBTAMP
#define WLC_E_IF_ROLE_BTA_CREATOR 5
#define WLC_E_IF_ROLE_BTA_ACCEPTOR 6
+#endif
#define WLC_E_LINK_BCN_LOSS 1
@@ -308,7 +309,7 @@ typedef struct wl_event_data_if {
#define WLC_E_LINK_BSSCFG_DIS 4
-#define WLC_E_OVL_DOWNLOAD 0
+#define WLC_E_OVL_DOWNLOAD 0
#define WLC_E_OVL_UPDATE_IND 1
diff --git a/drivers/net/wireless/bcmdhd/include/proto/bcmip.h b/drivers/net/wireless/bcmdhd/include/proto/bcmip.h
index 55eff247c49..d5c3b76da5a 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/bcmip.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/bcmip.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,10 +21,9 @@
*
* Fundamental constants relating to IP Protocol
*
- * $Id: bcmip.h 277737 2011-08-16 17:54:59Z $
+ * $Id: bcmip.h 290206 2011-10-17 19:13:51Z $
*/
-
#ifndef _bcmip_h_
#define _bcmip_h_
@@ -47,8 +46,10 @@
((((uint8 *)(ip_body))[IP_VER_OFFSET] & IP_VER_MASK) >> IP_VER_SHIFT)
#define IP_PROT_ICMP 0x1
+#define IP_PROT_IGMP 0x2
#define IP_PROT_TCP 0x6
#define IP_PROT_UDP 0x11
+#define IP_PROT_ICMP6 0x3a
#define IPV4_VER_HL_OFFSET 0
@@ -149,6 +150,61 @@ BWL_PRE_PACKED_STRUCT struct ipv4_hdr {
IP_VER(ip_body) == IP_VER_6 ? IPV6_TRAFFIC_CLASS(ip_body) : 0)
+#define IPV6_EXTHDR_HOP 0
+#define IPV6_EXTHDR_ROUTING 43
+#define IPV6_EXTHDR_FRAGMENT 44
+#define IPV6_EXTHDR_AUTH 51
+#define IPV6_EXTHDR_NONE 59
+#define IPV6_EXTHDR_DEST 60
+
+#define IPV6_EXTHDR(prot) (((prot) == IPV6_EXTHDR_HOP) || \
+ ((prot) == IPV6_EXTHDR_ROUTING) || \
+ ((prot) == IPV6_EXTHDR_FRAGMENT) || \
+ ((prot) == IPV6_EXTHDR_AUTH) || \
+ ((prot) == IPV6_EXTHDR_NONE) || \
+ ((prot) == IPV6_EXTHDR_DEST))
+
+#define IPV6_MIN_HLEN 40
+
+#define IPV6_EXTHDR_LEN(eh) ((((struct ipv6_exthdr *)(eh))->hdrlen + 1) << 3)
+
+BWL_PRE_PACKED_STRUCT struct ipv6_exthdr {
+ uint8 nexthdr;
+ uint8 hdrlen;
+} BWL_POST_PACKED_STRUCT;
+
+BWL_PRE_PACKED_STRUCT struct ipv6_exthdr_frag {
+ uint8 nexthdr;
+ uint8 rsvd;
+ uint16 frag_off;
+ uint32 ident;
+} BWL_POST_PACKED_STRUCT;
+
+static INLINE int32
+ipv6_exthdr_len(uint8 *h, uint8 *proto)
+{
+ uint16 len = 0, hlen;
+ struct ipv6_exthdr *eh = (struct ipv6_exthdr *)h;
+
+ while (IPV6_EXTHDR(eh->nexthdr)) {
+ if (eh->nexthdr == IPV6_EXTHDR_NONE)
+ return -1;
+ else if (eh->nexthdr == IPV6_EXTHDR_FRAGMENT)
+ hlen = 8;
+ else if (eh->nexthdr == IPV6_EXTHDR_AUTH)
+ hlen = (eh->hdrlen + 2) << 2;
+ else
+ hlen = IPV6_EXTHDR_LEN(eh);
+
+ len += hlen;
+ eh = (struct ipv6_exthdr *)(h + len);
+ }
+
+ *proto = eh->nexthdr;
+ return len;
+}
+
+
#include <packed_section_end.h>
#endif
diff --git a/drivers/net/wireless/bcmdhd/include/proto/bcmipv6.h b/drivers/net/wireless/bcmdhd/include/proto/bcmipv6.h
new file mode 100644
index 00000000000..95333918274
--- /dev/null
+++ b/drivers/net/wireless/bcmdhd/include/proto/bcmipv6.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 1999-2012, Broadcom Corporation
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed to you
+ * under the terms of the GNU General Public License version 2 (the "GPL"),
+ * available at http://www.broadcom.com/licenses/GPLv2.php, with the
+ * following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give you
+ * permission to link this software with independent modules, and to copy and
+ * distribute the resulting executable under terms of your choice, provided that
+ * you also meet, for each linked independent module, the terms and conditions of
+ * the license of that module. An independent module is a module which is not
+ * derived from this software. The special exception does not apply to any
+ * modifications of the software.
+ *
+ * Notwithstanding the above, under no circumstances may you combine this
+ * software in any way with any other Broadcom software provided under a license
+ * other than the GPL, without Broadcom's express prior written consent.
+ *
+ * Fundamental constants relating to Neighbor Discovery Protocol
+ *
+ * $Id: bcmipv6.h 309193 2012-01-19 00:03:57Z $
+ */
+
+#ifndef _bcmipv6_h_
+#define _bcmipv6_h_
+
+#ifndef _TYPEDEFS_H_
+#include <typedefs.h>
+#endif
+
+/* This marks the start of a packed structure section. */
+#include <packed_section_start.h>
+
+#define ICMPV6_HEADER_TYPE 0x3A
+#define ICMPV6_PKT_TYPE_NS 135
+#define ICMPV6_PKT_TYPE_NA 136
+
+#define ICMPV6_ND_OPT_TYPE_TARGET_MAC 2
+#define ICMPV6_ND_OPT_TYPE_SRC_MAC 1
+
+#define IPV6_VERSION 6
+#define IPV6_HOP_LIMIT 255
+
+#define IPV6_ADDR_NULL(a) ((a[0] | a[1] | a[2] | a[3] | a[4] | \
+ a[5] | a[6] | a[7] | a[8] | a[9] | \
+ a[10] | a[11] | a[12] | a[13] | \
+ a[14] | a[15]) == 0)
+
+/* IPV6 address */
+BWL_PRE_PACKED_STRUCT struct ipv6_addr {
+ uint8 addr[16];
+} BWL_POST_PACKED_STRUCT;
+
+
+/* ICMPV6 Header */
+BWL_PRE_PACKED_STRUCT struct icmp6_hdr {
+ uint8 icmp6_type;
+ uint8 icmp6_code;
+ uint16 icmp6_cksum;
+ BWL_PRE_PACKED_STRUCT union {
+ uint32 reserved;
+ BWL_PRE_PACKED_STRUCT struct nd_advt {
+ uint32 reserved1:5,
+ override:1,
+ solicited:1,
+ router:1,
+ reserved2:24;
+ } BWL_POST_PACKED_STRUCT nd_advt;
+ } BWL_POST_PACKED_STRUCT opt;
+} BWL_POST_PACKED_STRUCT;
+
+/* Ipv6 Header Format */
+BWL_PRE_PACKED_STRUCT struct ipv6_hdr {
+ uint8 priority:4,
+ version:4;
+ uint8 flow_lbl[3];
+ uint16 payload_len;
+ uint8 nexthdr;
+ uint8 hop_limit;
+ struct ipv6_addr saddr;
+ struct ipv6_addr daddr;
+} BWL_POST_PACKED_STRUCT;
+
+/* Neighbor Advertisement/Solicitation Packet Structure */
+BWL_PRE_PACKED_STRUCT struct nd_msg {
+ struct icmp6_hdr icmph;
+ struct ipv6_addr target;
+} BWL_POST_PACKED_STRUCT;
+
+
+/* Neighibor Solicitation/Advertisement Optional Structure */
+BWL_PRE_PACKED_STRUCT struct nd_msg_opt {
+ uint8 type;
+ uint8 len;
+ uint8 mac_addr[ETHER_ADDR_LEN];
+} BWL_POST_PACKED_STRUCT;
+
+/* This marks the end of a packed structure section. */
+#include <packed_section_end.h>
+
+#endif /* !defined(_bcmipv6_h_) */
diff --git a/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h b/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
index 91ab4fe538f..8617985dd36 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/bt_amp_hci.h
@@ -1,9 +1,9 @@
/*
* BT-AMP (BlueTooth Alternate Mac and Phy) HCI (Host/Controller Interface)
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,7 +21,7 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: bt_amp_hci.h 277737 2011-08-16 17:54:59Z $
+ * $Id: bt_amp_hci.h 294267 2011-11-04 23:41:52Z $
*/
#ifndef _bt_amp_hci_h
@@ -211,7 +211,6 @@ typedef BWL_PRE_PACKED_STRUCT struct amp_hci_event {
#define HCI_Short_Range_Mode_Change_Complete_Event_Mask 0x1000
#define HCI_Status_Change_Event_Mask 0x2000
#define HCI_All_Event_Mask 0x31e7
-
/* AMP HCI event parameters */
typedef BWL_PRE_PACKED_STRUCT struct cmd_status_parms {
uint8 status;
diff --git a/drivers/net/wireless/bcmdhd/include/proto/eapol.h b/drivers/net/wireless/bcmdhd/include/proto/eapol.h
index 92634c1221a..8936d1641a3 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/eapol.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/eapol.h
@@ -7,7 +7,7 @@
*
* Copyright (C) 2002 Broadcom Corporation
*
- * $Id: eapol.h 277737 2011-08-16 17:54:59Z $
+ * $Id: eapol.h 241182 2011-02-17 21:50:03Z $
*/
#ifndef _eapol_h_
@@ -23,16 +23,24 @@
#include <bcmcrypto/aeskeywrap.h>
/* EAPOL for 802.3/Ethernet */
-typedef struct {
+typedef BWL_PRE_PACKED_STRUCT struct {
struct ether_header eth; /* 802.3/Ethernet header */
unsigned char version; /* EAPOL protocol version */
unsigned char type; /* EAPOL type */
unsigned short length; /* Length of body */
unsigned char body[1]; /* Body (optional) */
-} eapol_header_t;
+} BWL_POST_PACKED_STRUCT eapol_header_t;
#define EAPOL_HEADER_LEN 18
+typedef struct {
+ unsigned char version; /* EAPOL protocol version */
+ unsigned char type; /* EAPOL type */
+ unsigned short length; /* Length of body */
+} eapol_hdr_t;
+
+#define EAPOL_HDR_LEN 4
+
/* EAPOL version */
#define WPA2_EAPOL_VERSION 2
#define WPA_EAPOL_VERSION 1
@@ -116,6 +124,8 @@ typedef BWL_PRE_PACKED_STRUCT struct {
#define WPA_KEY_ERROR 0x400
#define WPA_KEY_REQ 0x800
+#define WPA_KEY_DESC_V2_OR_V3 WPA_KEY_DESC_V2
+
/* WPA-only KEY KEY_INFO bits */
#define WPA_KEY_INDEX_0 0x00
#define WPA_KEY_INDEX_1 0x10
@@ -142,6 +152,7 @@ typedef BWL_PRE_PACKED_STRUCT struct {
#define WPA2_KEY_DATA_SUBTYPE_STAKEY 2
#define WPA2_KEY_DATA_SUBTYPE_MAC 3
#define WPA2_KEY_DATA_SUBTYPE_PMKID 4
+#define WPA2_KEY_DATA_SUBTYPE_IGTK 9
/* GTK encapsulation */
typedef BWL_PRE_PACKED_STRUCT struct {
@@ -157,6 +168,15 @@ typedef BWL_PRE_PACKED_STRUCT struct {
#define WPA2_GTK_TRANSMIT 0x04
+/* IGTK encapsulation */
+typedef BWL_PRE_PACKED_STRUCT struct {
+ uint16 key_id;
+ uint8 ipn[6];
+ uint8 key[EAPOL_WPA_MAX_KEY_SIZE];
+} BWL_POST_PACKED_STRUCT eapol_wpa2_key_igtk_encap_t;
+
+#define EAPOL_WPA2_KEY_IGTK_ENCAP_HDR_LEN 8
+
/* STAKey encapsulation */
typedef BWL_PRE_PACKED_STRUCT struct {
uint8 reserved[2];
diff --git a/drivers/net/wireless/bcmdhd/include/proto/ethernet.h b/drivers/net/wireless/bcmdhd/include/proto/ethernet.h
index 20865dc5a23..e45518564c1 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/ethernet.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/ethernet.h
@@ -1,9 +1,9 @@
/*
* From FreeBSD 2.2.7: Fundamental constants relating to ethernet.
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,10 +21,9 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: ethernet.h 285437 2011-09-21 22:16:56Z $
+ * $Id: ethernet.h 309193 2012-01-19 00:03:57Z $
*/
-
#ifndef _NET_ETHERNET_H_
#define _NET_ETHERNET_H_
@@ -65,16 +64,17 @@
#define ETHER_TYPE_IP 0x0800
#define ETHER_TYPE_ARP 0x0806
#define ETHER_TYPE_8021Q 0x8100
+#define ETHER_TYPE_IPV6 0x86dd
#define ETHER_TYPE_BRCM 0x886c
#define ETHER_TYPE_802_1X 0x888e
#define ETHER_TYPE_802_1X_PREAUTH 0x88c7
#define ETHER_TYPE_WAI 0x88b4
#define ETHER_TYPE_89_0D 0x890d
+#define ETHER_TYPE_IPV6 0x86dd
#define ETHER_BRCM_SUBTYPE_LEN 4
-#define ETHER_BRCM_CRAM 1
#define ETHER_DEST_OFFSET (0 * ETHER_ADDR_LEN)
@@ -111,7 +111,7 @@ BWL_PRE_PACKED_STRUCT struct ether_addr {
#define ETHER_SET_LOCALADDR(ea) (((uint8 *)(ea))[0] = (((uint8 *)(ea))[0] | 2))
#define ETHER_IS_LOCALADDR(ea) (((uint8 *)(ea))[0] & 2)
-#define ETHER_CLR_LOCALADDR(ea) (((uint8 *)(ea))[0] = (((uint8 *)(ea))[0] & 0xd))
+#define ETHER_CLR_LOCALADDR(ea) (((uint8 *)(ea))[0] = (((uint8 *)(ea))[0] & 0xfd))
#define ETHER_TOGGLE_LOCALADDR(ea) (((uint8 *)(ea))[0] = (((uint8 *)(ea))[0] ^ 2))
@@ -122,15 +122,15 @@ BWL_PRE_PACKED_STRUCT struct ether_addr {
-#define ether_cmp(a, b) (!(((short*)a)[0] == ((short*)b)[0]) | \
- !(((short*)a)[1] == ((short*)b)[1]) | \
- !(((short*)a)[2] == ((short*)b)[2]))
+#define ether_cmp(a, b) (!(((short*)(a))[0] == ((short*)(b))[0]) | \
+ !(((short*)(a))[1] == ((short*)(b))[1]) | \
+ !(((short*)(a))[2] == ((short*)(b))[2]))
#define ether_copy(s, d) { \
- ((short*)d)[0] = ((short*)s)[0]; \
- ((short*)d)[1] = ((short*)s)[1]; \
- ((short*)d)[2] = ((short*)s)[2]; }
+ ((short*)(d))[0] = ((const short*)(s))[0]; \
+ ((short*)(d))[1] = ((const short*)(s))[1]; \
+ ((short*)(d))[2] = ((const short*)(s))[2]; }
static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}};
@@ -149,7 +149,6 @@ static const struct ether_addr ether_null = {{0, 0, 0, 0, 0, 0}};
((uint8 *)(ea))[4] | \
((uint8 *)(ea))[5]) == 0)
-
#define ETHER_MOVE_HDR(d, s) \
do { \
struct ether_header t; \
diff --git a/drivers/net/wireless/bcmdhd/include/proto/p2p.h b/drivers/net/wireless/bcmdhd/include/proto/p2p.h
index d2bf3f20688..27996406f06 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/p2p.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/p2p.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,7 +21,7 @@
*
* Fundamental types and constants relating to WFA P2P (aka WiFi Direct)
*
- * $Id: p2p.h 277737 2011-08-16 17:54:59Z $
+ * $Id: p2p.h 281528 2011-09-02 17:13:26Z $
*/
#ifndef _P2P_H_
@@ -33,355 +33,349 @@
#include <wlioctl.h>
#include <proto/802.11.h>
-/* This marks the start of a packed structure section. */
+
#include <packed_section_start.h>
-/* WiFi P2P OUI values */
-#define P2P_OUI WFA_OUI /* WiFi P2P OUI */
-#define P2P_VER WFA_OUI_TYPE_P2P /* P2P version: 9=WiFi P2P v1.0 */
-#define P2P_IE_ID 0xdd /* P2P IE element ID */
+#define P2P_OUI WFA_OUI
+#define P2P_VER WFA_OUI_TYPE_P2P
+
+#define P2P_IE_ID 0xdd
+
-/* WiFi P2P IE */
BWL_PRE_PACKED_STRUCT struct wifi_p2p_ie {
- uint8 id; /* IE ID: 0xDD */
- uint8 len; /* IE length */
- uint8 OUI[3]; /* WiFi P2P specific OUI: P2P_OUI */
- uint8 oui_type; /* Identifies P2P version: P2P_VER */
- uint8 subelts[1]; /* variable length subelements */
+ uint8 id;
+ uint8 len;
+ uint8 OUI[3];
+ uint8 oui_type;
+ uint8 subelts[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_ie wifi_p2p_ie_t;
-#define P2P_IE_FIXED_LEN 6
-
-#define P2P_ATTR_ID_OFF 0
-#define P2P_ATTR_LEN_OFF 1
-#define P2P_ATTR_DATA_OFF 3
-
-#define P2P_ATTR_HDR_LEN 3 /* ID + 2-byte length field spec 1.02 */
-
-/* P2P IE Subelement IDs from WiFi P2P Technical Spec 1.00 */
-#define P2P_SEID_STATUS 0 /* Status */
-#define P2P_SEID_MINOR_RC 1 /* Minor Reason Code */
-#define P2P_SEID_P2P_INFO 2 /* P2P Capability (capabilities info) */
-#define P2P_SEID_DEV_ID 3 /* P2P Device ID */
-#define P2P_SEID_INTENT 4 /* Group Owner Intent */
-#define P2P_SEID_CFG_TIMEOUT 5 /* Configuration Timeout */
-#define P2P_SEID_CHANNEL 6 /* Channel */
-#define P2P_SEID_GRP_BSSID 7 /* P2P Group BSSID */
-#define P2P_SEID_XT_TIMING 8 /* Extended Listen Timing */
-#define P2P_SEID_INTINTADDR 9 /* Intended P2P Interface Address */
-#define P2P_SEID_P2P_MGBTY 10 /* P2P Manageability */
-#define P2P_SEID_CHAN_LIST 11 /* Channel List */
-#define P2P_SEID_ABSENCE 12 /* Notice of Absence */
-#define P2P_SEID_DEV_INFO 13 /* Device Info */
-#define P2P_SEID_GROUP_INFO 14 /* Group Info */
-#define P2P_SEID_GROUP_ID 15 /* Group ID */
-#define P2P_SEID_P2P_IF 16 /* P2P Interface */
-#define P2P_SEID_VNDR 221 /* Vendor-specific subelement */
-
-#define P2P_SE_VS_ID_SERVICES 0x1b /* BRCM proprietary subel: L2 Services */
-
-
-/* WiFi P2P IE subelement: P2P Capability (capabilities info) */
+#define P2P_IE_FIXED_LEN 6
+
+#define P2P_ATTR_ID_OFF 0
+#define P2P_ATTR_LEN_OFF 1
+#define P2P_ATTR_DATA_OFF 3
+
+#define P2P_ATTR_HDR_LEN 3
+
+
+#define P2P_SEID_STATUS 0
+#define P2P_SEID_MINOR_RC 1
+#define P2P_SEID_P2P_INFO 2
+#define P2P_SEID_DEV_ID 3
+#define P2P_SEID_INTENT 4
+#define P2P_SEID_CFG_TIMEOUT 5
+#define P2P_SEID_CHANNEL 6
+#define P2P_SEID_GRP_BSSID 7
+#define P2P_SEID_XT_TIMING 8
+#define P2P_SEID_INTINTADDR 9
+#define P2P_SEID_P2P_MGBTY 10
+#define P2P_SEID_CHAN_LIST 11
+#define P2P_SEID_ABSENCE 12
+#define P2P_SEID_DEV_INFO 13
+#define P2P_SEID_GROUP_INFO 14
+#define P2P_SEID_GROUP_ID 15
+#define P2P_SEID_P2P_IF 16
+#define P2P_SEID_VNDR 221
+
+#define P2P_SE_VS_ID_SERVICES 0x1b
+
+
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_info_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_P2P_INFO */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 dev; /* Device Capability Bitmap */
- uint8 group; /* Group Capability Bitmap */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 dev;
+ uint8 group;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_info_se_s wifi_p2p_info_se_t;
-/* P2P Capability subelement's Device Capability Bitmap bit values */
-#define P2P_CAPSE_DEV_SERVICE_DIS 0x1 /* Service Discovery */
-#define P2P_CAPSE_DEV_CLIENT_DIS 0x2 /* Client Discoverability */
-#define P2P_CAPSE_DEV_CONCURRENT 0x4 /* Concurrent Operation */
-#define P2P_CAPSE_DEV_INFRA_MAN 0x8 /* P2P Infrastructure Managed */
-#define P2P_CAPSE_DEV_LIMIT 0x10 /* P2P Device Limit */
-#define P2P_CAPSE_INVITE_PROC 0x20 /* P2P Invitation Procedure */
-
-/* P2P Capability subelement's Group Capability Bitmap bit values */
-#define P2P_CAPSE_GRP_OWNER 0x1 /* P2P Group Owner */
-#define P2P_CAPSE_PERSIST_GRP 0x2 /* Persistent P2P Group */
-#define P2P_CAPSE_GRP_LIMIT 0x4 /* P2P Group Limit */
-#define P2P_CAPSE_GRP_INTRA_BSS 0x8 /* Intra-BSS Distribution */
-#define P2P_CAPSE_GRP_X_CONNECT 0x10 /* Cross Connection */
-#define P2P_CAPSE_GRP_PERSISTENT 0x20 /* Persistent Reconnect */
-#define P2P_CAPSE_GRP_FORMATION 0x40 /* Group Formation */
-
-
-/* WiFi P2P IE subelement: Group Owner Intent */
+
+#define P2P_CAPSE_DEV_SERVICE_DIS 0x1
+#define P2P_CAPSE_DEV_CLIENT_DIS 0x2
+#define P2P_CAPSE_DEV_CONCURRENT 0x4
+#define P2P_CAPSE_DEV_INFRA_MAN 0x8
+#define P2P_CAPSE_DEV_LIMIT 0x10
+#define P2P_CAPSE_INVITE_PROC 0x20
+
+
+#define P2P_CAPSE_GRP_OWNER 0x1
+#define P2P_CAPSE_PERSIST_GRP 0x2
+#define P2P_CAPSE_GRP_LIMIT 0x4
+#define P2P_CAPSE_GRP_INTRA_BSS 0x8
+#define P2P_CAPSE_GRP_X_CONNECT 0x10
+#define P2P_CAPSE_GRP_PERSISTENT 0x20
+#define P2P_CAPSE_GRP_FORMATION 0x40
+
+
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_intent_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_INTENT */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 intent; /* Intent Value 0...15 (0=legacy 15=master only) */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 intent;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_intent_se_s wifi_p2p_intent_se_t;
-/* WiFi P2P IE subelement: Configuration Timeout */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_cfg_tmo_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_CFG_TIMEOUT */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 go_tmo; /* GO config timeout in units of 10 ms */
- uint8 client_tmo; /* Client config timeout in units of 10 ms */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 go_tmo;
+ uint8 client_tmo;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_cfg_tmo_se_s wifi_p2p_cfg_tmo_se_t;
-/* WiFi P2P IE subelement: Status */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_status_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_STATUS */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 status; /* Status Code: P2P_STATSE_* */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 status;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_status_se_s wifi_p2p_status_se_t;
-/* Status subelement Status Code definitions */
-#define P2P_STATSE_SUCCESS 0
- /* Success */
-#define P2P_STATSE_FAIL_INFO_CURR_UNAVAIL 1
- /* Failed, information currently unavailable */
-#define P2P_STATSE_PASSED_UP P2P_STATSE_FAIL_INFO_CURR_UNAVAIL
- /* Old name for above in P2P spec 1.08 and older */
-#define P2P_STATSE_FAIL_INCOMPAT_PARAMS 2
- /* Failed, incompatible parameters */
-#define P2P_STATSE_FAIL_LIMIT_REACHED 3
- /* Failed, limit reached */
-#define P2P_STATSE_FAIL_INVALID_PARAMS 4
- /* Failed, invalid parameters */
-#define P2P_STATSE_FAIL_UNABLE_TO_ACCOM 5
- /* Failed, unable to accomodate request */
-#define P2P_STATSE_FAIL_PROTO_ERROR 6
- /* Failed, previous protocol error or disruptive behaviour */
-#define P2P_STATSE_FAIL_NO_COMMON_CHAN 7
- /* Failed, no common channels */
-#define P2P_STATSE_FAIL_UNKNOWN_GROUP 8
- /* Failed, unknown P2P Group */
-#define P2P_STATSE_FAIL_INTENT 9
- /* Failed, both peers indicated Intent 15 in GO Negotiation */
-#define P2P_STATSE_FAIL_INCOMPAT_PROVIS 10
- /* Failed, incompatible provisioning method */
-#define P2P_STATSE_FAIL_USER_REJECT 11
- /* Failed, rejected by user */
-
-/* WiFi P2P IE attribute: Extended Listen Timing */
+
+#define P2P_STATSE_SUCCESS 0
+
+#define P2P_STATSE_FAIL_INFO_CURR_UNAVAIL 1
+
+#define P2P_STATSE_PASSED_UP P2P_STATSE_FAIL_INFO_CURR_UNAVAIL
+
+#define P2P_STATSE_FAIL_INCOMPAT_PARAMS 2
+
+#define P2P_STATSE_FAIL_LIMIT_REACHED 3
+
+#define P2P_STATSE_FAIL_INVALID_PARAMS 4
+
+#define P2P_STATSE_FAIL_UNABLE_TO_ACCOM 5
+
+#define P2P_STATSE_FAIL_PROTO_ERROR 6
+
+#define P2P_STATSE_FAIL_NO_COMMON_CHAN 7
+
+#define P2P_STATSE_FAIL_UNKNOWN_GROUP 8
+
+#define P2P_STATSE_FAIL_INTENT 9
+
+#define P2P_STATSE_FAIL_INCOMPAT_PROVIS 10
+
+#define P2P_STATSE_FAIL_USER_REJECT 11
+
+
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_ext_se_s {
- uint8 eltId; /* ID: P2P_SEID_EXT_TIMING */
- uint8 len[2]; /* length not including eltId, len fields */
- uint8 avail[2]; /* availibility period */
- uint8 interval[2]; /* availibility interval */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 avail[2];
+ uint8 interval[2];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_ext_se_s wifi_p2p_ext_se_t;
-#define P2P_EXT_MIN 10 /* minimum 10ms */
+#define P2P_EXT_MIN 10
+
-/* WiFi P2P IE subelement: Intended P2P Interface Address */
BWL_PRE_PACKED_STRUCT struct wifi_p2p_intintad_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_INTINTADDR */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 mac[6]; /* intended P2P interface MAC address */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 mac[6];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_intintad_se_s wifi_p2p_intintad_se_t;
-/* WiFi P2P IE subelement: Channel */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_channel_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_STATUS */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 band; /* Regulatory Class (band) */
- uint8 channel; /* Channel */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 band;
+ uint8 channel;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_channel_se_s wifi_p2p_channel_se_t;
-/* Channel Entry structure within the Channel List SE */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_chanlist_entry_s {
- uint8 band; /* Regulatory Class (band) */
- uint8 num_channels; /* # of channels in the channel list */
- uint8 channels[WL_NUMCHANNELS]; /* Channel List */
+ uint8 band;
+ uint8 num_channels;
+ uint8 channels[WL_NUMCHANNELS];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_chanlist_entry_s wifi_p2p_chanlist_entry_t;
#define WIFI_P2P_CHANLIST_SE_MAX_ENTRIES 2
-/* WiFi P2P IE subelement: Channel List */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_chanlist_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_STATUS */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 country[3]; /* Country String */
- uint8 num_entries; /* # of channel entries */
- wifi_p2p_chanlist_entry_t entries[WIFI_P2P_CHANLIST_SE_MAX_ENTRIES];
- /* Channel Entry List */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 country[3];
+ uint8 num_entries;
+ wifi_p2p_chanlist_entry_t entries[WIFI_P2P_CHANLIST_SE_MAX_ENTRIES];
+
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_chanlist_se_s wifi_p2p_chanlist_se_t;
-/* WiFi P2P IE's Device Info subelement */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_devinfo_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_DEVINFO */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 mac[6]; /* P2P Device MAC address */
- uint16 wps_cfg_meths; /* Config Methods: reg_prototlv.h WPS_CONFMET_* */
- uint8 pri_devtype[8]; /* Primary Device Type */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 mac[6];
+ uint16 wps_cfg_meths;
+ uint8 pri_devtype[8];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_devinfo_se_s wifi_p2p_devinfo_se_t;
-#define P2P_DEV_TYPE_LEN 8
+#define P2P_DEV_TYPE_LEN 8
+
-/* WiFi P2P IE's Group Info subelement Client Info Descriptor */
BWL_PRE_PACKED_STRUCT struct wifi_p2p_cid_fixed_s {
- uint8 len;
- uint8 devaddr[ETHER_ADDR_LEN]; /* P2P Device Address */
- uint8 ifaddr[ETHER_ADDR_LEN]; /* P2P Interface Address */
- uint8 devcap; /* Device Capability */
- uint8 cfg_meths[2]; /* Config Methods: reg_prototlv.h WPS_CONFMET_* */
- uint8 pridt[P2P_DEV_TYPE_LEN]; /* Primary Device Type */
- uint8 secdts; /* Number of Secondary Device Types */
+ uint8 len;
+ uint8 devaddr[ETHER_ADDR_LEN];
+ uint8 ifaddr[ETHER_ADDR_LEN];
+ uint8 devcap;
+ uint8 cfg_meths[2];
+ uint8 pridt[P2P_DEV_TYPE_LEN];
+ uint8 secdts;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_cid_fixed_s wifi_p2p_cid_fixed_t;
-/* WiFi P2P IE's Device ID subelement */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_devid_se_s {
- uint8 eltId;
- uint8 len[2];
- struct ether_addr addr; /* P2P Device MAC address */
+ uint8 eltId;
+ uint8 len[2];
+ struct ether_addr addr;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_devid_se_s wifi_p2p_devid_se_t;
-/* WiFi P2P IE subelement: P2P Manageability */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_mgbt_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_P2P_MGBTY */
- uint8 len[2]; /* SE length not including eltId, len fields */
- uint8 mg_bitmap; /* manageability bitmap */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 mg_bitmap;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_mgbt_se_s wifi_p2p_mgbt_se_t;
-/* mg_bitmap field bit values */
-#define P2P_MGBTSE_P2PDEVMGMT_FLAG 0x1 /* AP supports Managed P2P Device */
-/* WiFi P2P IE subelement: Group Info */
+#define P2P_MGBTSE_P2PDEVMGMT_FLAG 0x1
+
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_grpinfo_se_s {
- uint8 eltId; /* SE ID: P2P_SEID_GROUP_INFO */
- uint8 len[2]; /* SE length not including eltId, len fields */
+ uint8 eltId;
+ uint8 len[2];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_grpinfo_se_s wifi_p2p_grpinfo_se_t;
-/* WiFi P2P Action Frame */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_action_frame {
- uint8 category; /* P2P_AF_CATEGORY */
- uint8 OUI[3]; /* OUI - P2P_OUI */
- uint8 type; /* OUI Type - P2P_VER */
- uint8 subtype; /* OUI Subtype - P2P_AF_* */
- uint8 dialog_token; /* nonzero, identifies req/resp tranaction */
- uint8 elts[1]; /* Variable length information elements. Max size =
- * ACTION_FRAME_SIZE - sizeof(this structure) - 1
- */
+ uint8 category;
+ uint8 OUI[3];
+ uint8 type;
+ uint8 subtype;
+ uint8 dialog_token;
+ uint8 elts[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_action_frame wifi_p2p_action_frame_t;
-#define P2P_AF_CATEGORY 0x7f
+#define P2P_AF_CATEGORY 0x7f
+
+#define P2P_AF_FIXED_LEN 7
+
-#define P2P_AF_FIXED_LEN 7
+#define P2P_AF_NOTICE_OF_ABSENCE 0
+#define P2P_AF_PRESENCE_REQ 1
+#define P2P_AF_PRESENCE_RSP 2
+#define P2P_AF_GO_DISC_REQ 3
-/* WiFi P2P Action Frame OUI Subtypes */
-#define P2P_AF_NOTICE_OF_ABSENCE 0 /* Notice of Absence */
-#define P2P_AF_PRESENCE_REQ 1 /* P2P Presence Request */
-#define P2P_AF_PRESENCE_RSP 2 /* P2P Presence Response */
-#define P2P_AF_GO_DISC_REQ 3 /* GO Discoverability Request */
-/* WiFi P2P Public Action Frame */
BWL_PRE_PACKED_STRUCT struct wifi_p2p_pub_act_frame {
- uint8 category; /* P2P_PUB_AF_CATEGORY */
- uint8 action; /* P2P_PUB_AF_ACTION */
- uint8 oui[3]; /* P2P_OUI */
- uint8 oui_type; /* OUI type - P2P_VER */
- uint8 subtype; /* OUI subtype - P2P_TYPE_* */
- uint8 dialog_token; /* nonzero, identifies req/rsp transaction */
- uint8 elts[1]; /* Variable length information elements. Max size =
- * ACTION_FRAME_SIZE - sizeof(this structure) - 1
- */
+ uint8 category;
+ uint8 action;
+ uint8 oui[3];
+ uint8 oui_type;
+ uint8 subtype;
+ uint8 dialog_token;
+ uint8 elts[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_pub_act_frame wifi_p2p_pub_act_frame_t;
-#define P2P_PUB_AF_FIXED_LEN 8
-#define P2P_PUB_AF_CATEGORY 0x04
-#define P2P_PUB_AF_ACTION 0x09
-
-/* WiFi P2P Public Action Frame OUI Subtypes */
-#define P2P_PAF_GON_REQ 0 /* Group Owner Negotiation Req */
-#define P2P_PAF_GON_RSP 1 /* Group Owner Negotiation Rsp */
-#define P2P_PAF_GON_CONF 2 /* Group Owner Negotiation Confirm */
-#define P2P_PAF_INVITE_REQ 3 /* P2P Invitation Request */
-#define P2P_PAF_INVITE_RSP 4 /* P2P Invitation Response */
-#define P2P_PAF_DEVDIS_REQ 5 /* Device Discoverability Request */
-#define P2P_PAF_DEVDIS_RSP 6 /* Device Discoverability Response */
-#define P2P_PAF_PROVDIS_REQ 7 /* Provision Discovery Request */
-#define P2P_PAF_PROVDIS_RSP 8 /* Provision Discovery Request */
-
-/* TODO: Stop using these obsolete aliases for P2P_PAF_GON_* */
-#define P2P_TYPE_MNREQ P2P_PAF_GON_REQ
-#define P2P_TYPE_MNRSP P2P_PAF_GON_RSP
-#define P2P_TYPE_MNCONF P2P_PAF_GON_CONF
-
-/* WiFi P2P IE subelement: Notice of Absence */
+#define P2P_PUB_AF_FIXED_LEN 8
+#define P2P_PUB_AF_CATEGORY 0x04
+#define P2P_PUB_AF_ACTION 0x09
+
+
+#define P2P_PAF_GON_REQ 0
+#define P2P_PAF_GON_RSP 1
+#define P2P_PAF_GON_CONF 2
+#define P2P_PAF_INVITE_REQ 3
+#define P2P_PAF_INVITE_RSP 4
+#define P2P_PAF_DEVDIS_REQ 5
+#define P2P_PAF_DEVDIS_RSP 6
+#define P2P_PAF_PROVDIS_REQ 7
+#define P2P_PAF_PROVDIS_RSP 8
+
+
+#define P2P_TYPE_MNREQ P2P_PAF_GON_REQ
+#define P2P_TYPE_MNRSP P2P_PAF_GON_RSP
+#define P2P_TYPE_MNCONF P2P_PAF_GON_CONF
+
+
BWL_PRE_PACKED_STRUCT struct wifi_p2p_noa_desc {
- uint8 cnt_type; /* Count/Type */
- uint32 duration; /* Duration */
- uint32 interval; /* Interval */
- uint32 start; /* Start Time */
+ uint8 cnt_type;
+ uint32 duration;
+ uint32 interval;
+ uint32 start;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_noa_desc wifi_p2p_noa_desc_t;
BWL_PRE_PACKED_STRUCT struct wifi_p2p_noa_se {
- uint8 eltId; /* Subelement ID */
- uint8 len[2]; /* Length */
- uint8 index; /* Index */
- uint8 ops_ctw_parms; /* CTWindow and OppPS Parameters */
- wifi_p2p_noa_desc_t desc[1]; /* Notice of Absence Descriptor(s) */
+ uint8 eltId;
+ uint8 len[2];
+ uint8 index;
+ uint8 ops_ctw_parms;
+ wifi_p2p_noa_desc_t desc[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2p_noa_se wifi_p2p_noa_se_t;
-#define P2P_NOA_SE_FIXED_LEN 5
+#define P2P_NOA_SE_FIXED_LEN 5
-/* cnt_type field values */
-#define P2P_NOA_DESC_CNT_RESERVED 0 /* reserved and should not be used */
-#define P2P_NOA_DESC_CNT_REPEAT 255 /* continuous schedule */
-#define P2P_NOA_DESC_TYPE_PREFERRED 1 /* preferred values */
-#define P2P_NOA_DESC_TYPE_ACCEPTABLE 2 /* acceptable limits */
-/* ctw_ops_parms field values */
-#define P2P_NOA_CTW_MASK 0x7f
-#define P2P_NOA_OPS_MASK 0x80
-#define P2P_NOA_OPS_SHIFT 7
+#define P2P_NOA_DESC_CNT_RESERVED 0
+#define P2P_NOA_DESC_CNT_REPEAT 255
+#define P2P_NOA_DESC_TYPE_PREFERRED 1
+#define P2P_NOA_DESC_TYPE_ACCEPTABLE 2
+
+
+#define P2P_NOA_CTW_MASK 0x7f
+#define P2P_NOA_OPS_MASK 0x80
+#define P2P_NOA_OPS_SHIFT 7
+
+#define P2P_CTW_MIN 10
+
+
+#define P2PSD_ACTION_CATEGORY 0x04
+
+#define P2PSD_ACTION_ID_GAS_IREQ 0x0a
+
+#define P2PSD_ACTION_ID_GAS_IRESP 0x0b
+
+#define P2PSD_ACTION_ID_GAS_CREQ 0x0c
+
+#define P2PSD_ACTION_ID_GAS_CRESP 0x0d
+
+#define P2PSD_AD_EID 0x6c
+
+#define P2PSD_ADP_TUPLE_QLMT_PAMEBI 0x00
+
+#define P2PSD_ADP_PROTO_ID 0x00
+
+#define P2PSD_GAS_OUI P2P_OUI
+
+#define P2PSD_GAS_OUI_SUBTYPE P2P_VER
+
+#define P2PSD_GAS_NQP_INFOID 0xDDDD
+
+#define P2PSD_GAS_COMEBACKDEALY 0x00
+
-#define P2P_CTW_MIN 10 /* minimum 10TU */
-/*
- * P2P Service Discovery related
- */
-#define P2PSD_ACTION_CATEGORY 0x04
- /* Public action frame */
-#define P2PSD_ACTION_ID_GAS_IREQ 0x0a
- /* Action value for GAS Initial Request AF */
-#define P2PSD_ACTION_ID_GAS_IRESP 0x0b
- /* Action value for GAS Initial Response AF */
-#define P2PSD_ACTION_ID_GAS_CREQ 0x0c
- /* Action value for GAS Comback Request AF */
-#define P2PSD_ACTION_ID_GAS_CRESP 0x0d
- /* Action value for GAS Comback Response AF */
-#define P2PSD_AD_EID 0x6c
- /* Advertisement Protocol IE ID */
-#define P2PSD_ADP_TUPLE_QLMT_PAMEBI 0x00
- /* Query Response Length Limit 7 bits plus PAME-BI 1 bit */
-#define P2PSD_ADP_PROTO_ID 0x00
- /* Advertisement Protocol ID. Always 0 for P2P SD */
-#define P2PSD_GAS_OUI P2P_OUI
- /* WFA OUI */
-#define P2PSD_GAS_OUI_SUBTYPE P2P_VER
- /* OUI Subtype for GAS IE */
-#define P2PSD_GAS_NQP_INFOID 0xDDDD
- /* NQP Query Info ID: 56797 */
-#define P2PSD_GAS_COMEBACKDEALY 0x00
- /* Not used in the Native GAS protocol */
-
-/* Service Protocol Type */
typedef enum p2psd_svc_protype {
SVC_RPOTYPE_ALL = 0,
SVC_RPOTYPE_BONJOUR = 1,
@@ -390,7 +384,7 @@ typedef enum p2psd_svc_protype {
SVC_RPOTYPE_VENDOR = 255
} p2psd_svc_protype_t;
-/* Service Discovery response status code */
+
typedef enum {
P2PSD_RESP_STATUS_SUCCESS = 0,
P2PSD_RESP_STATUS_PROTYPE_NA = 1,
@@ -398,115 +392,107 @@ typedef enum {
P2PSD_RESP_STATUS_BAD_REQUEST = 3
} p2psd_resp_status_t;
-/* Advertisement Protocol IE tuple field */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_adp_tpl {
- uint8 llm_pamebi; /* Query Response Length Limit bit 0-6, set to 0 plus
- * Pre-Associated Message Exchange BSSID Independent bit 7, set to 0
- */
- uint8 adp_id; /* Advertisement Protocol ID: 0 for NQP Native Query Protocol */
+ uint8 llm_pamebi;
+ uint8 adp_id;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_adp_tpl wifi_p2psd_adp_tpl_t;
-/* Advertisement Protocol IE */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_adp_ie {
- uint8 id; /* IE ID: 0x6c - 108 */
- uint8 len; /* IE length */
- wifi_p2psd_adp_tpl_t adp_tpl; /* Advertisement Protocol Tuple field. Only one
- * tuple is defined for P2P Service Discovery
- */
+ uint8 id;
+ uint8 len;
+ wifi_p2psd_adp_tpl_t adp_tpl;
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_adp_ie wifi_p2psd_adp_ie_t;
-/* NQP Vendor-specific Content */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_nqp_query_vsc {
- uint8 oui_subtype; /* OUI Subtype: 0x09 */
- uint16 svc_updi; /* Service Update Indicator */
- uint8 svc_tlvs[1]; /* wifi_p2psd_qreq_tlv_t type for service request,
- * wifi_p2psd_qresp_tlv_t type for service response
- */
+ uint8 oui_subtype;
+ uint16 svc_updi;
+ uint8 svc_tlvs[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_nqp_query_vsc wifi_p2psd_nqp_query_vsc_t;
-/* Service Request TLV */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_qreq_tlv {
- uint16 len; /* Length: 5 plus size of Query Data */
- uint8 svc_prot; /* Service Protocol Type */
- uint8 svc_tscid; /* Service Transaction ID */
- uint8 query_data[1]; /* Query Data, passed in from above Layer 2 */
+ uint16 len;
+ uint8 svc_prot;
+ uint8 svc_tscid;
+ uint8 query_data[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_qreq_tlv wifi_p2psd_qreq_tlv_t;
-/* Query Request Frame, defined in generic format, instead of NQP specific */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_qreq_frame {
- uint16 info_id; /* Info ID: 0xDDDD */
- uint16 len; /* Length of service request TLV, 5 plus the size of request data */
- uint8 oui[3]; /* WFA OUI: 0x0050F2 */
- uint8 qreq_vsc[1]; /* Vendor-specific Content: wifi_p2psd_nqp_query_vsc_t type for NQP */
+ uint16 info_id;
+ uint16 len;
+ uint8 oui[3];
+ uint8 qreq_vsc[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_qreq_frame wifi_p2psd_qreq_frame_t;
-/* GAS Initial Request AF body, "elts" in wifi_p2p_pub_act_frame */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_gas_ireq_frame {
- wifi_p2psd_adp_ie_t adp_ie; /* Advertisement Protocol IE */
- uint16 qreq_len; /* Query Request Length */
- uint8 qreq_frm[1]; /* Query Request Frame wifi_p2psd_qreq_frame_t */
+ wifi_p2psd_adp_ie_t adp_ie;
+ uint16 qreq_len;
+ uint8 qreq_frm[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_gas_ireq_frame wifi_p2psd_gas_ireq_frame_t;
-/* Service Response TLV */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_qresp_tlv {
- uint16 len; /* Length: 5 plus size of Query Data */
- uint8 svc_prot; /* Service Protocol Type */
- uint8 svc_tscid; /* Service Transaction ID */
- uint8 status; /* Value defined in Table 57 of P2P spec. */
- uint8 query_data[1]; /* Response Data, passed in from above Layer 2 */
+ uint16 len;
+ uint8 svc_prot;
+ uint8 svc_tscid;
+ uint8 status;
+ uint8 query_data[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_qresp_tlv wifi_p2psd_qresp_tlv_t;
-/* Query Response Frame, defined in generic format, instead of NQP specific */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_qresp_frame {
- uint16 info_id; /* Info ID: 0xDDDD */
- uint16 len; /* Lenth of service response TLV, 6 plus the size of resp data */
- uint8 oui[3]; /* WFA OUI: 0x0050F2 */
- uint8 qresp_vsc[1]; /* Vendor-specific Content: wifi_p2psd_qresp_tlv_t type for NQP */
+ uint16 info_id;
+ uint16 len;
+ uint8 oui[3];
+ uint8 qresp_vsc[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_qresp_frame wifi_p2psd_qresp_frame_t;
-/* GAS Initial Response AF body, "elts" in wifi_p2p_pub_act_frame */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_gas_iresp_frame {
- uint16 status; /* Value defined in Table 7-23 of IEEE P802.11u */
- uint16 cb_delay; /* GAS Comeback Delay */
- wifi_p2psd_adp_ie_t adp_ie; /* Advertisement Protocol IE */
- uint16 qresp_len; /* Query Response Length */
- uint8 qresp_frm[1]; /* Query Response Frame wifi_p2psd_qresp_frame_t */
+ uint16 status;
+ uint16 cb_delay;
+ wifi_p2psd_adp_ie_t adp_ie;
+ uint16 qresp_len;
+ uint8 qresp_frm[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_gas_iresp_frame wifi_p2psd_gas_iresp_frame_t;
-/* GAS Comeback Response AF body, "elts" in wifi_p2p_pub_act_frame */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_gas_cresp_frame {
- uint16 status; /* Value defined in Table 7-23 of IEEE P802.11u */
- uint8 fragment_id; /* Fragmentation ID */
- uint16 cb_delay; /* GAS Comeback Delay */
- wifi_p2psd_adp_ie_t adp_ie; /* Advertisement Protocol IE */
- uint16 qresp_len; /* Query Response Length */
- uint8 qresp_frm[1]; /* Query Response Frame wifi_p2psd_qresp_frame_t */
+ uint16 status;
+ uint8 fragment_id;
+ uint16 cb_delay;
+ wifi_p2psd_adp_ie_t adp_ie;
+ uint16 qresp_len;
+ uint8 qresp_frm[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_gas_cresp_frame wifi_p2psd_gas_cresp_frame_t;
-/* Wi-Fi GAS Public Action Frame */
+
BWL_PRE_PACKED_STRUCT struct wifi_p2psd_gas_pub_act_frame {
- uint8 category; /* 0x04 Public Action Frame */
- uint8 action; /* 0x6c Advertisement Protocol */
- uint8 dialog_token; /* nonzero, identifies req/rsp transaction */
- uint8 query_data[1]; /* Query Data. wifi_p2psd_gas_ireq_frame_t
- * or wifi_p2psd_gas_iresp_frame_t format
- */
+ uint8 category;
+ uint8 action;
+ uint8 dialog_token;
+ uint8 query_data[1];
} BWL_POST_PACKED_STRUCT;
typedef struct wifi_p2psd_gas_pub_act_frame wifi_p2psd_gas_pub_act_frame_t;
-/* This marks the end of a packed structure section. */
+
#include <packed_section_end.h>
-#endif /* _P2P_H_ */
+#endif
diff --git a/drivers/net/wireless/bcmdhd/include/proto/sdspi.h b/drivers/net/wireless/bcmdhd/include/proto/sdspi.h
index 7353ff0d7c7..a4900edd4ac 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/sdspi.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/sdspi.h
@@ -1,9 +1,9 @@
/*
* SD-SPI Protocol Standard
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,9 +21,8 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: sdspi.h 277737 2011-08-16 17:54:59Z $
+ * $Id: sdspi.h 241182 2011-02-17 21:50:03Z $
*/
-
#ifndef _SD_SPI_H
#define _SD_SPI_H
diff --git a/drivers/net/wireless/bcmdhd/include/proto/vlan.h b/drivers/net/wireless/bcmdhd/include/proto/vlan.h
index 27f00553760..9c94985cf95 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/vlan.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/vlan.h
@@ -1,9 +1,9 @@
/*
* 802.1Q VLAN protocol definitions
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,10 +21,9 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: vlan.h 277737 2011-08-16 17:54:59Z $
+ * $Id: vlan.h 241182 2011-02-17 21:50:03Z $
*/
-
#ifndef _vlan_h_
#define _vlan_h_
diff --git a/drivers/net/wireless/bcmdhd/include/proto/wpa.h b/drivers/net/wireless/bcmdhd/include/proto/wpa.h
index 7361cbf20b0..cc2ff5b315d 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/wpa.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/wpa.h
@@ -1,9 +1,9 @@
/*
* Fundamental types and constants relating to WPA
*
- * Copyright (C) 1999-2011, Broadcom Corporation
+ * Copyright (C) 1999-2012, Broadcom Corporation
*
- * Unless you and Broadcom execute a separate written software license
+ * Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
@@ -21,10 +21,9 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: wpa.h 285437 2011-09-21 22:16:56Z $
+ * $Id: wpa.h 261155 2011-05-23 23:51:32Z $
*/
-
#ifndef _proto_wpa_h_
#define _proto_wpa_h_
@@ -117,6 +116,12 @@ typedef BWL_PRE_PACKED_STRUCT struct
#define WPA_CIPHER_BIP 6
#define WPA_CIPHER_TPK 7
+#ifdef BCMWAPI_WAI
+#define WAPI_CIPHER_NONE WPA_CIPHER_NONE
+#define WAPI_CIPHER_SMS4 11
+
+#define WAPI_CSE_WPI_SMS4 1
+#endif
#define IS_WPA_CIPHER(cipher) ((cipher) == WPA_CIPHER_NONE || \
(cipher) == WPA_CIPHER_WEP_40 || \
@@ -126,6 +131,17 @@ typedef BWL_PRE_PACKED_STRUCT struct
(cipher) == WPA_CIPHER_AES_CCM || \
(cipher) == WPA_CIPHER_TPK)
+#ifdef BCMWAPI_WAI
+#define IS_WAPI_CIPHER(cipher) ((cipher) == WAPI_CIPHER_NONE || \
+ (cipher) == WAPI_CSE_WPI_SMS4)
+
+
+#define WAPI_CSE_WPI_2_CIPHER(cse) ((cse) == WAPI_CSE_WPI_SMS4 ? \
+ WAPI_CIPHER_SMS4 : WAPI_CIPHER_NONE)
+
+#define WAPI_CIPHER_2_CSE_WPI(cipher) ((cipher) == WAPI_CIPHER_SMS4 ? \
+ WAPI_CSE_WPI_SMS4 : WAPI_CIPHER_NONE)
+#endif
#define WPA_TKIP_CM_DETECT 60
@@ -145,6 +161,10 @@ typedef BWL_PRE_PACKED_STRUCT struct
#define RSN_CAP_2_REPLAY_CNTRS 1
#define RSN_CAP_4_REPLAY_CNTRS 2
#define RSN_CAP_16_REPLAY_CNTRS 3
+#ifdef MFP
+#define RSN_CAP_MFPR 0x0040
+#define RSN_CAP_MFPC 0x0080
+#endif
#define WPA_CAP_4_REPLAY_CNTRS RSN_CAP_4_REPLAY_CNTRS
@@ -157,10 +177,25 @@ typedef BWL_PRE_PACKED_STRUCT struct
#define WPA_CAP_LEN RSN_CAP_LEN
-#define WPA_PMKID_CNT_LEN 2
+#define WPA_PMKID_CNT_LEN 2
#define WPA_CAP_WPA2_PREAUTH RSN_CAP_PREAUTH
+#define WPA2_PMKID_COUNT_LEN 2
+
+#ifdef BCMWAPI_WAI
+#define WAPI_CAP_PREAUTH RSN_CAP_PREAUTH
+
+
+#define WAPI_WAI_REQUEST 0x00F1
+#define WAPI_UNICAST_REKEY 0x00F2
+#define WAPI_STA_AGING 0x00F3
+#define WAPI_MUTIL_REKEY 0x00F4
+#define WAPI_STA_STATS 0x00F5
+
+#define WAPI_USK_REKEY_COUNT 0x4000000
+#define WAPI_MSK_REKEY_COUNT 0x4000000
+#endif
#include <packed_section_end.h>
diff --git a/drivers/net/wireless/bcmdhd/include/proto/wps.h b/drivers/net/wireless/bcmdhd/include/proto/wps.h
new file mode 100644
index 00000000000..cccbfff4cfb
--- /dev/null
+++ b/drivers/net/wireless/bcmdhd/include/proto/wps.h
@@ -0,0 +1,379 @@
+/*
+ * WPS IE definitions
+ *
+ * Copyright (C) 1999-2012, Broadcom Corporation
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed to you
+ * under the terms of the GNU General Public License version 2 (the "GPL"),
+ * available at http://www.broadcom.com/licenses/GPLv2.php, with the
+ * following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give you
+ * permission to link this software with independent modules, and to copy and
+ * distribute the resulting executable under terms of your choice, provided that
+ * you also meet, for each linked independent module, the terms and conditions of
+ * the license of that module. An independent module is a module which is not
+ * derived from this software. The special exception does not apply to any
+ * modifications of the software.
+ *
+ * Notwithstanding the above, under no circumstances may you combine this
+ * software in any way with any other Broadcom software provided under a license
+ * other than the GPL, without Broadcom's express prior written consent.
+ *
+ * $Id$
+ */
+
+#ifndef _WPS_
+#define _WPS_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Data Element Definitions */
+#define WPS_ID_AP_CHANNEL 0x1001
+#define WPS_ID_ASSOC_STATE 0x1002
+#define WPS_ID_AUTH_TYPE 0x1003
+#define WPS_ID_AUTH_TYPE_FLAGS 0x1004
+#define WPS_ID_AUTHENTICATOR 0x1005
+#define WPS_ID_CONFIG_METHODS 0x1008
+#define WPS_ID_CONFIG_ERROR 0x1009
+#define WPS_ID_CONF_URL4 0x100A
+#define WPS_ID_CONF_URL6 0x100B
+#define WPS_ID_CONN_TYPE 0x100C
+#define WPS_ID_CONN_TYPE_FLAGS 0x100D
+#define WPS_ID_CREDENTIAL 0x100E
+#define WPS_ID_DEVICE_NAME 0x1011
+#define WPS_ID_DEVICE_PWD_ID 0x1012
+#define WPS_ID_E_HASH1 0x1014
+#define WPS_ID_E_HASH2 0x1015
+#define WPS_ID_E_SNONCE1 0x1016
+#define WPS_ID_E_SNONCE2 0x1017
+#define WPS_ID_ENCR_SETTINGS 0x1018
+#define WPS_ID_ENCR_TYPE 0x100F
+#define WPS_ID_ENCR_TYPE_FLAGS 0x1010
+#define WPS_ID_ENROLLEE_NONCE 0x101A
+#define WPS_ID_FEATURE_ID 0x101B
+#define WPS_ID_IDENTITY 0x101C
+#define WPS_ID_IDENTITY_PROOF 0x101D
+#define WPS_ID_KEY_WRAP_AUTH 0x101E
+#define WPS_ID_KEY_IDENTIFIER 0x101F
+#define WPS_ID_MAC_ADDR 0x1020
+#define WPS_ID_MANUFACTURER 0x1021
+#define WPS_ID_MSG_TYPE 0x1022
+#define WPS_ID_MODEL_NAME 0x1023
+#define WPS_ID_MODEL_NUMBER 0x1024
+#define WPS_ID_NW_INDEX 0x1026
+#define WPS_ID_NW_KEY 0x1027
+#define WPS_ID_NW_KEY_INDEX 0x1028
+#define WPS_ID_NEW_DEVICE_NAME 0x1029
+#define WPS_ID_NEW_PWD 0x102A
+#define WPS_ID_OOB_DEV_PWD 0x102C
+#define WPS_ID_OS_VERSION 0x102D
+#define WPS_ID_POWER_LEVEL 0x102F
+#define WPS_ID_PSK_CURRENT 0x1030
+#define WPS_ID_PSK_MAX 0x1031
+#define WPS_ID_PUBLIC_KEY 0x1032
+#define WPS_ID_RADIO_ENABLED 0x1033
+#define WPS_ID_REBOOT 0x1034
+#define WPS_ID_REGISTRAR_CURRENT 0x1035
+#define WPS_ID_REGISTRAR_ESTBLSHD 0x1036
+#define WPS_ID_REGISTRAR_LIST 0x1037
+#define WPS_ID_REGISTRAR_MAX 0x1038
+#define WPS_ID_REGISTRAR_NONCE 0x1039
+#define WPS_ID_REQ_TYPE 0x103A
+#define WPS_ID_RESP_TYPE 0x103B
+#define WPS_ID_RF_BAND 0x103C
+#define WPS_ID_R_HASH1 0x103D
+#define WPS_ID_R_HASH2 0x103E
+#define WPS_ID_R_SNONCE1 0x103F
+#define WPS_ID_R_SNONCE2 0x1040
+#define WPS_ID_SEL_REGISTRAR 0x1041
+#define WPS_ID_SERIAL_NUM 0x1042
+#define WPS_ID_SC_STATE 0x1044
+#define WPS_ID_SSID 0x1045
+#define WPS_ID_TOT_NETWORKS 0x1046
+#define WPS_ID_UUID_E 0x1047
+#define WPS_ID_UUID_R 0x1048
+#define WPS_ID_VENDOR_EXT 0x1049
+#define WPS_ID_VERSION 0x104A
+#define WPS_ID_X509_CERT_REQ 0x104B
+#define WPS_ID_X509_CERT 0x104C
+#define WPS_ID_EAP_IDENTITY 0x104D
+#define WPS_ID_MSG_COUNTER 0x104E
+#define WPS_ID_PUBKEY_HASH 0x104F
+#define WPS_ID_REKEY_KEY 0x1050
+#define WPS_ID_KEY_LIFETIME 0x1051
+#define WPS_ID_PERM_CFG_METHODS 0x1052
+#define WPS_ID_SEL_REG_CFG_METHODS 0x1053
+#define WPS_ID_PRIM_DEV_TYPE 0x1054
+#define WPS_ID_SEC_DEV_TYPE_LIST 0x1055
+#define WPS_ID_PORTABLE_DEVICE 0x1056
+#define WPS_ID_AP_SETUP_LOCKED 0x1057
+#define WPS_ID_APP_LIST 0x1058
+#define WPS_ID_EAP_TYPE 0x1059
+#define WPS_ID_INIT_VECTOR 0x1060
+#define WPS_ID_KEY_PROVIDED_AUTO 0x1061
+#define WPS_ID_8021X_ENABLED 0x1062
+#define WPS_ID_WEP_TRANSMIT_KEY 0x1064
+#define WPS_ID_REQ_DEV_TYPE 0x106A
+
+/* WSC 2.0, WFA Vendor Extension Subelements */
+#define WFA_VENDOR_EXT_ID "\x00\x37\x2A"
+#define WPS_WFA_SUBID_VERSION2 0x00
+#define WPS_WFA_SUBID_AUTHORIZED_MACS 0x01
+#define WPS_WFA_SUBID_NW_KEY_SHAREABLE 0x02
+#define WPS_WFA_SUBID_REQ_TO_ENROLL 0x03
+#define WPS_WFA_SUBID_SETTINGS_DELAY_TIME 0x04
+
+
+/* WCN-NET Windows Rally Vertical Pairing Vendor Extensions */
+#define MS_VENDOR_EXT_ID "\x00\x01\x37"
+#define WPS_MS_ID_VPI 0x1001 /* Vertical Pairing Identifier TLV */
+#define WPS_MS_ID_TRANSPORT_UUID 0x1002 /* Transport UUID TLV */
+
+/* Vertical Pairing Identifier TLV Definitions */
+#define WPS_MS_VPI_TRANSPORT_NONE 0x00 /* None */
+#define WPS_MS_VPI_TRANSPORT_DPWS 0x01 /* Devices Profile for Web Services */
+#define WPS_MS_VPI_TRANSPORT_UPNP 0x02 /* uPnP */
+#define WPS_MS_VPI_TRANSPORT_SDNWS 0x03 /* Secure Devices Profile for Web Services */
+#define WPS_MS_VPI_NO_PROFILE_REQ 0x00 /* Wi-Fi profile not requested.
+ * Not supported in Windows 7
+ */
+#define WPS_MS_VPI_PROFILE_REQ 0x01 /* Wi-Fi profile requested. */
+
+/* sizes of the fixed size elements */
+#define WPS_ID_AP_CHANNEL_S 2
+#define WPS_ID_ASSOC_STATE_S 2
+#define WPS_ID_AUTH_TYPE_S 2
+#define WPS_ID_AUTH_TYPE_FLAGS_S 2
+#define WPS_ID_AUTHENTICATOR_S 8
+#define WPS_ID_CONFIG_METHODS_S 2
+#define WPS_ID_CONFIG_ERROR_S 2
+#define WPS_ID_CONN_TYPE_S 1
+#define WPS_ID_CONN_TYPE_FLAGS_S 1
+#define WPS_ID_DEVICE_PWD_ID_S 2
+#define WPS_ID_ENCR_TYPE_S 2
+#define WPS_ID_ENCR_TYPE_FLAGS_S 2
+#define WPS_ID_FEATURE_ID_S 4
+#define WPS_ID_MAC_ADDR_S 6
+#define WPS_ID_MSG_TYPE_S 1
+#define WPS_ID_SC_STATE_S 1
+#define WPS_ID_RF_BAND_S 1
+#define WPS_ID_OS_VERSION_S 4
+#define WPS_ID_VERSION_S 1
+#define WPS_ID_SEL_REGISTRAR_S 1
+#define WPS_ID_SEL_REG_CFG_METHODS_S 2
+#define WPS_ID_REQ_TYPE_S 1
+#define WPS_ID_RESP_TYPE_S 1
+#define WPS_ID_AP_SETUP_LOCKED_S 1
+
+/* WSC 2.0, WFA Vendor Extension Subelements */
+#define WPS_WFA_SUBID_VERSION2_S 1
+#define WPS_WFA_SUBID_NW_KEY_SHAREABLE_S 1
+#define WPS_WFA_SUBID_REQ_TO_ENROLL_S 1
+#define WPS_WFA_SUBID_SETTINGS_DELAY_TIME_S 1
+
+/* Association states */
+#define WPS_ASSOC_NOT_ASSOCIATED 0
+#define WPS_ASSOC_CONN_SUCCESS 1
+#define WPS_ASSOC_CONFIG_FAIL 2
+#define WPS_ASSOC_ASSOC_FAIL 3
+#define WPS_ASSOC_IP_FAIL 4
+
+/* Authentication types */
+#define WPS_AUTHTYPE_OPEN 0x0001
+#define WPS_AUTHTYPE_WPAPSK 0x0002 /* Deprecated in WSC 2.0 */
+#define WPS_AUTHTYPE_SHARED 0x0004 /* Deprecated in WSC 2.0 */
+#define WPS_AUTHTYPE_WPA 0x0008 /* Deprecated in WSC 2.0 */
+#define WPS_AUTHTYPE_WPA2 0x0010
+#define WPS_AUTHTYPE_WPA2PSK 0x0020
+
+/* Config methods */
+#define WPS_CONFMET_USBA 0x0001 /* Deprecated in WSC 2.0 */
+#define WPS_CONFMET_ETHERNET 0x0002 /* Deprecated in WSC 2.0 */
+#define WPS_CONFMET_LABEL 0x0004
+#define WPS_CONFMET_DISPLAY 0x0008
+#define WPS_CONFMET_EXT_NFC_TOK 0x0010
+#define WPS_CONFMET_INT_NFC_TOK 0x0020
+#define WPS_CONFMET_NFC_INTF 0x0040
+#define WPS_CONFMET_PBC 0x0080
+#define WPS_CONFMET_KEYPAD 0x0100
+/* WSC 2.0 */
+#define WPS_CONFMET_VIRT_PBC 0x0280
+#define WPS_CONFMET_PHY_PBC 0x0480
+#define WPS_CONFMET_VIRT_DISPLAY 0x2008
+#define WPS_CONFMET_PHY_DISPLAY 0x4008
+
+/* WPS error messages */
+#define WPS_ERROR_NO_ERROR 0
+#define WPS_ERROR_OOB_INT_READ_ERR 1
+#define WPS_ERROR_DECRYPT_CRC_FAIL 2
+#define WPS_ERROR_CHAN24_NOT_SUPP 3
+#define WPS_ERROR_CHAN50_NOT_SUPP 4
+#define WPS_ERROR_SIGNAL_WEAK 5 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_NW_AUTH_FAIL 6 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_NW_ASSOC_FAIL 7 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_NO_DHCP_RESP 8 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_FAILED_DHCP_CONF 9 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_IP_ADDR_CONFLICT 10 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_FAIL_CONN_REGISTRAR 11
+#define WPS_ERROR_MULTI_PBC_DETECTED 12
+#define WPS_ERROR_ROGUE_SUSPECTED 13
+#define WPS_ERROR_DEVICE_BUSY 14
+#define WPS_ERROR_SETUP_LOCKED 15
+#define WPS_ERROR_MSG_TIMEOUT 16 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_REG_SESSION_TIMEOUT 17 /* Deprecated in WSC 2.0 */
+#define WPS_ERROR_DEV_PWD_AUTH_FAIL 18
+
+/* Connection types */
+#define WPS_CONNTYPE_ESS 0x01
+#define WPS_CONNTYPE_IBSS 0x02
+
+/* Device password ID */
+#define WPS_DEVICEPWDID_DEFAULT 0x0000
+#define WPS_DEVICEPWDID_USER_SPEC 0x0001
+#define WPS_DEVICEPWDID_MACHINE_SPEC 0x0002
+#define WPS_DEVICEPWDID_REKEY 0x0003
+#define WPS_DEVICEPWDID_PUSH_BTN 0x0004
+#define WPS_DEVICEPWDID_REG_SPEC 0x0005
+
+/* Encryption type */
+#define WPS_ENCRTYPE_NONE 0x0001
+#define WPS_ENCRTYPE_WEP 0x0002 /* Deprecated in WSC 2.0 */
+#define WPS_ENCRTYPE_TKIP 0x0004 /* Deprecated in version 2.0. TKIP can only
+ * be advertised on the AP when Mixed Mode
+ * is enabled (Encryption Type is 0x000c).
+ */
+#define WPS_ENCRTYPE_AES 0x0008
+
+
+/* WPS Message Types */
+#define WPS_ID_BEACON 0x01
+#define WPS_ID_PROBE_REQ 0x02
+#define WPS_ID_PROBE_RESP 0x03
+#define WPS_ID_MESSAGE_M1 0x04
+#define WPS_ID_MESSAGE_M2 0x05
+#define WPS_ID_MESSAGE_M2D 0x06
+#define WPS_ID_MESSAGE_M3 0x07
+#define WPS_ID_MESSAGE_M4 0x08
+#define WPS_ID_MESSAGE_M5 0x09
+#define WPS_ID_MESSAGE_M6 0x0A
+#define WPS_ID_MESSAGE_M7 0x0B
+#define WPS_ID_MESSAGE_M8 0x0C
+#define WPS_ID_MESSAGE_ACK 0x0D
+#define WPS_ID_MESSAGE_NACK 0x0E
+#define WPS_ID_MESSAGE_DONE 0x0F
+
+/* WSP private ID for local use */
+#define WPS_PRIVATE_ID_IDENTITY (WPS_ID_MESSAGE_DONE + 1)
+#define WPS_PRIVATE_ID_WPS_START (WPS_ID_MESSAGE_DONE + 2)
+#define WPS_PRIVATE_ID_FAILURE (WPS_ID_MESSAGE_DONE + 3)
+#define WPS_PRIVATE_ID_FRAG (WPS_ID_MESSAGE_DONE + 4)
+#define WPS_PRIVATE_ID_FRAG_ACK (WPS_ID_MESSAGE_DONE + 5)
+#define WPS_PRIVATE_ID_EAPOL_START (WPS_ID_MESSAGE_DONE + 6)
+
+
+/* Device Type categories for primary and secondary device types */
+#define WPS_DEVICE_TYPE_CAT_COMPUTER 1
+#define WPS_DEVICE_TYPE_CAT_INPUT_DEVICE 2
+#define WPS_DEVICE_TYPE_CAT_PRINTER 3
+#define WPS_DEVICE_TYPE_CAT_CAMERA 4
+#define WPS_DEVICE_TYPE_CAT_STORAGE 5
+#define WPS_DEVICE_TYPE_CAT_NW_INFRA 6
+#define WPS_DEVICE_TYPE_CAT_DISPLAYS 7
+#define WPS_DEVICE_TYPE_CAT_MM_DEVICES 8
+#define WPS_DEVICE_TYPE_CAT_GAME_DEVICES 9
+#define WPS_DEVICE_TYPE_CAT_TELEPHONE 10
+#define WPS_DEVICE_TYPE_CAT_AUDIO_DEVICES 11 /* WSC 2.0 */
+
+/* Device Type sub categories for primary and secondary device types */
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_PC 1
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_SERVER 2
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_MEDIA_CTR 3
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_UM_PC 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_NOTEBOOK 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_DESKTOP 6 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_MID 7 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_COMP_NETBOOK 8 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_Keyboard 1 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_MOUSE 2 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_JOYSTICK 3 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_TRACKBALL 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_GAM_CTRL 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_REMOTE 6 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_TOUCHSCREEN 7 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_BIO_READER 8 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_INP_BAR_READER 9 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_PRTR_PRINTER 1
+#define WPS_DEVICE_TYPE_SUB_CAT_PRTR_SCANNER 2
+#define WPS_DEVICE_TYPE_SUB_CAT_PRTR_FAX 3 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_PRTR_COPIER 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_PRTR_ALLINONE 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_CAM_DGTL_STILL 1
+#define WPS_DEVICE_TYPE_SUB_CAT_CAM_VIDEO_CAM 2 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_CAM_WEB_CAM 3 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_CAM_SECU_CAM 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_STOR_NAS 1
+#define WPS_DEVICE_TYPE_SUB_CAT_NW_AP 1
+#define WPS_DEVICE_TYPE_SUB_CAT_NW_ROUTER 2
+#define WPS_DEVICE_TYPE_SUB_CAT_NW_SWITCH 3
+#define WPS_DEVICE_TYPE_SUB_CAT_NW_GATEWAY 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_NW_BRIDGE 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_DISP_TV 1
+#define WPS_DEVICE_TYPE_SUB_CAT_DISP_PIC_FRAME 2
+#define WPS_DEVICE_TYPE_SUB_CAT_DISP_PROJECTOR 3
+#define WPS_DEVICE_TYPE_SUB_CAT_DISP_MONITOR 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_MM_DAR 1
+#define WPS_DEVICE_TYPE_SUB_CAT_MM_PVR 2
+#define WPS_DEVICE_TYPE_SUB_CAT_MM_MCX 3
+#define WPS_DEVICE_TYPE_SUB_CAT_MM_STB 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_MM_MS_ME 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_MM_PVP 6 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_GAM_XBOX 1
+#define WPS_DEVICE_TYPE_SUB_CAT_GAM_XBOX_360 2
+#define WPS_DEVICE_TYPE_SUB_CAT_GAM_PS 3
+#define WPS_DEVICE_TYPE_SUB_CAT_GAM_GC 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_GAM_PGD 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_PHONE_WM 1
+#define WPS_DEVICE_TYPE_SUB_CAT_PHONE_PSM 2 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_PHONE_PDM 3 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_PHONE_SSM 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_PHONE_SDM 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_AUDIO_TUNER 1 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_AUDIO_SPEAKERS 2 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_AUDIO_PMP 3 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_AUDIO_HEADSET 4 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_AUDIO_HPHONE 5 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_AUDIO_MPHONE 6 /* WSC 2.0 */
+#define WPS_DEVICE_TYPE_SUB_CAT_AUDIO_HTS 7 /* WSC 2.0 */
+
+
+/* Device request/response type */
+#define WPS_MSGTYPE_ENROLLEE_INFO_ONLY 0x00
+#define WPS_MSGTYPE_ENROLLEE_OPEN_8021X 0x01
+#define WPS_MSGTYPE_REGISTRAR 0x02
+#define WPS_MSGTYPE_AP_WLAN_MGR 0x03
+
+/* RF Band */
+#define WPS_RFBAND_24GHZ 0x01
+#define WPS_RFBAND_50GHZ 0x02
+
+/* Simple Config state */
+#define WPS_SCSTATE_UNCONFIGURED 0x01
+#define WPS_SCSTATE_CONFIGURED 0x02
+#define WPS_SCSTATE_OFF 11
+
+/* WPS Vendor extension key */
+#define WPS_OUI_HEADER_LEN 2
+#define WPS_OUI_HEADER_SIZE 4
+#define WPS_OUI_FIXED_HEADER_OFF 16
+#define WPS_WFA_SUBID_V2_OFF 3
+#define WPS_WFA_V2_OFF 5
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WPS_ */