1 /******************************************************************************
3 * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
18 #define P80211CAPTURE_VERSION 0x80211001
20 /* This value is tested by WiFi 11n Test Plan 5.2.3.
21 * This test verifies the WLAN NIC can update the NAV through sending
22 * the CTS with large duration.
24 #define WiFiNavUpperUs 30000 /* 30 ms */
26 #define SetToDs(pbuf) \
27 (*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_TODS))
29 #define SetFrDs(pbuf) \
30 (*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_FROMDS))
32 #define _ASOCREQ_IE_OFFSET_ 4 /* excluding wlan_hdr */
33 #define _ASOCRSP_IE_OFFSET_ 6
34 #define _REASOCREQ_IE_OFFSET_ 10
35 #define _REASOCRSP_IE_OFFSET_ 6
36 #define _PROBEREQ_IE_OFFSET_ 0
37 #define _PROBERSP_IE_OFFSET_ 12
38 #define _AUTH_IE_OFFSET_ 6
39 #define _DEAUTH_IE_OFFSET_ 0
40 #define _BEACON_IE_OFFSET_ 12
41 #define _PUBLIC_ACTION_IE_OFFSET_ 8
43 #define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_
46 #define EID_BSSIntolerantChlReport 73
48 /* ---------------------------------------------------------------------------
49 Below is the fixed elements...
50 -----------------------------------------------------------------------------*/
51 #define _AUTH_ALGM_NUM_ 2
52 #define _AUTH_SEQ_NUM_ 2
53 #define _BEACON_ITERVAL_ 2
54 #define _CAPABILITY_ 2
55 #define _CURRENT_APADDR_ 6
56 #define _LISTEN_INTERVAL_ 2
58 #define _STATUS_CODE_ 2
61 /*-----------------------------------------------------------------------------
62 Below is the definition for WMM
63 ------------------------------------------------------------------------------*/
64 #define _WMM_IE_Length_ 7 /* for WMM STA */
65 #define _WMM_Para_Element_Length_ 24
68 /*-----------------------------------------------------------------------------
69 Below is the definition for 802.11n
70 ------------------------------------------------------------------------------*/
72 /* struct rtw_ieee80211_ht_cap - HT additional information
74 * This structure refers to "HT information element" as
75 * described in 802.11n draft section 7.3.2.53
77 struct ieee80211_ht_addt_info {
78 unsigned char control_chan;
79 unsigned char ht_param;
80 unsigned short operation_mode;
81 unsigned short stbc_param;
82 unsigned char basic_set[16];
85 struct HT_caps_element {
88 unsigned short HT_caps_info;
89 unsigned char AMPDU_para;
90 unsigned char MCS_rate[16];
91 unsigned short HT_ext_caps;
92 unsigned int Beamforming_caps;
93 unsigned char ASEL_caps;
95 unsigned char HT_cap[26];
99 struct HT_info_element {
100 unsigned char primary_channel;
101 unsigned char infos[5];
102 unsigned char MCS_rate[16];
106 unsigned char ACI_AIFSN;
108 unsigned short TXOP_limit;
111 struct WMM_para_element {
112 unsigned char QoS_info;
113 unsigned char reserved;
114 struct AC_param ac_param[4];
117 struct ADDBA_request {
118 unsigned char dialog_token;
119 unsigned short BA_para_set;
120 unsigned short BA_timeout_value;
121 unsigned short BA_starting_seqctrl;
125 /* ===============WPS Section=============== */
126 /* WPS attribute ID */
127 #define WPS_ATTR_VER1 0x104A
128 #define WPS_ATTR_SIMPLE_CONF_STATE 0x1044
129 #define WPS_ATTR_RESP_TYPE 0x103B
130 #define WPS_ATTR_UUID_E 0x1047
131 #define WPS_ATTR_MANUFACTURER 0x1021
132 #define WPS_ATTR_MODEL_NAME 0x1023
133 #define WPS_ATTR_MODEL_NUMBER 0x1024
134 #define WPS_ATTR_SERIAL_NUMBER 0x1042
135 #define WPS_ATTR_PRIMARY_DEV_TYPE 0x1054
136 #define WPS_ATTR_SEC_DEV_TYPE_LIST 0x1055
137 #define WPS_ATTR_DEVICE_NAME 0x1011
138 #define WPS_ATTR_CONF_METHOD 0x1008
139 #define WPS_ATTR_RF_BANDS 0x103C
140 #define WPS_ATTR_DEVICE_PWID 0x1012
141 #define WPS_ATTR_REQUEST_TYPE 0x103A
142 #define WPS_ATTR_ASSOCIATION_STATE 0x1002
143 #define WPS_ATTR_CONFIG_ERROR 0x1009
144 #define WPS_ATTR_VENDOR_EXT 0x1049
145 #define WPS_ATTR_SELECTED_REGISTRAR 0x1041
147 /* WPS Configuration Method */
148 #define WPS_CM_NONE 0x0000
149 #define WPS_CM_LABEL 0x0004
150 #define WPS_CM_DISPLYA 0x0008
151 #define WPS_CM_EXTERNAL_NFC_TOKEN 0x0010
152 #define WPS_CM_INTEGRATED_NFC_TOKEN 0x0020
153 #define WPS_CM_NFC_INTERFACE 0x0040
154 #define WPS_CM_PUSH_BUTTON 0x0080
155 #define WPS_CM_KEYPAD 0x0100
156 #define WPS_CM_SW_PUHS_BUTTON 0x0280
157 #define WPS_CM_HW_PUHS_BUTTON 0x0480
158 #define WPS_CM_SW_DISPLAY_PIN 0x2008
159 #define WPS_CM_LCD_DISPLAY_PIN 0x4008
161 #endif /* _WIFI_H_ */