ieee802_11_defs.h
Go to the documentation of this file.
00001 /*
00002  * IEEE 802.11 Frame type definitions
00003  * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
00004  * Copyright (c) 2007-2008 Intel Corporation
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License version 2 as
00008  * published by the Free Software Foundation.
00009  *
00010  * Alternatively, this software may be distributed under the terms of BSD
00011  * license.
00012  *
00013  * See README and COPYING for more details.
00014  */
00015 
00016 #ifndef IEEE802_11_DEFS_H
00017 #define IEEE802_11_DEFS_H
00018 
00019 /* IEEE 802.11 defines */
00020 
00021 #define WLAN_FC_PVER            0x0003
00022 #define WLAN_FC_TODS            0x0100
00023 #define WLAN_FC_FROMDS          0x0200
00024 #define WLAN_FC_MOREFRAG        0x0400
00025 #define WLAN_FC_RETRY           0x0800
00026 #define WLAN_FC_PWRMGT          0x1000
00027 #define WLAN_FC_MOREDATA        0x2000
00028 #define WLAN_FC_ISWEP           0x4000
00029 #define WLAN_FC_ORDER           0x8000
00030 
00031 #define WLAN_FC_GET_TYPE(fc)    (((fc) & 0x000c) >> 2)
00032 #define WLAN_FC_GET_STYPE(fc)   (((fc) & 0x00f0) >> 4)
00033 
00034 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & (BIT(3) | BIT(2) | BIT(1) | BIT(0)))
00035 #define WLAN_GET_SEQ_SEQ(seq) \
00036         (((seq) & (~(BIT(3) | BIT(2) | BIT(1) | BIT(0)))) >> 4)
00037 
00038 #define WLAN_FC_TYPE_MGMT               0
00039 #define WLAN_FC_TYPE_CTRL               1
00040 #define WLAN_FC_TYPE_DATA               2
00041 
00042 /* management */
00043 #define WLAN_FC_STYPE_ASSOC_REQ         0
00044 #define WLAN_FC_STYPE_ASSOC_RESP        1
00045 #define WLAN_FC_STYPE_REASSOC_REQ       2
00046 #define WLAN_FC_STYPE_REASSOC_RESP      3
00047 #define WLAN_FC_STYPE_PROBE_REQ         4
00048 #define WLAN_FC_STYPE_PROBE_RESP        5
00049 #define WLAN_FC_STYPE_BEACON            8
00050 #define WLAN_FC_STYPE_ATIM              9
00051 #define WLAN_FC_STYPE_DISASSOC          10
00052 #define WLAN_FC_STYPE_AUTH              11
00053 #define WLAN_FC_STYPE_DEAUTH            12
00054 #define WLAN_FC_STYPE_ACTION            13
00055 
00056 /* control */
00057 #define WLAN_FC_STYPE_PSPOLL            10
00058 #define WLAN_FC_STYPE_RTS               11
00059 #define WLAN_FC_STYPE_CTS               12
00060 #define WLAN_FC_STYPE_ACK               13
00061 #define WLAN_FC_STYPE_CFEND             14
00062 #define WLAN_FC_STYPE_CFENDACK          15
00063 
00064 /* data */
00065 #define WLAN_FC_STYPE_DATA              0
00066 #define WLAN_FC_STYPE_DATA_CFACK        1
00067 #define WLAN_FC_STYPE_DATA_CFPOLL       2
00068 #define WLAN_FC_STYPE_DATA_CFACKPOLL    3
00069 #define WLAN_FC_STYPE_NULLFUNC          4
00070 #define WLAN_FC_STYPE_CFACK             5
00071 #define WLAN_FC_STYPE_CFPOLL            6
00072 #define WLAN_FC_STYPE_CFACKPOLL         7
00073 #define WLAN_FC_STYPE_QOS_DATA          8
00074 
00075 /* Authentication algorithms */
00076 #define WLAN_AUTH_OPEN                  0
00077 #define WLAN_AUTH_SHARED_KEY            1
00078 #define WLAN_AUTH_FT                    2
00079 #define WLAN_AUTH_LEAP                  128
00080 
00081 #define WLAN_AUTH_CHALLENGE_LEN 128
00082 
00083 #define WLAN_CAPABILITY_ESS BIT(0)
00084 #define WLAN_CAPABILITY_IBSS BIT(1)
00085 #define WLAN_CAPABILITY_CF_POLLABLE BIT(2)
00086 #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3)
00087 #define WLAN_CAPABILITY_PRIVACY BIT(4)
00088 #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
00089 #define WLAN_CAPABILITY_PBCC BIT(6)
00090 #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7)
00091 #define WLAN_CAPABILITY_SPECTRUM_MGMT BIT(8)
00092 #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
00093 #define WLAN_CAPABILITY_DSSS_OFDM BIT(13)
00094 
00095 /* Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23) */
00096 #define WLAN_STATUS_SUCCESS 0
00097 #define WLAN_STATUS_UNSPECIFIED_FAILURE 1
00098 #define WLAN_STATUS_CAPS_UNSUPPORTED 10
00099 #define WLAN_STATUS_REASSOC_NO_ASSOC 11
00100 #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
00101 #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
00102 #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
00103 #define WLAN_STATUS_CHALLENGE_FAIL 15
00104 #define WLAN_STATUS_AUTH_TIMEOUT 16
00105 #define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
00106 #define WLAN_STATUS_ASSOC_DENIED_RATES 18
00107 /* IEEE 802.11b */
00108 #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
00109 #define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
00110 #define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
00111 /* IEEE 802.11h */
00112 #define WLAN_STATUS_SPEC_MGMT_REQUIRED 22
00113 #define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23
00114 #define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24
00115 /* IEEE 802.11g */
00116 #define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25
00117 #define WLAN_STATUS_ASSOC_DENIED_NO_ER_PBCC 26
00118 #define WLAN_STATUS_ASSOC_DENIED_NO_DSSS_OFDM 27
00119 #define WLAN_STATUS_R0KH_UNREACHABLE 28
00120 /* IEEE 802.11w */
00121 #define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30
00122 #define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31
00123 #define WLAN_STATUS_UNSPECIFIED_QOS_FAILURE 32
00124 #define WLAN_STATUS_REQUEST_DECLINED 37
00125 #define WLAN_STATUS_INVALID_PARAMETERS 38
00126 /* IEEE 802.11i */
00127 #define WLAN_STATUS_INVALID_IE 40
00128 #define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41
00129 #define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42
00130 #define WLAN_STATUS_AKMP_NOT_VALID 43
00131 #define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44
00132 #define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45
00133 #define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46
00134 #define WLAN_STATUS_TS_NOT_CREATED 47
00135 #define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48
00136 #define WLAN_STATUS_DEST_STA_NOT_PRESENT 49
00137 #define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50
00138 #define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51
00139 /* IEEE 802.11r */
00140 #define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52
00141 #define WLAN_STATUS_INVALID_PMKID 53
00142 #define WLAN_STATUS_INVALID_MDIE 54
00143 #define WLAN_STATUS_INVALID_FTIE 55
00144 
00145 /* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
00146 #define WLAN_REASON_UNSPECIFIED 1
00147 #define WLAN_REASON_PREV_AUTH_NOT_VALID 2
00148 #define WLAN_REASON_DEAUTH_LEAVING 3
00149 #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
00150 #define WLAN_REASON_DISASSOC_AP_BUSY 5
00151 #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
00152 #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
00153 #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
00154 #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
00155 /* IEEE 802.11h */
00156 #define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10
00157 #define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11
00158 /* IEEE 802.11i */
00159 #define WLAN_REASON_INVALID_IE 13
00160 #define WLAN_REASON_MICHAEL_MIC_FAILURE 14
00161 #define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15
00162 #define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16
00163 #define WLAN_REASON_IE_IN_4WAY_DIFFERS 17
00164 #define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18
00165 #define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19
00166 #define WLAN_REASON_AKMP_NOT_VALID 20
00167 #define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21
00168 #define WLAN_REASON_INVALID_RSN_IE_CAPAB 22
00169 #define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23
00170 #define WLAN_REASON_CIPHER_SUITE_REJECTED 24
00171 
00172 
00173 /* Information Element IDs */
00174 #define WLAN_EID_SSID 0
00175 #define WLAN_EID_SUPP_RATES 1
00176 #define WLAN_EID_FH_PARAMS 2
00177 #define WLAN_EID_DS_PARAMS 3
00178 #define WLAN_EID_CF_PARAMS 4
00179 #define WLAN_EID_TIM 5
00180 #define WLAN_EID_IBSS_PARAMS 6
00181 #define WLAN_EID_COUNTRY 7
00182 #define WLAN_EID_CHALLENGE 16
00183 /* EIDs defined by IEEE 802.11h - START */
00184 #define WLAN_EID_PWR_CONSTRAINT 32
00185 #define WLAN_EID_PWR_CAPABILITY 33
00186 #define WLAN_EID_TPC_REQUEST 34
00187 #define WLAN_EID_TPC_REPORT 35
00188 #define WLAN_EID_SUPPORTED_CHANNELS 36
00189 #define WLAN_EID_CHANNEL_SWITCH 37
00190 #define WLAN_EID_MEASURE_REQUEST 38
00191 #define WLAN_EID_MEASURE_REPORT 39
00192 #define WLAN_EID_QUITE 40
00193 #define WLAN_EID_IBSS_DFS 41
00194 /* EIDs defined by IEEE 802.11h - END */
00195 #define WLAN_EID_ERP_INFO 42
00196 #define WLAN_EID_HT_CAP 45
00197 #define WLAN_EID_RSN 48
00198 #define WLAN_EID_EXT_SUPP_RATES 50
00199 #define WLAN_EID_MOBILITY_DOMAIN 54
00200 #define WLAN_EID_FAST_BSS_TRANSITION 55
00201 #define WLAN_EID_TIMEOUT_INTERVAL 56
00202 #define WLAN_EID_RIC_DATA 57
00203 #define WLAN_EID_HT_OPERATION 61
00204 #define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62
00205 #define WLAN_EID_20_40_BSS_COEXISTENCE 72
00206 #define WLAN_EID_20_40_BSS_INTOLERANT 73
00207 #define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
00208 #define WLAN_EID_MMIE 76
00209 #define WLAN_EID_VENDOR_SPECIFIC 221
00210 
00211 
00212 /* Action frame categories (IEEE 802.11-2007, 7.3.1.11, Table 7-24) */
00213 #define WLAN_ACTION_SPECTRUM_MGMT 0
00214 #define WLAN_ACTION_QOS 1
00215 #define WLAN_ACTION_DLS 2
00216 #define WLAN_ACTION_BLOCK_ACK 3
00217 #define WLAN_ACTION_PUBLIC 4
00218 #define WLAN_ACTION_RADIO_MEASUREMENT 5
00219 #define WLAN_ACTION_FT 6
00220 #define WLAN_ACTION_HT 7
00221 #define WLAN_ACTION_SA_QUERY 8
00222 #define WLAN_ACTION_WMM 17 /* WMM Specification 1.1 */
00223 
00224 /* SA Query Action frame (IEEE 802.11w/D8.0, 7.4.9) */
00225 #define WLAN_SA_QUERY_REQUEST 0
00226 #define WLAN_SA_QUERY_RESPONSE 1
00227 
00228 #define WLAN_SA_QUERY_TR_ID_LEN 2
00229 
00230 /* Timeout Interval Type */
00231 #define WLAN_TIMEOUT_REASSOC_DEADLINE 1
00232 #define WLAN_TIMEOUT_KEY_LIFETIME 2
00233 #define WLAN_TIMEOUT_ASSOC_COMEBACK 3
00234 
00235 
00236 #ifdef _MSC_VER
00237 #pragma pack(push, 1)
00238 #endif /* _MSC_VER */
00239 
00240 struct ieee80211_hdr {
00241         le16 frame_control;
00242         le16 duration_id;
00243         u8 addr1[6];
00244         u8 addr2[6];
00245         u8 addr3[6];
00246         le16 seq_ctrl;
00247         /* followed by 'u8 addr4[6];' if ToDS and FromDS is set in data frame
00248          */
00249 } STRUCT_PACKED;
00250 
00251 #define IEEE80211_DA_FROMDS addr1
00252 #define IEEE80211_BSSID_FROMDS addr2
00253 #define IEEE80211_SA_FROMDS addr3
00254 
00255 #define IEEE80211_HDRLEN (sizeof(struct ieee80211_hdr))
00256 
00257 #define IEEE80211_FC(type, stype) host_to_le16((type << 2) | (stype << 4))
00258 
00259 struct ieee80211_mgmt {
00260         le16 frame_control;
00261         le16 duration;
00262         u8 da[6];
00263         u8 sa[6];
00264         u8 bssid[6];
00265         le16 seq_ctrl;
00266         union {
00267                 struct {
00268                         le16 auth_alg;
00269                         le16 auth_transaction;
00270                         le16 status_code;
00271                         /* possibly followed by Challenge text */
00272                         u8 variable[0];
00273                 } STRUCT_PACKED auth;
00274                 struct {
00275                         le16 reason_code;
00276                 } STRUCT_PACKED deauth;
00277                 struct {
00278                         le16 capab_info;
00279                         le16 listen_interval;
00280                         /* followed by SSID and Supported rates */
00281                         u8 variable[0];
00282                 } STRUCT_PACKED assoc_req;
00283                 struct {
00284                         le16 capab_info;
00285                         le16 status_code;
00286                         le16 aid;
00287                         /* followed by Supported rates */
00288                         u8 variable[0];
00289                 } STRUCT_PACKED assoc_resp, reassoc_resp;
00290                 struct {
00291                         le16 capab_info;
00292                         le16 listen_interval;
00293                         u8 current_ap[6];
00294                         /* followed by SSID and Supported rates */
00295                         u8 variable[0];
00296                 } STRUCT_PACKED reassoc_req;
00297                 struct {
00298                         le16 reason_code;
00299                 } STRUCT_PACKED disassoc;
00300                 struct {
00301                         u8 timestamp[8];
00302                         le16 beacon_int;
00303                         le16 capab_info;
00304                         /* followed by some of SSID, Supported rates,
00305                          * FH Params, DS Params, CF Params, IBSS Params, TIM */
00306                         u8 variable[0];
00307                 } STRUCT_PACKED beacon;
00308                 struct {
00309                         /* only variable items: SSID, Supported rates */
00310                         u8 variable[0];
00311                 } STRUCT_PACKED probe_req;
00312                 struct {
00313                         u8 timestamp[8];
00314                         le16 beacon_int;
00315                         le16 capab_info;
00316                         /* followed by some of SSID, Supported rates,
00317                          * FH Params, DS Params, CF Params, IBSS Params */
00318                         u8 variable[0];
00319                 } STRUCT_PACKED probe_resp;
00320                 struct {
00321                         u8 category;
00322                         union {
00323                                 struct {
00324                                         u8 action_code;
00325                                         u8 dialog_token;
00326                                         u8 status_code;
00327                                         u8 variable[0];
00328                                 } STRUCT_PACKED wmm_action;
00329                                 struct{
00330                                         u8 action_code;
00331                                         u8 element_id;
00332                                         u8 length;
00333                                         u8 switch_mode;
00334                                         u8 new_chan;
00335                                         u8 switch_count;
00336                                 } STRUCT_PACKED chan_switch;
00337                                 struct {
00338                                         u8 action;
00339                                         u8 sta_addr[ETH_ALEN];
00340                                         u8 target_ap_addr[ETH_ALEN];
00341                                         u8 variable[0]; /* FT Request */
00342                                 } STRUCT_PACKED ft_action_req;
00343                                 struct {
00344                                         u8 action;
00345                                         u8 sta_addr[ETH_ALEN];
00346                                         u8 target_ap_addr[ETH_ALEN];
00347                                         le16 status_code;
00348                                         u8 variable[0]; /* FT Request */
00349                                 } STRUCT_PACKED ft_action_resp;
00350                                 struct {
00351                                         u8 action;
00352                                         u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
00353                                 } STRUCT_PACKED sa_query_req;
00354                                 struct {
00355                                         u8 action; /* */
00356                                         u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
00357                                 } STRUCT_PACKED sa_query_resp;
00358                         } u;
00359                 } STRUCT_PACKED action;
00360         } u;
00361 } STRUCT_PACKED;
00362 
00363 
00364 struct ieee80211_ht_capabilities {
00365         le16 ht_capabilities_info;
00366         u8 a_mpdu_params;
00367         u8 supported_mcs_set[16];
00368         le16 ht_extended_capabilities;
00369         le32 tx_bf_capability_info;
00370         u8 asel_capabilities;
00371 } STRUCT_PACKED;
00372 
00373 
00374 struct ieee80211_ht_operation {
00375         u8 control_chan;
00376         u8 ht_param;
00377         le16 operation_mode;
00378         le16 stbc_param;
00379         u8 basic_set[16];
00380 } STRUCT_PACKED;
00381 
00382 #ifdef _MSC_VER
00383 #pragma pack(pop)
00384 #endif /* _MSC_VER */
00385 
00386 #define ERP_INFO_NON_ERP_PRESENT BIT(0)
00387 #define ERP_INFO_USE_PROTECTION BIT(1)
00388 #define ERP_INFO_BARKER_PREAMBLE_MODE BIT(2)
00389 
00390 
00391 #define HT_CAP_INFO_LDPC_CODING_CAP             ((u16) BIT(0))
00392 #define HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET      ((u16) BIT(1))
00393 #define HT_CAP_INFO_SMPS_MASK                   ((u16) (BIT(2) | BIT(3)))
00394 #define HT_CAP_INFO_SMPS_STATIC                 ((u16) 0)
00395 #define HT_CAP_INFO_SMPS_DYNAMIC                ((u16) BIT(2))
00396 #define HT_CAP_INFO_SMPS_DISABLED               ((u16) (BIT(2) | BIT(3)))
00397 #define HT_CAP_INFO_GREEN_FIELD                 ((u16) BIT(4))
00398 #define HT_CAP_INFO_SHORT_GI20MHZ               ((u16) BIT(5))
00399 #define HT_CAP_INFO_SHORT_GI40MHZ               ((u16) BIT(6))
00400 #define HT_CAP_INFO_TX_STBC                     ((u16) BIT(7))
00401 #define HT_CAP_INFO_RX_STBC_MASK                ((u16) (BIT(8) | BIT(9)))
00402 #define HT_CAP_INFO_RX_STBC_1                   ((u16) BIT(8))
00403 #define HT_CAP_INFO_RX_STBC_12                  ((u16) BIT(9))
00404 #define HT_CAP_INFO_RX_STBC_123                 ((u16) (BIT(8) | BIT(9)))
00405 #define HT_CAP_INFO_DELAYED_BA                  ((u16) BIT(10))
00406 #define HT_CAP_INFO_MAX_AMSDU_SIZE              ((u16) BIT(11))
00407 #define HT_CAP_INFO_DSSS_CCK40MHZ               ((u16) BIT(12))
00408 #define HT_CAP_INFO_PSMP_SUPP                   ((u16) BIT(13))
00409 #define HT_CAP_INFO_40MHZ_INTOLERANT            ((u16) BIT(14))
00410 #define HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT   ((u16) BIT(15))
00411 
00412 
00413 #define EXT_HT_CAP_INFO_PCO                     ((u16) BIT(0))
00414 #define EXT_HT_CAP_INFO_TRANS_TIME_OFFSET       1
00415 #define EXT_HT_CAP_INFO_MCS_FEEDBACK_OFFSET     8
00416 #define EXT_HT_CAP_INFO_HTC_SUPPORTED           ((u16) BIT(10))
00417 #define EXT_HT_CAP_INFO_RD_RESPONDER            ((u16) BIT(11))
00418 
00419 
00420 #define TX_BEAMFORM_CAP_TXBF_CAP ((u32) BIT(0))
00421 #define TX_BEAMFORM_CAP_RX_STAGGERED_SOUNDING_CAP ((u32) BIT(1))
00422 #define TX_BEAMFORM_CAP_TX_STAGGERED_SOUNDING_CAP ((u32) BIT(2))
00423 #define TX_BEAMFORM_CAP_RX_ZLF_CAP ((u32) BIT(3))
00424 #define TX_BEAMFORM_CAP_TX_ZLF_CAP ((u32) BIT(4))
00425 #define TX_BEAMFORM_CAP_IMPLICIT_ZLF_CAP ((u32) BIT(5))
00426 #define TX_BEAMFORM_CAP_CALIB_OFFSET 6
00427 #define TX_BEAMFORM_CAP_EXPLICIT_CSI_TXBF_CAP ((u32) BIT(8))
00428 #define TX_BEAMFORM_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_CAP ((u32) BIT(9))
00429 #define TX_BEAMFORM_CAP_EXPLICIT_BF_CSI_FEEDBACK_CAP ((u32) BIT(10))
00430 #define TX_BEAMFORM_CAP_EXPLICIT_BF_CSI_FEEDBACK_OFFSET 11
00431 #define TX_BEAMFORM_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_FEEDBACK_OFFSET 13
00432 #define TX_BEAMFORM_CAP_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBACK_OFFSET 15
00433 #define TX_BEAMFORM_CAP_MINIMAL_GROUPING_OFFSET 17
00434 #define TX_BEAMFORM_CAP_CSI_NUM_BEAMFORMER_ANT_OFFSET 19
00435 #define TX_BEAMFORM_CAP_UNCOMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 21
00436 #define TX_BEAMFORM_CAP_COMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 23
00437 #define TX_BEAMFORM_CAP_SCI_MAX_OF_ROWS_BEANFORMER_SUPPORTED_OFFSET 25
00438 
00439 
00440 #define ASEL_CAPABILITY_ASEL_CAPABLE ((u8) BIT(0))
00441 #define ASEL_CAPABILITY_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(1))
00442 #define ASEL_CAPABILITY_ANT_INDICES_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(2))
00443 #define ASEL_CAPABILITY_EXPLICIT_CSI_FEEDBACK_CAP ((u8) BIT(3))
00444 #define ASEL_CAPABILITY_ANT_INDICES_FEEDBACK_CAP ((u8) BIT(4))
00445 #define ASEL_CAPABILITY_RX_AS_CAP ((u8) BIT(5))
00446 #define ASEL_CAPABILITY_TX_SOUND_PPDUS_CAP ((u8) BIT(6))
00447 
00448 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK        ((u8) BIT(0) | BIT(1))
00449 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE           ((u8) BIT(0))
00450 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW           ((u8) BIT(0) | BIT(1))
00451 #define HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH           ((u8) BIT(2))
00452 #define HT_INFO_HT_PARAM_RIFS_MODE                      ((u8) BIT(3))
00453 #define HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY               ((u8) BIT(4))
00454 #define HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY       ((u8) BIT(5))
00455 
00456 
00457 #define OP_MODE_PURE                    0
00458 #define OP_MODE_MAY_BE_LEGACY_STAS      1
00459 #define OP_MODE_20MHZ_HT_STA_ASSOCED    2
00460 #define OP_MODE_MIXED                   3
00461 
00462 #define HT_INFO_OPERATION_MODE_OP_MODE_MASK     \
00463                 ((le16) (0x0001 | 0x0002))
00464 #define HT_INFO_OPERATION_MODE_OP_MODE_OFFSET           0
00465 #define HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT      ((u8) BIT(2))
00466 #define HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT     ((u8) BIT(3))
00467 #define HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT       ((u8) BIT(4))
00468 
00469 #define HT_INFO_STBC_PARAM_DUAL_BEACON                  ((u16) BIT(6))
00470 #define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT            ((u16) BIT(7))
00471 #define HT_INFO_STBC_PARAM_SECONDARY_BCN                ((u16) BIT(8))
00472 #define HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED    ((u16) BIT(9))
00473 #define HT_INFO_STBC_PARAM_PCO_ACTIVE                   ((u16) BIT(10))
00474 #define HT_INFO_STBC_PARAM_PCO_PHASE                    ((u16) BIT(11))
00475 
00476 
00477 #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
00478                                 * 00:50:F2 */
00479 #define WPA_IE_VENDOR_TYPE 0x0050f201
00480 #define WPS_IE_VENDOR_TYPE 0x0050f204
00481 
00482 #define WMM_OUI_TYPE 2
00483 #define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
00484 #define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
00485 #define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
00486 #define WMM_VERSION 1
00487 
00488 #define WMM_ACTION_CODE_ADDTS_REQ 0
00489 #define WMM_ACTION_CODE_ADDTS_RESP 1
00490 #define WMM_ACTION_CODE_DELTS 2
00491 
00492 #define WMM_ADDTS_STATUS_ADMISSION_ACCEPTED 0
00493 #define WMM_ADDTS_STATUS_INVALID_PARAMETERS 1
00494 /* 2 - Reserved */
00495 #define WMM_ADDTS_STATUS_REFUSED 3
00496 /* 4-255 - Reserved */
00497 
00498 /* WMM TSPEC Direction Field Values */
00499 #define WMM_TSPEC_DIRECTION_UPLINK 0
00500 #define WMM_TSPEC_DIRECTION_DOWNLINK 1
00501 /* 2 - Reserved */
00502 #define WMM_TSPEC_DIRECTION_BI_DIRECTIONAL 3
00503 
00504 /*
00505  * WMM Information Element (used in (Re)Association Request frames; may also be
00506  * used in Beacon frames)
00507  */
00508 struct wmm_information_element {
00509         /* Element ID: 221 (0xdd); Length: 7 */
00510         /* required fields for WMM version 1 */
00511         u8 oui[3]; /* 00:50:f2 */
00512         u8 oui_type; /* 2 */
00513         u8 oui_subtype; /* 0 */
00514         u8 version; /* 1 for WMM version 1.0 */
00515         u8 qos_info; /* AP/STA specific QoS info */
00516 
00517 } STRUCT_PACKED;
00518 
00519 #define WMM_AC_AIFSN_MASK 0x0f
00520 #define WMM_AC_AIFNS_SHIFT 0
00521 #define WMM_AC_ACM 0x10
00522 #define WMM_AC_ACI_MASK 0x60
00523 #define WMM_AC_ACI_SHIFT 5
00524 
00525 #define WMM_AC_ECWMIN_MASK 0x0f
00526 #define WMM_AC_ECWMIN_SHIFT 0
00527 #define WMM_AC_ECWMAX_MASK 0xf0
00528 #define WMM_AC_ECWMAX_SHIFT 4
00529 
00530 struct wmm_ac_parameter {
00531         u8 aci_aifsn; /* AIFSN, ACM, ACI */
00532         u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */
00533         le16 txop_limit;
00534 }  STRUCT_PACKED;
00535 
00536 /*
00537  * WMM Parameter Element (used in Beacon, Probe Response, and (Re)Association
00538  * Response frmaes)
00539  */
00540 struct wmm_parameter_element {
00541         /* Element ID: 221 (0xdd); Length: 24 */
00542         /* required fields for WMM version 1 */
00543         u8 oui[3]; /* 00:50:f2 */
00544         u8 oui_type; /* 2 */
00545         u8 oui_subtype; /* 1 */
00546         u8 version; /* 1 for WMM version 1.0 */
00547         u8 qos_info; /* AP/STA specif QoS info */
00548         u8 reserved; /* 0 */
00549         struct wmm_ac_parameter ac[4]; /* AC_BE, AC_BK, AC_VI, AC_VO */
00550 
00551 } STRUCT_PACKED;
00552 
00553 /* WMM TSPEC Element */
00554 struct wmm_tspec_element {
00555         u8 eid; /* 221 = 0xdd */
00556         u8 length; /* 6 + 55 = 61 */
00557         u8 oui[3]; /* 00:50:f2 */
00558         u8 oui_type; /* 2 */
00559         u8 oui_subtype; /* 2 */
00560         u8 version; /* 1 */
00561         /* WMM TSPEC body (55 octets): */
00562         u8 ts_info[3];
00563         le16 nominal_msdu_size;
00564         le16 maximum_msdu_size;
00565         le32 minimum_service_interval;
00566         le32 maximum_service_interval;
00567         le32 inactivity_interval;
00568         le32 suspension_interval;
00569         le32 service_start_time;
00570         le32 minimum_data_rate;
00571         le32 mean_data_rate;
00572         le32 peak_data_rate;
00573         le32 maximum_burst_size;
00574         le32 delay_bound;
00575         le32 minimum_phy_rate;
00576         le16 surplus_bandwidth_allowance;
00577         le16 medium_time;
00578 } STRUCT_PACKED;
00579 
00580 
00581 /* Access Categories / ACI to AC coding */
00582 enum {
00583         WMM_AC_BE = 0 /* Best Effort */,
00584         WMM_AC_BK = 1 /* Background */,
00585         WMM_AC_VI = 2 /* Video */,
00586         WMM_AC_VO = 3 /* Voice */
00587 };
00588 
00589 
00590 #define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
00591 
00592 #define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */
00593 
00594 /* cipher suite selectors */
00595 #define WLAN_CIPHER_SUITE_USE_GROUP     0x000FAC00
00596 #define WLAN_CIPHER_SUITE_WEP40         0x000FAC01
00597 #define WLAN_CIPHER_SUITE_TKIP          0x000FAC02
00598 /* reserved:                            0x000FAC03 */
00599 #define WLAN_CIPHER_SUITE_CCMP          0x000FAC04
00600 #define WLAN_CIPHER_SUITE_WEP104        0x000FAC05
00601 #define WLAN_CIPHER_SUITE_AES_CMAC      0x000FAC06
00602 
00603 /* AKM suite selectors */
00604 #define WLAN_AKM_SUITE_8021X            0x000FAC01
00605 #define WLAN_AKM_SUITE_PSK              0x000FAC02
00606 
00607 #endif /* IEEE802_11_DEFS_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:38