ieee802_11_defs.h
Go to the documentation of this file.00001
00017 #ifndef IEEE802_11_DEFS_H
00018 #define IEEE802_11_DEFS_H
00019
00020
00021
00022 #define WLAN_FC_PVER 0x0003
00023 #define WLAN_FC_TODS 0x0100
00024 #define WLAN_FC_FROMDS 0x0200
00025 #define WLAN_FC_MOREFRAG 0x0400
00026 #define WLAN_FC_RETRY 0x0800
00027 #define WLAN_FC_PWRMGT 0x1000
00028 #define WLAN_FC_MOREDATA 0x2000
00029 #define WLAN_FC_ISWEP 0x4000
00030 #define WLAN_FC_ORDER 0x8000
00031
00032 #define WLAN_FC_GET_TYPE(fc) (((fc) & 0x000c) >> 2)
00033 #define WLAN_FC_GET_STYPE(fc) (((fc) & 0x00f0) >> 4)
00034
00035 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & (BIT(3) | BIT(2) | BIT(1) | BIT(0)))
00036 #define WLAN_GET_SEQ_SEQ(seq) \
00037 (((seq) & (~(BIT(3) | BIT(2) | BIT(1) | BIT(0)))) >> 4)
00038
00039 #define WLAN_FC_TYPE_MGMT 0
00040 #define WLAN_FC_TYPE_CTRL 1
00041 #define WLAN_FC_TYPE_DATA 2
00042
00043
00044 #define WLAN_FC_STYPE_ASSOC_REQ 0
00045 #define WLAN_FC_STYPE_ASSOC_RESP 1
00046 #define WLAN_FC_STYPE_REASSOC_REQ 2
00047 #define WLAN_FC_STYPE_REASSOC_RESP 3
00048 #define WLAN_FC_STYPE_PROBE_REQ 4
00049 #define WLAN_FC_STYPE_PROBE_RESP 5
00050 #define WLAN_FC_STYPE_BEACON 8
00051 #define WLAN_FC_STYPE_ATIM 9
00052 #define WLAN_FC_STYPE_DISASSOC 10
00053 #define WLAN_FC_STYPE_AUTH 11
00054 #define WLAN_FC_STYPE_DEAUTH 12
00055 #define WLAN_FC_STYPE_ACTION 13
00056
00057
00058 #define WLAN_FC_STYPE_PSPOLL 10
00059 #define WLAN_FC_STYPE_RTS 11
00060 #define WLAN_FC_STYPE_CTS 12
00061 #define WLAN_FC_STYPE_ACK 13
00062 #define WLAN_FC_STYPE_CFEND 14
00063 #define WLAN_FC_STYPE_CFENDACK 15
00064
00065
00066 #define WLAN_FC_STYPE_DATA 0
00067 #define WLAN_FC_STYPE_DATA_CFACK 1
00068 #define WLAN_FC_STYPE_DATA_CFPOLL 2
00069 #define WLAN_FC_STYPE_DATA_CFACKPOLL 3
00070 #define WLAN_FC_STYPE_NULLFUNC 4
00071 #define WLAN_FC_STYPE_CFACK 5
00072 #define WLAN_FC_STYPE_CFPOLL 6
00073 #define WLAN_FC_STYPE_CFACKPOLL 7
00074 #define WLAN_FC_STYPE_QOS_DATA 8
00075
00076
00077 #define WLAN_AUTH_OPEN 0
00078 #define WLAN_AUTH_SHARED_KEY 1
00079 #define WLAN_AUTH_FT 2
00080 #define WLAN_AUTH_LEAP 128
00081
00082 #define WLAN_AUTH_CHALLENGE_LEN 128
00083
00084 #define WLAN_CAPABILITY_ESS BIT(0)
00085 #define WLAN_CAPABILITY_IBSS BIT(1)
00086 #define WLAN_CAPABILITY_CF_POLLABLE BIT(2)
00087 #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3)
00088 #define WLAN_CAPABILITY_PRIVACY BIT(4)
00089 #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
00090 #define WLAN_CAPABILITY_PBCC BIT(6)
00091 #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7)
00092 #define WLAN_CAPABILITY_SPECTRUM_MGMT BIT(8)
00093 #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
00094 #define WLAN_CAPABILITY_DSSS_OFDM BIT(13)
00095
00096
00097 #define WLAN_STATUS_SUCCESS 0
00098 #define WLAN_STATUS_UNSPECIFIED_FAILURE 1
00099 #define WLAN_STATUS_CAPS_UNSUPPORTED 10
00100 #define WLAN_STATUS_REASSOC_NO_ASSOC 11
00101 #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
00102 #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
00103 #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
00104 #define WLAN_STATUS_CHALLENGE_FAIL 15
00105 #define WLAN_STATUS_AUTH_TIMEOUT 16
00106 #define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
00107 #define WLAN_STATUS_ASSOC_DENIED_RATES 18
00108
00109 #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
00110 #define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
00111 #define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
00112
00113 #define WLAN_STATUS_SPEC_MGMT_REQUIRED 22
00114 #define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23
00115 #define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24
00116
00117 #define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25
00118 #define WLAN_STATUS_ASSOC_DENIED_NO_ER_PBCC 26
00119 #define WLAN_STATUS_ASSOC_DENIED_NO_DSSS_OFDM 27
00120 #define WLAN_STATUS_R0KH_UNREACHABLE 28
00121
00122 #define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30
00123 #define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31
00124 #define WLAN_STATUS_UNSPECIFIED_QOS_FAILURE 32
00125 #define WLAN_STATUS_REQUEST_DECLINED 37
00126 #define WLAN_STATUS_INVALID_PARAMETERS 38
00127
00128 #define WLAN_STATUS_INVALID_IE 40
00129 #define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41
00130 #define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42
00131 #define WLAN_STATUS_AKMP_NOT_VALID 43
00132 #define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44
00133 #define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45
00134 #define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46
00135 #define WLAN_STATUS_TS_NOT_CREATED 47
00136 #define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48
00137 #define WLAN_STATUS_DEST_STA_NOT_PRESENT 49
00138 #define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50
00139 #define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51
00140
00141 #define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52
00142 #define WLAN_STATUS_INVALID_PMKID 53
00143 #define WLAN_STATUS_INVALID_MDIE 54
00144 #define WLAN_STATUS_INVALID_FTIE 55
00145
00146
00147 #define WLAN_REASON_UNSPECIFIED 1
00148 #define WLAN_REASON_PREV_AUTH_NOT_VALID 2
00149 #define WLAN_REASON_DEAUTH_LEAVING 3
00150 #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
00151 #define WLAN_REASON_DISASSOC_AP_BUSY 5
00152 #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
00153 #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
00154 #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
00155 #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
00156
00157 #define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10
00158 #define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11
00159
00160 #define WLAN_REASON_INVALID_IE 13
00161 #define WLAN_REASON_MICHAEL_MIC_FAILURE 14
00162 #define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15
00163 #define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16
00164 #define WLAN_REASON_IE_IN_4WAY_DIFFERS 17
00165 #define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18
00166 #define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19
00167 #define WLAN_REASON_AKMP_NOT_VALID 20
00168 #define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21
00169 #define WLAN_REASON_INVALID_RSN_IE_CAPAB 22
00170 #define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23
00171 #define WLAN_REASON_CIPHER_SUITE_REJECTED 24
00172
00173
00174
00175 #define WLAN_EID_SSID 0
00176 #define WLAN_EID_SUPP_RATES 1
00177 #define WLAN_EID_FH_PARAMS 2
00178 #define WLAN_EID_DS_PARAMS 3
00179 #define WLAN_EID_CF_PARAMS 4
00180 #define WLAN_EID_TIM 5
00181 #define WLAN_EID_IBSS_PARAMS 6
00182 #define WLAN_EID_COUNTRY 7
00183 #define WLAN_EID_CHALLENGE 16
00184
00185 #define WLAN_EID_PWR_CONSTRAINT 32
00186 #define WLAN_EID_PWR_CAPABILITY 33
00187 #define WLAN_EID_TPC_REQUEST 34
00188 #define WLAN_EID_TPC_REPORT 35
00189 #define WLAN_EID_SUPPORTED_CHANNELS 36
00190 #define WLAN_EID_CHANNEL_SWITCH 37
00191 #define WLAN_EID_MEASURE_REQUEST 38
00192 #define WLAN_EID_MEASURE_REPORT 39
00193 #define WLAN_EID_QUITE 40
00194 #define WLAN_EID_IBSS_DFS 41
00195
00196 #define WLAN_EID_ERP_INFO 42
00197 #define WLAN_EID_HT_CAP 45
00198 #define WLAN_EID_RSN 48
00199 #define WLAN_EID_EXT_SUPP_RATES 50
00200 #define WLAN_EID_MOBILITY_DOMAIN 54
00201 #define WLAN_EID_FAST_BSS_TRANSITION 55
00202 #define WLAN_EID_TIMEOUT_INTERVAL 56
00203 #define WLAN_EID_RIC_DATA 57
00204 #define WLAN_EID_HT_OPERATION 61
00205 #define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62
00206 #define WLAN_EID_20_40_BSS_COEXISTENCE 72
00207 #define WLAN_EID_20_40_BSS_INTOLERANT 73
00208 #define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
00209 #define WLAN_EID_MMIE 76
00210 #define WLAN_EID_VENDOR_SPECIFIC 221
00211
00212
00213
00214 #define WLAN_ACTION_SPECTRUM_MGMT 0
00215 #define WLAN_ACTION_QOS 1
00216 #define WLAN_ACTION_DLS 2
00217 #define WLAN_ACTION_BLOCK_ACK 3
00218 #define WLAN_ACTION_PUBLIC 4
00219 #define WLAN_ACTION_RADIO_MEASUREMENT 5
00220 #define WLAN_ACTION_FT 6
00221 #define WLAN_ACTION_HT 7
00222 #define WLAN_ACTION_SA_QUERY 8
00223 #define WLAN_ACTION_WMM 17
00224
00225
00226 #define WLAN_SA_QUERY_REQUEST 0
00227 #define WLAN_SA_QUERY_RESPONSE 1
00228
00229 #define WLAN_SA_QUERY_TR_ID_LEN 2
00230
00231
00232 #define WLAN_TIMEOUT_REASSOC_DEADLINE 1
00233 #define WLAN_TIMEOUT_KEY_LIFETIME 2
00234 #define WLAN_TIMEOUT_ASSOC_COMEBACK 3
00235
00236
00237 #ifdef _MSC_VER
00238 #pragma pack(push, 1)
00239 #endif
00240
00241 struct ieee80211_mgmt {
00242 le16 frame_control;
00243 le16 duration;
00244 u8 da[6];
00245 u8 sa[6];
00246 u8 bssid[6];
00247 le16 seq_ctrl;
00248 union {
00249 struct {
00250 le16 auth_alg;
00251 le16 auth_transaction;
00252 le16 status_code;
00253
00254 u8 variable[0];
00255 } STRUCT_PACKED auth;
00256 struct {
00257 le16 reason_code;
00258 } STRUCT_PACKED deauth;
00259 struct {
00260 le16 capab_info;
00261 le16 listen_interval;
00262
00263 u8 variable[0];
00264 } STRUCT_PACKED assoc_req;
00265 struct {
00266 le16 capab_info;
00267 le16 status_code;
00268 le16 aid;
00269
00270 u8 variable[0];
00271 } STRUCT_PACKED assoc_resp, reassoc_resp;
00272 struct {
00273 le16 capab_info;
00274 le16 listen_interval;
00275 u8 current_ap[6];
00276
00277 u8 variable[0];
00278 } STRUCT_PACKED reassoc_req;
00279 struct {
00280 le16 reason_code;
00281 } STRUCT_PACKED disassoc;
00282 struct {
00283 u8 timestamp[8];
00284 le16 beacon_int;
00285 le16 capab_info;
00286
00287
00288 u8 variable[0];
00289 } STRUCT_PACKED beacon;
00290 struct {
00291
00292 u8 variable[0];
00293 } STRUCT_PACKED probe_req;
00294 struct {
00295 u8 timestamp[8];
00296 le16 beacon_int;
00297 le16 capab_info;
00298
00299
00300 u8 variable[0];
00301 } STRUCT_PACKED probe_resp;
00302 struct {
00303 u8 category;
00304 union {
00305 struct {
00306 u8 action_code;
00307 u8 dialog_token;
00308 u8 status_code;
00309 u8 variable[0];
00310 } STRUCT_PACKED wmm_action;
00311 struct{
00312 u8 action_code;
00313 u8 element_id;
00314 u8 length;
00315 u8 switch_mode;
00316 u8 new_chan;
00317 u8 switch_count;
00318 } STRUCT_PACKED chan_switch;
00319 struct {
00320 u8 action;
00321 u8 sta_addr[ETH_ALEN];
00322 u8 target_ap_addr[ETH_ALEN];
00323 u8 variable[0];
00324 } STRUCT_PACKED ft_action_req;
00325 struct {
00326 u8 action;
00327 u8 sta_addr[ETH_ALEN];
00328 u8 target_ap_addr[ETH_ALEN];
00329 le16 status_code;
00330 u8 variable[0];
00331 } STRUCT_PACKED ft_action_resp;
00332 struct {
00333 u8 action;
00334 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
00335 } STRUCT_PACKED sa_query_req;
00336 struct {
00337 u8 action;
00338 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
00339 } STRUCT_PACKED sa_query_resp;
00340 } u;
00341 } STRUCT_PACKED action;
00342 } u;
00343 } STRUCT_PACKED;
00344
00345 #ifdef _MSC_VER
00346 #pragma pack(pop)
00347 #endif
00348
00349 #define ERP_INFO_NON_ERP_PRESENT BIT(0)
00350 #define ERP_INFO_USE_PROTECTION BIT(1)
00351 #define ERP_INFO_BARKER_PREAMBLE_MODE BIT(2)
00352
00353
00354
00355
00356 enum {
00357 MAX_RX_AMPDU_FACTOR_8KB = 0,
00358 MAX_RX_AMPDU_FACTOR_16KB,
00359 MAX_RX_AMPDU_FACTOR_32KB,
00360 MAX_RX_AMPDU_FACTOR_64KB
00361 };
00362
00363 enum {
00364 CALIBRATION_NOT_SUPPORTED = 0,
00365 CALIBRATION_CANNOT_INIT,
00366 CALIBRATION_CAN_INIT,
00367 CALIBRATION_FULL_SUPPORT
00368 };
00369
00370 enum {
00371 MCS_FEEDBACK_NOT_PROVIDED = 0,
00372 MCS_FEEDBACK_UNSOLICITED,
00373 MCS_FEEDBACK_MRQ_RESPONSE
00374 };
00375
00376
00377 struct ieee80211_ht_capability {
00378 le16 capabilities_info;
00379 u8 mac_ht_params_info;
00380 u8 supported_mcs_set[16];
00381 le16 extended_ht_capability_info;
00382 le32 tx_BF_capability_info;
00383 u8 antenna_selection_info;
00384 } STRUCT_PACKED;
00385
00386
00387 struct ieee80211_ht_operation {
00388 u8 control_chan;
00389 u8 ht_param;
00390 le16 operation_mode;
00391 le16 stbc_param;
00392 u8 basic_set[16];
00393 } STRUCT_PACKED;
00394
00395
00396 #define SET_2BIT_U8(_ptr_, _shift_, _val_) \
00397 ((*(_ptr_) &= ~(3 << (_shift_))), \
00398 (*(_ptr_) |= (*(_ptr_) & (((u8)3) << (_shift_))) | \
00399 (((u8)(_val_) & 3) << _shift_)))
00400
00401 #define GET_2BIT_U8(_var_, _shift_) \
00402 (((_var_) & (((u8)3) << (_shift_))) >> (_shift_))
00403
00404 #define SET_2BIT_LE16(_u16ptr_, _shift_, _val_) \
00405 ((*(_u16ptr_) &= ~(3 << (_shift_))), \
00406 (*(_u16ptr_) |= \
00407 (((*(_u16ptr_)) & (((u16)3) << ((u16)_shift_))) | \
00408 (((u16)(_val_) & (u16)3) << (u16)(_shift_)))))
00409
00410 #define GET_2BIT_LE16(_var_, _shift_) \
00411 (((_var_) & (((u16)3) << (_shift_))) >> (_shift_))
00412
00413 #define SET_2BIT_LE32(_u32ptr_, _shift_, _val_) \
00414 ((*(_u32ptr_) &= ~(3 << (_shift_))), \
00415 (*(_u32ptr_) |= (((*(_u32ptr_)) & (((u32)3) << (_shift_))) | \
00416 (((u32)(_val_) & 3) << _shift_))))
00417
00418 #define GET_2BIT_LE32(_var_, _shift_) \
00419 (((_var_) & (((u32)3) << (_shift_))) >> (_shift_))
00420
00421 #define SET_3BIT_LE16(_u16ptr_, _shift_, _val_) \
00422 ((*(_u16ptr_) &= ~(7 << (_shift_))), \
00423 (*(_u16ptr_) |= (((*(_u16ptr_)) & (((u16)7) << (_shift_))) | \
00424 (((u16)(_val_) & 7) << _shift_))))
00425
00426 #define GET_3BIT_LE16(_var_, _shift_) \
00427 (((_var_) & (((u16)7) << (_shift_))) >> (_shift_))
00428
00429 #define SET_3BIT_LE32(_u32ptr_, _shift_, _val_) \
00430 ((*(_u32ptr_) &= ~(7 << (_shift_))), \
00431 (*(_u32ptr_) |= (((*(_u32ptr_)) & (((u32)7) << (_shift_))) | \
00432 (((u32)(_val_) & 7) << _shift_))))
00433
00434 #define GET_3BIT_LE32(_var_, _shift_) \
00435 (((_var_) & (((u32)7) << (_shift_))) >> (_shift_))
00436
00437
00438 #define HT_CAP_INFO_LDPC_CODING_CAP ((u16) BIT(0))
00439 #define HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET ((u16) BIT(1))
00440 #define HT_CAP_INFO_SMPS_MASK ((u16) (BIT(2) | BIT(3)))
00441 #define HT_CAP_INFO_SMPS_STATIC ((u16) 0)
00442 #define HT_CAP_INFO_SMPS_DYNAMIC ((u16) BIT(2))
00443 #define HT_CAP_INFO_SMPS_DISABLED ((u16) (BIT(2) | BIT(3)))
00444 #define HT_CAP_INFO_GREEN_FIELD ((u16) BIT(4))
00445 #define HT_CAP_INFO_SHORT_GI20MHZ ((u16) BIT(5))
00446 #define HT_CAP_INFO_SHORT_GI40MHZ ((u16) BIT(6))
00447 #define HT_CAP_INFO_TX_STBC ((u16) BIT(7))
00448 #define HT_CAP_INFO_RX_STBC_MASK ((u16) (BIT(8) | BIT(9)))
00449 #define HT_CAP_INFO_RX_STBC_1 ((u16) BIT(8))
00450 #define HT_CAP_INFO_RX_STBC_12 ((u16) BIT(9))
00451 #define HT_CAP_INFO_RX_STBC_123 ((u16) (BIT(8) | BIT(9)))
00452 #define HT_CAP_INFO_DELAYED_BA ((u16) BIT(10))
00453 #define HT_CAP_INFO_MAX_AMSDU_SIZE ((u16) BIT(11))
00454 #define HT_CAP_INFO_DSSS_CCK40MHZ ((u16) BIT(12))
00455 #define HT_CAP_INFO_PSMP_SUPP ((u16) BIT(13))
00456 #define HT_CAP_INFO_40MHZ_INTOLERANT ((u16) BIT(14))
00457 #define HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT ((u16) BIT(15))
00458
00459
00460 #define MAC_HT_PARAM_INFO_MAX_RX_AMPDU_FACTOR_OFFSET 0
00461 #define MAC_HT_PARAM_INFO_MAX_MPDU_DENSITY_OFFSET 2
00462
00463 #define EXT_HT_CAP_INFO_PCO ((u16) BIT(0))
00464 #define EXT_HT_CAP_INFO_TRANS_TIME_OFFSET 1
00465 #define EXT_HT_CAP_INFO_MCS_FEEDBACK_OFFSET 8
00466 #define EXT_HT_CAP_INFO_HTC_SUPPORTED ((u16) BIT(10))
00467 #define EXT_HT_CAP_INFO_RD_RESPONDER ((u16) BIT(11))
00468
00469
00470 #define TX_BEAMFORM_CAP_TXBF_CAP ((u32) BIT(0))
00471 #define TX_BEAMFORM_CAP_RX_STAGGERED_SOUNDING_CAP ((u32) BIT(1))
00472 #define TX_BEAMFORM_CAP_TX_STAGGERED_SOUNDING_CAP ((u32) BIT(2))
00473 #define TX_BEAMFORM_CAP_RX_ZLF_CAP ((u32) BIT(3))
00474 #define TX_BEAMFORM_CAP_TX_ZLF_CAP ((u32) BIT(4))
00475 #define TX_BEAMFORM_CAP_IMPLICIT_ZLF_CAP ((u32) BIT(5))
00476 #define TX_BEAMFORM_CAP_CALIB_OFFSET 6
00477 #define TX_BEAMFORM_CAP_EXPLICIT_CSI_TXBF_CAP ((u32) BIT(8))
00478 #define TX_BEAMFORM_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_CAP ((u32) BIT(9))
00479 #define TX_BEAMFORM_CAP_EXPLICIT_BF_CSI_FEEDBACK_CAP ((u32) BIT(10))
00480 #define TX_BEAMFORM_CAP_EXPLICIT_BF_CSI_FEEDBACK_OFFSET 11
00481 #define TX_BEAMFORM_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_FEEDBACK_OFFSET 13
00482 #define TX_BEAMFORM_CAP_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBACK_OFFSET 15
00483 #define TX_BEAMFORM_CAP_MINIMAL_GROUPING_OFFSET 17
00484 #define TX_BEAMFORM_CAP_CSI_NUM_BEAMFORMER_ANT_OFFSET 19
00485 #define TX_BEAMFORM_CAP_UNCOMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 21
00486 #define TX_BEAMFORM_CAP_COMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 23
00487 #define TX_BEAMFORM_CAP_SCI_MAX_OF_ROWS_BEANFORMER_SUPPORTED_OFFSET 25
00488
00489
00490 #define ASEL_CAPABILITY_ASEL_CAPABLE ((u8) BIT(0))
00491 #define ASEL_CAPABILITY_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(1))
00492 #define ASEL_CAPABILITY_ANT_INDICES_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(2))
00493 #define ASEL_CAPABILITY_EXPLICIT_CSI_FEEDBACK_CAP ((u8) BIT(3))
00494 #define ASEL_CAPABILITY_ANT_INDICES_FEEDBACK_CAP ((u8) BIT(4))
00495 #define ASEL_CAPABILITY_RX_AS_CAP ((u8) BIT(5))
00496 #define ASEL_CAPABILITY_TX_SOUND_PPDUS_CAP ((u8) BIT(6))
00497
00498
00499 struct ht_cap_ie {
00500 u8 id;
00501 u8 length;
00502 struct ieee80211_ht_capability data;
00503 } STRUCT_PACKED;
00504
00505
00506 #define REC_TRANS_CHNL_WIDTH_20 0
00507 #define REC_TRANS_CHNL_WIDTH_ANY 1
00508
00509 #define OP_MODE_PURE 0
00510 #define OP_MODE_MAY_BE_LEGACY_STAS 1
00511 #define OP_MODE_20MHZ_HT_STA_ASSOCED 2
00512 #define OP_MODE_MIXED 3
00513
00514 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8) BIT(0) | BIT(1))
00515 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8) BIT(0))
00516 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8) BIT(0) | BIT(1))
00517 #define HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH ((u8) BIT(2))
00518 #define HT_INFO_HT_PARAM_RIFS_MODE ((u8) BIT(3))
00519 #define HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY ((u8) BIT(4))
00520 #define HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY ((u8) BIT(5))
00521
00522 #define HT_INFO_OPERATION_MODE_OP_MODE_MASK \
00523 ((le16) (0x0001 | 0x0002))
00524 #define HT_INFO_OPERATION_MODE_OP_MODE_OFFSET 0
00525 #define HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT ((u8) BIT(2))
00526 #define HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT ((u8) BIT(3))
00527 #define HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT ((u8) BIT(4))
00528
00529 #define HT_INFO_STBC_PARAM_DUAL_BEACON ((u16) BIT(6))
00530 #define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT ((u16) BIT(7))
00531 #define HT_INFO_STBC_PARAM_SECONDARY_BCN ((u16) BIT(8))
00532 #define HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED ((u16) BIT(9))
00533 #define HT_INFO_STBC_PARAM_PCO_ACTIVE ((u16) BIT(10))
00534 #define HT_INFO_STBC_PARAM_PCO_PHASE ((u16) BIT(11))
00535
00536
00537
00538 #define SECONDARY_CHANNEL_OFFSET_NONE 0
00539 #define SECONDARY_CHANNEL_OFFSET_ABOVE 1
00540 #define SECONDARY_CHANNEL_OFFSET_BELOW 3
00541 struct secondary_channel_offset_ie {
00542 u8 id;
00543 u8 length;
00544 u8 secondary_offset_offset;
00545 } STRUCT_PACKED;
00546
00547
00548
00549 #define CHANNEL_WIDTH_20 0
00550 #define CHANNEL_WIDTH_ANY 1
00551 struct recommended_tx_channel_width_action {
00552 u8 category;
00553 u8 action;
00554 u8 channel_width;
00555 } STRUCT_PACKED;
00556
00557
00558 #define PWR_SAVE_MODE_STATIC 0
00559 #define PWR_SAVE_MODE_DYNAMIC 1
00560 struct mimo_pwr_save_action {
00561 u8 category;
00562 u8 action;
00563 u8 enable;
00564 u8 mode;
00565 } STRUCT_PACKED;
00566
00567
00568 #define OUI_MICROSOFT 0x0050f2
00569
00570
00571 #define WMM_OUI_TYPE 2
00572 #define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
00573 #define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
00574 #define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
00575 #define WMM_VERSION 1
00576
00577 #define WMM_ACTION_CODE_ADDTS_REQ 0
00578 #define WMM_ACTION_CODE_ADDTS_RESP 1
00579 #define WMM_ACTION_CODE_DELTS 2
00580
00581 #define WMM_ADDTS_STATUS_ADMISSION_ACCEPTED 0
00582 #define WMM_ADDTS_STATUS_INVALID_PARAMETERS 1
00583
00584 #define WMM_ADDTS_STATUS_REFUSED 3
00585
00586
00587
00588 #define WMM_TSPEC_DIRECTION_UPLINK 0
00589 #define WMM_TSPEC_DIRECTION_DOWNLINK 1
00590
00591 #define WMM_TSPEC_DIRECTION_BI_DIRECTIONAL 3
00592
00593
00594
00595
00596
00597 struct wmm_information_element {
00598
00599
00600 u8 oui[3];
00601 u8 oui_type;
00602 u8 oui_subtype;
00603 u8 version;
00604 u8 qos_info;
00605
00606 } STRUCT_PACKED;
00607
00608 #define WMM_AC_AIFSN_MASK 0x0f
00609 #define WMM_AC_AIFNS_SHIFT 0
00610 #define WMM_AC_ACM 0x10
00611 #define WMM_AC_ACI_MASK 0x60
00612 #define WMM_AC_ACI_SHIFT 5
00613
00614 #define WMM_AC_ECWMIN_MASK 0x0f
00615 #define WMM_AC_ECWMIN_SHIFT 0
00616 #define WMM_AC_ECWMAX_MASK 0xf0
00617 #define WMM_AC_ECWMAX_SHIFT 4
00618
00619 struct wmm_ac_parameter {
00620 u8 aci_aifsn;
00621 u8 cw;
00622 le16 txop_limit;
00623 } STRUCT_PACKED;
00624
00625
00626
00627
00628
00629 struct wmm_parameter_element {
00630
00631
00632 u8 oui[3];
00633 u8 oui_type;
00634 u8 oui_subtype;
00635 u8 version;
00636 u8 qos_info;
00637 u8 reserved;
00638 struct wmm_ac_parameter ac[4];
00639
00640 } STRUCT_PACKED;
00641
00642
00643 struct wmm_tspec_element {
00644 u8 eid;
00645 u8 length;
00646 u8 oui[3];
00647 u8 oui_type;
00648 u8 oui_subtype;
00649 u8 version;
00650
00651 u8 ts_info[3];
00652 le16 nominal_msdu_size;
00653 le16 maximum_msdu_size;
00654 le32 minimum_service_interval;
00655 le32 maximum_service_interval;
00656 le32 inactivity_interval;
00657 le32 suspension_interval;
00658 le32 service_start_time;
00659 le32 minimum_data_rate;
00660 le32 mean_data_rate;
00661 le32 peak_data_rate;
00662 le32 maximum_burst_size;
00663 le32 delay_bound;
00664 le32 minimum_phy_rate;
00665 le16 surplus_bandwidth_allowance;
00666 le16 medium_time;
00667 } STRUCT_PACKED;
00668
00669
00670
00671 enum {
00672 WMM_AC_BE = 0 ,
00673 WMM_AC_BK = 1 ,
00674 WMM_AC_VI = 2 ,
00675 WMM_AC_VO = 3
00676 };
00677
00678
00679 #define OUI_BROADCOM 0x00904c
00680
00681 #define VENDOR_HT_CAPAB_OUI_TYPE 0x33
00682
00683
00684 #define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
00685 #define WLAN_CIPHER_SUITE_WEP40 0x000FAC01
00686 #define WLAN_CIPHER_SUITE_TKIP 0x000FAC02
00687
00688 #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04
00689 #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05
00690 #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
00691
00692
00693 #define WLAN_AKM_SUITE_8021X 0x000FAC01
00694 #define WLAN_AKM_SUITE_PSK 0x000FAC02
00695
00696 #endif
00697