- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# /space/home/slher/rel/Beken/v6_4_5/macsw/modules/mac/src/mac_frame.h

Go to the documentation of this file.

    00001
    00013 #ifndef _MAC_FRAME_H_
    00014 #define _MAC_FRAME_H_
    00015
    00025 /*
    00026  * INCLUDE FILES
    00027  ****************************************************************************************
    00028  */
    00029 // for the CO_BIT macro
    00030 #include "co_math.h"
    00031 #include "mac.h"
    00032 #include "rwnx_config.h"
    00033
    00039
    00040 #define MIC_HDR_LEN     (16)
    00042 #define IV_LEN          (4)
    00044 #define EIV_LEN         (4)
    00046 #define MIC_LEN         (8)
    00048 #define ICV_LEN         (4)
    00049 // WPI IV length
    00050 #define WPI_IV_LEN      (18)
    00051 // WPI MIC length
    00052 #define WPI_MIC_LEN     (16)
    00054 #define MAC_FCS_LEN     4
    00055
    00062
    00063 #define MAC_LONG_QOS_HTC_MAC_HDR_LEN   36
    00065 #define MAC_LONG_QOS_MAC_HDR_LEN       32
    00067 #define MAC_LONG_MAC_HDR_LEN           30
    00069 #define MAC_SHORT_QOS_HTC_MAC_HDR_LEN  30
    00071 #define MAC_SHORT_QOS_MAC_HDR_LEN      26
    00073 #define MAC_SHORT_MAC_HDR_LEN          24
    00074
    00076 #define MAC_HDR_QOS_CTRL_LEN           2
    00077
    00079 #define MAC_HDR_LEN_MAX                MAC_LONG_QOS_HTC_MAC_HDR_LEN
    00080
    00082 #define MAC_LONG_CTRLFRAME_LEN         16
    00084 #define MAC_SHORT_CTRLFRAME_LEN        10
    00085
    00093
    00094 #define MAC_HEAD_FCTRL_OFT              0
    00095 #define MAC_HEAD_DURATION_OFT           2
    00096 #define MAC_HEAD_DURATION_CFP      0x8000
    00097 #define MAC_HEAD_ADDR1_OFT              4
    00098 #define MAC_HEAD_ADDR2_OFT             10
    00099 #define MAC_HEAD_ADDR3_OFT             16
    00100 #define MAC_HEAD_CTRL_OFT              22
    00101 #define MAC_HEAD_ADDR4_OFT             24
    00102 #define MAC_HEAD_SHORT_QOS_OFT         24
    00103 #define MAC_HEAD_LONG_QOS_OFT          30
    00104 #define MAC_ORIGINAL_ETHTYPE_OFT       36
    00105
    00114 /* The type information in the header of a frame consists of the Type and Subtype fields
    00115  * When using the term "frame type" in the code, we refer to the type field and not to
    00116  * the combined type+subtype information.
    00117  */
    00119 #define MAC_FCTRL_LEN                   2
    00120
    00121 #define MAC_FCTRL_PROTOCOLVERSION_MASK  0x0003
    00122 #define MAC_FCTRL_TYPE_MASK             0x000C
    00123 #define MAC_FCTRL_SUBT_MASK             0x00F0
    00124 #define MAC_FCTRL_TODS                  0x0100
    00125 #define MAC_FCTRL_FROMDS                0x0200
    00126 #define MAC_FCTRL_MOREFRAG              0x0400
    00127 #define MAC_FCTRL_RETRY                 0x0800
    00128 #define MAC_FCTRL_PWRMGT                0x1000
    00129 #define MAC_FCTRL_MOREDATA              0x2000
    00130 #define MAC_FCTRL_PROTECTEDFRAME        0x4000
    00131 #define MAC_FCTRL_ORDER                 0x8000
    00132
    00133 #define MAC_FCTRL_TODS_FROMDS          (MAC_FCTRL_TODS | MAC_FCTRL_FROMDS)
    00134
    00141
    00142 #define MAC_FCTRL_MGT_T                 0x0000
    00143 #define MAC_FCTRL_CTRL_T                0x0004
    00144 #define MAC_FCTRL_DATA_T                0x0008
    00145
    00152
    00153 // Management SubType
    00154 #define MAC_FCTRL_ASSOCREQ_ST           0x0000
    00155 #define MAC_FCTRL_ASSOCRSP_ST           0x0010
    00156 #define MAC_FCTRL_REASSOCREQ_ST         0x0020
    00157 #define MAC_FCTRL_REASSOCRSP_ST         0x0030
    00158 #define MAC_FCTRL_PROBEREQ_ST           0x0040
    00159 #define MAC_FCTRL_PROBERSP_ST           0x0050
    00160 #define MAC_FCTRL_BEACON_ST             0x0080
    00161 #define MAC_FCTRL_ATIM_ST               0x0090
    00162 #define MAC_FCTRL_DISASSOC_ST           0x00A0
    00163 #define MAC_FCTRL_AUTHENT_ST            0x00B0
    00164 #define MAC_FCTRL_DEAUTHENT_ST          0x00C0
    00165 #define MAC_FCTRL_ACTION_ST             0x00D0
    00166 #define MAC_FCTRL_ACTION_NO_ACK_ST      0x00E0
    00167 // Control SubTypes
    00168 #define MAC_FCTRL_HE_TRIGGER_ST         0x0020
    00169 #define MAC_FCTRL_BFM_REPORT_POLL_ST    0x0040
    00170 #define MAC_FCTRL_VHT_NDPA_ST           0x0050
    00171 #define MAC_FCTRL_CTRL_WRAPPER_ST       0x0070
    00172 #define MAC_FCTRL_BAR_ST                0x0080
    00173 #define MAC_FCTRL_BA_ST                 0x0090
    00174 #define MAC_FCTRL_PSPOLL_ST             0x00A0
    00175 #define MAC_FCTRL_RTS_ST                0x00B0
    00176 #define MAC_FCTRL_CTS_ST                0x00C0
    00177 #define MAC_FCTRL_ACK_ST                0x00D0
    00178 #define MAC_FCTRL_CFEND_ST              0x00E0
    00179 #define MAC_FCTRL_CFEND_CFACK_ST        0x00F0
    00180
    00181 // Data SubTypes
    00182 /* Decoding the subtypes of data type frames can take advantage of the fact that
    00183  * each subtype field bit position is used to indicate a specific modification of
    00184  * the basic data frame (subtype 0). Frame control bit 4 is set to 1 in data
    00185  * subtypes which include +CF-Ack, bit 5 is set to 1 in data subtypes which include
    00186  * +CF-Poll, bit 6 is set to 1 in data subtypes that contain no Frame Body,
    00187  * and bit 7 is set to 1 in the QoS data subtypes, which have QoS Control fields in
    00188  * their MAC headers.
    00189  *
    00190  * Usage: check FrameT and FrameSubT individually. If the FrameT is MAC_FCTRL_DATA_T,
    00191  * check the following bits of the FrameSubT
    00192  */
    00193 #define MAC_CFACK_ST_BIT                CO_BIT(4)
    00194 #define MAC_CFPOLL_ST_BIT               CO_BIT(5)
    00195 #define MAC_NODATA_ST_BIT               CO_BIT(6)
    00196 #define MAC_QOS_ST_BIT                  CO_BIT(7)
    00197 #define MAC_FCTRL_DATACFACKPOLL_ST      (MAC_CFACK_ST_BIT | MAC_CFPOLL_ST_BIT)
    00198
    00205
    00206 #define MAC_FCTRL_TYPESUBTYPE_MASK      (MAC_FCTRL_TYPE_MASK | MAC_FCTRL_SUBT_MASK)
    00207 #define MAC_FCTRL_ASSOCREQ              (MAC_FCTRL_MGT_T     | MAC_FCTRL_ASSOCREQ_ST)
    00208 #define MAC_FCTRL_ASSOCRSP              (MAC_FCTRL_MGT_T     | MAC_FCTRL_ASSOCRSP_ST)
    00209 #define MAC_FCTRL_REASSOCREQ            (MAC_FCTRL_MGT_T     | MAC_FCTRL_REASSOCREQ_ST)
    00210 #define MAC_FCTRL_REASSOCRSP            (MAC_FCTRL_MGT_T     | MAC_FCTRL_REASSOCRSP_ST)
    00211 #define MAC_FCTRL_PROBEREQ              (MAC_FCTRL_MGT_T     | MAC_FCTRL_PROBEREQ_ST)
    00212 #define MAC_FCTRL_PROBERSP              (MAC_FCTRL_MGT_T     | MAC_FCTRL_PROBERSP_ST)
    00213 #define MAC_FCTRL_BEACON                (MAC_FCTRL_MGT_T     | MAC_FCTRL_BEACON_ST)
    00214 #define MAC_FCTRL_ATIM                  (MAC_FCTRL_MGT_T     | MAC_FCTRL_ATIM_ST)
    00215 #define MAC_FCTRL_DISASSOC              (MAC_FCTRL_MGT_T     | MAC_FCTRL_DISASSOC_ST)
    00216 #define MAC_FCTRL_AUTHENT               (MAC_FCTRL_MGT_T     | MAC_FCTRL_AUTHENT_ST)
    00217 #define MAC_FCTRL_DEAUTHENT             (MAC_FCTRL_MGT_T     | MAC_FCTRL_DEAUTHENT_ST)
    00218 #define MAC_FCTRL_ACTION                (MAC_FCTRL_MGT_T     | MAC_FCTRL_ACTION_ST)
    00219 #define MAC_FCTRL_ACTION_NO_ACK         (MAC_FCTRL_MGT_T     | MAC_FCTRL_ACTION_NO_ACK_ST)
    00220 #define MAC_FCTRL_BFM_REPORT_POLL       (MAC_FCTRL_CTRL_T    | MAC_FCTRL_BFM_REPORT_POLL_ST)
    00221 #define MAC_FCTRL_HE_TRIGGER            (MAC_FCTRL_CTRL_T    | MAC_FCTRL_HE_TRIGGER_ST)
    00222 #define MAC_FCTRL_VHT_NDPA              (MAC_FCTRL_CTRL_T    | MAC_FCTRL_VHT_NDPA_ST)
    00223 #define MAC_FCTRL_BA                    (MAC_FCTRL_CTRL_T    | MAC_FCTRL_BA_ST)
    00224 #define MAC_FCTRL_BAR                   (MAC_FCTRL_CTRL_T    | MAC_FCTRL_BAR_ST)
    00225 #define MAC_FCTRL_PSPOLL                (MAC_FCTRL_CTRL_T    | MAC_FCTRL_PSPOLL_ST)
    00226 #define MAC_FCTRL_RTS                   (MAC_FCTRL_CTRL_T    | MAC_FCTRL_RTS_ST)
    00227 #define MAC_FCTRL_CTS                   (MAC_FCTRL_CTRL_T    | MAC_FCTRL_CTS_ST)
    00228 #define MAC_FCTRL_ACK                   (MAC_FCTRL_CTRL_T    | MAC_FCTRL_ACK_ST)
    00229 #define MAC_FCTRL_CFEND                 (MAC_FCTRL_CTRL_T    | MAC_FCTRL_CFEND_ST)
    00230 #define MAC_FCTRL_CFEND_CFACK           (MAC_FCTRL_CFEND     | MAC_CFACK_ST_BIT)
    00231 #define MAC_FCTRL_DATA_CFACK            (MAC_FCTRL_DATA_T    | MAC_CFACK_ST_BIT)
    00232 #define MAC_FCTRL_DATA_CFPOLL           (MAC_FCTRL_DATA_T    | MAC_CFPOLL_ST_BIT)
    00233 #define MAC_FCTRL_DATA_CFACKPOLL        (MAC_FCTRL_DATA_T    | MAC_FCTRL_DATACFACKPOLL_ST)
    00234 #define MAC_FCTRL_NULL_FUNCTION         (MAC_FCTRL_DATA_T    | MAC_NODATA_ST_BIT)
    00235 #define MAC_FCTRL_NULL_CFACK            (MAC_FCTRL_NULL_FUNCTION  | MAC_CFACK_ST_BIT)
    00236 #define MAC_FCTRL_NULL_CFPOLL           (MAC_FCTRL_NULL_FUNCTION  | MAC_CFPOLL_ST_BIT)
    00237 #define MAC_FCTRL_NULL_CFACKPOLL        (MAC_FCTRL_NULL_FUNCTION  | MAC_FCTRL_DATACFACKPOLL_ST)
    00238 #define MAC_FCTRL_QOS_DATA              (MAC_FCTRL_DATA_T    | MAC_QOS_ST_BIT)
    00239 #define MAC_FCTRL_QOS_DATA_CFACK        (MAC_FCTRL_QOS_DATA  | MAC_CFACK_ST_BIT)
    00240 #define MAC_FCTRL_QOS_DATA_CFPOLL       (MAC_FCTRL_QOS_DATA  | MAC_CFPOLL_ST_BIT)
    00241 #define MAC_FCTRL_QOS_DATA_CFACKPOLL    (MAC_FCTRL_QOS_DATA  | MAC_FCTRL_DATACFACKPOLL_ST)
    00242 #define MAC_FCTRL_QOS_NULL              (MAC_FCTRL_QOS_DATA  | MAC_NODATA_ST_BIT)
    00243 #define MAC_FCTRL_QOS_NULL_CFACK        (MAC_FCTRL_QOS_DATA  | MAC_FCTRL_NULL_CFACK)
    00244 #define MAC_FCTRL_QOS_NULL_CFPOLL       (MAC_FCTRL_QOS_DATA  | MAC_FCTRL_NULL_CFPOLL)
    00245 #define MAC_FCTRL_QOS_NULL_CFACKPOLL    (MAC_FCTRL_QOS_DATA  | MAC_FCTRL_NULL_CFACKPOLL)
    00246
    00247 #define MAC_FCTRL_IS(fc, type) (((fc) & MAC_FCTRL_TYPESUBTYPE_MASK) == MAC_FCTRL_##type)
    00248 #define MAC_FCTRL_SUBTYPE(fc) (((fc) & MAC_FCTRL_SUBT_MASK) >> 4)
    00249
    00252 /*
    00253  * FIELD DESCRIPTION
    00254  ****************************************************************************************
    00255  */
    00261
    00262 #define MAC_DURATION_LEN                2
    00263
    00265 #define MAC_AID_MSK                     0x3FFF
    00266
    00273
    00274 #define MAC_SEQCTRL_LEN                 2
    00275 #define MAC_SEQCTRL_NUM_OFT             4
    00276 #define MAC_SEQCTRL_NUM_MSK             0xFFF0
    00277 #define MAC_SEQCTRL_NUM_MAX             (MAC_SEQCTRL_NUM_MSK >> MAC_SEQCTRL_NUM_OFT)
    00278 #define MAC_SEQCTRL_FRAG_OFT            0
    00279 #define MAC_SEQCTRL_FRAG_MSK            0x000F
    00280
    00287
    00288 #define MAC_HDR_TSC_LEN          6
    00289 #define MAC_TKIP_TSC1_OFT        0
    00290 #define MAC_TKIP_TSC0_OFT        2
    00291 #define MAC_TKIP_KEYID_OFT       3
    00292 #define MAC_CCMP_PN0_OFT         0
    00293 #define MAC_CCMP_PN1_OFT         1
    00294 #define MAC_CCMP_RSV_OFT         2
    00295 #define MAC_CCMP_PN2BIT_OFT      8
    00296 #define MAC_IV_EXTIV             0x20000000
    00297
    00304
    00305 #define MAC_QOSCTRL_LEN                 2
    00306 #define MAC_QOSCTRL_UP_OFT              0
    00307 #define MAC_QOSCTRL_UP_MSK              0x0007
    00308 #define MAC_QOSCTRL_EOSP_OFT            4
    00309 #define MAC_QOSCTRL_EOSP                0x10
    00310 #define MAC_QOSCTRL_QUEUE_SIZE_PRESENT  0x10
    00311 #define MAC_QOSCTRL_QUEUE_SIZE_OFT      8
    00312 #define MAC_QOSCTRL_QUEUE_SIZE_UNKNOWN  (0xFF << MAC_QOSCTRL_QUEUE_SIZE_OFT)
    00313 #define MAC_QOSCTRL_HE_QUEUE_SIZE       (MAC_QOSCTRL_QUEUE_SIZE_PRESENT |                \
    00314                                          MAC_QOSCTRL_QUEUE_SIZE_UNKNOWN)
    00315 #define MAC_QOSCTRL_ACK_OFT             5
    00316 #define MAC_QOSCTRL_ACK_NORMAL          0x0000
    00317 #define MAC_QOSCTRL_ACK_NOACK           0x0020
    00318 #define MAC_QOSCTRL_ACK_NOEXPL          0x0040
    00319 #define MAC_QOSCTRL_ACK_BLOCK           0x0060
    00320 #define MAC_QOSCTRL_AMSDU_OFT           7
    00321 #define MAC_QOSCTRL_AMSDU_PRESENT       CO_BIT(7)
    00322 #define MAC_QOSCTRL_MESH_CTRL_PRESENT   CO_BIT(8)
    00323 #define MAC_QOSCTRL_MESH_POWER_SAVE_LVL CO_BIT(9)
    00324 #define MAC_QOSCTRL_MESH_RSPI           CO_BIT(10)
    00325
    00333
    00334 #define MAC_HTC_LEN                     4
    00335 #define MAC_HTC_TYPE_OFT                0
    00336 #define MAC_HTC_TYPE_HT_MSK             (0x01 << MAC_HTC_TYPE_OFT)
    00337 #define MAC_HTC_TYPE_HT                 (0x00 << MAC_HTC_TYPE_OFT)
    00338 #define MAC_HTC_TYPE_VHT_HE_MSK         (0x03 << MAC_HTC_TYPE_OFT)
    00339 #define MAC_HTC_TYPE_VHT                (0x01 << MAC_HTC_TYPE_OFT)
    00340 #define MAC_HTC_TYPE_HE                 (0x03 << MAC_HTC_TYPE_OFT)
    00341 #define MAC_HTC_HE_A_CONTROL_OFT        2
    00342 #define MAC_HTC_HE_A_CONTROL_MSK        (0x3FFFFFFF << MAC_HTC_HE_A_CONTROL_OFT)
    00343
    00352
    00353 #define MAC_HTC_HE_CTRL_ID_OFT          0
    00354 #define MAC_HTC_HE_CTRL_ID_MSK          (0x0F << MAC_HTC_HE_CTRL_ID_OFT)
    00355 #define MAC_HTC_HE_CTRL_ID_TRS          (0x00 << MAC_HTC_HE_CTRL_ID_OFT)
    00356 #define MAC_HTC_HE_CTRL_ID_OM           (0x01 << MAC_HTC_HE_CTRL_ID_OFT)
    00357 #define MAC_HTC_HE_CTRL_ID_HLA          (0x02 << MAC_HTC_HE_CTRL_ID_OFT)
    00358 #define MAC_HTC_HE_CTRL_ID_BSR          (0x03 << MAC_HTC_HE_CTRL_ID_OFT)
    00359 #define MAC_HTC_HE_CTRL_ID_UPH          (0x04 << MAC_HTC_HE_CTRL_ID_OFT)
    00360 #define MAC_HTC_HE_CTRL_ID_BQR          (0x05 << MAC_HTC_HE_CTRL_ID_OFT)
    00361 #define MAC_HTC_HE_CTRL_ID_CAS          (0x06 << MAC_HTC_HE_CTRL_ID_OFT)
    00362 #define MAC_HTC_HE_CTRL_ID_ONES         (0x0F << MAC_HTC_HE_CTRL_ID_OFT)
    00363 #define MAC_HTC_HE_CTRL_INFO_OFT        4
    00364 #define MAC_HTC_HE_CTRL_INFO_MSK        (0x0F << MAC_HTC_HE_CTRL_ID_OFT)
    00365 #define MAC_HTC_HE_BSR_ACI_BMP_OFT      MAC_HTC_HE_CTRL_INFO_OFT
    00366 #define MAC_HTC_HE_BSR_ACI_BMP_MSK      (0x0F << MAC_HTC_HE_BSR_ACI_BMP_OFT)
    00367 #define MAC_HTC_HE_BSR_DELTA_TID_OFT    (MAC_HTC_HE_CTRL_INFO_OFT + 4)
    00368 #define MAC_HTC_HE_BSR_DELTA_TID_MSK    (0x03 << MAC_HTC_HE_BSR_DELTA_TID_OFT)
    00369 #define MAC_HTC_HE_BSR_ACI_HIGH_OFT     (MAC_HTC_HE_CTRL_INFO_OFT + 6)
    00370 #define MAC_HTC_HE_BSR_ACI_HIGH_MSK     (0x03 << MAC_HTC_HE_BSR_ACI_HIGH_OFT)
    00371 #define MAC_HTC_HE_BSR_SCALING_FAC_OFT  (MAC_HTC_HE_CTRL_INFO_OFT + 8)
    00372 #define MAC_HTC_HE_BSR_SCALING_FAC_MSK  (0x03 << MAC_HTC_HE_BSR_SCALING_FAC_OFT)
    00373 #define MAC_HTC_HE_BSR_QSIZE_HIGH_OFT   (MAC_HTC_HE_CTRL_INFO_OFT + 10)
    00374 #define MAC_HTC_HE_BSR_QSIZE_HIGH_MSK   (0xFF << MAC_HTC_HE_BSR_QSIZE_HIGH_OFT)
    00375 #define MAC_HTC_HE_BSR_QSIZE_ALL_OFT    (MAC_HTC_HE_CTRL_INFO_OFT + 18)
    00376 #define MAC_HTC_HE_BSR_QSIZE_ALL_MSK    (0xFF << MAC_HTC_HE_BSR_QSIZE_ALL_OFT)
    00377
    00398 #define MAC_HTC_HE_CTRL(id, info) (MAC_HTC_HE_CTRL_ID_##id | ((info) << MAC_HTC_HE_CTRL_INFO_OFT))
    00399
    00411 #define MAC_HTC_HE(a_control) (MAC_HTC_TYPE_HE | ((a_control) << MAC_HTC_HE_A_CONTROL_OFT))
    00412
    00420
    00421 // CAPABILITY INFORMATION FIELD
    00422 #define MAC_CAPA_ESS                    CO_BIT(0)
    00423 #define MAC_CAPA_IBSS                   CO_BIT(1)
    00424 #define MAC_CAPA_CFPOLL                 CO_BIT(2)
    00425 #define MAC_CAPA_CFREQ                  CO_BIT(3)
    00426 #define MAC_CAPA_PRIVA                  CO_BIT(4)
    00427 #define MAC_CAPA_SHORT_PREAMBLE         CO_BIT(5)
    00428 #define MAC_CAPA_PBCB                   CO_BIT(6)
    00429 #define MAC_CAPA_AGILITY                CO_BIT(7)
    00430 #define MAC_CAPA_SPECTRUM               CO_BIT(8)
    00431 #define MAC_CAPA_QOS                    CO_BIT(9)
    00432 #define MAC_CAPA_SHORT_SLOT             CO_BIT(10)
    00433 //#define MAC_CAPA_ROBUST_SECURITY       CO_BIT(11)
    00434 #define MAC_CAPA_APSD                   CO_BIT(11)
    00435 #define MAC_CAPA_DSSS_OFDM              CO_BIT(13)
    00436 #define MAC_CAPA_DELAYED_BA             CO_BIT(14)
    00437 #define MAC_CAPA_IMMEDIATE_BA           CO_BIT(15)
    00438 #define MAC_CAPA_BA_POLICY              (MAC_CAPA_DELAYED_BA | MAC_CAPA_IMMEDIATE_BA)
    00439
    00446
    00447 #define MAC_HTCAPA_LDPC                 CO_BIT(0)
    00448 #define MAC_HTCAPA_40_MHZ               CO_BIT(1)
    00449 #define MAC_HTCAPA_SMPS_OFT             2
    00450 #define MAC_HTCAPA_SMPS_MSK             (0x03 << MAC_HTCAPA_SMPS_OFT)
    00451 #define MAC_HTCAPA_SMPS_STATIC          (0x00 << MAC_HTCAPA_SMPS_OFT)
    00452 #define MAC_HTCAPA_SMPS_DYNAMIC         (0x01 << MAC_HTCAPA_SMPS_OFT)
    00453 #define MAC_HTCAPA_SMPS_DISABLE         (0x03 << MAC_HTCAPA_SMPS_OFT)
    00454 #define MAC_HTCAPA_GREEN_FIELD          CO_BIT(4)
    00455 #define MAC_HTCAPA_SHORTGI_20           CO_BIT(5)
    00456 #define MAC_HTCAPA_SHORTGI_40           CO_BIT(6)
    00457 #define MAC_HTCAPA_TX_STBC              CO_BIT(7)
    00458 #define MAC_HTCAPA_RX_STBC_OFT          8
    00459 #define MAC_HTCAPA_RX_STBC_MSK          (0x03 << MAC_HTCAPA_RX_STBC_OFT)
    00460 #define MAC_HTCAPA_AMSDU                CO_BIT(11)
    00461 #define MAC_HTCAPA_DSSS_CCK_40          CO_BIT(12)
    00462 #define MAC_HTCAPA_40_INTOLERANT        CO_BIT(14)
    00463 #define MAC_HTCAPA_LSIG                 CO_BIT(15)
    00464
    00465 #define MAC_AMPDU_LEN_EXP_OFT           0
    00466 #define MAC_AMPDU_LEN_EXP_MSK           (0x03 << MAC_AMPDU_LEN_EXP_OFT)
    00467 #define MAC_AMPDU_MIN_SPACING_OFT       2
    00468 #define MAC_AMPDU_MIN_SPACING_MSK       (0x07 << MAC_AMPDU_MIN_SPACING_OFT)
    00469
    00470 #define MAC_HT_MAX_AMPDU_FACTOR         13
    00471
    00472 #define MAC_HTXCAPA_MFB_UNSOLICIT       CO_BIT(9)
    00473
    00481
    00482 #define MAC_VHTCAPA_MAX_MPDU_LENGTH_OFT        0
    00483 #define MAC_VHTCAPA_MAX_MPDU_LENGTH_MSK        (0x03 << MAC_VHTCAPA_MAX_MPDU_LENGTH_OFT)
    00484 #define MAC_VHTCAPA_MAX_MPDU_LENGTH_3895       (0x00 << MAC_VHTCAPA_MAX_MPDU_LENGTH_OFT)
    00485 #define MAC_VHTCAPA_MAX_MPDU_LENGTH_7991       (0x01 << MAC_VHTCAPA_MAX_MPDU_LENGTH_OFT)
    00486 #define MAC_VHTCAPA_MAX_MPDU_LENGTH_11454      (0x02 << MAC_VHTCAPA_MAX_MPDU_LENGTH_OFT)
    00487 #define MAC_VHTCAPA_SUPP_CHAN_WIDTH_OFT        2
    00488 #define MAC_VHTCAPA_SUPP_CHAN_WIDTH_MSK        (0x03 << MAC_VHTCAPA_SUPP_CHAN_WIDTH_OFT)
    00489 #define MAC_VHTCAPA_SUPP_CHAN_WIDTH_80         (0x00 << MAC_VHTCAPA_SUPP_CHAN_WIDTH_OFT)
    00490 #define MAC_VHTCAPA_SUPP_CHAN_WIDTH_160        (0x01 << MAC_VHTCAPA_SUPP_CHAN_WIDTH_OFT)
    00491 #define MAC_VHTCAPA_SUPP_CHAN_WIDTH_160_80P80  (0x02 << MAC_VHTCAPA_SUPP_CHAN_WIDTH_OFT)
    00492 #define MAC_VHTCAPA_RXLDPC                     CO_BIT(4)
    00493 #define MAC_VHTCAPA_SHORT_GI_80                CO_BIT(5)
    00494 #define MAC_VHTCAPA_SHORT_GI_160               CO_BIT(6)
    00495 #define MAC_VHTCAPA_TXSTBC                     CO_BIT(7)
    00496 #define MAC_VHTCAPA_RXSTBC_OFT                 8
    00497 #define MAC_VHTCAPA_RXSTBC_MSK                 (0x07 << MAC_VHTCAPA_RXSTBC_OFT)
    00498 #define MAC_VHTCAPA_RXSTBC_1                   (0x01 << MAC_VHTCAPA_RXSTBC_OFT)
    00499 #define MAC_VHTCAPA_RXSTBC_2                   (0x02 << MAC_VHTCAPA_RXSTBC_OFT)
    00500 #define MAC_VHTCAPA_RXSTBC_3                   (0x03 << MAC_VHTCAPA_RXSTBC_OFT)
    00501 #define MAC_VHTCAPA_RXSTBC_4                   (0x04 << MAC_VHTCAPA_RXSTBC_OFT)
    00502 #define MAC_VHTCAPA_SU_BEAMFORMER_CAPABLE      CO_BIT(11)
    00503 #define MAC_VHTCAPA_SU_BEAMFORMEE_CAPABLE      CO_BIT(12)
    00504 #define MAC_VHTCAPA_BEAMFORMEE_STS_OFT         13
    00505 #define MAC_VHTCAPA_BEAMFORMEE_STS_MSK         (0x07 << MAC_VHTCAPA_BEAMFORMEE_STS_OFT)
    00506 #define MAC_VHTCAPA_SOUNDING_DIMENSIONS_OFT    16
    00507 #define MAC_VHTCAPA_SOUNDING_DIMENSIONS_MSK    (0x07 << MAC_VHTCAPA_SOUNDING_DIMENSIONS_OFT)
    00508 #define MAC_VHTCAPA_MU_BEAMFORMER_CAPABLE      CO_BIT(19)
    00509 #define MAC_VHTCAPA_MU_BEAMFORMEE_CAPABLE      CO_BIT(20)
    00510 #define MAC_VHTCAPA_VHT_TXOP_PS                CO_BIT(21)
    00511 #define MAC_VHTCAPA_HTC_VHT                    CO_BIT(22)
    00512 #define MAC_VHTCAPA_MAX_A_MPDU_LENGTH_EXP_OFT  23
    00513 #define MAC_VHTCAPA_MAX_A_MPDU_LENGTH_EXP_MSK  (0x07 << MAC_VHTCAPA_MAX_A_MPDU_LENGTH_EXP_OFT)
    00514 #define MAC_VHTCAPA_VHT_LA_VHT_UNSOL_MFB       0x08000000
    00515 #define MAC_VHTCAPA_VHT_LA_VHT_MRQ_MFB         0x0c000000
    00516 #define MAC_VHTCAPA_RX_ANTENNA_PATTERN         CO_BIT(28)
    00517 #define MAC_VHTCAPA_TX_ANTENNA_PATTERN         CO_BIT(29)
    00518
    00519 #define MAC_VHT_MCS_MAP_MSK                    0x03
    00520 #define MAC_VHT_MCS_MAP_0_7                    0x00
    00521 #define MAC_VHT_MCS_MAP_0_8                    0x01
    00522 #define MAC_VHT_MCS_MAP_0_9                    0x02
    00523 #define MAC_VHT_MCS_MAP_NONE                   0x03
    00524
    00531
    00532 #define HE_MAC_CAPA_HTC_HE_POS                             0
    00533 #define HE_MAC_CAPA_TWT_REQ_POS                            1
    00534 #define HE_MAC_CAPA_TWT_RES_POS                            2
    00535
    00536 #define HE_MAC_CAPA_DYNAMIC_FRAG_OFT                       3
    00537 #define HE_MAC_CAPA_DYNAMIC_FRAG_WIDTH                     2
    00538 #define HE_MAC_CAPA_DYNAMIC_FRAG_NOT_SUPP                         0x00
    00539 #define HE_MAC_CAPA_DYNAMIC_FRAG_LEVEL_1                          0x01
    00540 #define HE_MAC_CAPA_DYNAMIC_FRAG_LEVEL_2                          0x02
    00541 #define HE_MAC_CAPA_DYNAMIC_FRAG_LEVEL_3                          0x03
    00542
    00543 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_OFT                  5
    00544 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_WIDTH                3
    00545 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_1                           0x00
    00546 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_2                           0x01
    00547 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_4                           0x02
    00548 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_8                           0x03
    00549 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_16                          0x04
    00550 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_32                          0x05
    00551 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_64                          0x06
    00552 #define HE_MAC_CAPA_MAX_NUM_FRAG_MSDU_UNLIMITED                   0x07
    00553
    00554 #define HE_MAC_CAPA_MIN_FRAG_SIZE_OFT                      8
    00555 #define HE_MAC_CAPA_MIN_FRAG_SIZE_WIDTH                    2
    00556 #define HE_MAC_CAPA_MIN_FRAG_SIZE_UNLIMITED                       0x00
    00557 #define HE_MAC_CAPA_MIN_FRAG_SIZE_128                             0x01
    00558 #define HE_MAC_CAPA_MIN_FRAG_SIZE_256                             0x02
    00559 #define HE_MAC_CAPA_MIN_FRAG_SIZE_512                             0x03
    00560
    00561 #define HE_MAC_CAPA_TF_MAC_PAD_DUR_OFT                     10
    00562 #define HE_MAC_CAPA_TF_MAC_PAD_DUR_WIDTH                   2
    00563 #define HE_MAC_CAPA_TF_MAC_PAD_DUR_0US                            0x00
    00564 #define HE_MAC_CAPA_TF_MAC_PAD_DUR_8US                            0x01
    00565 #define HE_MAC_CAPA_TF_MAC_PAD_DUR_16US                           0x02
    00566
    00567 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_OFT                   12
    00568 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_WIDTH                 3
    00569 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_1                            0x00
    00570 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_2                            0x01
    00571 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_3                            0x02
    00572 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_4                            0x03
    00573 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_5                            0x04
    00574 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_6                            0x05
    00575 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_7                            0x06
    00576 #define HE_MAC_CAPA_MULTI_TID_AGG_RX_8                            0x07
    00577
    00578 #define HE_MAC_CAPA_LINK_ADAPTATION_OFT                    15
    00579 #define HE_MAC_CAPA_LINK_ADAPTATION_WIDTH                  2
    00580 #define HE_MAC_CAPA_LINK_ADAPTATION_NONE                          0x00
    00581 #define HE_MAC_CAPA_LINK_ADAPTATION_RSVD                          0x01
    00582 #define HE_MAC_CAPA_LINK_ADAPTATION_UNSOL                         0x02
    00583 #define HE_MAC_CAPA_LINK_ADAPTATION_BOTH                          0x03
    00584
    00585 #define HE_MAC_CAPA_ALL_ACK_POS                            17
    00586 #define HE_MAC_CAPA_TSR_POS                                18
    00587 #define HE_MAC_CAPA_BSR_POS                                19
    00588 #define HE_MAC_CAPA_BCAST_TWT_POS                          20
    00589 #define HE_MAC_CAPA_32BIT_BA_BITMAP_POS                    21
    00590 #define HE_MAC_CAPA_MU_CASCADING_POS                       22
    00591 #define HE_MAC_CAPA_ACK_EN_POS                             23
    00592 #define HE_MAC_CAPA_OM_CONTROL_POS                         25
    00593 #define HE_MAC_CAPA_OFDMA_RA_POS                           26
    00594
    00595 #define HE_MAC_CAPA_MAX_A_AMPDU_LEN_EXP_OFT                27
    00596 #define HE_MAC_CAPA_MAX_A_AMPDU_LEN_EXP_WIDTH              2
    00597 #define HE_MAC_CAPA_MAX_A_AMPDU_LEN_EXP_USE_VHT                   0x00
    00598 #define HE_MAC_CAPA_MAX_A_AMPDU_LEN_EXP_VHT_1                     0x01
    00599 #define HE_MAC_CAPA_MAX_A_AMPDU_LEN_EXP_VHT_2                     0x02
    00600 #define HE_MAC_CAPA_MAX_A_AMPDU_LEN_EXP_RSVD                      0x03
    00601
    00602 #define HE_MAC_CAPA_A_AMSDU_FRAG_POS                       29
    00603 #define HE_MAC_CAPA_FLEX_TWT_SCHED_POS                     30
    00604 #define HE_MAC_CAPA_RX_CTRL_FRAME_TO_MULTIBSS_POS          31
    00605 #define HE_MAC_CAPA_BSRP_BQRP_A_MPDU_AGG_POS               32
    00606 #define HE_MAC_CAPA_QTP_POS                                33
    00607 #define HE_MAC_CAPA_BQR_POS                                34
    00608 #define HE_MAC_CAPA_SRP_RESP_POS                           35
    00609 #define HE_MAC_CAPA_NDP_FB_REP_POS                         36
    00610 #define HE_MAC_CAPA_OPS_POS                                37
    00611 #define HE_MAC_CAPA_AMDSU_IN_AMPDU_POS                     38
    00612
    00613 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_OFT                   39
    00614 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_WIDTH                 3
    00615 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_1                            0x00
    00616 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_2                            0x01
    00617 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_3                            0x02
    00618 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_4                            0x03
    00619 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_5                            0x04
    00620 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_6                            0x05
    00621 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_7                            0x06
    00622 #define HE_MAC_CAPA_MULTI_TID_AGG_TX_8                            0x07
    00623
    00624 #define HE_MAC_CAPA_SUB_CHNL_SEL_TX_POS                    42
    00625 #define HE_MAC_CAPA_UL_2_996_TONE_RU_POS                   43
    00626 #define HE_MAC_CAPA_OM_CONTROL_UL_MU_DIS_RX_POS            44
    00627 #define HE_MAC_CAPA_DYN_SMPS_POS                           45
    00628
    00636
    00637 #define HE_PHY_CAPA_CHAN_WIDTH_SET_OFT                     1
    00638 #define HE_PHY_CAPA_CHAN_WIDTH_SET_WIDTH                   7
    00639 #define HE_PHY_CAPA_CHAN_WIDTH_SET_40MHZ_IN_2G                    0x01
    00640 #define HE_PHY_CAPA_CHAN_WIDTH_SET_40MHZ_80MHZ_IN_5G              0x02
    00641 #define HE_PHY_CAPA_CHAN_WIDTH_SET_160MHZ_IN_5G                   0x04
    00642 #define HE_PHY_CAPA_CHAN_WIDTH_SET_80PLUS80_MHZ_IN_5G             0x08
    00643 #define HE_PHY_CAPA_CHAN_WIDTH_SET_RU_MAPPING_IN_2G               0x10
    00644 #define HE_PHY_CAPA_CHAN_WIDTH_SET_RU_MAPPING_IN_5G               0x20
    00645
    00646 #define HE_PHY_CAPA_PREAMBLE_PUNC_RX_OFT                   8
    00647 #define HE_PHY_CAPA_PREAMBLE_PUNC_RX_WIDTH                 4
    00648 #define HE_PHY_CAPA_PREAMBLE_PUNC_RX_80M_ONLY_SCND_20M            0x01
    00649 #define HE_PHY_CAPA_PREAMBLE_PUNC_RX_80M_ONLY_SCND_40M            0x02
    00650 #define HE_PHY_CAPA_PREAMBLE_PUNC_RX_160M_ONLY_SCND_20M           0x04
    00651 #define HE_PHY_CAPA_PREAMBLE_PUNC_RX_160M_ONLY_SCND_40M           0x08
    00652
    00653 #define HE_PHY_CAPA_DEVICE_CLASS_A_POS                     12
    00654 #define HE_PHY_CAPA_LDPC_CODING_IN_PAYLOAD_POS             13
    00655 #define HE_PHY_CAPA_HE_SU_PPDU_1x_LTF_AND_GI_0_8US_POS     14
    00656
    00657 #define HE_PHY_CAPA_MIDAMBLE_RX_MAX_NSTS_OFT               15
    00658 #define HE_PHY_CAPA_MIDAMBLE_RX_MAX_NSTS_WIDTH             2
    00659
    00660 #define HE_PHY_CAPA_NDP_4x_LTF_AND_3_2US_POS               17
    00661 #define HE_PHY_CAPA_STBC_TX_UNDER_80MHZ_POS                18
    00662 #define HE_PHY_CAPA_STBC_RX_UNDER_80MHZ_POS                19
    00663 #define HE_PHY_CAPA_DOPPLER_TX_POS                         20
    00664 #define HE_PHY_CAPA_DOPPLER_RX_POS                         21
    00665 #define HE_PHY_CAPA_FULL_BW_UL_MU_MIMO_POS                 22
    00666 #define HE_PHY_CAPA_PARTIAL_BW_UL_MU_MIMO_POS              23
    00667
    00668 #define HE_PHY_CAPA_DCM_MAX_CONST_TX_OFT                   24
    00669 #define HE_PHY_CAPA_DCM_MAX_CONST_TX_WIDTH                 2
    00670 #define HE_PHY_CAPA_DCM_MAX_CONST_TX_NO_DCM                       0x00
    00671 #define HE_PHY_CAPA_DCM_MAX_CONST_TX_BPSK                         0x01
    00672 #define HE_PHY_CAPA_DCM_MAX_CONST_TX_QPSK                         0x02
    00673 #define HE_PHY_CAPA_DCM_MAX_CONST_TX_16_QAM                       0x03
    00674
    00675 #define HE_PHY_CAPA_DCM_MAX_NSS_TX_POS                     26
    00676
    00677 #define HE_PHY_CAPA_DCM_MAX_CONST_RX_OFT                   27
    00678 #define HE_PHY_CAPA_DCM_MAX_CONST_RX_WIDTH                 2
    00679 #define HE_PHY_CAPA_DCM_MAX_CONST_RX_NO_DCM                       0x00
    00680 #define HE_PHY_CAPA_DCM_MAX_CONST_RX_BPSK                         0x01
    00681 #define HE_PHY_CAPA_DCM_MAX_CONST_RX_QPSK                         0x02
    00682 #define HE_PHY_CAPA_DCM_MAX_CONST_RX_16_QAM                       0x03
    00683
    00684 #define HE_PHY_CAPA_DCM_MAX_NSS_RX_POS                     29
    00685 #define HE_PHY_CAPA_RX_HE_MU_PPDU_FRM_NON_AP_POS           30
    00686 #define HE_PHY_CAPA_SU_BEAMFORMER_POS                      31
    00687 #define HE_PHY_CAPA_SU_BEAMFORMEE_POS                      32
    00688 #define HE_PHY_CAPA_MU_BEAMFORMER_POS                      33
    00689
    00690 #define HE_PHY_CAPA_BFMEE_MAX_STS_UNDER_80MHZ_OFT          34
    00691 #define HE_PHY_CAPA_BFMEE_MAX_STS_UNDER_80MHZ_WIDTH         3
    00692 #define HE_PHY_CAPA_BFMEE_MAX_STS_UNDER_80MHZ_4                   0x03
    00693 #define HE_PHY_CAPA_BFMEE_MAX_STS_UNDER_80MHZ_5                   0x04
    00694 #define HE_PHY_CAPA_BFMEE_MAX_STS_UNDER_80MHZ_6                   0x05
    00695 #define HE_PHY_CAPA_BFMEE_MAX_STS_UNDER_80MHZ_7                   0x06
    00696 #define HE_PHY_CAPA_BFMEE_MAX_STS_UNDER_80MHZ_8                   0x07
    00697
    00698 #define HE_PHY_CAPA_BFMEE_MAX_STS_ABOVE_80MHZ_OFT          37
    00699 #define HE_PHY_CAPA_BFMEE_MAX_STS_ABOVE_80MHZ_WIDTH         3
    00700 #define HE_PHY_CAPA_BFMEE_MAX_STS_ABOVE_80MHZ_4                   0x03
    00701 #define HE_PHY_CAPA_BFMEE_MAX_STS_ABOVE_80MHZ_5                   0x04
    00702 #define HE_PHY_CAPA_BFMEE_MAX_STS_ABOVE_80MHZ_6                   0x05
    00703 #define HE_PHY_CAPA_BFMEE_MAX_STS_ABOVE_80MHZ_7                   0x06
    00704 #define HE_PHY_CAPA_BFMEE_MAX_STS_ABOVE_80MHZ_8                   0x07
    00705
    00706 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_OFT      40
    00707 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_WIDTH     3
    00708 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_1               0x00
    00709 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_2               0x01
    00710 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_3               0x02
    00711 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_4               0x03
    00712 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_5               0x04
    00713 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_6               0x05
    00714 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_7               0x06
    00715 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_UNDER_80MHZ_8               0x07
    00716
    00717 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_OFT      43
    00718 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_WIDTH     3
    00719 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_1               0x00
    00720 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_2               0x01
    00721 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_3               0x02
    00722 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_4               0x03
    00723 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_5               0x04
    00724 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_6               0x05
    00725 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_7               0x06
    00726 #define HE_PHY_CAPA_BFMEE_NUM_SND_DIM_ABOVE_80MHZ_8               0x07
    00727
    00728 #define HE_PHY_CAPA_NG16_SU_FEEDBACK_POS                   46
    00729 #define HE_PHY_CAPA_NG16_MU_FEEDBACK_POS                   47
    00730 #define HE_PHY_CAPA_CODEBOOK_SIZE_42_SU_POS                48
    00731 #define HE_PHY_CAPA_CODEBOOK_SIZE_75_MU_POS                49
    00732 #define HE_PHY_CAPA_TRIG_SU_BEAMFORMER_FB_POS              50
    00733 #define HE_PHY_CAPA_TRIG_MU_BEAMFORMER_FB_POS              51
    00734 #define HE_PHY_CAPA_TRIG_CQI_FB_POS                        52
    00735 #define HE_PHY_CAPA_PARTIAL_BW_EXT_RANGE_POS               53
    00736 #define HE_PHY_CAPA_PARTIAL_BW_DL_MUMIMO_POS               54
    00737 #define HE_PHY_CAPA_PPE_THRESHOLD_PRESENT_POS              55
    00738 #define HE_PHY_CAPA_SRP_BASED_SR_POS                       56
    00739 #define HE_PHY_CAPA_POWER_BOOST_FACTOR_AR_POS              57
    00740 #define HE_PHY_CAPA_HE_SU_MU_PPDU_4x_LTF_AND_08_US_GI_POS  58
    00741
    00742 #define HE_PHY_CAPA_MAX_NC_OFT                             59
    00743 #define HE_PHY_CAPA_MAX_NC_WIDTH                           3
    00744 #define HE_PHY_CAPA_MAX_NC_1                                      0x01
    00745 #define HE_PHY_CAPA_MAX_NC_2                                      0x02
    00746 #define HE_PHY_CAPA_MAX_NC_3                                      0x03
    00747 #define HE_PHY_CAPA_MAX_NC_4                                      0x04
    00748 #define HE_PHY_CAPA_MAX_NC_5                                      0x05
    00749 #define HE_PHY_CAPA_MAX_NC_6                                      0x06
    00750 #define HE_PHY_CAPA_MAX_NC_7                                      0x07
    00751
    00752 #define HE_PHY_CAPA_STBC_TX_ABOVE_80MHZ_POS                62
    00753 #define HE_PHY_CAPA_STBC_RX_ABOVE_80MHZ_POS                63
    00754 #define HE_PHY_CAPA_HE_ER_SU_PPDU_4x_LTF_AND_08_US_GI_POS  64
    00755 #define HE_PHY_CAPA_20MHZ_IN_40MHZ_HE_PPDU_IN_2G_POS       65
    00756 #define HE_PHY_CAPA_20MHZ_IN_160MHZ_HE_PPDU_POS            66
    00757 #define HE_PHY_CAPA_80MHZ_IN_160MHZ_HE_PPDU_POS            67
    00758 #define HE_PHY_CAPA_HE_ER_SU_1x_LTF_AND_08_US_GI_POS       68
    00759 #define HE_PHY_CAPA_MIDAMBLE_RX_2x_AND_1x_LTF_POS          69
    00760
    00761 #define HE_PHY_CAPA_DCM_MAX_BW_OFT                         70
    00762 #define HE_PHY_CAPA_DCM_MAX_BW_WIDTH                        3
    00763 #define HE_PHY_CAPA_DCM_MAX_BW_20MHZ                              0x00
    00764 #define HE_PHY_CAPA_DCM_MAX_BW_40MHZ                              0x01
    00765 #define HE_PHY_CAPA_DCM_MAX_BW_80MHZ                              0x02
    00766 #define HE_PHY_CAPA_DCM_MAX_BW_160MHZ_80P80MHZ                    0x03
    00767
    00768 #define HE_PHY_CAPA_16PLUS_HE_SIGB_OFDM_SYM_POS            72
    00769 #define HE_PHY_CAPA_NON_TRIG_CQI_FEEDBACK_POS              73
    00770 #define HE_PHY_CAPA_TX_1024QAM_LESS_242_RU_POS             74
    00771 #define HE_PHY_CAPA_RX_1024QAM_LESS_242_RU_POS             75
    00772 #define HE_PHY_CAPA_RX_FULL_BW_SU_COMP_SIGB_POS            76
    00773 #define HE_PHY_CAPA_RX_FULL_BW_SU_NON_COMP_SIGB_POS        77
    00774
    00775 #define HE_PHY_CAPA_NOMINAL_PACKET_PADDING_OFT             78
    00776 #define HE_PHY_CAPA_NOMINAL_PACKET_PADDING_WIDTH           2
    00777
    00785
    00786 #define MAC_HE_MCS_MAP_MSK                                 0x03
    00787 #define MAC_HE_MCS_MAP_0_7                                 0x00
    00788 #define MAC_HE_MCS_MAP_0_9                                 0x01
    00789 #define MAC_HE_MCS_MAP_0_11                                0x02
    00790 #define MAC_HE_MCS_MAP_NONE                                0x03
    00791
    00798
    00799 // Offset for the length frame in any element ID
    00800 #define MAC_LEN_OFT                             1
    00801
    00802 // SSID FIELD
    00803 #define MAC_SSID_ID_OFT                         0
    00804 #define MAC_SSID_LEN_OFT                        1
    00805 #define MAC_SSID_SSID_OFT                       2
    00806 #define MAC_SSID_MAX_LEN                       (MAC_SSID_LEN + 2)
    00807
    00808 // SUPPORTED RATES FIELD
    00809 #define MAC_RATES_ID_OFT                        0
    00810 #define MAC_RATES_LEN_OFT                       1
    00811 #define MAC_RATES_RATES_OFT                     2
    00812 #define MAC_RATES_ELMT_MAX_LEN                  8
    00813 #define MAC_RATES_MAX_LEN                       10
    00814 #define MAC_RATES_MIN_LEN                       3
    00815
    00816 // FH PARAM SET FIELD
    00817 #define MAC_FH_ID_OFT                           0
    00818 #define MAC_FH_LEN_OFT                          1
    00819 #define MAC_FH_DWELL_OFT                        2
    00820 #define MAC_FH_HOP_SET_OFT                      4
    00821 #define MAC_FH_HOP_PAT_OFT                      5
    00822 #define MAC_FH_HOP_IDX_OFT                      6
    00823 #define MAC_FH_PARAM_LEN                        7
    00824
    00825 // DS PARAM SET
    00826 #define MAC_DS_ID_OFT                           0
    00827 #define MAC_DS_LEN_OFT                          1
    00828 #define MAC_DS_CHANNEL_OFT                      2
    00829 #define MAC_DS_PARAM_LEN                        3
    00830
    00831 // CF PARAM SET
    00832 #define MAC_CF_ID_OFT                           0
    00833 #define MAC_CF_LEN_OFT                          1
    00834 #define MAC_CF_COUNT_OFT                        2
    00835 #define MAC_CF_PERIOD_OFT                       3
    00836 #define MAC_CF_MAX_DUR_OFT                      4
    00837 #define MAC_CF_REM_DUR_OFT                      6
    00838 #define MAC_CF_PARAM_LEN                        8
    00839
    00840 // TIM
    00841 #define MAC_TIM_ID_OFT                          0
    00842 #define MAC_TIM_LEN_OFT                         1
    00843 #define MAC_TIM_CNT_OFT                         2
    00844 #define MAC_TIM_PERIOD_OFT                      3
    00845 #define MAC_TIM_BMPC_OFT                        4
    00846 #define MAC_TIM_BMP_OFT                         5
    00847 #define MAC_TIM_MIN_LEN                         6
    00848 #define MAC_TIM_MAX_LEN                        (5 + MAC_TIM_SIZE)
    00849 #define MAC_TIM_BCMC_PRESENT                    CO_BIT(0)
    00850
    00851 // IBSS PARAM SET
    00852 #define MAC_IBSS_ID_OFT                         0
    00853 #define MAC_IBSS_LEN_OFT                        1
    00854 #define MAC_IBSSATIM_OFT                        2
    00855 #define MAC_IBSS_PARAM_LEN                      4
    00856
    00857 // Country
    00858 #define MAC_COUNTRY_ID_OFT                      0
    00859 #define MAC_COUNTRY_LEN_OFT                     1
    00860 #define MAC_COUNTRY_MIN_LEN                     8
    00861 #define MAC_COUNTRY_STRING_OFT                  2
    00862 #define MAC_COUNTRY_STRING_LEN                  3
    00863 #define MAC_COUNTRY_FIRST_CHAN_OFT              0
    00864 #define MAC_COUNTRY_NB_CHAN_OFT                 1
    00865 #define MAC_COUNTRY_PWR_LEVEL_OFT               2
    00866 #define MAC_COUNTRY_TRIPLET_LEN                 3
    00867
    00868 // CHALLENGE PARAM SET
    00869 #define MAC_CHALLENGE_ID_OFT                    0
    00870 #define MAC_CHALLENGE_LEN_OFT                   1
    00871 #define MAC_CHALLENGE_TEXT_OFT                  2
    00872
    00873 // ERP
    00874 #define MAC_ERP_ID_OFT                          0
    00875 #define MAC_ERP_LEN_OFT                         1
    00876 #define MAC_ERP_PARAM_OFT                       2
    00877 #define MAC_ERP_LEN                             3
    00878 // ERP BIT FIELD
    00879 #define MAC_ERP_NON_ERP_PRESENT                 CO_BIT(0)
    00880 #define MAC_ERP_USE_PROTECTION                  CO_BIT(1)
    00881 #define MAC_ERP_BARKER_PREAMBLE_MODE            CO_BIT(2)
    00882 #define MAC_ERP_IE_PRESENT                      CO_BIT(7)   // not standard, used internally
    00883
    00884 // RSN INFORMATION FIELD (WPA Extension)
    00885 #define MAC_RSNIE_ID_OFT                         0
    00886 #define MAC_RSNIE_LEN_OFT                        1
    00887 #define MAC_RSNIE_INFO_OFT                       2
    00888 #define MAC_RSNIE_VERSION_OFT                    2
    00889 #define MAC_RSNIE_GROUP_CIPHER_OFT               4
    00890 #define MAC_RSNIE_PAIRWISE_CIPHER_SUITE_CNT_OFT  8
    00891 #define MAC_RSNIE_PAIRWISE_CIPHER_SUITE_LIST_OFT 10
    00892 #define MAC_RSNIE_PAIRWISE_CIPHER_SIZE           4
    00893 #define MAC_RSNIE_KEY_MANAGEMENT_SUITE_CNT_OFT   14
    00894 #define MAC_RSNIE_KEY_MANAGEMENT_SUITE_LIST_OFT  16
    00895 #define MAC_RSNIE_KEY_MANAGEMENT_SIZE            4
    00896 #define MAC_RSNIE_RSN_CAPABILITIES_OFT           20
    00897 #define MAC_RSNIE_RSN_PMKID_COUNT_OFT            22
    00898 #define MAC_RSNIE_RSN_PMKID_COUNT_LIST_OFT       24
    00899 #define MAC_RSNIE_RSN_PMKID_SIZE                 16
    00900 #define MAC_RSNIE_MIN_LEN                        20
    00901
    00902 // WPA INFORMATION FIELD (pre RSN)
    00903 #define MAC_WPA_ID_OFT                           0
    00904 #define MAC_WPA_LEN_OFT                          1
    00905 #define MAC_WPA_INFO_OFT                         2
    00906 #define MAC_WPA_VERSION_OFT                      6
    00907 #define MAC_WPA_GROUP_CIPHER_OFT                 8
    00908 #define MAC_WPA_PAIRWISE_CIPHER_SUITE_CNT_OFT    12
    00909 #define MAC_WPA_PAIRWISE_CIPHER_SUITE_LIST_OFT   14
    00910 #define MAC_WPA_CIPHER_SIZE                      4
    00911 #define MAC_WPA_KEY_MANAGEMENT_SUITE_CNT_OFT     18
    00912 #define MAC_WPA_KEY_MANAGEMENT_SUITE_LIST_OFT    20
    00913 #define MAC_WPA_KEY_MANAGEMENT_SIZE              4
    00914 #define MAC_WPA_CAPABILITIES_OFT                 24
    00915 #define MAC_WPA_MIN_LEN                          24
    00916
    00917 // WAPI INFORMATION FIELD
    00918 #define MAC_WAPI_ID_OFT                          0
    00919 #define MAC_WAPI_LEN_OFT                         1
    00920 #define MAC_WAPI_INFO_OFT                        2
    00921 #define MAC_WAPI_VERSION_OFT                     2
    00922 #define MAC_WAPI_AKM_SUITE_CNT_OFT               4
    00923 #define MAC_WAPI_AKM_SUITE_LIST_OFT              6
    00924 #define MAC_WAPI_AKM_SUITE_SIZE                  4
    00925 #define MAC_WAPI_PAIRWISE_CIPHER_SUITE_CNT_OFT   10
    00926 #define MAC_WAPI_PAIRWISE_CIPHER_SUITE_LIST_OFT  12
    00927 #define MAC_WAPI_CIPHER_SUITE_SIZE               4
    00928 #define MAC_WAPI_GROUP_CIPHER_SUITE_OFT          16
    00929 #define MAC_WAPI_CAPABILITY_OFT                  20
    00930 #define MAC_WAPI_BKID_CNT_OFT                    22
    00931 #define MAC_WAPI_BKID_LIST_OFT                   24
    00932 #define MAC_WAPI_MIN_LEN                         22
    00933
    00934 // BSS Load IE
    00935 #define MAC_BSS_LOAD_ID_OFT                     0
    00936 #define MAC_BSS_LOAD_LEN_OFT                    1
    00937 #define MAC_BSS_LOAD_STA_CNT_OFT                2
    00938 #define MAC_BSS_LOAD_CH_UTILIZATION_OFT         4
    00939 #define MAC_BSS_LOAD_AVAIL_ADM_CAPA             5
    00940 #define MAC_BSS_LOAD_LEN                        7
    00941
    00942 // EDCA Parameter Set IE
    00943 #define MAC_EDCA_PARAM_ID_OFT                   0
    00944 #define MAC_EDCA_PARAM_LEN_OFT                  1
    00945 #define MAC_EDCA_PARAM_QOS_INFO_OFT             2
    00946 #define MAC_EDCA_PARAM_RESERVED_OFT             3
    00947 #define MAC_EDCA_PARAM_BE_PARAM_OFT             4
    00948 #define MAC_EDCA_PARAM_BK_PARAM_OFT             8
    00949 #define MAC_EDCA_PARAM_VI_PARAM_OFT             12
    00950 #define MAC_EDCA_PARAM_VO_PARAM_OFT             16
    00951 #define MAC_EDCA_PARAM_LEN                      20
    00952
    00953 // QoS Capability IE
    00954 #define MAC_QOS_CAPA_ID_OFT                     0
    00955 #define MAC_QOS_CAPA_LEN_OFT                    1
    00956 #define MAC_QOS_CAPA_INFO_OFT                   2
    00957 #define MAC_QOS_CAPA_LEN                        3
    00958
    00959 // Multiple BSSID IE
    00960 #define MAC_MULTI_BSSID_ID_OFT                  0
    00961 #define MAC_MULTI_BSSID_LEN_OFT                 1
    00962 #define MAC_MULTI_BSSID_MAX_INDICATOR_OFT       2
    00963 #define MAC_MULTI_BSSID_SUB_IES_OFT             3
    00964 #define MAC_MULTI_BSSID_ELMT_MIN_LEN            4
    00965 #define MAC_MULTI_BSSID_MIN_LEN                 6
    00966
    00967 // Nontransmitted BSSID capabilities IE
    00968 #define MAC_NON_TXED_BSSID_CAPA_ID_OFT          0
    00969 #define MAC_NON_TXED_BSSID_CAPA_LEN_OFT         1
    00970 #define MAC_NON_TXED_BSSID_CAPA_OFT             2
    00971 #define MAC_NON_TXED_BSSID_CAPA_LEN             4
    00972
    00973 // Nontransmitted BSSID capabilities IE
    00974 #define MAC_MULTI_BSSID_INDEX_ID_OFT            0
    00975 #define MAC_MULTI_BSSID_INDEX_LEN_OFT           1
    00976 #define MAC_MULTI_BSSID_INDEX_OFT               2
    00977 #define MAC_MULTI_BSSID_DTIM_PERIOD_OFT         3
    00978 #define MAC_MULTI_BSSID_DTIM_COUNT_OFT          4
    00979 #define MAC_MULTI_BSSID_INDEX_MIN_LEN           3
    00980
    00981 // HT Capability IE
    00982 #define MAC_HT_CAPA_ID_OFT                      0
    00983 #define MAC_HT_CAPA_LEN_OFT                     1
    00984 #define MAC_HT_CAPA_INFO_OFT                    2
    00985 #define MAC_HT_CAPA_AMPDU_PARAM_OFT             4
    00986 #define MAC_HT_CAPA_SUPPORTED_MCS_SET_OFT       5
    00987 #define MAC_HT_CAPA_EXTENDED_CAPA_OFT           21
    00988 #define MAC_HT_CAPA_TX_BEAM_FORMING_CAPA_OFT    23
    00989 #define MAC_HT_CAPA_ASEL_CAPA_OFT               27
    00990 #define MAC_HT_CAPA_ELMT_LEN                    26
    00991 #define MAC_HT_CAPA_ELMT_LEN_WD                (CO_ALIGN4_HI(MAC_HT_CAPA_ELMT_LEN) / 4)
    00992 #define MAC_HT_CAPA_LEN                         28
    00993
    00994 // HT Operation IE
    00995 #define MAC_HT_OPER_ID_OFT                      0
    00996 #define MAC_HT_OPER_LEN_OFT                     1
    00997 #define MAC_HT_OPER_PRIM_CH_OFT                 2
    00998 #define MAC_HT_OPER_INFO_OFT                    3
    00999 #define MAC_HT_OPER_INFO_SUBSET2_OFT            4
    01000 #define MAC_HT_OPER_OP_MODE_MASK                0x0003
    01001 #define MAC_HT_OPER_NONGF_MASK                  0x0004
    01002 #define MAC_HT_OPER_OBSS_MASK                   0x0010
    01003 #define MAC_HT_OPER_INFO_SUBSET3_OFT            6
    01004 #define MAC_HT_OPER_BASIC_MSC_SET_OFT           8
    01005 #define MAC_HT_OPER_ELMT_LEN                    22
    01006 #define MAC_HT_OPER_LEN                         24
    01007
    01008 // HT Protection values
    01009 enum mac_ht_oper_prot_val
    01010 {
    01011     MAC_HT_OPER_PROT_NO_PROT   = 0,
    01012     MAC_HT_OPER_PROT_NONMEMBER,
    01013     MAC_HT_OPER_PROT_20MHZ,
    01014     MAC_HT_OPER_PROP_NON_HT_MIXED
    01015 };
    01016
    01017 // VHT Capability IE
    01018 #define MAC_VHT_CAPA_ELMT_LEN                   12
    01019 #define MAC_VHT_CAPA_ELMT_LEN_WD               (CO_ALIGN4_HI(MAC_VHT_CAPA_ELMT_LEN) / 4)
    01020 #define MAC_VHT_CAPA_LEN                        14
    01021 #define MAC_VHT_CAPA_ID_OFT                     0
    01022 #define MAC_VHT_CAPA_LEN_OFT                    1
    01023 #define MAC_VHT_CAPA_INFO_OFT                   2
    01024 #define MAC_VHT_RX_MCS_MAP_OFT                  6
    01025 #define MAC_VHT_RX_HIGHEST_RATE_OFT             8
    01026 #define MAC_VHT_TX_MCS_MAP_OFT                  10
    01027 #define MAC_VHT_TX_HIGHEST_RATE_OFT             12
    01028
    01029 // VHT Operation IE
    01030 #define MAC_VHT_OPER_ELMT_LEN                   5
    01031 #define MAC_VHT_OPER_LEN                        7
    01032 #define MAC_VHT_OPER_ID_OFT                     0
    01033 #define MAC_VHT_OPER_LEN_OFT                    1
    01034 #define MAC_VHT_CHAN_WIDTH_OFT                  2
    01035 #define MAC_VHT_CENTER_FREQ0_OFT                3
    01036 #define MAC_VHT_CENTER_FREQ1_OFT                4
    01037 #define MAC_VHT_BASIC_MCS_OFT                   5
    01038
    01039 // 20/40 Coexistence IE
    01040 #define MAC_20_40_COEXISTENCE_ID_OFT                0
    01041 #define MAC_20_40_COEXISTENCE_LEN_OFT               1
    01042 #define MAC_20_40_COEXISTENCE_INFO_OFT              2
    01043 #define MAC_20_40_COEXISTENCE_ELMT_LEN              1
    01044 #define MAC_20_40_COEXISTENCE_LEN                   3
    01045 #define MAC_20_40_COEXISTENCE_INFO_REQ_MASK         0x01
    01046 #define MAC_20_40_COEXISTENCE_40_INTOLERANT_MASK    0x02
    01047 #define MAC_20_40_COEXISTENCE_20_BSS_WIDTH_REQ_MASK 0x04
    01048 #define MAC_20_40_COEXISTENCE_OBSS_SCAN_REQ_MASK    0x08
    01049 #define MAC_20_40_COEXISTENCE_OBSS_SCAN_GRANT_MASK  0x10
    01050
    01051 // Mgmt MIC IE
    01052 #define MAC_MGMT_MIC_ID_OFT    0
    01053 #define MAC_MGMT_MIC_LEN_OFT   1
    01054 #define MAC_MGMT_MIC_KEYID_OFT 2
    01055 #define MAC_MGMT_MIC_IPN_OFT   4
    01056 #define MAC_MGMT_MIC_IPN_LEN   6
    01057 #define MAC_MGMT_MIC_MIC_OFT   10
    01058 #define MAC_MGMT_MIC_MIC_LEN   8
    01059 #define MAC_MGMT_MIC_LEN       18
    01060
    01061 // WME IE
    01062 #define MAC_WMM_PARAM_ELMT_LEN           24
    01063 #define MAC_WMM_PARAM_LEN                26
    01064 #define MAC_WMM_PARAM_QOS_INFO_OFT        8
    01065 #define MAC_WMM_PARAM_SET_CNT_MSK         0x0F
    01066 #define MAC_WMM_PARAM_RESERVED_OFT        9
    01067 #define MAC_WMM_PARAM_BK_PARAM_OFT       14
    01068 #define MAC_WMM_PARAM_BE_PARAM_OFT       10
    01069 #define MAC_WMM_PARAM_VI_PARAM_OFT       18
    01070 #define MAC_WMM_PARAM_VO_PARAM_OFT       22
    01071
    01072 // QOS INFORMATION FIELD
    01073 #define MAC_QINFO_OFT                           6
    01074
    01075 // QOS INFORMATION FIELD received from the AP
    01076 #define MAC_QINFO_SET_COUNT_OFT                 8
    01077 #define MAC_QINFO_SET_UAPSD_OFT                 8
    01078
    01079 // Bit position for QOS INFORMATION FEILD received from the AP
    01080 #define MAC_QINFO_SET_COUNT                     0x07   // Bits 0,1,2
    01081 #define MAC_QINFO_SET_UAPSD                     0x80   // Bit 7
    01082
    01083 #define SUP_MCS_RX_HIGHEST_RATE_OFT             10 // 10,11th Byte from Start of MCS.
    01084 #define SUP_MCS_RX_HIGHEST_RATE_SIZE            10 // 10 Bits
    01085 #define SUP_TX_MCS_SET_OFT                      12 // 12th Byte from Start of MCS.
    01086
    01087 // HE Capability IE
    01088 #define MAC_HE_CAPA_ID_OFT                      0
    01089 #define MAC_HE_CAPA_LEN_OFT                     1
    01090 #define MAC_HE_CAPA_EXT_ID_OFT                  2
    01091 #if NX_11AX_DRAFT_2_0
    01092 #define MAC_HE_CAPA_IE_MAC_CAPA_LEN            (MAC_HE_MAC_CAPA_LEN - 1)
    01093 #define MAC_HE_CAPA_IE_PHY_CAPA_LEN            (MAC_HE_PHY_CAPA_LEN - 2)
    01094 #else
    01095 #define MAC_HE_CAPA_IE_MAC_CAPA_LEN             MAC_HE_MAC_CAPA_LEN
    01096 #define MAC_HE_CAPA_IE_PHY_CAPA_LEN             MAC_HE_PHY_CAPA_LEN
    01097 #endif
    01098 #define MAC_HE_MAC_CAPA_INFO_OFT                3
    01099 #define MAC_HE_PHY_CAPA_INFO_OFT               (MAC_HE_MAC_CAPA_INFO_OFT + MAC_HE_CAPA_IE_MAC_CAPA_LEN)
    01100 #define MAC_HE_MCS_INFO_OFT                    (MAC_HE_PHY_CAPA_INFO_OFT + MAC_HE_CAPA_IE_PHY_CAPA_LEN)
    01101 #define MAC_HE_MCS_INFO_PER_BW_LEN              4
    01102 #define MAC_HE_CAPA_MIN_LEN                    (MAC_HE_MCS_INFO_OFT + MAC_HE_MCS_INFO_PER_BW_LEN)
    01103 #define MAC_HE_CAPA_MAX_LEN                    (MAC_HE_MCS_INFO_OFT + 3 * MAC_HE_MCS_INFO_PER_BW_LEN +\
    01104                                                 MAC_HE_PPE_THRES_MAX_LEN)
    01105
    01106 // HE Operation IE
    01107 #define MAC_HE_OPER_ID_OFT                      0
    01108 #define MAC_HE_OPER_LEN_OFT                     1
    01109 #define MAC_HE_OPER_EXT_ID_OFT                  2
    01110 #define MAC_HE_OPER_PARAM_OFT                   3
    01111 #define MAC_HE_OPER_PARAM_LEN                   4
    01112 #if NX_11AX_DRAFT_2_0
    01113 #define MAC_HE_OPER_BSS_COLOR_OFT               0
    01114 #define MAC_HE_OPER_BSS_COLOR_PARTIAL_BIT       CO_BIT(20)
    01115 #define MAC_HE_OPER_BSS_COLOR_DISABLED_BIT      CO_BIT(30)
    01116 #else
    01117 #define MAC_HE_OPER_BSS_COLOR_OFT               24
    01118 #define MAC_HE_OPER_BSS_COLOR_PARTIAL_BIT       CO_BIT(30)
    01119 #define MAC_HE_OPER_BSS_COLOR_DISABLED_BIT      CO_BIT(31)
    01120 #endif
    01121 #define MAC_HE_OPER_BSS_COLOR_MASK             (0x3F << MAC_HE_OPER_BSS_COLOR_OFT)
    01122 #define MAC_HE_OPER_TXOP_DUR_RTS_THRES_OFT      4
    01123 #define MAC_HE_OPER_TXOP_DUR_RTS_THRES_MSK     (0x3FF << MAC_HE_OPER_TXOP_DUR_RTS_THRES_OFT)
    01124 #define MAC_HE_OPER_TXOP_DUR_RTS_THRES_DISABLED 1023
    01125 #define MAC_HE_OPER_BASIC_MCS_OFT               7
    01126 #define MAC_HE_OPER_MIN_LEN                     9
    01127 #define MAC_HE_OPER_MAX_LEN                     13
    01128
    01129 // UORA Operation IE
    01130 #define MAC_UORA_ELMT_LEN                       1
    01131 #define MAC_UORA_LEN                            4
    01132 #define MAC_UORA_ID_OFT                         0
    01133 #define MAC_UORA_LEN_OFT                        1
    01134 #define MAC_UORA_EXT_ID_OFT                     2
    01135 #define MAC_UORA_OCW_RANGE                      3
    01136 #define MAC_UORA_EOCW_MIN_OFT                   0
    01137 #define MAC_UORA_EOCW_MIN_MASK                  (0x7 << MAC_UORA_EOCW_MIN_OFT)
    01138 #define MAC_UORA_EOCW_MAX_OFT                   3
    01139 #define MAC_UORA_EOCW_MAX_MASK                  (0x7 << MAC_UORA_EOCW_MAX_OFT)
    01140 #define MAC_UORA_EOCW_DEFAULT_MIN               3
    01141 #define MAC_UORA_EOCW_DEFAULT_MAX               5
    01142
    01143 // MU EDCA Operation IE
    01144 #define MAC_MU_EDCA_ELMT_LEN                    13
    01145 #define MAC_MU_EDCA_LEN                         16
    01146 #define MAC_MU_EDCA_ID_OFT                      0
    01147 #define MAC_MU_EDCA_LEN_OFT                     1
    01148 #define MAC_MU_EDCA_EXT_ID_OFT                  2
    01149 #define MAC_MU_EDCA_QOS_INFO_OFT                3
    01150 #define MAC_MU_EDCA_PARAM_SET_CNT_MSK           0x0F
    01151 #define MAC_MU_EDCA_AC_BE_OFT                   4
    01152 #define MAC_MU_EDCA_AC_BK_OFT                   7
    01153 #define MAC_MU_EDCA_AC_VI_OFT                   10
    01154 #define MAC_MU_EDCA_AC_VO_OFT                   13
    01155
    01156 #define MAC_MESHID_ELMT_MAX_LEN                 32
    01157 #define MAC_MESHID_MAX_LEN                      34
    01158
    01159 #define MAC_MPM_INFO_MIN_LEN                    4
    01160 #define MAC_MPM_PEERING_PROT_OFT               (MAC_INFOELT_INFO_OFT + 0)
    01161 #define MAC_MPM_LOCAL_LINK_ID_OFT              (MAC_INFOELT_INFO_OFT + 2)
    01162 #define MAC_MPM_OPT_FIELD_OFT                  (MAC_INFOELT_INFO_OFT + MAC_MPM_INFO_MIN_LEN)
    01163 #define MAC_MPM_MIN_LEN                         6
    01164 #define MAC_MPM_MAX_LEN                         26
    01165
    01166 #define MAC_MAW_AWAKE_WIND_OFT                  MAC_INFOELT_INFO_OFT
    01167 #define MAC_MAW_LEN                             4
    01168
    01169 #define MAC_MCFG_ELMT_LEN                       7
    01170 #define MAC_MCFG_PATH_SEL_PROT_OFT             (MAC_INFOELT_INFO_OFT + 0)
    01171 #define MAC_MCFG_PATH_METRIC_PROT_OFT          (MAC_INFOELT_INFO_OFT + 1)
    01172 #define MAC_MCFG_CONG_CTRL_MODE_OFT            (MAC_INFOELT_INFO_OFT + 2)
    01173 #define MAC_MCFG_SYNC_METHOD_OFT               (MAC_INFOELT_INFO_OFT + 3)
    01174 #define MAC_MCFG_AUTH_PROT_OFT                 (MAC_INFOELT_INFO_OFT + 4)
    01175 #define MAC_MCFG_MESH_FORM_INFO_OFT            (MAC_INFOELT_INFO_OFT + 5)
    01176 #define MAC_MCFG_MESH_CAP_OFT                  (MAC_INFOELT_INFO_OFT + 6)
    01177 #define MAC_MCFG_LEN                            9
    01178
    01185 // Multiple BSSID IE
    01186 #define MAC_MBSSID_NON_TXED_PROF_ID_OFT         0
    01187 #define MAC_MBSSID_NON_TXED_PROF_LEN_OFT        1
    01188 #define MAC_MBSSID_NON_TXED_PROF_INFO_OFT       2
    01189 #define MAC_MBSSID_NON_TXED_PROF_ELMT_MIN_LEN   4
    01190 #define MAC_MBSSID_NON_TXED_PROF_MIN_LEN        6
    01191
    01198
    01199 #define MAC_BEACON_MAX_LEN              333
    01200 #define MAC_BEACONINFO_SIZE              78   // size without TIM
    01201 #define MAC_TIM_SIZE                    251   // max TIM size
    01202 // Attention, in a non-AP STA the IBSS
    01203 // parameter set is stored in place of
    01204 // the TIM -> min size 4
    01205
    01206 #define MAC_BEACON_HDR_LEN               36
    01207
    01208 /*
    01209  * Beacon Frame offset (Table 5 p46)
    01210  */
    01211 #define MAC_BEACON_TIMESTAMP_OFT          MAC_SHORT_MAC_HDR_LEN   // Order 1
    01212 #define MAC_BEACON_INTERVAL_OFT          (MAC_SHORT_MAC_HDR_LEN + 8)   // Order 2
    01213 #define MAC_BEACON_CAPA_OFT              (MAC_SHORT_MAC_HDR_LEN + 10)   // Order 3
    01214 #define MAC_BEACON_VARIABLE_PART_OFT     (MAC_SHORT_MAC_HDR_LEN + 12)   // Order 4
    01215 /*
    01216  * Probe Request Frame offset
    01217  */
    01218 #define MAC_PROBEREQ_SSID_OFT             0   // Order 1
    01219
    01220 /*
    01221  * Probe Response Frame offset (Table 12 p49)
    01222  */
    01223 #define MAC_PROBE_TIMESTAMP_OFT           0   // Order 1
    01224 #define MAC_PROBE_INTERVAL_OFT            8   // Order 2
    01225 #define MAC_PROBE_CAPA_OFT               10   // Order 3
    01226 #define MAC_PROBE_SSID_OFT               12   // Order 4
    01227
    01228 /*
    01229  * Authentication Frame offset
    01230  */
    01231 #define MAC_AUTH_ALGONBR_OFT              0   // Order 1
    01232 #define MAC_AUTH_SEQNBR_OFT               2   // Order 2
    01233 #define MAC_AUTH_STATUS_OFT               4   // Order 3
    01234 #define MAC_AUTH_CHALLENGE_OFT            6   // Order 4
    01235 #define MAC_AUTH_CHALLENGE_LEN          128
    01236 //challenge text IE size
    01237 #define CHALLENGE_TEXT_SIZE             130
    01238
    01239 /*
    01240  * Association Req Frame offset
    01241  */
    01242 #define MAC_ASSO_REQ_CAPA_OFT             0   // Order 1
    01243 #define MAC_ASSO_REQ_LISTEN_OFT           2   // Order 2
    01244 #define MAC_ASSO_REQ_SSID_OFT             4   // Order 3
    01245
    01246 /*
    01247  * Association Rsp Frame offset
    01248  */
    01249 #define MAC_ASSO_RSP_CAPA_OFT             0   // Order 1
    01250 #define MAC_ASSO_RSP_STATUS_OFT           2   // Order 2
    01251 #define MAC_ASSO_RSP_AID_OFT              4   // Order 3
    01252 #define MAC_ASSO_RSP_RATES_OFT            6   // Order 4
    01253
    01254 /*
    01255  * Re association Req Frame offset
    01256  */
    01257 #define MAC_REASSO_REQ_CAPA_OFT           0   // Order 1
    01258 #define MAC_REASSO_REQ_LISTEN_OFT         2   // Order 2
    01259 #define MAC_REASSO_REQ_AP_ADDR_OFT        4   // Order 3
    01260 #define MAC_REASSO_REQ_SSID_OFT          10   // Order 4
    01261
    01262 /*
    01263  * Deauthentication Req Frame offset
    01264  */
    01265
    01266 #define MAC_DEAUTH_REASON_OFT             0
    01267
    01268 /*
    01269  * De association Req Frame offset
    01270  */
    01271
    01272 #define MAC_DISASSOC_REASON_OFT           0
    01273 #define MAC_DISASSOC_REASON_LEN           2
    01274
    01275 /*
    01276  * Category and action for all action frames
    01277  */
    01278 #define MAC_ACTION_CATEGORY_OFT           0
    01279 #define MAC_ACTION_ACTION_OFT             1
    01280 #define MAC_ACTION_TOKEN_OFT              2
    01281 #define MAC_ACTION_P2P_ACTION_OFT         5
    01282 #define MAC_ACTION_P2P_TAGGED_OFT         7
    01283
    01290
    01291 #define MAC_SPECTRUM_ACTION_CATEGORY        0
    01292 #define MAC_WMMAC_QOS_ACTION_CATEGORY       1
    01293 #define MAC_DLS_ACTION_CATEGORY             2
    01294 #define MAC_BA_ACTION_CATEGORY              3
    01295 #define MAC_PUBLIC_ACTION_CATEGORY          4
    01296 #define MAC_RADIO_MEASURE_ACTION_CATEGORY   5
    01297 #define MAC_FAST_BSS_ACTION_CATEGORY        6
    01298 #define MAC_HT_ACTION_CATEGORY              7
    01299 #define MAC_SA_QUERY_ACTION_CATEGORY        8
    01300 #define MAC_PROT_PUBLIC_ACTION_CATEGORY     9
    01301 #define MAC_WNM_ACTION_CATEGORY            10
    01302 #define MAC_UNPROT_WNM_ACTION_CATEGORY     11
    01303 #define MAC_TDLS_ACTION_CATEGORY           12
    01304 #define MAC_MESH_ACTION_CATEGORY           13
    01305 #define MAC_MULTIHOP_ACTION_CATEGORY       14
    01306 #define MAC_SELF_PROT_ACTION_CATEGORY      15
    01307 #define MAC_VHT_ACTION_CATEGORY            21
    01308 #define MAC_VENDOR_PROT_ACTION_CATEGORY   126
    01309 #define MAC_VENDOR_ACTION_CATEGORY        127
    01310 #define MAC_ACTION_CATEGORY_ERROR         128
    01311
    01312 #define MAC_P2P_ACTION_NOA_SUBTYPE          0
    01313
    01314 #define MAC_SELF_PROT_ACTION_CAPA_OFT     2
    01315 #define MAC_SELF_PROT_ACTION_CAPA_LEN     2
    01316 #define MAC_SELF_PROT_ACTION_AID_OFT      4
    01317 #define MAC_SELF_PROT_ACTION_AID_LEN      2
    01318
    01327
    01328 #define FRAME_BODY_LLC_H 0x0003AAAA
    01329 #define FRAME_BODY_LLC_L 0x0D890000
    01330 #define PAYLOAD_TYPE_TDLS 0x02
    01331
    01332 #define MAC_ENCAPSULATED_LLC_H_OFT  0
    01333 #define MAC_ENCAPSULATED_LLC_L_OFT  4
    01334 #define MAC_ENCAPSULATED_PAYLOAD_TYPE_OFT  8
    01335 #define MAC_ENCAPSULATED_PAYLOAD_OFT  9
    01336
    01343 /*
    01344 *---------------------------------------------------------------------------------------
    01345 *---------------------------------WMM-AC fields offsets---------------------------------
    01346 *---------------------------------------------------------------------------------------
    01347 */
    01349 #define MAC_WMMAC_OUI_BYTE                              0x00
    01350 #define MAC_WMMAC_OUI_TYPE_BYTE                         0x50
    01351 #define MAC_WMMAC_OUI_SUBTYPE_BYTE                      0xF2
    01352
    01353 /* TSPEC field offsets
    01354 *--------------------------------------------------------------------------------------*/
    01355 #define MAC_WMMAC_TSPEC_HDR_OFT                         0
    01356 #define MAC_WMMAC_TSPEC_TSINFO_OFT                      8
    01357 #define MAC_WMMAC_TSPEC_NOM_MSDU_SIZE_OFT              11
    01358 #define MAC_WMMAC_TSPEC_MAX_MSDU_SIZE_OFT              13
    01359 #define MAC_WMMAC_TSPEC_MINSI_OFT                      15
    01360 #define MAC_WMMAC_TSPEC_MAXSI_OFT                      19
    01361 #define MAC_WMMAC_TSPEC_INACTIVITY_INTERVAL_OFT        23
    01362 #define MAC_WMMAC_TSPEC_SUSPENSION_INTERVAL_OFT        27
    01363 #define MAC_WMMAC_TSPEC_SERVICE_START_TIME_OFT         31
    01364 #define MAC_WMMAC_TSPEC_MIN_DATA_RATE_OFT              35
    01365 #define MAC_WMMAC_TSPEC_MEAN_DATA_RATE_OFT             39
    01366 #define MAC_WMMAC_TSPEC_PEAK_DATA_RATE_OFT             43
    01367 #define MAC_WMMAC_TSPEC_BURST_SIZE_OFT                 47
    01368 #define MAC_WMMAC_TSPEC_DELAY_BOUND_OFT                51
    01369 #define MAC_WMMAC_TSPEC_MIN_PHY_RATE_OFT               55
    01370 #define MAC_WMMAC_TSPEC_SURPLUS_BW_OFT                 59
    01371 #define MAC_WMMAC_TSPEC_MEDUIM_TIME_OFT                61
    01372
    01373 /* TSINFO field offsets
    01374 *--------------------------------------------------------------------------------------*/
    01375 #define MAC_WMMAC_TSINFO_HDR_OFT                        0
    01376 #define MAC_WMMAC_TSINFO_BODY_OFT                       8
    01377
    01378 /* TSDELAY field offsets
    01379 *--------------------------------------------------------------------------------------*/
    01380 #define MAC_WMMSA_TSDELAY_HDR_OFT                       0
    01381 #define MAC_WMMSA_TSDELAY_BODY_OFT                      8
    01382 /*
    01383 *---------------------------------------------------------------------------------------
    01384 *---------------------------------WMM-AC fields subtypes--------------------------------
    01385 *---------------------------------------------------------------------------------------
    01386 */
    01387
    01388
    01389 #define MAC_WMMAC_OUI_SUBTYPE_TSPEC_LEN                 61
    01390
    01391
    01392 #define MAC_OUI_SUBTYPE_WMMAC_TSINFO_LEN                9
    01393
    01394 // Used by the unit test of the WMM-AC
    01395 #define MAC_OUI_SUBTYPE_WMMAC_TSDELAY_LEN              10
    01396
    01397 // Bit position for TSPEC info field
    01398 #define MAC_TSPEC_TRAFIC_TYPE_OFT                        0
    01399 #define MAC_TSPEC_TRAFIC_TYPE_MASK                       (CO_BIT(0))
    01400
    01401 #define MAC_TSPEC_TSID_OFT                               1
    01402 #define MAC_TSPEC_TSID_MASK                              (CO_BIT(1)|CO_BIT(2)|CO_BIT(3)|CO_BIT(4))
    01403
    01404 #define MAC_TSPEC_DIRECTION_OFT                          5
    01405 #define MAC_TSPEC_DIRECTION_MASK                         (CO_BIT(5)|CO_BIT(6))
    01406
    01407 #define MAC_TSPEC_ACCESS_POLICY_OFT                      7
    01408 #define MAC_TSPEC_ACCESS_POLICY_MASK                     (CO_BIT(7)|CO_BIT(8))
    01409
    01410 #define MAC_TSPEC_AGGREGATION_OFT                        9
    01411 #define MAC_TSPEC_AGGREGATION_MASK                       (CO_BIT(9))
    01412
    01413 #define MAC_TSPEC_APSD_OFT                               10
    01414 #define MAC_TSPEC_APSD_MASK                              (CO_BIT(10))
    01415
    01416 #define MAC_TSPEC_USER_PRIORITY_OFT                      11
    01417 #define MAC_TSPEC_USER_PRIORITY_MASK                     (CO_BIT(11)|CO_BIT(12)|CO_BIT(13))
    01418
    01419 #define MAC_TSPEC_ACK_POLICY_OFT                         14
    01420 #define MAC_TSPEC_ACK_POLICY_MASK                        (CO_BIT(14)|CO_BIT(15))
    01421
    01422 #define MAC_TSPEC_SCHEDULE_OFT                           16
    01423 #define MAC_TSPEC_SCHEDULE_MASK                          (CO_BIT(16))
    01424
    01425 /*
    01426 *---------------------------------------------------------------------------------------
    01427 *---------------------------------WMM-AC Status Codes-----------------------------------
    01428 *---------------------------------------------------------------------------------------
    01429 */
    01430 #define MAC_WMMAC_ST_ADDTS_SUCESS                      0
    01431 #define MAC_WMMAC_ST_DELTS_POOR_CHANNEL_COND          34
    01432 #define MAC_WMMAC_ST_ADDTS_REQUEST_DECLINED           37
    01433 #define MAC_WMMAC_ST_ADDTS_INVALID_PARAMETERS         38
    01434 #define MAC_WMMAC_ST_ADDTS_REJ_W_SUG_CHANGES          39
    01435 #define MAC_WMMAC_ST_ADDTS_REJ_W_DELAY_PRD            47
    01436
    01437 /*
    01438 *---------------------------------------------------------------------------------------
    01439 *---------------------------------WMM-AC Reason Codes-----------------------------------
    01440 *---------------------------------------------------------------------------------------
    01441 */
    01442 #define MAC_WMMAC_RS_DELTS_QSTA_LEAVING               36
    01443 #define MAC_WMMAC_RS_DELTS_END_TS                     37
    01444 #define MAC_WMMAC_RS_DELTS_UNKOWN_TS                  38
    01445 #define MAC_WMMAC_RS_DELTS_TIMEOUT                    39
    01446 #define MAC_WMMAC_RS_DELTS_UNSPECIFIED                32
    01447
    01448
    01449 /*
    01450 *---------------------------------------------------------------------------------------
    01451 *---------------------------------WMM-AC Action Frames----------------------------------
    01452 *---------------------------------------------------------------------------------------
    01453 */
    01454
    01455
    01456 /* CATEGORY \ ACTION values
    01457 *--------------------------------------------------------------------------------------*/
    01458 #define MAC_WMMAC_ACTION_ADDTS_REQ        0
    01459 #define MAC_WMMAC_ACTION_ADDTS_RSP        1
    01460 #define MAC_WMMAC_ACTION_DELTS            2
    01461 #define MAC_WMMAC_ACTION_SCHEDULE         3
    01462
    01463
    01464 /* ADDTS_REQ offsets
    01465 *--------------------------------------------------------------------------------------*/
    01466
    01467 #define MAC_ADDTS_REQ_TSPEC_OFT           3
    01468 #define MAC_ADDTS_REQ_TCLASS_OFT         66
    01469
    01470
    01471 /* ADDTS_RSP offsets
    01472 *--------------------------------------------------------------------------------------*/
    01473
    01474 #define MAC_ADDTS_RSP_STATUS_OFT          3
    01475 #define MAC_ADDTS_RSP_TSDELAY_OFT         5
    01476 #define MAC_ADDTS_RSP_TSPEC_OFT          17
    01477 #define MAC_ADDTS_RSP_TCLASS_OFT         80
    01478
    01479 /* DELTS offsets
    01480 *--------------------------------------------------------------------------------------*/
    01481
    01482 #define MAC_DELTS_TSINFO_OFT              2
    01483 #define MAC_DELTS_REASON_OFT             13
    01484
    01492 /*
    01493 *---------------------------------------------------------------------------------------
    01494 *---------------------------------Block Ack fields offsets---------------------------------
    01495 *---------------------------------------------------------------------------------------
    01496 */
    01498 #define MAC_BARINFO_PERTIDINFO_OFT              0
    01499 #define MAC_BARINFO_PERTIDINFO_STEP             1
    01500 #define MAC_BARINFO_SEQ_OFT                     2
    01501 #define MAC_BARINFO_PERTIDINFO_TID_STEP         4
    01502 #define MAC_CAPA_BA_OFT                         14
    01503
    01504 // the length of fields
    01505 #define MAC_BA_PARAMSET_LEN                     2
    01506 #define MAC_BA_TIMEOUT_LEN                      2
    01507 #define MAC_BA_BARINFO_LEN                      4
    01508 #define MAC_BA_DELBA_REASON_LEN                 2
    01509
    01510 // value of the The Fragment Number
    01511 #define MAC_BARINFO_SEQ_FRAG                    0
    01512
    01513 // offset of The DELPARAMSET
    01514 #define MAC_DELPARAMSET_START_OFT               0
    01515 #define MAC_DELPARAMSET_STEP_OFT                1
    01516
    01517 // Bit position for Parameter Set field
    01518 #define MAC_BA_PARAMSET_AMSDU_OFT               0
    01519 #define MAC_BA_PARAMSET_AMSDU_MASK              CO_BIT(0)
    01520
    01521 #define MAC_BA_PARAMSET_POLICY_OFT              1
    01522 #define MAC_BA_PARAMSET_POLICY_MASK             CO_BIT(1)
    01523
    01524 #define MAC_BA_PARAMSET_TID_OFT                 2
    01525 #define MAC_BA_PARAMSET_TID_MASK                (CO_BIT(2)|CO_BIT(3)|CO_BIT(4)|CO_BIT(5))
    01526
    01527 #define MAC_BA_PARAMSET_BUFFER_OFT              6
    01528 #define MAC_BA_PARAMSET_BUFFER_MASK             0xFFC0
    01529
    01530 //Bit position for Per TID Info field
    01531 #define MAC_BA_BARINFO_PERTIDINFO_TID_OFT       12
    01532 #define MAC_BA_BARINFO_PERTIDINFO_TID_MASK  (CO_BIT(12)|CO_BIT(13))|(CO_BIT(14)|CO_BIT(15))
    01533
    01534 //Bit position for Starting Sequence Control filed
    01535 #define MAC_BA_BARINFO_SEQ_FRAG_OFT             0
    01536 #define MAC_BA_BARINFO_SEQ_FRAG_MASK        (CO_BIT(0)|CO_BIT(1))|(CO_BIT(2)|CO_BIT(3))
    01537
    01538 #define MAC_BA_BARINFO_SEQ_STARTSEQ_OFT         4
    01539 #define MAC_BA_BARINFO_SEQ_STARTSEQ_MASK        0x7FF0
    01540
    01541 //Bit position for DELBA Parameter Set field
    01542 #define MAC_BA_DELPARAMSET_INIT_OFT             3
    01543 #define MAC_BA_DELBARINFO_INIT_MASK             CO_BIT(3)
    01544
    01545 #define MAC_BA_DELPARAMSET_TID_OFT              4
    01546 #define MAC_BA_DELPARAMSET_TID_MASK         (CO_BIT(4)|CO_BIT(5)|CO_BIT(6)|CO_BIT(7))
    01547
    01548 /*
    01549 *---------------------------------------------------------------------------------------
    01550 *---------------------------------Block Ack Status Codes-----------------------------------
    01551 *---------------------------------------------------------------------------------------
    01552 */
    01553 #define MAC_BA_ST_SUCCESS                     0
    01554 #define MAC_BA_ST_REQUEST_REFUSED             37
    01555 #define MAC_BA_ST_INVALID_PARAMETERS          38
    01556
    01557 /*
    01558 *---------------------------------------------------------------------------------------
    01559 *---------------------------------Block Ack Reason Codes-----------------------------------
    01560 *---------------------------------------------------------------------------------------
    01561 */
    01562 #define MAC_BA_RS_STA_LEAVING                 36
    01563 #define MAC_BA_RS_END_BA                      37
    01564 #define MAC_BA_RS_UNKNOWN_BA                  38
    01565 #define MAC_BA_RS_TIMEOUT                     39
    01566
    01567 /*
    01568 *---------------------------------------------------------------------------------------
    01569 *---------------------------------Block Ack Action Frames----------------------------------
    01570 *---------------------------------------------------------------------------------------
    01571 */
    01572
    01573
    01574 /* CATEGORY \ ACTION values
    01575 *--------------------------------------------------------------------------------------*/
    01576
    01577 #define MAC_BA_ACTION_ADDBA_REQ         0
    01578 #define MAC_BA_ACTION_ADDBA_RSP         1
    01579 #define MAC_BA_ACTION_DELBA             2
    01580
    01581
    01582 /* ADDBA_REQ offsets
    01583 *--------------------------------------------------------------------------------------*/
    01584
    01585 #define MAC_ADDBA_REQ_PARAMSET_OFT      3
    01586 #define MAC_ADDBA_REQ_TIMEOUT_OFT       5
    01587 #define MAC_ADDBA_REQ_BARINFO_OFT       7
    01588
    01589
    01590 /* ADDBA_RSP offsets
    01591 *--------------------------------------------------------------------------------------*/
    01592
    01593 #define MAC_ADDBA_RSP_STATUS_OFT        3
    01594 #define MAC_ADDBA_RSP_PARAMSET_OFT      5
    01595 #define MAC_ADDBA_RSP_TIMEOUT_OFT       7
    01596
    01597
    01598 /* DELBA offsets
    01599 *--------------------------------------------------------------------------------------*/
    01600
    01601 #define MAC_DELBA_PARAMSET_OFT          2
    01602 #define MAC_DELBA_REASON_OFT            4
    01603
    01612 /* CATEGORY \ ACTION values
    01613 *--------------------------------------------------------------------------------------*/
    01615 #define MAC_TDLS_ACTION_SETUP_REQ           0
    01616 #define MAC_TDLS_ACTION_SETUP_RSP           1
    01617 #define MAC_TDLS_ACTION_SETUP_CFM           2
    01618 #define MAC_TDLS_ACTION_TEARDOWN            3
    01619 #define MAC_TDLS_ACTION_PEER_TRAFFIC_IND    4
    01620 #define MAC_TDLS_ACTION_CHANSW_REQ          5
    01621 #define MAC_TDLS_ACTION_CHANSW_RSP          6
    01622 #define MAC_TDLS_ACTION_PEER_TRAFFIC_RSP    9
    01623 #define MAC_TDLS_ACTION_DISCOVERY_REQ       10
    01624
    01625 #define TDLS_CHANSW_REQ_TARGET_CH_OFFSET    2
    01626 #define TDLS_CHANSW_REQ_OP_CLASS            3
    01627 #define TDLS_CHANSW_REQ_IES_OFFSET          4
    01628 #define TDLS_CHANSW_REQ_IE_SEC_CH_OFT_LEN   3
    01629 #define TDLS_CHANSW_REQ_IE_LINK_ID_LEN      20
    01630 #define TDLS_CHANSW_REQ_IE_CH_SWITCH_TIMING_LEN 6
    01631 #define TDLS_CHANSW_REQ_IE_WIDE_BW_CHAN_SWITCH_LEN 5
    01632
    01633 #define TDLS_CHANSW_RSP_STATUS_OFFSET       2
    01634 #define TDLS_CHANSW_RSP_IES_OFFSET          4
    01635
    01636 #define TDLS_CHANSW_REQUEST_ACCEPTED        0
    01637 #define TDLS_CHANSW_REQUEST_DECLINED        37
    01638
    01639 #define TDLS_PEER_TRAFFIC_IND_IES_OFFSET    3
    01640 #define TDLS_PEER_TRAFFIC_IND_IE_LINK_ID_LEN 20
    01641 #define TDLS_PEER_TRAFFIC_IND_IE_PTI_CTRL_LEN 5
    01642 #define TDLS_PEER_TRAFFIC_IND_IE_TPU_BUF_STATUS_LEN 3
    01643
    01644 #define TDLS_PEER_TRAFFIC_RSP_IES_OFFSET    3
    01645 #define TDLS_PEER_TRAFFIC_RSP_IE_LINK_ID_LEN 20
    01646
    01655
    01656 #define MAC_HEAD_HT_OFT                  32
    01657 #define MAC_MAI_MASK                     0x003C
    01658 #define MAC_MAI_OFT                      2
    01659 #define MAC_MAI_IND_ASELI                14
    01660 #define MAC_MFB_MASK                     0xFE00
    01661 #define MAC_MFB_OFT                      9
    01662 #define NO_FEEDBACK                      127
    01663 #define MAC_ADDR2_OFT                    10
    01664 #define MCS_IDX3_MASK                    0x0000FF
    01665 #define MCS_IDX2_MASK                    0x00FF00
    01666 #define MCS_IDX1_MASK                    0xFF0000
    01667 #define MCS_IDX2_OFT                     8
    01668 #define MCS_IDX1_OFT                     16
    01669
    01677
    01678 #define MAC_ACTION_FRAME_INFO_OFT           3
    01679 #define MAC_ACTION_CH_SWITCH_FRAME_INFO_OFT 2
    01680 #define MAC_ACTION_FRAME_PRE_INFO_LEN       3
    01681
    01682 //Spectrum & Power Management Element Offset
    01683
    01684 // Power Constraint Element
    01685 #define MAC_INFOELT_POWER_CONSTRAINT_OFT     2
    01686
    01687 #define MAC_POWER_CONSTRAINT_ELT_LEN         3
    01688
    01689 // Power Capability Element
    01690 #define MAC_INFOELT_MIN_TX_POWER_OFT         2
    01691 #define MAC_INFOELT_MAX_TX_POWER_OFT         3
    01692
    01693 #define MAC_POWER_CAPABILITY_ELT_LEN         4
    01694 #define MAC_POWER_CAPABILITY_ELT_LEN_FIELD   2
    01695
    01696 // TPC Report Info Element sub-offsets
    01697 #define MAC_INFOELT_TX_POWER_OFT             2
    01698 #define MAC_INFOELT_LINK_MARGIN_OFT          3
    01699
    01700 // TPC Report and Request IE lengths
    01701 #define MAC_TPC_REQUEST_ELT_LEN              2
    01702 #define MAC_TPC_REPORT_ELT_LEN               4
    01703 // TPC Report and Request IE's length field values
    01704 #define MAC_INFOELT_LEN_VAL_TPC_REQ          0
    01705 #define MAC_INFOELT_LEN_VAL_TPC_REP          2
    01706 // TPC Report and Request Action frame lengths
    01707 #define MAC_ACTION_FRAME_TPC_REQ_LEN         5
    01708 #define MAC_ACTION_FRAME_TPC_REP_LEN         7
    01709
    01710
    01711 // Supported Channels Element
    01712 #define MAC_INFOELT_FIRST_CHANNEL_OFT        2
    01713 #define MAC_INFOELT_NUMBER_CHANNEL_OFT       3
    01714
    01715 // Channel Switch Announcement Element
    01716 #define MAC_INFOELT_SWITCH_MODE_OFT          2
    01717 #define MAC_INFOELT_SWITCH_NEW_CHAN_OFT      3
    01718 #define MAC_INFOELT_SWITCH_COUNT_OFT         4
    01719
    01720 #define MAC_CHANNEL_SWITCH_INFO_LEN          3
    01721 #define MAC_CHANNEL_SWITCH_ELT_LEN           5
    01722
    01723 // Extended Channel Switch Announcement Element
    01724 #define MAC_INFOELT_EXT_SWITCH_MODE_OFT      2
    01725 #define MAC_INFOELT_EXT_SWITCH_NEW_CLASS     3
    01726 #define MAC_INFOELT_EXT_SWITCH_NEW_CHAN_OFT  4
    01727 #define MAC_INFOELT_EXT_SWITCH_COUNT_OFT     5
    01728
    01729 #define MAC_EXT_CHANNEL_SWITCH_INFO_LEN      4
    01730 #define MAC_EXT_CHANNEL_SWITCH_ELT_LEN       6
    01731
    01732 // Secondary Channel Offset Element
    01733 #define MAC_INFOELT_SEC_CH_OFFSET_OFT        2
    01734
    01735 #define MAC_INFOELT_SEC_CH_OFFSET_INFO_LEN   1
    01736 #define MAC_INFOELT_SEC_CH_OFFSET_ELT_LEN    3
    01737
    01738 #define MAC_INFOELT_SEC_CH_OFFSET_SEC_CH_OFT 2
    01739 #define MAC_INFOELT_SEC_CH_OFFSET_NO_SEC_CH  0
    01740 #define MAC_INFOELT_SEC_CH_OFFSET_SEC_ABOVE  1
    01741 #define MAC_INFOELT_SEC_CH_OFFSET_SEC_BELOW  3
    01742
    01743 // Wide BAndwidth Channel switch
    01744 #define MAC_INFOELT_WIDE_BW_CHAN_SWITCH_NEW_CW_OFT 2
    01745 #define MAC_INFOELT_WIDE_BW_CHAN_SWITCH_NEW_CENTER1_OFT 3
    01746 #define MAC_INFOELT_WIDE_BW_CHAN_SWITCH_NEW_CENTER2_OFT 4
    01747 #define MAC_INFOELT_WIDE_BW_CHAN_SWITCH_INFO_LEN 3
    01748 #define MAC_INFOELT_WIDE_BW_CHAN_SWITCH_ELT_LEN  5
    01749
    01750 // Measurement Request/Report Element
    01751 #define MAC_INFOELT_MEASURE_TOKEN_OFT        2
    01752 #define MAC_INFOELT_MEASURE_MODE_OFT         3
    01753 #define MAC_INFOELT_MEASURE_TYPE_OFT         4
    01754 #define MAC_INFOELT_MEASURE_CH_NBR_OFT       5
    01755 #define MAC_INFOELT_MEASURE_START_TIME_OFT   6
    01756 #define MAC_INFOELT_MEASURE_DURATION_OFT     14
    01757
    01758 #define MAC_INFOELT_MEASURE_INFO_OFT        16
    01759
    01760 #define MAC_MEAS_REQ_CNF_ELT_LEN             5
    01761 #define MAC_MEAS_REQ_ELT_LEN                16
    01762 #define MAC_MEAS_REQ_FRAME_LEN              19
    01763 #define MAC_MEAS_REP_BASIC_ELT_LEN          17
    01764 #define MAC_MEAS_REP_BASIC_FRAME_LEN        20
    01765 #define MAC_MEAS_REP_CCA_ELT_LEN            17
    01766 #define MAC_MEAS_REP_CCA_FRAME_LEN          20
    01767 #define MAC_MEAS_REP_RPI_ELT_LEN            24
    01768 #define MAC_MEAS_REP_RPI_FRAME_LEN          27
    01769 #define MAC_MEAS_REP_ERR_ELT_LEN             5
    01770 #define MAC_MEAS_REP_ERR_FRAME_LEN           8
    01771
    01772 // Mobility Domain Element (MDE)
    01773 #define MAC_INFOELT_MDE_ID_OFT               0
    01774 #define MAC_INFOELT_MDE_LEN_OFT              1
    01775 #define MAC_INFOELT_MDE_MDID_OFT             2
    01776 #define MAC_INFOELT_MDE_FT_CAPA_POL_OFT      4
    01777 #define MAC_INFOELT_MDE_MDID_LEN             2
    01778 #define MAC_INFOELT_MDE_FT_CAPA_POL_LEN      1
    01779 #define MAC_INFOELT_MDE_ELMT_LEN             3
    01780 #define MAC_INFOELT_MDE_LEN                  5
    01781
    01782 // Link Identifier Element
    01783 #define MAC_INFOELT_LINK_ID_LEN              18
    01784 #define MAC_INFOELT_LINK_ID_BSSID_OFT        2
    01785 #define MAC_INFOELT_LINK_ID_INIT_STA_OFT     8
    01786 #define MAC_INFOELT_LINK_ID_RESP_STA_OFT     14
    01787
    01788 // Link Identifier Element
    01789 #define MAC_INFOELT_CH_SWITCH_TIMING_LEN     4
    01790 #define MAC_INFOELT_CH_SWITCH_TIMING_SWTIME_OFT 2
    01791 #define MAC_INFOELT_CH_SWITCH_TIMING_SWTOUT_OFT 4
    01792
    01793 // PTI Control Element
    01794 #define MAC_INFOELT_PTI_CONTROL_LEN          3
    01795 #define MAC_INFOELT_PTI_CONTROL_TID_OFT      2
    01796 #define MAC_INFOELT_PTI_CONTROL_SEQ_CTRL_OFT 3
    01797
    01798 // TPU Buffer Status Element
    01799 #define MAC_INFOELT_TPU_BUF_STATUS_LEN       1
    01800 #define MAC_INFOELT_TPU_BUF_STATUS_AC_STATUS 2
    01801
    01802 // Spectrum management frame values:
    01803 //----------------------------------
    01804
    01805 //TO_DO_MMH:Remove unused fields
    01806
    01807 //MAC Action Spectrum Categorie => Sub Action
    01809 #define MAC_ACTION_MEASURE_REQUEST        0
    01810 #define MAC_ACTION_MEASURE_REPORT         1
    01811 #define MAC_ACTION_TPC_REQUEST            2
    01812 #define MAC_ACTION_TPC_REPORT             3
    01813 #define MAC_ACTION_CHANNEL_SWITCH         4
    01814
    01815 // Channel Switch Annoncement Mode
    01816 #define MAC_SWITCH_MODE_TX_TRAFFIC_CONT   0
    01817 #define MAC_SWITCH_MODE_TX_TRAFFIC_STOP   1
    01818
    01819 // Measurement Request Mode
    01820 #define MAC_MEASURE_MODE_ENABLE           CO_BIT(1)
    01821 #define MAC_MEASURE_MODE_REQUEST          CO_BIT(2)
    01822 #define MAC_MEASURE_MODE_REPORT           CO_BIT(3)
    01823
    01824 // Measurement Report Mode
    01825 #define MAC_MEASURE_MODE_LATE             CO_BIT(0)
    01826 #define MAC_MEASURE_MODE_INCAPABLE        CO_BIT(1)
    01827 #define MAC_MEASURE_MODE_REFUSED          CO_BIT(2)
    01828
    01829 // Measurement Request Type
    01830 #define MAC_MEASURE_TYPE_BASIC            0
    01831 #define MAC_MEASURE_TYPE_CCA              1
    01832 #define MAC_MEASURE_TYPE_RPI              2
    01833
    01834 // Measurement Report Map Bits
    01835 #define MAC_MEASURE_MAP_FREE              0x00
    01836 #define MAC_MEASURE_MAP_BSS               CO_BIT(0)
    01837 #define MAC_MEASURE_MAP_OFDM              CO_BIT(1)
    01838 #define MAC_MEASURE_MAP_UNIDENTIFIED      CO_BIT(2)
    01839 #define MAC_MEASURE_MAP_RADAR             CO_BIT(3)
    01840 #define MAC_MEASURE_MAP_UNMEASURED        CO_BIT(4)
    01841 #define MAC_MEASURE_MAP_MASK              0x1F
    01842
    01843 /*
    01844  * We set the default switch count to Zero which indicates that the switch shall occur at
    01845  * any time after the frame containing the element is transmitted.
    01846  * This is done to be able to give the STA time to know the new channel number in case the
    01847  * channel switch fails and another new channel was decided
    01848  */
    01849 #define MAC_DEFAULT_SWITCH_COUNT            0
    01850 #define MAC_DEFAULT_RADAR_CHECK_TIME        60
    01851
    01852 enum
    01853 {
    01854     REMOTE_MEAS_REQ_LATE = 1,
    01855     REMOTE_MEAS_REQ_INCAPABLE,
    01856     REMOTE_MEAS_REQ_REFUSED
    01857 };
    01858
    01867 /* HT Action Field values
    01868 *--------------------------------------------------------------------------------------*/
    01870 #define MAC_CHAN_WIDTH_HT_ACTION                0
    01871 #define MAC_SMPS_HT_ACTION                      1
    01872 #define MAC_PSMP_HT_ACTION                      2
    01873 #define MAC_SET_PCO_PHASE_HT_ACTION             3
    01874 #define MAC_CSI_HT_ACTION                       4
    01875 #define MAC_NON_COMP_BEAMFORMING_HT_ACTION      5
    01876 #define MAC_COMP_BEAMFORMING_HT_ACTION          6
    01877 #define MAC_ASEL_INDICES_FEEDBACK_HT_ACTION     7
    01878
    01879
    01880 /* HT channel width offsets
    01881 *--------------------------------------------------------------------------------------*/
    01882 #define MAC_CHAN_WIDTH_WIDTH_OFT                2
    01883
    01884 /* HT SM Power Control field offset
    01885 *--------------------------------------------------------------------------------------*/
    01886 #define MAC_SM_PRW_CTRL_OFT                     2
    01887 #define MAC_SMPS_ENABLE_BIT                     CO_BIT(0)
    01888 #define MAC_SMPS_DYNAMIC_BIT                    CO_BIT(1)
    01889
    01898 /* VHT Action Field values
    01899 *--------------------------------------------------------------------------------------*/
    01901 #define MAC_COMP_BEAMFORMING_VHT_ACTION         0
    01902 #define MAC_GROUP_ID_MGMT_VHT_ACTION            1
    01903 #define MAC_OP_MODE_NOTIF_VHT_ACTION            2
    01904
    01905
    01906 /* GroupId management offsets
    01907 *--------------------------------------------------------------------------------------*/
    01908 #define MAC_GROUP_ID_MGT_PAYL_LENGTH            26
    01909 #define MAC_GROUP_ID_MGT_MEMBERSHIP_OFT         2
    01910 #define MAC_GROUP_ID_MGT_USER_POS_OFT           10
    01911
    01912
    01913 /* VHT operation mode notification offsets
    01914 *--------------------------------------------------------------------------------------*/
    01915 #define MAC_OP_MODE_NOTIF_OPMODE_OFT            2
    01916 #define MAC_OP_MODE_NOTIF_LEN                   3
    01917 #define MAC_OP_MODE_NOTIF_PARAM_LEN             1
    01918 #define MAC_OPMODE_BW_OFT                       0
    01919 #define MAC_OPMODE_BW_MSK                       (0x3 << MAC_OPMODE_BW_OFT)
    01920 #define MAC_OPMODE_RXNSS_OFT                    4
    01921 #define MAC_OPMODE_RXNSS_MSK                    (0x7 << MAC_OPMODE_RXNSS_OFT)
    01922 #define MAC_OPMODE_RXNSS_TYPE_BIT               CO_BIT(7)
    01923
    01931 #define MAC_SA_QUERY_ACTION_OFT 1
    01932 #define MAC_SA_QUERY_REQUEST    0
    01933 #define MAC_SA_QUERY_RESPONSE   1
    01934
    01935 #define MAC_SA_QUERY_TR_ID_OFT  2
    01936 #define MAC_SA_QUERY_TR_ID_LEN  2
    01937
    01938 #define MAC_SA_QUERY_MIN_LEN  (MAC_SA_QUERY_TR_ID_OFT + MAC_SA_QUERY_TR_ID_LEN)
    01939
    01946
    01947 #define MAC_INFOELT_ID_OFT                0
    01948 #define MAC_INFOELT_LEN_OFT               1
    01949 #define MAC_INFOELT_EXT_ID_OFT            2
    01950 #define MAC_INFOELT_INFO_OFT              2
    01951 #define MAC_INFOELT_EXT_INFO_OFT          3
    01952
    01953 #define MAC_ELTID_SSID                    0
    01954 #define MAC_ELTID_RATES                   1
    01955 #define MAC_ELTID_FH                      2
    01956 #define MAC_ELTID_DS                      3
    01957 #define MAC_ELTID_CF                      4
    01958 #define MAC_ELTID_TIM                     5
    01959 #define MAC_ELTID_IBSS                    6
    01960 #define MAC_ELTID_COUNTRY                 7             // optional
    01961 #define MAC_ELTID_HOP_PARAM               8             // optional
    01962 #define MAC_ELTID_HOP_TABLE               9             // optional
    01963 #define MAC_ELTID_REQUEST                10             // optional
    01964 #define MAC_ELTID_BSS_LOAD               11
    01965 #define MAC_ELTID_EDCA_PARAM             12
    01966
    01967 #define MAC_ELTID_CHALLENGE              16
    01968 #define MAC_ELTID_POWER_CONSTRAINT       32             // Spectrum & Power Management
    01969 #define MAC_ELTID_POWER_CAPABILITY       33             // Spectrum & Power Management
    01970 #define MAC_POWER_CAPABILITY_IE_LEN      2              // Spectrum & Power Management
    01971 #define MAC_ELTID_TPC_REQUEST            34             // Spectrum & Power Management
    01972 #define MAC_ELTID_TPC_REPORT             35             // Spectrum & Power Management
    01973 #define MAC_ELTID_SUPPORTED_CHANNELS     36             // Spectrum & Power Management
    01974 #define MAC_ELTID_CHANNEL_SWITCH         37             // Spectrum & Power Management
    01975 #define MAC_ELTID_MEASUREMENT_REQUEST    38             // Spectrum & Power Management
    01976 #define MAC_ELTID_MEASUREMENT_REPORT     39             // Spectrum & Power Management
    01977 #define MAC_ELTID_QUIET                  40             // Spectrum & Power Management
    01978 #define MAC_ELTID_IBSS_DFS               41             // Spectrum & Power Management
    01979
    01980 #define MAC_ELTID_ERP                    42
    01981 #define MAC_ELTID_HT_CAPA                45
    01982 #define MAC_ELTID_QOS_CAPA               46
    01983 #define MAC_ELTID_RSN_IEEE               48
    01984 #define MAC_ELTID_EXT_RATES              50
    01985 #define MAC_ELTID_MDE                    54  // Mobility Domain
    01986 #define MAC_ELTID_FTE                    55  // Fast BSS Transition
    01987 #define MAC_ELTID_SUPP_OPER_CLASS        59
    01988 #define MAC_ELTID_EXT_CHANNEL_SWITCH     60
    01989 #define MAC_ELTID_SEC_CH_OFFSET          62
    01990 #define MAC_ELTID_WAPI                   68
    01991 #define MAC_ELTID_MULTIPLE_BSSID         71
    01992 #define MAC_ELTID_20_40_COEXISTENCE      72
    01993 #define MAC_ELTID_OBSS_SCAN_PARAM        74
    01994 #define MAC_ELTID_MGMT_MIC               76
    01995 #define MAC_ELTID_NON_TXED_BSSID_CAPA    83
    01996 #define MAC_ELTID_MULTI_BSSID_INDEX      85
    01997 #define MAC_ELTID_HT_OPERATION           61
    01998 #define MAC_ELTID_LINK_IDENTIFIER        101
    01999 #define MAC_ELTID_CHANNEL_SWITCH_TIMING  104
    02000 #define MAC_ELTID_PTI_CONTROL            105
    02001 #define MAC_ELTID_TPU_BUFFER_STATUS      106
    02002 #define MAC_ELTID_MESH_CONF              113
    02003 #define MAC_ELTID_MESH_ID                114
    02004 #define MAC_ELTID_MESH_LINK_METRIC_REP   115
    02005 #define MAC_ELTID_CONGESTION_NOTIF       116
    02006 #define MAC_ELTID_MESH_PEER_MGMT         117
    02007 #define MAC_ELTID_MESH_CHAN_SWITCH_PARAM 118
    02008 #define MAC_ELTID_MESH_AWAKE_WINDOW      119
    02009 #define MAC_ELTID_MESH_GANN              125
    02010 #define MAC_ELTID_MESH_RANN              126
    02011 #define MAC_ELTID_EXT_CAPA               127 // This number need to be confirmed.
    02012 #define MAC_ELTID_MESH_PREQ              130
    02013 #define MAC_ELTID_MESH_PREP              131
    02014 #define MAC_ELTID_MESH_PERR              132
    02015 #define MAC_ELTID_VHT_CAPA               191
    02016 #define MAC_ELTID_VHT_OPERATION          192
    02017 #define MAC_ELTID_WIDE_BANDWIDTH_CHAN_SWITCH 194
    02018 #define MAC_ELTID_VHT_TRANSMIT_PWR_ENVELOP   195
    02019 #define MAC_ELTID_CHAN_SWITCH_WRP        196
    02020 #define MAC_ELTID_OP_MODE_NOTIF          199
    02021 #define MAC_ELTID_OUI                    221 // Proprietary   (0xDD)
    02022 #define MAC_ELTID_EXT                    255
    02023
    02024 #define MAC_OUI_TYPE_WPA                 1
    02025 #define MAC_OUI_TYPE_WME                 2
    02026 #define MAC_OUI_SUBTYPE_WME_INFORMATION  0
    02027 #define MAC_OUI_SUBTYPE_WME_PARAMETER    1
    02028 #define MAC_OUI_TYPE_WMMAC               2
    02029 #define MAC_OUI_SUBTYPE_WMMAC_TSPEC      2
    02030 #define MAC_OUI_SUBTYPE_WMMAC_TSDELAY    8
    02031 #define MAC_OUI_SUBTYPE_WMMAC_TSINFO     10
    02032
    02033 #define MAC_ELTID_EXT_HE_CAPA            35
    02034 #define MAC_ELTID_EXT_HE_OPERATION       36
    02035 #define MAC_ELTID_EXT_UORA               37
    02036 #define MAC_ELTID_EXT_MU_EDCA            38
    02037
    02044
    02045 #define MAC_SUBID_MBSSID_NON_TXED_PROF   0
    02046 #define MAC_SUBID_MBSSID_VENDOR_SPECIFIC 221
    02047
    02054
    02055 #define MAC_ST_SUCCESSFUL                   0
    02056 #define MAC_ST_FAILURE                      1
    02057 #define MAC_ST_RESERVED                     2
    02058 #define MAC_ST_CAPA_NOT_SUPPORTED           10
    02059 #define MAC_ST_REASSOC_NOT_ASSOC            11
    02060 #define MAC_ST_ASSOC_DENIED                 12
    02061 #define MAC_ST_AUTH_ALGO_NOT_SUPPORTED      13
    02062 #define MAC_ST_AUTH_FRAME_WRONG_SEQ         14
    02063 #define MAC_ST_AUTH_CHALLENGE_FAILED        15
    02064 #define MAC_ST_AUTH_TIMEOUT                 16
    02065 #define MAC_ST_ASSOC_TOO_MANY_STA           17
    02066 #define MAC_ST_ASSOC_RATES_NOT_SUPPORTED    18
    02067 #define MAC_ST_ASSOC_PREAMBLE_NOT_SUPPORTED 19
    02068
    02069 #define MAC_ST_ASSOC_SPECTRUM_REQUIRED   22
    02070 #define MAC_ST_ASSOC_POWER_CAPA          23
    02071 #define MAC_ST_ASSOC_SUPPORTED_CHANNEL   24
    02072 #define MAC_ST_ASSOC_SLOT_NOT_SUPPORTED  25
    02073
    02074 #define MAC_ST_REFUSED_TEMPORARILY       30
    02075 #define MAC_ST_INVALID_MFP_POLICY        31
    02076
    02077 #define MAC_ST_INVALID_IE                40             // draft 7.0 extention
    02078 #define MAC_ST_GROUP_CIPHER_INVALID      41             // draft 7.0 extention
    02079 #define MAC_ST_PAIRWISE_CIPHER_INVALID   42             // draft 7.0 extention
    02080 #define MAC_ST_AKMP_INVALID              43             // draft 7.0 extention
    02081 #define MAC_ST_UNSUPPORTED_RSNE_VERSION  44             // draft 7.0 extention
    02082 #define MAC_ST_INVALID_RSNE_CAPA         45             // draft 7.0 extention
    02083 #define MAC_ST_CIPHER_SUITE_REJECTED     46             // draft 7.0 extention
    02084
    02092
    02093 #define MAC_RS_RESERVED                           0
    02094 #define MAC_RS_UNSPECIFIED                        1
    02095 #define MAC_RS_PREVIOUS_AUTH_NOT_VALID            2
    02096 #define MAC_RS_DEAUTH_SENDER_LEFT_IBSS_ESS        3
    02097 #define MAC_RS_DIASSOC_INACTIVITY                 4
    02098 #define MAC_RS_DIASSOC_TOO_MANY_STA               5
    02099 #define MAC_RS_CLASS_2_FORBIDDEN                  6
    02100 #define MAC_RS_CLASS_3_FORBIDDEN                  7
    02101 #define MAC_RS_DEAUTH_SENDER_LEFT_BSS             8
    02102 #define MAC_RS_STA_REQ_ASSOC_NOT_AUTH             9
    02103 #define MAC_RS_DIASSOC_POWER_CAPA                10
    02104 #define MAC_RS_DIASSOC_SUPPORTED_CHANNEL         11
    02105 #define MAC_RS_RESERVED_12                       12
    02106 #define MAC_RS_INVALID_IE                        13
    02107 #define MAC_RS_MIC_FAILURE                       14
    02108 #define MAC_RS_4WAY_HANDSHAKE_TIMEOUT            15
    02109 #define MAC_RS_GROUP_KEY_UPDATE_TIMEOUT          16
    02110 #define MAC_RS_BAD_RSNIE                         17
    02111 #define MAC_RS_GROUP_CIPHER_INVALID              18
    02112 #define MAC_RS_PAIRWISE_CIPHER_INVALID           19
    02113 #define MAC_RS_AKMP_INVALID                      20
    02114 #define MAC_RS_UNSUPPORTED_RSNE_VERSION          21
    02115 #define MAC_RS_INVALID_RSNE_CAPA                 22
    02116 #define MAC_RS_802_1X_AUTH_FAIL                  23
    02117 #define MAC_RS_CIPHER_SUITE_REJECTED             24
    02118 #define MAC_RS_TIMEOUT                           39
    02119
    02127
    02128 #define MAC_WME_PARAM_LEN          16
    02130 #define MAC_RAW_WME_INFO_ELMT_DEFAULT                                         \
    02131 {                                                                             \
    02132     MAC_ELTID_OUI, 0x07,                                                      \
    02133     0x00, 0x50, 0xF2, MAC_OUI_TYPE_WME,         /* additionnal WPA OUI     */ \
    02134     MAC_OUI_SUBTYPE_WME_INFORMATION, 0x01,      /* OUI subtype and version */ \
    02135     0x00                                        /* QoS field               */ \
    02136 }
    02137
    02138 // Best effort
    02139 #define MAC_ACI_BE                        0
    02140 // Background
    02141 #define MAC_ACI_BK                        1
    02142 // Video
    02143 #define MAC_ACI_VI                        2
    02144 // Voice
    02145 #define MAC_ACI_VO                        3
    02146
    02147 #define MAC_ACI_OFT                       5
    02148
    02149 #define MAC_ECWMIN                        4
    02150 #define MAC_ECWMAX                        10
    02151
    02152 #define MAC_ECW_BK_MIN                  MAC_ECWMIN
    02153 #define MAC_ECW_BE_MIN                  MAC_ECWMIN
    02154 //#define MAC_ECW_VI_MIN                  ((MAC_ECWMIN+1)/2 - 1)
    02155 //#define MAC_ECW_VO_MIN                  ((MAC_ECWMIN+1)/4 - 1)
    02156 #define MAC_ECW_VI_MIN                  ((MAC_ECWMIN) - 1)
    02157 #define MAC_ECW_VO_MIN                  ((MAC_ECWMIN)/2)
    02158
    02159 #define MAC_ECW_BK_MAX                  MAC_ECWMAX
    02160 #define MAC_ECW_BE_MAX                  MAC_ECWMAX
    02161 #define MAC_ECW_VI_MAX                  MAC_ECWMIN
    02162 //#define MAC_ECW_VO_MAX                  ((MAC_ECWMIN+1)/2 - 1)
    02163 #define MAC_ECW_VO_MAX                  ((MAC_ECWMIN) - 1)
    02164
    02165 #define MAC_AIFSN_BK                    7
    02166 #define MAC_AIFSN_BE                    3
    02167 #define MAC_AIFSN_VI                    2
    02168 #define MAC_AIFSN_VO                    2
    02169
    02170 #define MAC_AC_BE_TXOP                  0
    02171 #define MAC_AC_BK_TXOP                  0
    02172 #define MAC_AC_VI_TXOP_b                188    // 6016us / 32 us
    02173 #define MAC_AC_VI_TXOP_ag               94     // 3008 ms / 32 usec
    02174
    02175
    02176 #define MAC_AC_VO_TXOP_b                102    // 3264us / 32 us
    02177 #define MAC_AC_VO_TXOP_ag                47    // 1504us / 32 us
    02178
    02179
    02187 // Cipher suites
    02188 #define MAC_RSNIE_CIPHER_USE_GROUP            0x000FAC00
    02189 #define MAC_RSNIE_CIPHER_WEP_40               0x000FAC01
    02190 #define MAC_RSNIE_CIPHER_TKIP                 0x000FAC02
    02191 #define MAC_RSNIE_CIPHER_RSVD                 0x000FAC03
    02192 #define MAC_RSNIE_CIPHER_CCMP_128             0x000FAC04
    02193 #define MAC_RSNIE_CIPHER_WEP_104              0x000FAC05
    02194 #define MAC_RSNIE_CIPHER_BIP_CMAC_128         0x000FAC06
    02195 #define MAC_RSNIE_CIPHER_NO_GROUP             0x000FAC07
    02196 #define MAC_RSNIE_CIPHER_GCMP_128             0x000FAC08
    02197 #define MAC_RSNIE_CIPHER_GCMP_256             0x000FAC09
    02198 #define MAC_RSNIE_CIPHER_CCMP_256             0x000FAC0A
    02199 #define MAC_RSNIE_CIPHER_BIP_GMAC_128         0x000FAC0B
    02200 #define MAC_RSNIE_CIPHER_BIP_GMAC_256         0x000FAC0C
    02201 #define MAC_RSNIE_CIPHER_BIP_CMAC_256         0x000FAC0D
    02202
    02203 // AKM suites
    02204 #define MAC_RSNIE_AKM_8021X                   0x000FAC01
    02205 #define MAC_RSNIE_AKM_PSK                     0x000FAC02
    02206 #define MAC_RSNIE_AKM_FT_8021X                0x000FAC03
    02207 #define MAC_RSNIE_AKM_FT_PSK                  0x000FAC04
    02208 #define MAC_RSNIE_AKM_8021X_SHA256            0x000FAC05
    02209 #define MAC_RSNIE_AKM_PSK_SHA256              0x000FAC06
    02210 #define MAC_RSNIE_AKM_TDLS                    0x000FAC07
    02211 #define MAC_RSNIE_AKM_SAE                     0x000FAC08
    02212 #define MAC_RSNIE_AKM_FT_OVER_SAE             0x000FAC09
    02213 #define MAC_RSNIE_AKM_8021X_SUITE_B           0x000FAC0B
    02214 #define MAC_RSNIE_AKM_8021X_SUITE_B_192       0x000FAC0C
    02215 #define MAC_RSNIE_AKM_FILS_SHA256             0x000FAC0D
    02216 #define MAC_RSNIE_AKM_FILS_SHA384             0x000FAC0F
    02217 #define MAC_RSNIE_AKM_FT_FILS_SHA256          0x000FAC10
    02218 #define MAC_RSNIE_AKM_FT_FILS_SHA384          0x000FAC11
    02219 #define MAC_RSNIE_AKM_OWE                     0x000FAC12
    02220
    02221 // RSN CAPA
    02222 #define MAC_RSNIE_CAPA_PREAUTH_BIT            CO_BIT(0)
    02223 #define MAC_RSNIE_CAPA_NO_PAIRWISE_BIT        CO_BIT(1)
    02224 #define MAC_RSNIE_CAPA_PTKSA_REPLAY_CNT_MSK   0x000C
    02225 #define MAC_RSNIE_CAPA_GTKSA_REPLAY_CNT_MSK   0x0030
    02226 #define MAC_RSNIE_CAPA_MFPR_BIT               CO_BIT(6)
    02227 #define MAC_RSNIE_CAPA_MFPC_BIT               CO_BIT(7)
    02228 #define MAC_RSNIE_CAPA_JOINT_MULIT_BAND_BIT   CO_BIT(8)
    02229 #define MAC_RSNIE_CAPA_PEERKEY_BIT            CO_BIT(9)
    02230 #define MAC_RSNIE_CAPA_SPP_AMSDU_CAP_BIT      CO_BIT(10)
    02231 #define MAC_RSNIE_CAPA_SPP_AMSDU_REQ_BIT      CO_BIT(11)
    02232 #define MAC_RSNIE_CAPA_PBAC_BIT               CO_BIT(12)
    02233 #define MAC_RSNIE_CAPA_EXT_KEY_ID_BIT         CO_BIT(13)
    02234
    02242 // Cipher suites
    02243 #define MAC_WPA_CIPHER_TKIP                   0x0050F202
    02244 #define MAC_WPA_CIPHER_CCMP                   0x0050F204
    02245
    02246 // AKM suites
    02247 #define MAC_WPA_AKM_8021X                     0x0050F201
    02248 #define MAC_WPA_AKM_PSK                       0x0050F202
    02249
    02256 // Cipher suites
    02257 #define MAC_WAPI_CIPHER_WPI_SMS4              0x00147201
    02258
    02259 // AKM suites
    02260 #define MAC_WAPI_AKM_CERT                     0x00147201
    02261 #define MAC_WAPI_AKM_PSK                      0x00147202
    02262
    02270
    02271 #define MAC_COUNTRY_2G4_FULL      {  3, {'x', 'x', ' '}, { 1, 14, 30}}
    02272 #define MAC_COUNTRY_2G4_USA       {  6, {'U', 'S', ' '}, { 1, 11, 30}} // X'10' FCC
    02273 #define MAC_COUNTRY_2G4_CANADA    {  6, {'C', 'A', ' '}, { 1, 11, 30}} // X'20' DOC/IC
    02274 #define MAC_COUNTRY_2G4_EUROPE    {  6, {'E', 'U', ' '}, { 1, 13, 30}} // X'30' ETSI
    02275 #define MAC_COUNTRY_2G4_SPAIN     {  6, {'S', 'P', ' '}, {10,  2, 30}} // X'31'
    02276 #define MAC_COUNTRY_2G4_FRANCE    {  6, {'F', 'R', ' '}, {10,  4, 20}} // X'32'
    02277 #define MAC_COUNTRY_2G4_JAPAN     {  6, {'J', 'P', ' '}, {14,  1, 30}} // X'40'
    02278 #define MAC_COUNTRY_2G4_CHINA     {  6, {'C', 'N', ' '}, { 1, 13, 30}} // X'50'
    02279
    02280 #define MAC_COUNTRY_5G_FULL       {  3, {'x', 'x', ' '}, {{ 36, 8, 23}}}
    02281 #define MAC_COUNTRY_5G_USA        { 18, {'U', 'S', ' '}, {{ 36, 4, 16},  {52, 4, 23},  {100, 11, 23},  {149, 4, 29},  {165, 1, 30}}}
    02282 #define MAC_COUNTRY_5G_FRANCE     { 12, {'F', 'R', ' '}, {{ 36, 4, 23},  {52, 4, 23},  {100, 11, 40}}}
    02283 #define MAC_COUNTRY_5G_JAPAN      { 12, {'J', 'P', ' '}, {{184, 4, 24},  { 8, 3, 24},  { 34,  4, 22}}}
    02284
    02292
    02293 #define MAC_AUTH_ALGO_OPEN                0
    02294 #define MAC_AUTH_ALGO_SHARED              1
    02295 #define MAC_AUTH_ALGO_FT                  2
    02296 #define MAC_AUTH_ALGO_SAE                 3
    02297
    02298
    02299 #define MAC_AUTH_FIRST_SEQ                1
    02300 #define MAC_AUTH_SECOND_SEQ               2
    02301 #define MAC_AUTH_THIRD_SEQ                3
    02302 #define MAC_AUTH_FOURTH_SEQ               4
    02303
    02311
    02312 // Defines for encryption status
    02313 #define MAC_ENC_NONE               0
    02314 #define MAC_ENC_WEP                0x01
    02315 #define MAC_ENC_WPA                0x02
    02316 #define MAC_ENC_TKIP               0x04
    02317 #define MAC_ENC_WPA2               0x10
    02318 #define MAC_ENC_CCMP               0x20
    02319
    02320 // Key Offsets
    02321 #define  MAC_ENC_KEY_OFFSET         0
    02322 #define  MAC_AUTHENTICATOR_KEY     16
    02323 #define  MAC_SUPPLICANT_KEY        24
    02324 #define  MAC_ENC_KEY_LEN           16
    02325 #define  MAC_MICHAEL_KEY_LEN        8
    02326
    02328 #define EIV_PRESENT     (0x2000)
    02329
    02336
    02337 #define MAC_BEACON_SIZE             (102 + MAC_TIM_SIZE + 128)
    02339 #define MAC_PROBEREQ_SIZE           100
    02341 #define MAC_PROBERSP_SIZE               (102 + 128)
    02343 #define MAC_NULL_FRAME_SIZE         MAC_SHORT_MAC_HDR_LEN
    02345 #define MAC_QOS_NULL_FRAME_SIZE     MAC_SHORT_QOS_MAC_HDR_LEN
    02347 #define MAC_PSPOLL_FRAME_SIZE       MAC_LONG_CTRLFRAME_LEN
    02348
    02350
    02351 struct mac_hdr_ctrl_short
    02352 {
    02354     uint16_t fctl;
    02356     uint16_t durid;
    02358     struct mac_addr addr1;
    02359 } __PACKED;
    02360
    02362 struct mac_hdr_ctrl
    02363 {
    02365     uint16_t fctl;
    02367     uint16_t durid;
    02369     struct mac_addr addr1;
    02371     struct mac_addr addr2;
    02372 } __PACKED;
    02373
    02375 struct mac_hdr
    02376 {
    02378     uint16_t fctl;
    02380     uint16_t durid;
    02382     struct mac_addr addr1;
    02384     struct mac_addr addr2;
    02386     struct mac_addr addr3;
    02388     uint16_t seq;
    02389 } __PACKED;
    02390
    02392 struct mac_hdr_qos
    02393 {
    02395     uint16_t fctl;
    02397     uint16_t durid;
    02399     struct mac_addr addr1;
    02401     struct mac_addr addr2;
    02403     struct mac_addr addr3;
    02405     uint16_t seq;
    02407     uint16_t qos;
    02408 } __PACKED;
    02409
    02411 struct mac_hdr_qos_htc
    02412 {
    02414     uint16_t fctl;
    02416     uint16_t durid;
    02418     struct mac_addr addr1;
    02420     struct mac_addr addr2;
    02422     struct mac_addr addr3;
    02424     uint16_t seq;
    02426     uint16_t qos;
    02428     uint32_t htc;
    02429 } __PACKED;
    02430
    02432 struct mac_hdr_long
    02433 {
    02435     uint16_t fctl;
    02437     uint16_t durid;
    02439     struct mac_addr addr1;
    02441     struct mac_addr addr2;
    02443     struct mac_addr addr3;
    02445     uint16_t seq;
    02447     struct mac_addr addr4;
    02448 } __PACKED;
    02449
    02450
    02452 struct mac_hdr_long_qos
    02453 {
    02455     uint16_t fctl;
    02457     uint16_t durid;
    02459     struct mac_addr addr1;
    02461     struct mac_addr addr2;
    02463     struct mac_addr addr3;
    02465     uint16_t seq;
    02467     struct mac_addr addr4;
    02469     uint16_t qos;
    02470 } __PACKED;
    02471
    02473 struct mac_eth_hdr
    02474 {
    02476     struct mac_addr da;
    02478     struct mac_addr sa;
    02480     uint16_t len;
    02481 } __PACKED;
    02482
    02484 struct bcn_frame
    02485 {
    02487     struct mac_hdr h;
    02489     uint64_t tsf;
    02491     uint16_t bcnint;
    02493     uint16_t capa;
    02495     uint8_t variable[];
    02496 } __PACKED;
    02497
    02499 struct preq_frame
    02500 {
    02502     struct mac_hdr h;
    02504     uint8_t payload[];
    02505 } __PACKED;
    02506
    02508 struct bar_frame
    02509 {
    02511     struct mac_hdr_ctrl h;
    02513     uint16_t bar_cntrl;
    02515     uint16_t bar_information;
    02516 } __PACKED;
    02517
    02519 struct ba_base
    02520 {
    02522     struct mac_hdr_ctrl h;
    02524     uint16_t ba_cntrl;
    02525 } __PACKED;
    02526
    02528 struct ba_ssc_bitmap
    02529 {
    02531     uint16_t ssc;
    02533     uint16_t bitmap[];
    02534 } __PACKED;
    02535
    02537 struct ba_ssc_bitmap_32
    02538 {
    02540     uint16_t ssc;
    02542     uint16_t bitmap[2];
    02543 } __PACKED;
    02544
    02546 struct ba_ssc_bitmap_64
    02547 {
    02549     uint16_t ssc;
    02551     uint16_t bitmap[4];
    02552 } __PACKED;
    02553
    02555 struct ba_ssc_bitmap_128
    02556 {
    02558     uint16_t ssc;
    02560     uint16_t bitmap[8];
    02561 } __PACKED;
    02562
    02564 struct ba_ssc_bitmap_256
    02565 {
    02567     uint16_t ssc;
    02569     uint16_t bitmap[16];
    02570 } __PACKED;
    02571
    02573 struct ba_msta_aid_tid_info
    02574 {
    02576     uint16_t aid_tid;
    02578     struct ba_ssc_bitmap ssc_bitmap;
    02579 } __PACKED;
    02580
    02582 struct ba_comp_frame
    02583 {
    02585     struct mac_hdr_ctrl h;
    02587     uint16_t ba_cntrl;
    02589     struct ba_ssc_bitmap_64 ssc_bitmap;
    02590 } __PACKED;
    02591
    02593 struct amsdu_hdr
    02594 {
    02596     struct mac_addr da;
    02598     struct mac_addr sa;
    02600     uint16_t len;
    02601 } __PACKED;
    02602
    02604 struct he_basic_trigger_user_info
    02605 {
    02607     uint32_t user_info1;
    02609     uint8_t ul_target_rssi;
    02611     uint8_t user_info2;
    02612 } __PACKED;
    02613
    02615 struct he_user_info_base
    02616 {
    02618     uint32_t user_info1;
    02620     uint8_t ul_target_rssi;
    02621 } __PACKED;
    02622
    02624 struct he_trigger_base
    02625 {
    02627     struct mac_hdr_ctrl h;
    02629     uint32_t common[2];
    02630 } __PACKED;
    02631
    02637
    02638 #define BAR_PAYLOAD_LEN        (sizeof_b(struct bar_frame))
    02640 #define BAR_FRM_LEN_WITH_FCS   (BAR_PAYLOAD_LEN + MAC_FCS_LEN)
    02641
    02643 #define BAR_CNTL_ACK_TYPE_BIT    CO_BIT(0)
    02645 #define BAR_CNTL_MULTI_TID_BIT   CO_BIT(1)
    02647 #define BAR_CNTL_COMPRESSED_BIT  CO_BIT(2)
    02648
    02650 #define BAR_CNTL_TID_OFT         12
    02652 #define BAR_CNTL_TID_MSK         (0xF<<BAR_CNTL_TID_OFT)
    02653
    02655 #define BA_COMPRESSED_LEN        (sizeof_b(struct ba_comp_frame))
    02656
    02658 #define BA_PAYL_TYPE_OFT        1
    02660 #define BA_PAYL_TYPE_MSK        (0xF << BA_PAYL_TYPE_OFT)
    02662 #define BA_BASIC_TYPE           (0x0 << BA_PAYL_TYPE_OFT)
    02664 #define BA_EXT_COMPRESSED_TYPE  (0x1 << BA_PAYL_TYPE_OFT)
    02666 #define BA_COMPRESSED_TYPE      (0x2 << BA_PAYL_TYPE_OFT)
    02668 #define BA_MULTI_TID_TYPE       (0x3 << BA_PAYL_TYPE_OFT)
    02670 #define BA_GCR_TYPE             (0x6 << BA_PAYL_TYPE_OFT)
    02672 #define BA_GLK_GCR_TYPE         (0xA << BA_PAYL_TYPE_OFT)
    02674 #define BA_MULTI_STA_TYPE       (0xB << BA_PAYL_TYPE_OFT)
    02675
    02677 #define BA_PAYL_TID_BIT_OFT     12
    02679 #define BA_PAYL_TID_BIT_MSK     (0xF << BA_PAYL_TID_BIT_OFT)
    02681 #define SN_IN_SSC_BIT_OFT       4
    02682
    02684 #define BA_MULTI_STA_AID_OFT    0
    02686 #define BA_MULTI_STA_AID_MSK    (0x7FF << BA_MULTI_STA_AID_OFT)
    02688 #define BA_MULTI_STA_ACK_BIT    CO_BIT(11)
    02690 #define BA_MULTI_STA_TID_OFT    12
    02692 #define BA_MULTI_STA_TID_MSK    (0xF << BA_MULTI_STA_TID_OFT)
    02693
    02701
    02702 #define HE_TRIG_TYPE_OFT         0
    02704 #define HE_TRIG_TYPE_MSK         (0xF << HE_TRIG_TYPE_OFT)
    02706 #define HE_TRIG_TYPE_BASIC       (0 << HE_TRIG_TYPE_OFT)
    02708 #define HE_TRIG_TYPE_BSRP        (4 << HE_TRIG_TYPE_OFT)
    02710 #define HE_TRIG_UL_LENGTH_OFT    4
    02712 #define HE_TRIG_UL_LENGTH_MSK    (0xFFF << HE_TRIG_UL_LENGTH_OFT)
    02714 #define HE_TRIG_MORE_TF_BIT      CO_BIT(16)
    02716 #define HE_TRIG_CS_REQUIRED_BIT  CO_BIT(17)
    02718 #define HE_TRIG_UL_BW_OFT        18
    02720 #define HE_TRIG_UL_BW_MSK        (0x3 << HE_TRIG_UL_BW_OFT)
    02722 #define HE_TRIG_GI_LTF_TYPE_OFT  20
    02724 #define HE_TRIG_GI_LTF_TYPE_MSK  (0x3 << HE_TRIG_GI_LTF_TYPE_OFT)
    02725
    02727 #define HE_TRIG_AID12_OFT        0
    02729 #define HE_TRIG_AID12_MSK        (0xFFF << HE_TRIG_AID12_OFT)
    02731 #define HE_TRIG_RU_IN_SEC_BIT    CO_BIT(12)
    02733 #define HE_TRIG_RU_ALLOC_OFT     13
    02735 #define HE_TRIG_RU_ALLOC_MSK     (0x7F << HE_TRIG_RU_ALLOC_OFT)
    02737 #define HE_TRIG_FEC_CODING_BIT   CO_BIT(20)
    02739 #define HE_TRIG_UL_MCS_OFT       21
    02741 #define HE_TRIG_UL_MCS_MSK       (0xF << HE_TRIG_UL_MCS_OFT)
    02743 #define HE_TRIG_DCM_BIT          CO_BIT(25)
    02745 #define HE_TRIG_UL_SSS_OFT       26
    02747 #define HE_TRIG_UL_SSS_MSK       (0x7 << HE_TRIG_UL_SSS_OFT)
    02749 #define HE_TRIG_UL_NSS_OFT       29
    02751 #define HE_TRIG_UL_NSS_MSK       (0x7 << HE_TRIG_UL_NSS_OFT)
    02753 #define HE_TRIG_SPC_FACTOR_OFT   0
    02755 #define HE_TRIG_SPC_FACTOR_MSK   (0x3 << HE_TRIG_SPC_FACTOR_OFT)
    02757 #define HE_TRIG_TID_AGG_OFT      2
    02759 #define HE_TRIG_TID_AGG_MSK      (0x7 << HE_TRIG_TID_AGG_OFT)
    02761 #define HE_TRIG_PREF_AC_OFT      6
    02763 #define HE_TRIG_PREF_AC_MSK      (0x3 << HE_TRIG_PREF_AC_OFT)
    02764
    02766 #define HE_TRIG_FRM_MIN_LEN      29
    02767
    02772
    02773 #endif // _MAC_FRAME_H_