Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | |
| 29 | /* |
| 30 | * This file sir_mac_prot_def.h contains the MAC/PHY protocol |
| 31 | * definitions used across various projects. |
| 32 | */ |
| 33 | |
| 34 | #ifndef __MAC_PROT_DEFS_H |
| 35 | #define __MAC_PROT_DEFS_H |
| 36 | |
| 37 | #include <linux/if_ether.h> |
| 38 | |
| 39 | #include "cds_api.h" |
| 40 | #include "sir_types.h" |
| 41 | #include "wni_cfg.h" |
| 42 | |
| 43 | /* /Capability information related */ |
| 44 | #define CAPABILITY_INFO_DELAYED_BA_BIT 14 |
| 45 | #define CAPABILITY_INFO_IMMEDIATE_BA_BIT 15 |
| 46 | |
| 47 | /* / 11h MAC defaults */ |
| 48 | #define SIR_11A_CHANNEL_BEGIN 34 |
| 49 | #define SIR_11A_CHANNEL_END 165 |
| 50 | #define SIR_11B_CHANNEL_BEGIN 1 |
| 51 | #define SIR_11B_CHANNEL_END 14 |
| 52 | #define SIR_11A_FREQUENCY_OFFSET 4 |
| 53 | #define SIR_11B_FREQUENCY_OFFSET 1 |
| 54 | #define SIR_11P_CHANNEL_BEGIN 170 |
| 55 | #define SIR_11P_CHANNEL_END 184 |
| 56 | |
| 57 | /* / Current version of 802.11 */ |
| 58 | #define SIR_MAC_PROTOCOL_VERSION 0 |
| 59 | |
| 60 | /* Frame Type definitions */ |
| 61 | |
| 62 | #define SIR_MAC_MGMT_FRAME 0x0 |
| 63 | #define SIR_MAC_CTRL_FRAME 0x1 |
| 64 | #define SIR_MAC_DATA_FRAME 0x2 |
| 65 | |
| 66 | #define SIR_MAC_FRAME_TYPE_START 0x0 |
| 67 | #define SIR_MAC_FRAME_TYPE_END 0x3 |
| 68 | |
| 69 | /* Control frame subtype definitions */ |
| 70 | |
| 71 | #define SIR_MAC_CTRL_RR 4 |
| 72 | #define SIR_MAC_CTRL_BAR 8 |
| 73 | #define SIR_MAC_CTRL_BA 9 |
| 74 | #define SIR_MAC_CTRL_PS_POLL 10 |
| 75 | #define SIR_MAC_CTRL_RTS 11 |
| 76 | #define SIR_MAC_CTRL_CTS 12 |
| 77 | #define SIR_MAC_CTRL_ACK 13 |
| 78 | #define SIR_MAC_CTRL_CF_END 14 |
| 79 | #define SIR_MAC_CTRL_CF_END_ACK 15 |
| 80 | |
| 81 | #define SIR_MAC_MAX_DURATION_MICRO_SECONDS 32767 |
| 82 | |
| 83 | /* Data frame subtype definitions */ |
| 84 | #define SIR_MAC_DATA_DATA 0 |
| 85 | #define SIR_MAC_DATA_DATA_ACK 1 |
| 86 | #define SIR_MAC_DATA_DATA_POLL 2 |
| 87 | #define SIR_MAC_DATA_DATA_ACK_POLL 3 |
| 88 | #define SIR_MAC_DATA_NULL 4 |
| 89 | #define SIR_MAC_DATA_NULL_ACK 5 |
| 90 | #define SIR_MAC_DATA_NULL_POLL 6 |
| 91 | #define SIR_MAC_DATA_NULL_ACK_POLL 7 |
| 92 | #define SIR_MAC_DATA_QOS_DATA 8 |
| 93 | #define SIR_MAC_DATA_QOS_DATA_ACK 9 |
| 94 | #define SIR_MAC_DATA_QOS_DATA_POLL 10 |
| 95 | #define SIR_MAC_DATA_QOS_DATA_ACK_POLL 11 |
| 96 | #define SIR_MAC_DATA_QOS_NULL 12 |
| 97 | #define SIR_MAC_DATA_QOS_NULL_ACK 13 |
| 98 | #define SIR_MAC_DATA_QOS_NULL_POLL 14 |
| 99 | #define SIR_MAC_DATA_QOS_NULL_ACK_POLL 15 |
| 100 | |
| 101 | #define SIR_MAC_FRAME_SUBTYPE_START 0 |
| 102 | #define SIR_MAC_FRAME_SUBTYPE_END 16 |
| 103 | |
| 104 | #define SIR_MAC_DATA_QOS_MASK 8 |
| 105 | #define SIR_MAC_DATA_NULL_MASK 4 |
| 106 | #define SIR_MAC_DATA_POLL_MASK 2 |
| 107 | #define SIR_MAC_DATA_ACK_MASK 1 |
| 108 | |
| 109 | /* Management frame subtype definitions */ |
| 110 | |
| 111 | #define SIR_MAC_MGMT_ASSOC_REQ 0x0 |
| 112 | #define SIR_MAC_MGMT_ASSOC_RSP 0x1 |
| 113 | #define SIR_MAC_MGMT_REASSOC_REQ 0x2 |
| 114 | #define SIR_MAC_MGMT_REASSOC_RSP 0x3 |
| 115 | #define SIR_MAC_MGMT_PROBE_REQ 0x4 |
| 116 | #define SIR_MAC_MGMT_PROBE_RSP 0x5 |
| 117 | #define SIR_MAC_MGMT_TIME_ADVERT 0x6 |
| 118 | #define SIR_MAC_MGMT_BEACON 0x8 |
| 119 | #define SIR_MAC_MGMT_ATIM 0x9 |
| 120 | #define SIR_MAC_MGMT_DISASSOC 0xA |
| 121 | #define SIR_MAC_MGMT_AUTH 0xB |
| 122 | #define SIR_MAC_MGMT_DEAUTH 0xC |
| 123 | #define SIR_MAC_MGMT_ACTION 0xD |
| 124 | #define SIR_MAC_MGMT_RESERVED15 0xF |
| 125 | |
| 126 | /* Action frame categories */ |
| 127 | |
| 128 | #define SIR_MAC_ACTION_SPECTRUM_MGMT 0 |
| 129 | #define SIR_MAC_ACTION_QOS_MGMT 1 |
| 130 | #define SIR_MAC_ACTION_DLP 2 |
| 131 | #define SIR_MAC_ACTION_PUBLIC_USAGE 4 |
| 132 | #define SIR_MAC_ACTION_RRM 5 |
| 133 | #define SIR_MAC_ACTION_FAST_BSS_TRNST 6 |
| 134 | #define SIR_MAC_ACTION_HT 7 |
| 135 | #define SIR_MAC_ACTION_SA_QUERY 8 |
| 136 | #define SIR_MAC_ACTION_PROT_DUAL_PUB 9 |
| 137 | #define SIR_MAC_ACTION_WNM 10 |
| 138 | #define SIR_MAC_ACTION_UNPROT_WNM 11 |
| 139 | #define SIR_MAC_ACTION_TDLS 12 |
| 140 | #define SIR_MAC_ACITON_MESH 13 |
| 141 | #define SIR_MAC_ACTION_MHF 14 |
| 142 | #define SIR_MAC_SELF_PROTECTED 15 |
| 143 | #define SIR_MAC_ACTION_WME 17 |
| 144 | #define SIR_MAC_ACTION_VHT 21 |
| 145 | |
| 146 | /* QoS management action codes */ |
| 147 | |
| 148 | #define SIR_MAC_QOS_ADD_TS_REQ 0 |
| 149 | #define SIR_MAC_QOS_ADD_TS_RSP 1 |
| 150 | #define SIR_MAC_QOS_DEL_TS_REQ 2 |
| 151 | #define SIR_MAC_QOS_SCHEDULE 3 |
| 152 | #define SIR_MAC_QOS_MAP_CONFIGURE 4 |
| 153 | /* and these are proprietary */ |
| 154 | #define SIR_MAC_QOS_DEF_BA_REQ 4 |
| 155 | #define SIR_MAC_QOS_DEF_BA_RSP 5 |
| 156 | |
| 157 | #ifdef ANI_SUPPORT_11H |
| 158 | #define SIR_MAC_ACTION_MEASURE_REQUEST_ID 0 |
| 159 | #define SIR_MAC_ACTION_MEASURE_REPORT_ID 1 |
| 160 | #define SIR_MAC_ACTION_TPC_REQUEST_ID 2 |
| 161 | #define SIR_MAC_ACTION_TPC_REPORT_ID 3 |
| 162 | #endif /* ANI_SUPPORT_11H */ |
| 163 | #define SIR_MAC_ACTION_CHANNEL_SWITCH_ID 4 |
| 164 | |
| 165 | #ifdef ANI_SUPPORT_11H |
| 166 | #define SIR_MAC_BASIC_MEASUREMENT_TYPE 0 |
| 167 | #define SIR_MAC_CCA_MEASUREMENT_TYPE 1 |
| 168 | #define SIR_MAC_RPI_MEASUREMENT_TYPE 2 |
| 169 | #endif /* ANI_SUPPORT_11H */ |
| 170 | |
| 171 | /* RRM related. */ |
| 172 | /* Refer IEEE Std 802.11k-2008, Section 7.3.2.21, table 7.29 */ |
| 173 | #if defined WLAN_FEATURE_VOWIFI |
| 174 | |
| 175 | #define SIR_MAC_RRM_CHANNEL_LOAD_TYPE 3 |
| 176 | #define SIR_MAC_RRM_NOISE_HISTOGRAM_BEACON 4 |
| 177 | #define SIR_MAC_RRM_BEACON_TYPE 5 |
| 178 | #define SIR_MAC_RRM_FRAME_TYPE 6 |
| 179 | #define SIR_MAC_RRM_STA_STATISTICS_TYPE 7 |
| 180 | #define SIR_MAC_RRM_LCI_TYPE 8 |
| 181 | #define SIR_MAC_RRM_TSM_TYPE 9 |
| 182 | #define SIR_MAC_RRM_LOCATION_CIVIC_TYPE 11 |
| 183 | #define SIR_MAC_RRM_FINE_TIME_MEAS_TYPE 16 |
| 184 | |
| 185 | /* RRM action codes */ |
| 186 | #define SIR_MAC_RRM_RADIO_MEASURE_REQ 0 |
| 187 | #define SIR_MAC_RRM_RADIO_MEASURE_RPT 1 |
| 188 | #define SIR_MAC_RRM_LINK_MEASUREMENT_REQ 2 |
| 189 | #define SIR_MAC_RRM_LINK_MEASUREMENT_RPT 3 |
| 190 | #define SIR_MAC_RRM_NEIGHBOR_REQ 4 |
| 191 | #define SIR_MAC_RRM_NEIGHBOR_RPT 5 |
| 192 | |
| 193 | #endif |
| 194 | |
| 195 | /* VHT Action Field */ |
| 196 | #ifdef WLAN_FEATURE_11AC |
| 197 | #define SIR_MAC_VHT_GID_NOTIFICATION 1 |
| 198 | #define SIR_MAC_VHT_OPMODE_NOTIFICATION 2 |
| 199 | #endif |
| 200 | |
| 201 | #define NUM_OF_SOUNDING_DIMENSIONS 1 /*Nss - 1, (Nss = 2 for 2x2)*/ |
| 202 | /* HT Action Field Codes */ |
| 203 | #define SIR_MAC_SM_POWER_SAVE 1 |
| 204 | |
| 205 | /* DLP action frame types */ |
| 206 | #define SIR_MAC_DLP_REQ 0 |
| 207 | #define SIR_MAC_DLP_RSP 1 |
| 208 | #define SIR_MAC_DLP_TEARDOWN 2 |
| 209 | |
| 210 | /* block acknowledgement action frame types */ |
| 211 | #define SIR_MAC_ACTION_VENDOR_SPECIFIC 9 |
| 212 | #define SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY 0x7F |
| 213 | #define SIR_MAC_ACTION_P2P_SUBTYPE_PRESENCE_RSP 2 |
| 214 | |
| 215 | /* Public Action for 20/40 BSS Coexistence */ |
| 216 | #define SIR_MAC_ACTION_2040_BSS_COEXISTENCE 0 |
| 217 | |
| 218 | #ifdef WLAN_FEATURE_11W |
| 219 | /* 11w SA query request/response action frame category code */ |
| 220 | #define SIR_MAC_SA_QUERY_REQ 0 |
| 221 | #define SIR_MAC_SA_QUERY_RSP 1 |
| 222 | #endif |
| 223 | |
| 224 | #ifdef FEATURE_WLAN_TDLS |
| 225 | #define SIR_MAC_TDLS_SETUP_REQ 0 |
| 226 | #define SIR_MAC_TDLS_SETUP_RSP 1 |
| 227 | #define SIR_MAC_TDLS_SETUP_CNF 2 |
| 228 | #define SIR_MAC_TDLS_TEARDOWN 3 |
| 229 | #define SIR_MAC_TDLS_PEER_TRAFFIC_IND 4 |
| 230 | #define SIR_MAC_TDLS_CH_SWITCH_REQ 5 |
| 231 | #define SIR_MAC_TDLS_CH_SWITCH_RSP 6 |
| 232 | #define SIR_MAC_TDLS_PEER_TRAFFIC_RSP 9 |
| 233 | #define SIR_MAC_TDLS_DIS_REQ 10 |
| 234 | #define SIR_MAC_TDLS_DIS_RSP 14 |
| 235 | #endif |
| 236 | |
| 237 | /* WNM Action field values; IEEE Std 802.11-2012, 8.5.14.1, Table 8-250 */ |
| 238 | #define SIR_MAC_WNM_BSS_TM_QUERY 6 |
| 239 | #define SIR_MAC_WNM_BSS_TM_REQUEST 7 |
| 240 | #define SIR_MAC_WNM_BSS_TM_RESPONSE 8 |
| 241 | #define SIR_MAC_WNM_NOTIF_REQUEST 26 |
| 242 | #define SIR_MAC_WNM_NOTIF_RESPONSE 27 |
| 243 | |
| 244 | #define SIR_MAC_MAX_RANDOM_LENGTH 2306 |
| 245 | |
| 246 | /* ----------------------------------------------------------------------------- */ |
| 247 | /* EID (Element ID) definitions */ |
| 248 | /* and their min/max lengths */ |
| 249 | /* ----------------------------------------------------------------------------- */ |
| 250 | |
| 251 | #define SIR_MAC_SSID_EID 0 |
| 252 | #define SIR_MAC_SSID_EID_MIN 0 |
| 253 | #define SIR_MAC_SSID_EID_MAX 32 |
| 254 | #define SIR_MAC_RATESET_EID 1 |
| 255 | #define SIR_MAC_RATESET_EID_MIN 1 |
| 256 | #define SIR_MAC_RATESET_EID_MAX 12 |
| 257 | #define SIR_MAC_FH_PARAM_SET_EID 2 |
| 258 | #define SIR_MAC_FH_PARAM_SET_EID_MIN 5 |
| 259 | #define SIR_MAC_FH_PARAM_SET_EID_MAX 5 |
| 260 | #define SIR_MAC_DS_PARAM_SET_EID 3 |
| 261 | #define SIR_MAC_DS_PARAM_SET_EID_MIN 1 |
| 262 | #define SIR_MAC_DS_PARAM_SET_EID_MAX 1 |
| 263 | #define SIR_MAC_CF_PARAM_SET_EID 4 |
| 264 | #define SIR_MAC_CF_PARAM_SET_EID_MIN 6 |
| 265 | #define SIR_MAC_CF_PARAM_SET_EID_MAX 6 |
| 266 | #define SIR_MAC_TIM_EID 5 |
| 267 | #define SIR_MAC_TIM_EID_MIN 3 |
| 268 | #define SIR_MAC_TIM_EID_MAX 254 |
| 269 | #define SIR_MAC_IBSS_PARAM_SET_EID 6 |
| 270 | #define SIR_MAC_IBSS_PARAM_SET_EID_MIN 2 |
| 271 | #define SIR_MAC_IBSS_PARAM_SET_EID_MAX 2 |
| 272 | #define SIR_MAC_COUNTRY_EID 7 |
| 273 | #define SIR_MAC_COUNTRY_EID_MIN 6 |
| 274 | #define SIR_MAC_COUNTRY_EID_MAX 254 |
| 275 | #define SIR_MAC_FH_PARAMS_EID 8 |
| 276 | #define SIR_MAC_FH_PARAMS_EID_MIN 4 |
| 277 | #define SIR_MAC_FH_PARAMS_EID_MAX 4 |
| 278 | #define SIR_MAC_FH_PATTERN_EID 9 |
| 279 | #define SIR_MAC_FH_PATTERN_EID_MIN 4 |
| 280 | #define SIR_MAC_FH_PATTERN_EID_MAX 254 |
| 281 | #define SIR_MAC_REQUEST_EID 10 |
| 282 | #define SIR_MAC_REQUEST_EID_MIN 1 |
| 283 | #define SIR_MAC_REQUEST_EID_MAX 255 |
| 284 | #define SIR_MAC_QBSS_LOAD_EID 11 |
| 285 | #define SIR_MAC_QBSS_LOAD_EID_MIN 5 |
| 286 | #define SIR_MAC_QBSS_LOAD_EID_MAX 5 |
| 287 | #define SIR_MAC_EDCA_PARAM_SET_EID 12 /* EDCA parameter set */ |
| 288 | #define SIR_MAC_EDCA_PARAM_SET_EID_MIN 18 |
| 289 | #define SIR_MAC_EDCA_PARAM_SET_EID_MAX 20 /* TBD temp - change backto 18 */ |
| 290 | #define SIR_MAC_TSPEC_EID 13 |
| 291 | #define SIR_MAC_TSPEC_EID_MIN 55 |
| 292 | #define SIR_MAC_TSPEC_EID_MAX 55 |
| 293 | #define SIR_MAC_TCLAS_EID 14 |
| 294 | #define SIR_MAC_TCLAS_EID_MIN 4 |
| 295 | #define SIR_MAC_TCLAS_EID_MAX 255 |
| 296 | #define SIR_MAC_QOS_SCHEDULE_EID 15 |
| 297 | #define SIR_MAC_QOS_SCHEDULE_EID_MIN 14 |
| 298 | #define SIR_MAC_QOS_SCHEDULE_EID_MAX 14 |
| 299 | #define SIR_MAC_CHALLENGE_TEXT_EID 16 |
| 300 | #define SIR_MAC_CHALLENGE_TEXT_EID_MIN 1 |
| 301 | #define SIR_MAC_CHALLENGE_TEXT_EID_MAX 253 |
| 302 | /* reserved 17-31 */ |
| 303 | #define SIR_MAC_PWR_CONSTRAINT_EID 32 |
| 304 | #define SIR_MAC_PWR_CONSTRAINT_EID_MIN 1 |
| 305 | #define SIR_MAC_PWR_CONSTRAINT_EID_MAX 1 |
| 306 | #define SIR_MAC_PWR_CAPABILITY_EID 33 |
| 307 | #define SIR_MAC_PWR_CAPABILITY_EID_MIN 2 |
| 308 | #define SIR_MAC_PWR_CAPABILITY_EID_MAX 2 |
| 309 | #define SIR_MAC_TPC_REQ_EID 34 |
| 310 | #define SIR_MAC_TPC_REQ_EID_MIN 0 |
| 311 | #define SIR_MAC_TPC_REQ_EID_MAX 255 |
| 312 | /* SIR_MAC_EXTENDED_CAP_EID 35 */ |
| 313 | #define SIR_MAC_TPC_RPT_EID 35 |
| 314 | #define SIR_MAC_TPC_RPT_EID_MIN 2 |
| 315 | #define SIR_MAC_TPC_RPT_EID_MAX 2 |
| 316 | #define SIR_MAC_SPRTD_CHNLS_EID 36 |
| 317 | #define SIR_MAC_SPRTD_CHNLS_EID_MIN 2 |
| 318 | #define SIR_MAC_SPRTD_CHNLS_EID_MAX 254 |
| 319 | #define SIR_MAC_CHNL_SWITCH_ANN_EID 37 |
| 320 | #define SIR_MAC_CHNL_SWITCH_ANN_EID_MIN 3 |
| 321 | #define SIR_MAC_CHNL_SWITCH_ANN_EID_MAX 3 |
| 322 | #define SIR_MAC_MEAS_REQ_EID 38 |
| 323 | #define SIR_MAC_MEAS_REQ_EID_MIN 3 |
| 324 | #define SIR_MAC_MEAS_REQ_EID_MAX 255 |
| 325 | #define SIR_MAC_MEAS_RPT_EID 39 |
| 326 | #define SIR_MAC_MEAS_RPT_EID_MIN 3 |
| 327 | #define SIR_MAC_MEAS_RPT_EID_MAX 255 |
| 328 | #define SIR_MAC_QUIET_EID 40 |
| 329 | #define SIR_MAC_QUIET_EID_MIN 6 |
| 330 | #define SIR_MAC_QUIET_EID_MAX 6 |
| 331 | #define SIR_MAC_IBSS_DFS_EID 41 |
| 332 | #define SIR_MAC_IBSS_DFS_EID_MIN 7 |
| 333 | #define SIR_MAC_IBSS_DFS_EID_MAX 255 |
| 334 | #define SIR_MAC_ERP_INFO_EID 42 |
| 335 | #define SIR_MAC_ERP_INFO_EID_MIN 0 |
| 336 | #define SIR_MAC_ERP_INFO_EID_MAX 255 |
| 337 | #define SIR_MAC_TS_DELAY_EID 43 |
| 338 | #define SIR_MAC_TS_DELAY_EID_MIN 4 |
| 339 | #define SIR_MAC_TS_DELAY_EID_MAX 4 |
| 340 | #define SIR_MAC_TCLAS_PROC_EID 44 |
| 341 | #define SIR_MAC_TCLAS_PROC_EID_MIN 1 |
| 342 | #define SIR_MAC_TCLAS_PROC_EID_MAX 1 |
| 343 | #define SIR_MAC_QOS_CAPABILITY_EID 46 |
| 344 | #define SIR_MAC_QOS_CAPABILITY_EID_MIN 1 |
| 345 | #define SIR_MAC_QOS_CAPABILITY_EID_MAX 1 |
| 346 | #define SIR_MAC_RSN_EID 48 |
| 347 | #define SIR_MAC_RSN_EID_MIN 4 |
| 348 | #define SIR_MAC_RSN_EID_MAX 254 |
| 349 | |
| 350 | /* using reserved EID for Qos Action IE for now, */ |
| 351 | /* need to check 11e spec for the actual EID */ |
| 352 | #define SIR_MAC_QOS_ACTION_EID 49 |
| 353 | #define SIR_MAC_QOS_ACTION_EID_MIN 4 |
| 354 | #define SIR_MAC_QOS_ACTION_EID_MAX 255 |
| 355 | #define SIR_MAC_EXTENDED_RATE_EID 50 |
| 356 | #define SIR_MAC_EXTENDED_RATE_EID_MIN 0 |
| 357 | #define SIR_MAC_EXTENDED_RATE_EID_MAX 255 |
| 358 | /* reserved 51-69 */ |
| 359 | #define SIR_MAC_RM_ENABLED_CAPABILITY_EID 70 |
| 360 | #define SIR_MAC_RM_ENABLED_CAPABILITY_EID_MIN 5 |
| 361 | #define SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX 5 |
| 362 | /* reserved 71-220 */ |
| 363 | #define SIR_MAC_WPA_EID 221 |
| 364 | #define SIR_MAC_WPA_EID_MIN 0 |
| 365 | #define SIR_MAC_WPA_EID_MAX 255 |
| 366 | |
| 367 | #define SIR_MAC_EID_VENDOR 221 |
| 368 | |
| 369 | #define SIR_MAC_WAPI_EID 68 |
| 370 | /* reserved 222-254 */ |
| 371 | #define SIR_MAC_HT_CAPABILITIES_EID 45 |
| 372 | #define SIR_MAC_HT_CAPABILITIES_EID_MIN 0 |
| 373 | #define SIR_MAC_HT_CAPABILITIES_EID_MAX 255 |
| 374 | #define SIR_MAC_HT_INFO_EID 61 |
| 375 | #define SIR_MAC_HT_INFO_EID_MIN 0 |
| 376 | #define SIR_MAC_HT_INFO_EID_MAX 255 |
| 377 | |
| 378 | #ifdef WLAN_FEATURE_11AC |
| 379 | #define SIR_MAC_VHT_CAPABILITIES_EID 191 |
| 380 | #define SIR_MAC_VHT_OPERATION_EID 192 |
| 381 | #define SIR_MAC_VHT_EXT_BSS_LOAD_EID 193 |
| 382 | #define SIR_MAC_VHT_OPMODE_EID 199 |
| 383 | #endif |
| 384 | #define SIR_MAC_MAX_SUPPORTED_MCS_SET 16 |
| 385 | |
| 386 | #ifdef FEATURE_AP_MCC_CH_AVOIDANCE |
| 387 | #define SIR_MAC_QCOM_VENDOR_EID 200 |
| 388 | #define SIR_MAC_QCOM_VENDOR_OUI "\x00\xA0\xC6" |
| 389 | #define SIR_MAC_QCOM_VENDOR_SIZE 3 |
| 390 | #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ |
| 391 | |
| 392 | /* / Workaround IE to change beacon length when it is 4*n+1 */ |
| 393 | #define SIR_MAC_ANI_WORKAROUND_EID 255 |
| 394 | #define SIR_MAC_ANI_WORKAROUND_EID_MIN 0 |
| 395 | #define SIR_MAC_ANI_WORKAROUND_EID_MAX 255 |
| 396 | |
| 397 | #define SIR_MAC_MAX_ADD_IE_LENGTH 500 |
| 398 | |
| 399 | /* / Maximum length of each IE */ |
| 400 | #define SIR_MAC_MAX_IE_LENGTH 255 |
| 401 | |
| 402 | /* / Maximum length of each IE */ |
| 403 | #define SIR_MAC_RSN_IE_MAX_LENGTH 255 |
| 404 | #define SIR_MAC_WPA_IE_MAX_LENGTH 255 |
| 405 | /* / Minimum length of each IE */ |
| 406 | #define SIR_MAC_RSN_IE_MIN_LENGTH 2 |
| 407 | #define SIR_MAC_WPA_IE_MIN_LENGTH 6 |
| 408 | |
| 409 | #ifdef FEATURE_WLAN_ESE |
| 410 | #define ESE_VERSION_4 4 |
| 411 | #define ESE_VERSION_SUPPORTED ESE_VERSION_4 |
| 412 | |
| 413 | /* When station sends Radio Management Cap. */ |
| 414 | /* State should be normal=1 */ |
| 415 | /* Mbssid Mask should be 0 */ |
| 416 | #define RM_STATE_NORMAL 1 |
| 417 | #endif |
| 418 | |
| 419 | #define SIR_MAC_OUI_VERSION_1 1 |
| 420 | |
| 421 | /* OUI and type definition for WPA IE in network byte order */ |
| 422 | #define SIR_MAC_WPA_OUI 0x01F25000 |
| 423 | #define SIR_MAC_WME_OUI 0x02F25000 |
| 424 | #define SIR_MAC_WSM_OUI SIR_MAC_WME_OUI |
| 425 | #define SIR_MAC_WSC_OUI "\x00\x50\xf2\x04" |
| 426 | #define SIR_MAC_WSC_OUI_SIZE 4 |
| 427 | #define SIR_MAC_P2P_OUI "\x50\x6f\x9a\x09" |
| 428 | #define SIR_MAC_P2P_OUI_SIZE 4 |
| 429 | #define SIR_P2P_NOA_ATTR 12 |
| 430 | #define SIR_MAX_NOA_ATTR_LEN 31 |
| 431 | #define SIR_MAX_NOA_DESCR 2 |
| 432 | #define SIR_P2P_IE_HEADER_LEN 6 |
| 433 | |
| 434 | #define SIR_MAC_CISCO_OUI "\x00\x40\x96" |
| 435 | #define SIR_MAC_CISCO_OUI_SIZE 3 |
| 436 | |
| 437 | /* min size of wme oui header: oui(3) + type + subtype + version */ |
| 438 | #define SIR_MAC_OUI_WME_HDR_MIN 6 |
| 439 | |
| 440 | /* OUI subtype and their lengths */ |
| 441 | #define SIR_MAC_OUI_SUBTYPE_WME_INFO 0 |
| 442 | #define SIR_MAC_OUI_WME_INFO_MIN 7 |
| 443 | #define SIR_MAC_OUI_WME_INFO_MAX 7 |
| 444 | |
| 445 | #define SIR_MAC_OUI_SUBTYPE_WME_PARAM 1 |
| 446 | #define SIR_MAC_OUI_WME_PARAM_MIN 24 |
| 447 | #define SIR_MAC_OUI_WME_PARAM_MAX 24 |
| 448 | |
| 449 | #define SIR_MAC_OUI_SUBTYPE_WME_TSPEC 2 |
| 450 | #define SIR_MAC_OUI_WME_TSPEC_MIN 61 |
| 451 | #define SIR_MAC_OUI_WME_TSPEC_MAX 61 |
| 452 | |
| 453 | #define SIR_MAC_OUI_SUBTYPE_WSM_TSPEC 2 /* same as WME TSPEC */ |
| 454 | #define SIR_MAC_OUI_WSM_TSPEC_MIN 61 |
| 455 | #define SIR_MAC_OUI_WSM_TSPEC_MAX 61 |
| 456 | |
| 457 | /* reserved subtypes 3-4 */ |
| 458 | /* WSM capability */ |
| 459 | #define SIR_MAC_OUI_SUBTYPE_WSM_CAPABLE 5 |
| 460 | #define SIR_MAC_OUI_WSM_CAPABLE_MIN 7 |
| 461 | #define SIR_MAC_OUI_WSM_CAPABLE_MAX 7 |
| 462 | /* WSM classifier */ |
| 463 | #define SIR_MAC_OUI_SUBTYPE_WSM_TCLAS 6 |
| 464 | #define SIR_MAC_OUI_WSM_TCLAS_MIN 10 |
| 465 | #define SIR_MAC_OUI_WSM_TCLAS_MAX 255 |
| 466 | /* classifier processing element */ |
| 467 | #define SIR_MAC_OUI_SUBTYPE_WSM_TCLASPROC 7 |
| 468 | #define SIR_MAC_OUI_WSM_TCLASPROC_MIN 7 |
| 469 | #define SIR_MAC_OUI_WSM_TCLASPROC_MAX 7 |
| 470 | /* tspec delay element */ |
| 471 | #define SIR_MAC_OUI_SUBTYPE_WSM_TSDELAY 8 |
| 472 | #define SIR_MAC_OUI_WSM_TSDELAY_MIN 10 |
| 473 | #define SIR_MAC_OUI_WSM_TSDELAY_MAX 10 |
| 474 | /* schedule element */ |
| 475 | #define SIR_MAC_OUI_SUBTYPE_WSM_SCHEDULE 9 |
| 476 | #define SIR_MAC_OUI_WSM_SCHEDULE_MIN 20 |
| 477 | #define SIR_MAC_OUI_WSM_SCHEDULE_MAX 20 |
| 478 | |
| 479 | #ifdef WLAN_NS_OFFLOAD |
| 480 | #define SIR_MAC_NS_OFFLOAD_SIZE 1 /* support only one IPv6 offload */ |
| 481 | /* Number of target IP V6 addresses for NS offload */ |
| 482 | #define SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16 |
| 483 | #define SIR_MAC_IPV6_ADDR_LEN 16 |
| 484 | #define SIR_IPV6_ADDR_VALID 1 |
| 485 | #endif /* WLAN_NS_OFFLOAD */ |
| 486 | #define SIR_MAC_ARP_OFFLOAD_SIZE 1 |
| 487 | |
| 488 | /* total length of an Info element including T/L fields */ |
| 489 | #define EID_LEN(eid) (2 + (eid)) |
| 490 | |
| 491 | /* support for radar Detect, Channel Switch */ |
| 492 | #define CHANNEL_SWITCH_MAX_FRAME_SIZE 256 |
| 493 | |
| 494 | /* Length of Channel Switch related message */ |
| 495 | #define SIR_SME_CHANNEL_SWITCH_SIZE \ |
| 496 | (sizeof(uint8_t) + 2 * sizeof(uint16_t) + sizeof(uint32_t) +\ |
| 497 | sizeof(ePhyChanBondState)) |
| 498 | #define SIR_CHANNEL_SWITCH_IE_SIZE EID_LEN(SIR_MAC_CHNL_SWITCH_ANN_EID_MIN) |
| 499 | |
| 500 | /* Measurement Request/Report messages */ |
| 501 | #define SIR_MEAS_REQ_FIELD_SIZE 11 |
| 502 | #define SIR_MEAS_REQ_IE_SIZE (5 + SIR_MEAS_REQ_FIELD_SIZE) |
| 503 | #define SIR_MEAS_REQ_ACTION_FRAME_SIZE (3 + SIR_MEAS_REQ_IE_SIZE) |
| 504 | #define SIR_MEAS_MAX_FRAME_SIZE 256 |
| 505 | #define SIR_MEAS_REPORT_MIN_FRAME_SIZE (3 + EID_LEN(SIR_MAC_MEAS_RPT_EID_MIN)) |
| 506 | |
| 507 | #define SIR_MAC_SET_MEAS_REQ_ENABLE(x) (((uint8_t) x) | 2) |
| 508 | #define SIR_MAC_SET_MEAS_REQ_REQUEST(x) (((uint8_t) x) | 4) |
| 509 | #define SIR_MAC_SET_MEAS_REQ_REPORT(x) (((uint8_t) x) | 8) |
| 510 | |
| 511 | #define SIR_MAC_SET_MEAS_REPORT_LATE(x) (((uint8_t) x) | 1) |
| 512 | #define SIR_MAC_SET_MEAS_REPORT_INCAPABLE(x) (((uint8_t) x) | 2) |
| 513 | #define SIR_MAC_SET_MEAS_REPORT_REFUSE(x) (((uint8_t) x) | 4) |
| 514 | |
| 515 | /* Length of TPC Request Action Frame */ |
| 516 | #define SIR_TPC_REQ_ACTION_FRAME_SIZE (3 + EID_LEN(SIR_MAC_TPC_REQ_EID_MIN)) |
| 517 | #define SIR_TPC_REPORT_ACTION_FRAME_SIZE (3 + EID_LEN(SIR_MAC_TPC_RPT_EID_MIN)) |
| 518 | #define SIR_TPC_MAX_FRAME_SIZE 256 |
| 519 | /* ----------------------------------------------------------------------------- */ |
| 520 | |
| 521 | /* OFFSET definitions for fixed fields in Management frames */ |
| 522 | |
| 523 | /* Beacon/Probe Response offsets */ |
| 524 | #define SIR_MAC_TS_OFFSET 0 |
| 525 | #define SIR_MAC_BEACON_INT_OFFSET 8 /* Beacon Interval offset */ |
| 526 | #define SIR_MAC_B_PR_CAPAB_OFFSET 10 |
| 527 | #define SIR_MAC_B_PR_SSID_OFFSET 12 |
| 528 | |
| 529 | /* Association/Reassociation offsets */ |
| 530 | #define SIR_MAC_ASSOC_CAPAB_OFFSET 0 |
| 531 | #define SIR_MAC_LISTEN_INT_OFFSET 2 /* Listen Interval offset */ |
| 532 | #define SIR_MAC_ASSOC_SSID_OFFSET 4 |
| 533 | #define SIR_MAC_CURRENT_AP_OFFSET 4 |
| 534 | #define SIR_MAC_REASSOC_SSID_OFFSET 10 |
| 535 | #define SIR_MAC_ASSOC_STATUS_CODE_OFFSET 2 |
| 536 | #define SIR_MAC_ASSOC_AID_OFFSET 4 |
| 537 | #define SIR_MAC_ASSOC_RSP_RATE_OFFSET 6 |
| 538 | |
| 539 | /* Disassociation/Deauthentication offsets */ |
| 540 | #define SIR_MAC_REASON_CODE_OFFSET 0 |
| 541 | |
| 542 | /* Probe Request offset */ |
| 543 | #define SIR_MAC_PROBE_REQ_SSID_OFFSET 0 |
| 544 | |
| 545 | /* Authentication offsets */ |
| 546 | #define SIR_MAC_AUTH_ALGO_OFFSET 0 |
| 547 | #define SIR_MAC_AUTH_XACT_SEQNUM_OFFSET 2 |
| 548 | #define SIR_MAC_AUTH_STATUS_CODE_OFFSET 4 |
| 549 | #define SIR_MAC_AUTH_CHALLENGE_OFFSET 6 |
| 550 | |
| 551 | /* / Transaction sequence number definitions (used in Authentication frames) */ |
| 552 | #define SIR_MAC_AUTH_FRAME_1 1 |
| 553 | #define SIR_MAC_AUTH_FRAME_2 2 |
| 554 | #define SIR_MAC_AUTH_FRAME_3 3 |
| 555 | #define SIR_MAC_AUTH_FRAME_4 4 |
| 556 | |
| 557 | /* / Protocol defined MAX definitions */ |
| 558 | #define SIR_MAC_MAX_SSID_LENGTH 32 |
| 559 | #define SIR_MAC_MAX_NUMBER_OF_RATES 12 |
| 560 | #define SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS 4 |
| 561 | #define SIR_MAC_KEY_LENGTH 13 /* WEP Maximum key length size */ |
| 562 | #define SIR_MAC_AUTH_CHALLENGE_LENGTH 128 |
| 563 | #define SIR_MAC_WEP_IV_LENGTH 4 |
| 564 | #define SIR_MAC_WEP_ICV_LENGTH 4 |
| 565 | |
| 566 | /* / MAX key length when ULA is used */ |
| 567 | #define SIR_MAC_MAX_KEY_LENGTH 32 |
| 568 | |
| 569 | /* / Macro definitions for get/set on FC fields */ |
| 570 | #define SIR_MAC_GET_PROT_VERSION(x) ((((uint16_t) x) & 0x0300) >> 8) |
| 571 | #define SIR_MAC_GET_FRAME_TYPE(x) ((((uint16_t) x) & 0x0C00) >> 8) |
| 572 | #define SIR_MAC_GET_FRAME_SUB_TYPE(x) ((((uint16_t) x) & 0xF000) >> 12) |
| 573 | #define SIR_MAC_GET_WEP_BIT_IN_FC(x) (((uint16_t) x) & 0x0040) |
| 574 | #define SIR_MAC_SET_PROT_VERSION(x) ((uint16_t) x) |
| 575 | #define SIR_MAC_SET_FRAME_TYPE(x) (((uint16_t) x) << 2) |
| 576 | #define SIR_MAC_SET_FRAME_SUB_TYPE(x) (((uint16_t) x) << 4) |
| 577 | #define SIR_MAC_SET_WEP_BIT_IN_FC(x) (((uint16_t) x) << 14) |
| 578 | |
| 579 | /* / Macro definitions for get/set on capabilityInfo bits */ |
| 580 | #define SIR_MAC_GET_ESS(x) (((uint16_t) x) & 0x0001) |
| 581 | #define SIR_MAC_GET_IBSS(x) ((((uint16_t) x) & 0x0002) >> 1) |
| 582 | #define SIR_MAC_GET_CF_POLLABLE(x) ((((uint16_t) x) & 0x0004) >> 2) |
| 583 | #define SIR_MAC_GET_CF_POLL_REQ(x) ((((uint16_t) x) & 0x0008) >> 3) |
| 584 | #define SIR_MAC_GET_PRIVACY(x) ((((uint16_t) x) & 0x0010) >> 4) |
| 585 | #define SIR_MAC_GET_SHORT_PREAMBLE(x) ((((uint16_t) x) & 0x0020) >> 5) |
| 586 | #define SIR_MAC_GET_SPECTRUM_MGMT(x) ((((uint16_t) x) & 0x0100) >> 8) |
| 587 | #define SIR_MAC_GET_QOS(x) ((((uint16_t) x) & 0x0200) >> 9) |
| 588 | #define SIR_MAC_GET_SHORT_SLOT_TIME(x) ((((uint16_t) x) & 0x0400) >> 10) |
| 589 | #define SIR_MAC_GET_APSD(x) ((((uint16_t) x) & 0x0800) >> 11) |
| 590 | #if defined WLAN_FEATURE_VOWIFI |
| 591 | #define SIR_MAC_GET_RRM(x) ((((uint16_t) x) & 0x1000) >> 12) |
| 592 | #endif |
| 593 | #define SIR_MAC_GET_BLOCK_ACK(x) ((((uint16_t) x) & 0xc000) >> CAPABILITY_INFO_DELAYED_BA_BIT) |
| 594 | #define SIR_MAC_SET_ESS(x) (((uint16_t) x) | 0x0001) |
| 595 | #define SIR_MAC_SET_IBSS(x) (((uint16_t) x) | 0x0002) |
| 596 | #define SIR_MAC_SET_CF_POLLABLE(x) (((uint16_t) x) | 0x0004) |
| 597 | #define SIR_MAC_SET_CF_POLL_REQ(x) (((uint16_t) x) | 0x0008) |
| 598 | #define SIR_MAC_SET_PRIVACY(x) (((uint16_t) x) | 0x0010) |
| 599 | #define SIR_MAC_SET_SHORT_PREAMBLE(x) (((uint16_t) x) | 0x0020) |
| 600 | #define SIR_MAC_SET_SPECTRUM_MGMT(x) (((uint16_t) x) | 0x0100) |
| 601 | #define SIR_MAC_SET_QOS(x) (((uint16_t) x) | 0x0200) |
| 602 | #define SIR_MAC_SET_SHORT_SLOT_TIME(x) (((uint16_t) x) | 0x0400) |
| 603 | #define SIR_MAC_SET_APSD(x) (((uint16_t) x) | 0x0800) |
| 604 | #if defined WLAN_FEATURE_VOWIFI |
| 605 | #define SIR_MAC_SET_RRM(x) (((uint16_t) x) | 0x1000) |
| 606 | #endif |
| 607 | #define SIR_MAC_SET_GROUP_ACK(x) (((uint16_t) x) | 0x4000) |
| 608 | |
| 609 | #ifdef WLAN_FEATURE_11AC |
| 610 | #define SIR_MAC_GET_VHT_MAX_AMPDU_EXPO(x) ((((uint32_t) x) & 0x03800000) >> 23) |
| 611 | #endif |
| 612 | |
| 613 | /* bitname must be one of the above, eg ESS, CF_POLLABLE, etc. */ |
| 614 | #define SIR_MAC_CLEAR_CAPABILITY(u16value, bitname) \ |
| 615 | ((u16value) &= (~(SIR_MAC_SET_ ## bitname(0)))) |
| 616 | |
| 617 | #define IS_WES_MODE_ENABLED(x) \ |
| 618 | ((x)->roam.configParam.isWESModeEnabled) |
| 619 | |
| 620 | #define BA_RECIPIENT 1 |
| 621 | #define BA_INITIATOR 2 |
| 622 | #define BA_BOTH_DIRECTIONS 3 |
| 623 | |
| 624 | /* / Status Code (present in Management response frames) enum */ |
| 625 | |
| 626 | typedef enum eSirMacStatusCodes { |
| 627 | eSIR_MAC_SUCCESS_STATUS = 0, /* Reserved */ |
| 628 | eSIR_MAC_UNSPEC_FAILURE_STATUS = 1, /* Unspecified reason */ |
| 629 | /* 802.11 reserved 2-9 */ |
| 630 | /* |
| 631 | WMM status codes(standard 1.1 table 9) |
| 632 | Table 9 ADDTS Response Status Codes |
| 633 | Value Operation |
| 634 | 0 Admission accepted |
| 635 | 1 Invalid parameters |
| 636 | 2 Reserved |
| 637 | 3 Refused |
| 638 | 4-255 Reserved |
| 639 | */ |
| 640 | eSIR_MAC_WME_INVALID_PARAMS_STATUS = 1, /* ?? */ |
| 641 | eSIR_MAC_WME_REFUSED_STATUS = 3, /* ?? */ |
| 642 | eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS = 10, /* Cannot support all requested capabilities in the Capability Information field */ |
| 643 | eSIR_MAC_INABLITY_TO_CONFIRM_ASSOC_STATUS = 11, /* Reassociation denied due to inability to confirm that association exists */ |
| 644 | eSIR_MAC_OUTSIDE_SCOPE_OF_SPEC_STATUS = 12, /* Association denied due to reason outside the scope of this standard */ |
| 645 | eSIR_MAC_AUTH_ALGO_NOT_SUPPORTED_STATUS = 13, /* Responding station does not support the specified authentication algorithm */ |
| 646 | eSIR_MAC_AUTH_FRAME_OUT_OF_SEQ_STATUS = 14, /* Received an Authentication frame with authentication transaction sequence number */ |
| 647 | /* out of expected sequence */ |
| 648 | eSIR_MAC_CHALLENGE_FAILURE_STATUS = 15, /* Authentication rejected because of challenge failure */ |
| 649 | eSIR_MAC_AUTH_RSP_TIMEOUT_STATUS = 16, /* Authentication rejected due to timeout waiting for next frame in sequence */ |
| 650 | eSIR_MAC_MAX_ASSOC_STA_REACHED_STATUS = 17, /* Association denied because AP is unable to handle additional associated stations */ |
| 651 | eSIR_MAC_BASIC_RATES_NOT_SUPPORTED_STATUS = 18, /* Association denied due to requesting station not supporting all of the data rates in the */ |
| 652 | /* BSSBasicRateSet parameter */ |
| 653 | eSIR_MAC_SHORT_PREAMBLE_NOT_SUPPORTED_STATUS = 19, /* Association denied due to requesting station not supporting the short preamble */ |
| 654 | /* option */ |
| 655 | eSIR_MAC_PBCC_NOT_SUPPORTED_STATUS = 20, /* Association denied due to requesting station not supporting the PBCC modulation */ |
| 656 | /* option */ |
| 657 | eSIR_MAC_CHANNEL_AGILITY_NOT_SUPPORTED_STATUS = 21, /* Association denied due to requesting station not supporting the Channel Agility */ |
| 658 | /* option */ |
| 659 | eSIR_MAC_SPECTRUM_MGMT_REQD_STATUS = 22, /* Association request rejected because Spectrum Management capability is required */ |
| 660 | eSIR_MAC_PWR_CAPABILITY_BAD_STATUS = 23, /* Association request rejected because the information in the Power Capability */ |
| 661 | /* element is unacceptable */ |
| 662 | eSIR_MAC_SPRTD_CHANNELS_BAD_STATUS = 24, /* Association request rejected because the information in the Supported Channels */ |
| 663 | /* element is unacceptable */ |
| 664 | eSIR_MAC_SHORT_SLOT_NOT_SUPORTED_STATUS = 25, /* Association denied due to requesting station not supporting the Short Slot Time */ |
| 665 | /* option */ |
| 666 | eSIR_MAC_DSSS_OFDM_NOT_SUPPORTED_STATUS = 26, /* Association denied due to requesting station not supporting the DSSS-OFDM option */ |
| 667 | /* reserved 27-29 */ |
| 668 | eSIR_MAC_TRY_AGAIN_LATER = 30, /* Association request rejected temporarily, try again later */ |
| 669 | /* reserved 31 */ |
| 670 | eSIR_MAC_QOS_UNSPECIFIED_FAILURE_STATUS = 32, /* Unspecified, QoS-related failure */ |
| 671 | eSIR_MAC_QAP_NO_BANDWIDTH_STATUS = 33, /* Association denied because QoS AP has insufficient bandwidth to handle another */ |
| 672 | /* QoS STA */ |
| 673 | eSIR_MAC_XS_FRAME_LOSS_STATUS = 34, /* Association denied due to excessive frame loss rates and/or poor conditions on cur- */ |
| 674 | /* rent operating channel */ |
| 675 | eSIR_MAC_STA_QOS_NOT_SUPPORTED_STATUS = 35, /* Association (with QoS BSS) denied because the requesting STA does not support the */ |
| 676 | /* QoS facility */ |
| 677 | eSIR_MAC_STA_BLK_ACK_NOT_SUPPORTED_STATUS = 36, /* Reserved */ |
| 678 | eSIR_MAC_REQ_DECLINED_STATUS = 37, /* The request has been declined */ |
| 679 | eSIR_MAC_INVALID_PARAM_STATUS = 38, /* The request has not been successful as one or more parameters have invalid values */ |
| 680 | eSIR_MAC_TS_NOT_HONOURED_STATUS = 39, /* The TS has not been created because the request cannot be honored; however, a suggested */ |
| 681 | /* TSPEC is provided so that the initiating STA may attempt to set another TS */ |
| 682 | /* with the suggested changes to the TSPEC */ |
| 683 | eSIR_MAC_INVALID_INFORMATION_ELEMENT_STATUS = 40, /* Invalid information element, i.e., an information element defined in this standard for */ |
| 684 | /* which the content does not meet the specifications in Clause 7 */ |
| 685 | eSIR_MAC_INVALID_GROUP_CIPHER_STATUS = 41, /* Invalid group cipher */ |
| 686 | eSIR_MAC_INVALID_PAIRWISE_CIPHER_STATUS = 42, /* Invalid pairwise cipher */ |
| 687 | eSIR_MAC_INVALID_AKMP_STATUS = 43, /* Invalid AKMP */ |
| 688 | eSIR_MAC_UNSUPPORTED_RSN_IE_VERSION_STATUS = 44, /* Unsupported RSN information element version */ |
| 689 | eSIR_MAC_INVALID_RSN_IE_CAPABILITIES_STATUS = 45, /* Invalid RSN information element capabilities */ |
| 690 | eSIR_MAC_CIPHER_SUITE_REJECTED_STATUS = 46, /* Cipher suite rejected because of security policy */ |
| 691 | eSIR_MAC_TS_NOT_CREATED_STATUS = 47, /* The TS has not been created; however, the HC may be capable of creating a TS, in */ |
| 692 | /* response to a request, after the time indicated in the TS Delay element */ |
| 693 | eSIR_MAC_DL_NOT_ALLOWED_STATUS = 48, /* Direct link is not allowed in the BSS by policy */ |
| 694 | eSIR_MAC_DEST_STA_NOT_KNOWN_STATUS = 49, /* The Destination STA is not present within this BSS */ |
| 695 | eSIR_MAC_DEST_STA_NOT_QSTA_STATUS = 50, /* The Destination STA is not a QoS STA */ |
| 696 | eSIR_MAC_INVALID_LISTEN_INTERVAL_STATUS = 51, /* Association denied because the ListenInterval is too large */ |
| 697 | |
| 698 | eSIR_MAC_DSSS_CCK_RATE_MUST_SUPPORT_STATUS = 52, /* FIXME: */ |
| 699 | eSIR_MAC_DSSS_CCK_RATE_NOT_SUPPORT_STATUS = 53, |
| 700 | eSIR_MAC_PSMP_CONTROLLED_ACCESS_ONLY_STATUS = 54, |
| 701 | #ifdef FEATURE_WLAN_ESE |
| 702 | eSIR_MAC_ESE_UNSPECIFIED_QOS_FAILURE_STATUS = 200, /* ESE-Unspecified, QoS related failure in (Re)Assoc response frames */ |
| 703 | eSIR_MAC_ESE_TSPEC_REQ_REFUSED_STATUS = 201, /* ESE-TSPEC request refused due to AP's policy configuration in AddTs Rsp, (Re)Assoc Rsp. */ |
| 704 | eSIR_MAC_ESE_ASSOC_DENIED_INSUFF_BW_STATUS = 202, /* ESE-Assoc denied due to insufficient bandwidth to handle new TS in (Re)Assoc Rsp. */ |
| 705 | eSIR_MAC_ESE_INVALID_PARAMETERS_STATUS = 203, /* ESE-Invalid parameters. (Re)Assoc request had one or more TSPEC parameters with */ |
| 706 | /* invalid values. */ |
| 707 | #endif |
| 708 | |
| 709 | } tSirMacStatusCodes; |
| 710 | |
| 711 | /** |
| 712 | * Reason Code (present in Deauthentication/Disassociation |
| 713 | * Management frames) enum |
| 714 | */ |
| 715 | typedef enum eSirMacReasonCodes { |
| 716 | eSIR_MAC_UNSPEC_FAILURE_REASON = 1, /* Unspecified reason */ |
| 717 | eSIR_MAC_PREV_AUTH_NOT_VALID_REASON = 2, /* Previous authentication no longer valid */ |
| 718 | eSIR_MAC_DEAUTH_LEAVING_BSS_REASON = 3, /* Deauthenticated because sending station is leaving (or has left) IBSS or ESS */ |
| 719 | eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON = 4, /* Disassociated due to inactivity */ |
| 720 | eSIR_MAC_DISASSOC_DUE_TO_DISABILITY_REASON = 5, /* Disassociated because AP is unable to handle all currently associated stations */ |
| 721 | eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON = 6, /* Class 2 frame received from nonauthenticated station */ |
| 722 | eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON = 7, /* Class 3 frame received from nonassociated station */ |
| 723 | eSIR_MAC_DISASSOC_LEAVING_BSS_REASON = 8, /* Disassociated because sending station is leaving (or has left) BSS */ |
| 724 | eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON = 9, /* Station requesting (re)association is not authenticated with responding station */ |
| 725 | eSIR_MAC_PWR_CAPABILITY_BAD_REASON = 10, /* Disassociated because the information in the Power Capability element is unacceptable */ |
| 726 | eSIR_MAC_SPRTD_CHANNELS_BAD_REASON = 11, /* Disassociated because the information in the Supported Channels element is unacceptable */ |
| 727 | /* reserved 12 */ |
| 728 | eSIR_MAC_INVALID_IE_REASON = 13, /* Invalid information element, i.e., an information element defined in this standard for */ |
| 729 | /* which the content does not meet the specifications in Clause 7 */ |
| 730 | eSIR_MAC_MIC_FAILURE_REASON = 14, /* Message integrity code (MIC) failure */ |
| 731 | eSIR_MAC_4WAY_HANDSHAKE_TIMEOUT_REASON = 15, /* 4-Way Handshake timeout */ |
| 732 | eSIR_MAC_GR_KEY_UPDATE_TIMEOUT_REASON = 16, /* Group Key Handshake timeout */ |
| 733 | eSIR_MAC_RSN_IE_MISMATCH_REASON = 17, /* Information element in 4-Way Handshake different from (Re)Association Request/Probe */ |
| 734 | /* Response/Beacon frame */ |
| 735 | eSIR_MAC_INVALID_MC_CIPHER_REASON = 18, /* Invalid group cipher */ |
| 736 | eSIR_MAC_INVALID_UC_CIPHER_REASON = 19, /* Invalid pairwise cipher */ |
| 737 | eSIR_MAC_INVALID_AKMP_REASON = 20, /* Invalid AKMP */ |
| 738 | eSIR_MAC_UNSUPPORTED_RSN_IE_VER_REASON = 21, /* Unsupported RSN information element version */ |
| 739 | eSIR_MAC_INVALID_RSN_CAPABILITIES_REASON = 22, /* Invalid RSN information element capabilities */ |
| 740 | eSIR_MAC_1X_AUTH_FAILURE_REASON = 23, /* IEEE 802.1X authentication failed */ |
| 741 | eSIR_MAC_CIPHER_SUITE_REJECTED_REASON = 24, /* Cipher suite rejected because of the security policy */ |
| 742 | #ifdef FEATURE_WLAN_TDLS |
| 743 | eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE = 25, /* TDLS direct link teardown due to TDLS peer STA unreachable via the TDLS direct link */ |
| 744 | eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON = 26, /* TDLS direct link teardown for unspecified reason */ |
| 745 | #endif |
| 746 | /* reserved 27 - 30 */ |
| 747 | #ifdef WLAN_FEATURE_11W |
| 748 | eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION = 31, /* Robust management frames policy violation */ |
| 749 | #endif |
| 750 | eSIR_MAC_QOS_UNSPECIFIED_REASON = 32, /* Disassociated for unspecified, QoS-related reason */ |
| 751 | eSIR_MAC_QAP_NO_BANDWIDTH_REASON = 33, /* Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA */ |
| 752 | eSIR_MAC_XS_UNACKED_FRAMES_REASON = 34, /* Disassociated because excessive number of frames need to be acknowledged, but are not */ |
| 753 | /* acknowledged due to AP transmissions and/or poor channel conditions */ |
| 754 | eSIR_MAC_BAD_TXOP_USE_REASON = 35, /* Disassociated because STA is transmitting outside the limits of its TXOPs */ |
| 755 | eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON = 36, /* Requested from peer STA as the STA is leaving the BSS (or resetting) */ |
| 756 | eSIR_MAC_PEER_REJECT_MECHANISIM_REASON = 37, /* Requested from peer STA as it does not want to use the mechanism */ |
| 757 | eSIR_MAC_MECHANISM_NOT_SETUP_REASON = 38, /* Requested from peer STA as the STA received frames using the mechanism for which a */ |
| 758 | /* setup is required */ |
| 759 | eSIR_MAC_PEER_TIMEDOUT_REASON = 39, /* Requested from peer STA due to timeout */ |
| 760 | eSIR_MAC_CIPHER_NOT_SUPPORTED_REASON = 45, /* Peer STA does not support the requested cipher suite */ |
| 761 | eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON = 46, /* FT reason */ |
| 762 | /* reserved 47 - 65535. */ |
| 763 | eSIR_BEACON_MISSED = 65534, /* We invented this to tell beacon missed case */ |
| 764 | } tSirMacReasonCodes; |
| 765 | |
| 766 | /* BA Initiator v/s Recipient */ |
| 767 | typedef enum eBADirection { |
| 768 | eBA_RECIPIENT, |
| 769 | eBA_INITIATOR |
| 770 | } tBADirection; |
| 771 | |
| 772 | /* A-MPDU/BA Enable/Disable in Tx/Rx direction */ |
| 773 | typedef enum eBAEnable { |
| 774 | eBA_DISABLE, |
| 775 | eBA_ENABLE |
| 776 | } tBAEnable; |
| 777 | |
| 778 | /* A-MPDU/BA Policy */ |
| 779 | typedef enum eBAPolicy { |
| 780 | eBA_UNCOMPRESSED, |
| 781 | eBA_COMPRESSED |
| 782 | } tBAPolicy; |
| 783 | |
| 784 | /* A-MPDU/BA Policy */ |
| 785 | typedef enum eBAPolicyType { |
| 786 | eBA_POLICY_DELAYED, |
| 787 | eBA_POLICY_IMMEDIATE |
| 788 | } tBAPolicyType; |
| 789 | |
| 790 | /* / Frame control field format (2 bytes) */ |
| 791 | typedef struct sSirMacFrameCtl { |
| 792 | |
| 793 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 794 | |
| 795 | uint8_t subType:4; |
| 796 | uint8_t type:2; |
| 797 | uint8_t protVer:2; |
| 798 | |
| 799 | uint8_t order:1; |
| 800 | uint8_t wep:1; |
| 801 | uint8_t moreData:1; |
| 802 | uint8_t powerMgmt:1; |
| 803 | uint8_t retry:1; |
| 804 | uint8_t moreFrag:1; |
| 805 | uint8_t fromDS:1; |
| 806 | uint8_t toDS:1; |
| 807 | |
| 808 | #else |
| 809 | |
| 810 | uint8_t protVer:2; |
| 811 | uint8_t type:2; |
| 812 | uint8_t subType:4; |
| 813 | |
| 814 | uint8_t toDS:1; |
| 815 | uint8_t fromDS:1; |
| 816 | uint8_t moreFrag:1; |
| 817 | uint8_t retry:1; |
| 818 | uint8_t powerMgmt:1; |
| 819 | uint8_t moreData:1; |
| 820 | uint8_t wep:1; |
| 821 | uint8_t order:1; |
| 822 | |
| 823 | #endif |
| 824 | |
| 825 | } cdf_packed tSirMacFrameCtl, *tpSirMacFrameCtl; |
| 826 | |
| 827 | /* / Sequence control field */ |
| 828 | typedef struct sSirMacSeqCtl { |
| 829 | |
| 830 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 831 | |
| 832 | uint8_t seqNumLo:4; |
| 833 | uint8_t fragNum:4; |
| 834 | |
| 835 | uint8_t seqNumHi:8; |
| 836 | |
| 837 | #else |
| 838 | |
| 839 | uint8_t fragNum:4; |
| 840 | uint8_t seqNumLo:4; |
| 841 | uint8_t seqNumHi:8; |
| 842 | |
| 843 | #endif |
| 844 | } cdf_packed tSirMacSeqCtl, *tpSirMacSeqCtl; |
| 845 | |
| 846 | /* / QoS control field */ |
| 847 | typedef struct sSirMacQosCtl { |
| 848 | |
| 849 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 850 | |
| 851 | uint8_t rsvd:1; |
| 852 | uint8_t ackPolicy:2; |
| 853 | uint8_t esop_txopUnit:1; |
| 854 | uint8_t tid:4; |
| 855 | |
| 856 | uint8_t txop:8; |
| 857 | |
| 858 | #else |
| 859 | |
| 860 | uint8_t tid:4; |
| 861 | uint8_t esop_txopUnit:1; |
| 862 | uint8_t ackPolicy:2; |
| 863 | uint8_t rsvd:1; |
| 864 | |
| 865 | uint8_t txop:8; |
| 866 | |
| 867 | #endif |
| 868 | } cdf_packed tSirMacQosCtl, *tpSirMacQosCtl; |
| 869 | |
| 870 | /* / Length (in bytes) of MAC header in 3 address format */ |
| 871 | #define SIR_MAC_HDR_LEN_3A 24 |
| 872 | |
| 873 | typedef uint8_t tSirMacAddr[ETH_ALEN]; |
| 874 | |
| 875 | /* / 3 address MAC data header format (24/26 bytes) */ |
| 876 | typedef struct sSirMacDot3Hdr { |
| 877 | tSirMacAddr da; |
| 878 | tSirMacAddr sa; |
| 879 | uint16_t length; |
| 880 | } cdf_packed tSirMacDot3Hdr, *tpSirMacDot3Hdr; |
| 881 | |
| 882 | /* / 3 address MAC data header format (24/26 bytes) */ |
| 883 | typedef struct sSirMacDataHdr3a { |
| 884 | tSirMacFrameCtl fc; |
| 885 | uint8_t durationLo; |
| 886 | uint8_t durationHi; |
| 887 | tSirMacAddr addr1; |
| 888 | tSirMacAddr addr2; |
| 889 | tSirMacAddr addr3; |
| 890 | tSirMacSeqCtl seqControl; |
| 891 | tSirMacQosCtl qosControl; |
| 892 | } cdf_packed tSirMacDataHdr3a, *tpSirMacDataHdr3a; |
| 893 | |
| 894 | /* / Management header format */ |
| 895 | typedef struct sSirMacMgmtHdr { |
| 896 | tSirMacFrameCtl fc; |
| 897 | uint8_t durationLo; |
| 898 | uint8_t durationHi; |
| 899 | tSirMacAddr da; |
| 900 | tSirMacAddr sa; |
| 901 | tSirMacAddr bssId; |
| 902 | tSirMacSeqCtl seqControl; |
| 903 | } cdf_packed tSirMacMgmtHdr, *tpSirMacMgmtHdr; |
| 904 | |
| 905 | /* / ERP information field */ |
| 906 | typedef struct sSirMacErpInfo { |
| 907 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 908 | uint8_t reserved:5; |
| 909 | uint8_t barkerPreambleMode:1; |
| 910 | uint8_t useProtection:1; |
| 911 | uint8_t nonErpPresent:1; |
| 912 | #else |
| 913 | uint8_t nonErpPresent:1; |
| 914 | uint8_t useProtection:1; |
| 915 | uint8_t barkerPreambleMode:1; |
| 916 | uint8_t reserved:5; |
| 917 | #endif |
| 918 | } cdf_packed tSirMacErpInfo, *tpSirMacErpInfo; |
| 919 | |
| 920 | /* / Capability information field */ |
| 921 | typedef struct sSirMacCapabilityInfo { |
| 922 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 923 | uint16_t immediateBA:1; |
| 924 | uint16_t delayedBA:1; |
| 925 | uint16_t dsssOfdm:1; |
| 926 | uint16_t rrm:1; |
| 927 | uint16_t apsd:1; |
| 928 | uint16_t shortSlotTime:1; |
| 929 | uint16_t qos:1; |
| 930 | uint16_t spectrumMgt:1; |
| 931 | uint16_t channelAgility:1; |
| 932 | uint16_t pbcc:1; |
| 933 | uint16_t shortPreamble:1; |
| 934 | uint16_t privacy:1; |
| 935 | uint16_t cfPollReq:1; |
| 936 | uint16_t cfPollable:1; |
| 937 | uint16_t ibss:1; |
| 938 | uint16_t ess:1; |
| 939 | #else |
| 940 | uint16_t ess:1; |
| 941 | uint16_t ibss:1; |
| 942 | uint16_t cfPollable:1; |
| 943 | uint16_t cfPollReq:1; |
| 944 | uint16_t privacy:1; |
| 945 | uint16_t shortPreamble:1; |
| 946 | uint16_t pbcc:1; |
| 947 | uint16_t channelAgility:1; |
| 948 | uint16_t spectrumMgt:1; |
| 949 | uint16_t qos:1; |
| 950 | uint16_t shortSlotTime:1; |
| 951 | uint16_t apsd:1; |
| 952 | uint16_t rrm:1; |
| 953 | uint16_t dsssOfdm:1; |
| 954 | uint16_t delayedBA:1; |
| 955 | uint16_t immediateBA:1; |
| 956 | #endif |
| 957 | } cdf_packed tSirMacCapabilityInfo, *tpSirMacCapabilityInfo; |
| 958 | |
| 959 | typedef struct sSirMacCfParamSet { |
| 960 | uint8_t cfpCount; |
| 961 | uint8_t cfpPeriod; |
| 962 | uint16_t cfpMaxDuration; |
| 963 | uint16_t cfpDurRemaining; |
| 964 | } cdf_packed tSirMacCfParamSet; |
| 965 | |
| 966 | typedef struct sSirMacTim { |
| 967 | uint8_t dtimCount; |
| 968 | uint8_t dtimPeriod; |
| 969 | uint8_t bitmapControl; |
| 970 | uint8_t bitmapLength; |
| 971 | uint8_t bitmap[251]; |
| 972 | } cdf_packed tSirMacTim; |
| 973 | |
| 974 | /* 12 Bytes long because this structure can be used to represent rate */ |
| 975 | /* and extended rate set IEs */ |
| 976 | /* The parser assume this to be at least 12 */ |
| 977 | typedef struct sSirMacRateSet { |
| 978 | uint8_t numRates; |
| 979 | uint8_t rate[SIR_MAC_RATESET_EID_MAX]; |
| 980 | } cdf_packed tSirMacRateSet; |
| 981 | |
| 982 | typedef struct sSirMacSSid { |
| 983 | uint8_t length; |
| 984 | uint8_t ssId[SIR_MAC_MAX_SSID_LENGTH]; |
| 985 | } cdf_packed tSirMacSSid; |
| 986 | |
| 987 | typedef struct sSirMacWpaInfo { |
| 988 | uint8_t length; |
| 989 | uint8_t info[SIR_MAC_MAX_IE_LENGTH]; |
| 990 | } cdf_packed tSirMacWpaInfo, *tpSirMacWpaInfo, |
| 991 | tSirMacRsnInfo, *tpSirMacRsnInfo; |
| 992 | typedef struct sSirMacWapiInfo { |
| 993 | uint8_t length; |
| 994 | uint8_t info[SIR_MAC_MAX_IE_LENGTH]; |
| 995 | } cdf_packed tSirMacWapiInfo, *tpSirMacWapiInfo, |
| 996 | tSirMacWapiInfo, *tpSirMacWapiInfo; |
| 997 | |
| 998 | typedef struct sSirMacFHParamSet { |
| 999 | uint16_t dwellTime; |
| 1000 | uint8_t hopSet; |
| 1001 | uint8_t hopPattern; |
| 1002 | uint8_t hopIndex; |
| 1003 | } tSirMacFHParamSet, *tpSirMacFHParamSet; |
| 1004 | |
| 1005 | typedef struct sSirMacIBSSParams { |
| 1006 | uint16_t atim; |
| 1007 | } tSirMacIBSSParams, *tpSirMacIBSSParams; |
| 1008 | |
| 1009 | typedef struct sSirMacRRMEnabledCap { |
| 1010 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1011 | uint8_t reserved:6; |
| 1012 | uint8_t AntennaInformation:1; |
| 1013 | uint8_t BSSAvailAdmission:1; |
| 1014 | uint8_t BssAvgAccessDelay:1; |
| 1015 | uint8_t RSNIMeasurement:1; |
| 1016 | uint8_t RCPIMeasurement:1; |
| 1017 | uint8_t NeighborTSFOffset:1; |
| 1018 | uint8_t MeasurementPilotEnabled:1; |
| 1019 | uint8_t MeasurementPilot:3; |
| 1020 | uint8_t nonOperatinChanMax:3; |
| 1021 | uint8_t operatingChanMax:3; |
| 1022 | uint8_t RRMMIBEnabled:1; |
| 1023 | uint8_t APChanReport:1; |
| 1024 | uint8_t triggeredTCM:1; |
| 1025 | uint8_t TCMCapability:1; |
| 1026 | uint8_t LCIAzimuth:1; |
| 1027 | uint8_t LCIMeasurement:1; |
| 1028 | uint8_t statistics:1; |
| 1029 | uint8_t NoiseHistogram:1; |
| 1030 | uint8_t ChannelLoad:1; |
| 1031 | uint8_t FrameMeasurement:1; |
| 1032 | uint8_t BeaconRepCond:1; |
| 1033 | uint8_t BeaconTable:1; |
| 1034 | uint8_t BeaconActive:1; |
| 1035 | uint8_t BeaconPassive:1; |
| 1036 | uint8_t repeated:1; |
| 1037 | uint8_t parallel:1; |
| 1038 | uint8_t NeighborRpt:1; |
| 1039 | uint8_t LinkMeasurement:1; |
| 1040 | uint8_t present; |
| 1041 | #else |
| 1042 | uint8_t present; |
| 1043 | uint8_t LinkMeasurement:1; |
| 1044 | uint8_t NeighborRpt:1; |
| 1045 | uint8_t parallel:1; |
| 1046 | uint8_t repeated:1; |
| 1047 | uint8_t BeaconPassive:1; |
| 1048 | uint8_t BeaconActive:1; |
| 1049 | uint8_t BeaconTable:1; |
| 1050 | uint8_t BeaconRepCond:1; |
| 1051 | uint8_t FrameMeasurement:1; |
| 1052 | uint8_t ChannelLoad:1; |
| 1053 | uint8_t NoiseHistogram:1; |
| 1054 | uint8_t statistics:1; |
| 1055 | uint8_t LCIMeasurement:1; |
| 1056 | uint8_t LCIAzimuth:1; |
| 1057 | uint8_t TCMCapability:1; |
| 1058 | uint8_t triggeredTCM:1; |
| 1059 | uint8_t APChanReport:1; |
| 1060 | uint8_t RRMMIBEnabled:1; |
| 1061 | uint8_t operatingChanMax:3; |
| 1062 | uint8_t nonOperatinChanMax:3; |
| 1063 | uint8_t MeasurementPilot:3; |
| 1064 | uint8_t MeasurementPilotEnabled:1; |
| 1065 | uint8_t NeighborTSFOffset:1; |
| 1066 | uint8_t RCPIMeasurement:1; |
| 1067 | uint8_t RSNIMeasurement:1; |
| 1068 | uint8_t BssAvgAccessDelay:1; |
| 1069 | uint8_t BSSAvailAdmission:1; |
| 1070 | uint8_t AntennaInformation:1; |
| 1071 | uint8_t reserved:6; |
| 1072 | #endif |
| 1073 | } tSirMacRRMEnabledCap, *tpSirMacRRMEnabledCap; |
| 1074 | |
| 1075 | /* ---------------- |
| 1076 | * EDCA Profiles |
| 1077 | * --------------- |
| 1078 | */ |
| 1079 | |
| 1080 | #define EDCA_AC_BE 0 |
| 1081 | #define EDCA_AC_BK 1 |
| 1082 | #define EDCA_AC_VI 2 |
| 1083 | #define EDCA_AC_VO 3 |
| 1084 | #define AC_MGMT_LO 4 |
| 1085 | #define AC_MGMT_HI 5 |
| 1086 | #define MAX_NUM_AC 4 |
| 1087 | |
| 1088 | /* access categories */ |
| 1089 | #define SIR_MAC_EDCAACI_BESTEFFORT (EDCA_AC_BE) |
| 1090 | #define SIR_MAC_EDCAACI_BACKGROUND (EDCA_AC_BK) |
| 1091 | #define SIR_MAC_EDCAACI_VIDEO (EDCA_AC_VI) |
| 1092 | #define SIR_MAC_EDCAACI_VOICE (EDCA_AC_VO) |
| 1093 | |
| 1094 | /* access category record */ |
| 1095 | typedef struct sSirMacAciAifsn { |
| 1096 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1097 | uint8_t rsvd:1; |
| 1098 | uint8_t aci:2; |
| 1099 | uint8_t acm:1; |
| 1100 | uint8_t aifsn:4; |
| 1101 | #else |
| 1102 | uint8_t aifsn:4; |
| 1103 | uint8_t acm:1; |
| 1104 | uint8_t aci:2; |
| 1105 | uint8_t rsvd:1; |
| 1106 | #endif |
| 1107 | } cdf_packed tSirMacAciAifsn; |
| 1108 | |
| 1109 | /* contention window size */ |
| 1110 | typedef struct sSirMacCW { |
| 1111 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1112 | uint8_t max:4; |
| 1113 | uint8_t min:4; |
| 1114 | #else |
| 1115 | uint8_t min:4; |
| 1116 | uint8_t max:4; |
| 1117 | #endif |
| 1118 | } cdf_packed tSirMacCW; |
| 1119 | |
| 1120 | typedef struct sSirMacEdcaParamRecord { |
| 1121 | tSirMacAciAifsn aci; |
| 1122 | tSirMacCW cw; |
| 1123 | uint16_t txoplimit; |
| 1124 | } cdf_packed tSirMacEdcaParamRecord; |
| 1125 | |
| 1126 | typedef struct sSirMacQosInfo { |
| 1127 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1128 | uint8_t uapsd:1; |
| 1129 | uint8_t txopreq:1; |
| 1130 | uint8_t qreq:1; |
| 1131 | uint8_t qack:1; |
| 1132 | uint8_t count:4; |
| 1133 | #else |
| 1134 | uint8_t count:4; |
| 1135 | uint8_t qack:1; |
| 1136 | uint8_t qreq:1; |
| 1137 | uint8_t txopreq:1; |
| 1138 | uint8_t uapsd:1; |
| 1139 | #endif |
| 1140 | } cdf_packed tSirMacQosInfo; |
| 1141 | |
| 1142 | typedef struct sSirMacQosInfoStation { |
| 1143 | #ifdef ANI_LITTLE_BIT_ENDIAN |
| 1144 | uint8_t acvo_uapsd:1; |
| 1145 | uint8_t acvi_uapsd:1; |
| 1146 | uint8_t acbk_uapsd:1; |
| 1147 | uint8_t acbe_uapsd:1; |
| 1148 | uint8_t qack:1; |
| 1149 | uint8_t maxSpLen:2; |
| 1150 | uint8_t moreDataAck:1; |
| 1151 | #else |
| 1152 | uint8_t moreDataAck:1; |
| 1153 | uint8_t maxSpLen:2; |
| 1154 | uint8_t qack:1; |
| 1155 | uint8_t acbe_uapsd:1; |
| 1156 | uint8_t acbk_uapsd:1; |
| 1157 | uint8_t acvi_uapsd:1; |
| 1158 | uint8_t acvo_uapsd:1; |
| 1159 | #endif |
| 1160 | } cdf_packed tSirMacQosInfoStation, *tpSirMacQosInfoStation; |
| 1161 | |
| 1162 | typedef struct sSirMacEdcaParamSetIE { |
| 1163 | uint8_t type; |
| 1164 | uint8_t length; |
| 1165 | tSirMacQosInfo qosInfo; |
| 1166 | uint8_t rsvd; |
| 1167 | tSirMacEdcaParamRecord acbe; /* best effort */ |
| 1168 | tSirMacEdcaParamRecord acbk; /* background */ |
| 1169 | tSirMacEdcaParamRecord acvi; /* video */ |
| 1170 | tSirMacEdcaParamRecord acvo; /* voice */ |
| 1171 | } cdf_packed tSirMacEdcaParamSetIE; |
| 1172 | |
| 1173 | typedef struct sSirMacQoSParams { |
| 1174 | uint8_t count; |
| 1175 | uint16_t limit; |
| 1176 | uint8_t CWmin[8]; |
| 1177 | uint8_t AIFS[8]; |
| 1178 | } cdf_packed tSirMacQoSParams; |
| 1179 | |
| 1180 | /* ts info direction field can take any of these values */ |
| 1181 | #define SIR_MAC_DIRECTION_UPLINK 0 |
| 1182 | #define SIR_MAC_DIRECTION_DNLINK 1 |
| 1183 | #define SIR_MAC_DIRECTION_DIRECT 2 |
| 1184 | #define SIR_MAC_DIRECTION_BIDIR 3 |
| 1185 | |
| 1186 | /* access policy */ |
| 1187 | /* reserved 0 */ |
| 1188 | #define SIR_MAC_ACCESSPOLICY_EDCA 1 |
| 1189 | #define SIR_MAC_ACCESSPOLICY_HCCA 2 |
| 1190 | #define SIR_MAC_ACCESSPOLICY_BOTH 3 |
| 1191 | |
| 1192 | typedef struct sSirMacTSInfoTfc { |
| 1193 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1194 | uint8_t burstSizeDefn:1; |
| 1195 | uint8_t reserved:7; |
| 1196 | #else |
| 1197 | uint8_t reserved:7; |
| 1198 | uint8_t burstSizeDefn:1; |
| 1199 | #endif |
| 1200 | |
| 1201 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1202 | uint16_t ackPolicy:2; |
| 1203 | uint16_t userPrio:3; |
| 1204 | uint16_t psb:1; |
| 1205 | uint16_t aggregation:1; |
| 1206 | uint16_t accessPolicy:2; |
| 1207 | uint16_t direction:2; |
| 1208 | uint16_t tsid:4; |
| 1209 | uint16_t trafficType:1; |
| 1210 | #else |
| 1211 | uint16_t trafficType:1; |
| 1212 | uint16_t tsid:4; |
| 1213 | uint16_t direction:2; |
| 1214 | uint16_t accessPolicy:2; |
| 1215 | uint16_t aggregation:1; |
| 1216 | uint16_t psb:1; |
| 1217 | uint16_t userPrio:3; |
| 1218 | uint16_t ackPolicy:2; |
| 1219 | #endif |
| 1220 | } cdf_packed tSirMacTSInfoTfc; |
| 1221 | |
| 1222 | typedef struct sSirMacTSInfoSch { |
| 1223 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1224 | uint8_t rsvd:7; |
| 1225 | uint8_t schedule:1; |
| 1226 | #else |
| 1227 | uint8_t schedule:1; |
| 1228 | uint8_t rsvd:7; |
| 1229 | #endif |
| 1230 | } cdf_packed tSirMacTSInfoSch; |
| 1231 | |
| 1232 | typedef struct sSirMacTSInfo { |
| 1233 | tSirMacTSInfoTfc traffic; |
| 1234 | tSirMacTSInfoSch schedule; |
| 1235 | } cdf_packed tSirMacTSInfo; |
| 1236 | |
| 1237 | typedef struct sSirMacTspecIE { |
| 1238 | uint8_t type; |
| 1239 | uint8_t length; |
| 1240 | tSirMacTSInfo tsinfo; |
| 1241 | uint16_t nomMsduSz; |
| 1242 | uint16_t maxMsduSz; |
| 1243 | uint32_t minSvcInterval; |
| 1244 | uint32_t maxSvcInterval; |
| 1245 | uint32_t inactInterval; |
| 1246 | uint32_t suspendInterval; |
| 1247 | uint32_t svcStartTime; |
| 1248 | uint32_t minDataRate; |
| 1249 | uint32_t meanDataRate; |
| 1250 | uint32_t peakDataRate; |
| 1251 | uint32_t maxBurstSz; |
| 1252 | uint32_t delayBound; |
| 1253 | uint32_t minPhyRate; |
| 1254 | uint16_t surplusBw; |
| 1255 | uint16_t mediumTime; |
| 1256 | } cdf_packed tSirMacTspecIE; |
| 1257 | |
| 1258 | /* frame classifier types */ |
| 1259 | #define SIR_MAC_TCLASTYPE_ETHERNET 0 |
| 1260 | #define SIR_MAC_TCLASTYPE_TCPUDPIP 1 |
| 1261 | #define SIR_MAC_TCLASTYPE_8021DQ 2 |
| 1262 | /* reserved 3-255 */ |
| 1263 | |
| 1264 | typedef struct sSirMacTclasParamEthernet { |
| 1265 | tSirMacAddr srcAddr; |
| 1266 | tSirMacAddr dstAddr; |
| 1267 | uint16_t type; |
| 1268 | } cdf_packed tSirMacTclasParamEthernet; |
| 1269 | |
| 1270 | typedef struct sSirMacTclasParamIPv4 { |
| 1271 | uint8_t version; |
| 1272 | uint8_t srcIpAddr[4]; |
| 1273 | uint8_t dstIpAddr[4]; |
| 1274 | uint16_t srcPort; |
| 1275 | uint16_t dstPort; |
| 1276 | uint8_t dscp; |
| 1277 | uint8_t protocol; |
| 1278 | uint8_t rsvd; |
| 1279 | } cdf_packed tSirMacTclasParamIPv4; |
| 1280 | |
| 1281 | #define SIR_MAC_TCLAS_IPV4 4 |
| 1282 | #define SIR_MAC_TCLAS_IPV6 6 |
| 1283 | |
| 1284 | typedef struct sSirMacTclasParamIPv6 { |
| 1285 | uint8_t version; |
| 1286 | uint8_t srcIpAddr[16]; |
| 1287 | uint8_t dstIpAddr[16]; |
| 1288 | uint16_t srcPort; |
| 1289 | uint16_t dstPort; |
| 1290 | uint8_t flowLabel[3]; |
| 1291 | } cdf_packed tSirMacTclasParamIPv6; |
| 1292 | |
| 1293 | typedef struct sSirMacTclasParam8021dq { |
| 1294 | uint16_t tag; |
| 1295 | } cdf_packed tSirMacTclasParam8021dq; |
| 1296 | |
| 1297 | typedef struct sSirMacTclasIE { |
| 1298 | uint8_t type; |
| 1299 | uint8_t length; |
| 1300 | uint8_t userPrio; |
| 1301 | uint8_t classifierType; |
| 1302 | uint8_t classifierMask; |
| 1303 | } cdf_packed tSirMacTclasIE; |
| 1304 | |
| 1305 | typedef struct sSirMacTsDelayIE { |
| 1306 | uint8_t type; |
| 1307 | uint8_t length; |
| 1308 | uint32_t delay; |
| 1309 | } cdf_packed tSirMacTsDelayIE; |
| 1310 | |
| 1311 | typedef struct sSirMacScheduleInfo { |
| 1312 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1313 | uint16_t rsvd:9; |
| 1314 | uint16_t direction:2; |
| 1315 | uint16_t tsid:4; |
| 1316 | uint16_t aggregation:1; |
| 1317 | #else |
| 1318 | uint16_t aggregation:1; |
| 1319 | uint16_t tsid:4; |
| 1320 | uint16_t direction:2; |
| 1321 | uint16_t rsvd:9; |
| 1322 | #endif |
| 1323 | } cdf_packed tSirMacScheduleInfo; |
| 1324 | |
| 1325 | typedef struct sSirMacScheduleIE { |
| 1326 | uint8_t type; |
| 1327 | uint8_t length; |
| 1328 | tSirMacScheduleInfo info; |
| 1329 | uint32_t svcStartTime; |
| 1330 | uint32_t svcInterval; |
| 1331 | uint16_t maxSvcDuration; |
| 1332 | uint16_t specInterval; |
| 1333 | } cdf_packed tSirMacScheduleIE; |
| 1334 | |
| 1335 | typedef struct sSirMacQosCapabilityIE { |
| 1336 | uint8_t type; |
| 1337 | uint8_t length; |
| 1338 | tSirMacQosInfo qosInfo; |
| 1339 | } cdf_packed tSirMacQosCapabilityIE; |
| 1340 | |
| 1341 | typedef struct sSirMacQosCapabilityStaIE { |
| 1342 | uint8_t type; |
| 1343 | uint8_t length; |
| 1344 | tSirMacQosInfoStation qosInfo; |
| 1345 | } cdf_packed tSirMacQosCapabilityStaIE; |
| 1346 | |
| 1347 | typedef uint32_t tSirMacTimeStamp[2]; |
| 1348 | |
| 1349 | typedef uint16_t tSirMacBeaconInterval; |
| 1350 | |
| 1351 | typedef uint16_t tSirMacListenInterval; |
| 1352 | |
| 1353 | typedef uint8_t tSirMacChanNum; |
| 1354 | |
| 1355 | /* IE definitions */ |
| 1356 | typedef struct sSirMacSSidIE { |
| 1357 | uint8_t type; |
| 1358 | tSirMacSSid ssId; |
| 1359 | } cdf_packed tSirMacSSidIE; |
| 1360 | |
| 1361 | typedef struct sSirMacRateSetIE { |
| 1362 | uint8_t type; |
| 1363 | tSirMacRateSet supportedRateSet; |
| 1364 | } cdf_packed tSirMacRateSetIE; |
| 1365 | |
| 1366 | typedef struct sSirMacDsParamSetIE { |
| 1367 | uint8_t type; |
| 1368 | uint8_t length; |
| 1369 | tSirMacChanNum channelNumber; |
| 1370 | } cdf_packed tSirMacDsParamSetIE; |
| 1371 | |
| 1372 | typedef struct sSirMacCfParamSetIE { |
| 1373 | uint8_t type; |
| 1374 | uint8_t length; |
| 1375 | tSirMacCfParamSet cfParams; |
| 1376 | } cdf_packed tSirMacCfParamSetIE; |
| 1377 | |
| 1378 | typedef struct sSirMacChanInfo { |
| 1379 | tSirMacChanNum firstChanNum; |
| 1380 | uint8_t numChannels; |
| 1381 | int8_t maxTxPower; |
| 1382 | } cdf_packed tSirMacChanInfo; |
| 1383 | |
| 1384 | typedef struct sSirMacNonErpPresentIE { |
| 1385 | uint8_t type; |
| 1386 | uint8_t length; |
| 1387 | uint8_t erp; |
| 1388 | } cdf_packed tSirMacNonErpPresentIE; |
| 1389 | |
| 1390 | typedef struct sSirMacPowerCapabilityIE { |
| 1391 | uint8_t type; |
| 1392 | uint8_t length; |
| 1393 | uint8_t minTxPower; |
| 1394 | uint8_t maxTxPower; |
| 1395 | } tSirMacPowerCapabilityIE; |
| 1396 | |
| 1397 | typedef struct sSirMacSupportedChannelIE { |
| 1398 | uint8_t type; |
| 1399 | uint8_t length; |
| 1400 | uint8_t supportedChannels[96]; |
| 1401 | } tSirMacSupportedChannelIE; |
| 1402 | |
| 1403 | typedef struct sSirMacMeasReqField { |
| 1404 | uint8_t channelNumber; |
| 1405 | uint8_t measStartTime[8]; |
| 1406 | uint16_t measDuration; |
| 1407 | } tSirMacMeasReqField, *tpSirMacMeasReqField; |
| 1408 | |
| 1409 | typedef struct sSirMacMeasReqIE { |
| 1410 | uint8_t type; |
| 1411 | uint8_t length; |
| 1412 | uint8_t measToken; |
| 1413 | uint8_t measReqMode; |
| 1414 | uint8_t measType; |
| 1415 | tSirMacMeasReqField measReqField; |
| 1416 | } tSirMacMeasReqIE, *tpSirMacMeasReqIE; |
| 1417 | |
| 1418 | #define SIR_MAC_MAX_SUPP_RATES 32 |
| 1419 | |
| 1420 | #define SIR_MAC_MAX_SUPP_CHANNELS 100 |
| 1421 | #define SIR_MAC_MAX_SUPP_OPER_CLASSES 32 |
| 1422 | #define SIR_MAC_MAX_EXTN_CAP 8 |
| 1423 | |
| 1424 | /* VHT Capabilities Info */ |
| 1425 | typedef struct sSirMacVHTCapabilityInfo { |
| 1426 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1427 | uint32_t reserved1:2; |
| 1428 | uint32_t txAntPattern:1; |
| 1429 | uint32_t rxAntPattern:1; |
| 1430 | uint32_t vhtLinkAdaptCap:2; |
| 1431 | uint32_t maxAMPDULenExp:3; |
| 1432 | uint32_t htcVHTCap:1; |
| 1433 | uint32_t vhtTXOPPS:1; |
| 1434 | uint32_t muBeamformeeCap:1; |
| 1435 | uint32_t muBeamformerCap:1; |
| 1436 | uint32_t numSoundingDim:3; |
| 1437 | uint32_t csnofBeamformerAntSup:3; |
| 1438 | uint32_t suBeamformeeCap:1; |
| 1439 | uint32_t suBeamFormerCap:1; |
| 1440 | uint32_t rxSTBC:3; |
| 1441 | uint32_t txSTBC:1; |
| 1442 | uint32_t shortGI160and80plus80MHz:1; |
| 1443 | uint32_t shortGI80MHz:1; |
| 1444 | uint32_t ldpcCodingCap:1; |
| 1445 | uint32_t supportedChannelWidthSet:2; |
| 1446 | uint32_t maxMPDULen:2; |
| 1447 | #else |
| 1448 | uint32_t maxMPDULen:2; |
| 1449 | uint32_t supportedChannelWidthSet:2; |
| 1450 | uint32_t ldpcCodingCap:1; |
| 1451 | uint32_t shortGI80MHz:1; |
| 1452 | uint32_t shortGI160and80plus80MHz:1; |
| 1453 | uint32_t txSTBC:1; |
| 1454 | uint32_t rxSTBC:3; |
| 1455 | uint32_t suBeamFormerCap:1; |
| 1456 | uint32_t suBeamformeeCap:1; |
| 1457 | uint32_t csnofBeamformerAntSup:3; |
| 1458 | uint32_t numSoundingDim:3; |
| 1459 | uint32_t muBeamformerCap:1; |
| 1460 | uint32_t muBeamformeeCap:1; |
| 1461 | uint32_t vhtTXOPPS:1; |
| 1462 | uint32_t htcVHTCap:1; |
| 1463 | uint32_t maxAMPDULenExp:3; |
| 1464 | uint32_t vhtLinkAdaptCap:2; |
| 1465 | uint32_t rxAntPattern:1; |
| 1466 | uint32_t txAntPattern:1; |
| 1467 | uint32_t reserved1:2; |
| 1468 | #endif |
| 1469 | } cdf_packed tSirMacVHTCapabilityInfo; |
| 1470 | |
| 1471 | typedef struct sSirMacVHTTxSupDataRateInfo { |
| 1472 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1473 | uint16_t reserved:3; |
| 1474 | uint16_t txSupDataRate:13; |
| 1475 | #else |
| 1476 | uint16_t txSupDataRate:13; |
| 1477 | uint16_t reserved:3; |
| 1478 | #endif |
| 1479 | } cdf_packed tSirMacVHTTxSupDataRateInfo; |
| 1480 | |
| 1481 | typedef struct sSirMacVHTRxSupDataRateInfo { |
| 1482 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1483 | uint16_t reserved:3; |
| 1484 | uint16_t rxSupDataRate:13; |
| 1485 | #else |
| 1486 | uint16_t rxSupDataRate:13; |
| 1487 | uint16_t reserved:3; |
| 1488 | #endif |
| 1489 | } cdf_packed tSirMacVHTRxSupDataRateInfo; |
| 1490 | |
| 1491 | /** |
| 1492 | * struct sSirVhtMcsInfo - VHT MCS information |
| 1493 | * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams |
| 1494 | * @rx_highest: Indicates highest long GI VHT PPDU data rate |
| 1495 | * STA can receive. Rate expressed in units of 1 Mbps. |
| 1496 | * If this field is 0 this value should not be used to |
| 1497 | * consider the highest RX data rate supported. |
| 1498 | * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams |
| 1499 | * @tx_highest: Indicates highest long GI VHT PPDU data rate |
| 1500 | * STA can transmit. Rate expressed in units of 1 Mbps. |
| 1501 | * If this field is 0 this value should not be used to |
| 1502 | * consider the highest TX data rate supported. |
| 1503 | */ |
| 1504 | typedef struct sSirVhtMcsInfo { |
| 1505 | uint16_t rxMcsMap; |
| 1506 | uint16_t rxHighest; |
| 1507 | uint16_t txMcsMap; |
| 1508 | uint16_t txHighest; |
| 1509 | } tSirVhtMcsInfo; |
| 1510 | |
| 1511 | /** |
| 1512 | * struct sSirVHtCap - VHT capabilities |
| 1513 | * |
| 1514 | * This structure is the "VHT capabilities element" as |
| 1515 | * described in 802.11ac D3.0 8.4.2.160 |
| 1516 | * @vht_cap_info: VHT capability info |
| 1517 | * @supp_mcs: VHT MCS supported rates |
| 1518 | */ |
| 1519 | typedef struct sSirVHtCap { |
| 1520 | uint32_t vhtCapInfo; |
| 1521 | tSirVhtMcsInfo suppMcs; |
| 1522 | } tSirVHTCap; |
| 1523 | |
| 1524 | /** |
| 1525 | * struct sSirHtCap - HT capabilities |
| 1526 | * |
| 1527 | * This structure refers to "HT capabilities element" as |
| 1528 | * described in 802.11n draft section 7.3.2.52 |
| 1529 | */ |
| 1530 | |
| 1531 | typedef struct sSirHtCap { |
| 1532 | uint16_t capInfo; |
| 1533 | uint8_t ampduParamsInfo; |
| 1534 | uint8_t suppMcsSet[16]; |
| 1535 | uint16_t extendedHtCapInfo; |
| 1536 | uint32_t txBFCapInfo; |
| 1537 | uint8_t antennaSelectionInfo; |
| 1538 | } tSirHTCap; |
| 1539 | |
| 1540 | /* HT Cap and HT IE Size defines */ |
| 1541 | #define HT_CAPABILITY_IE_SIZE 28 |
| 1542 | #define HT_INFO_IE_SIZE 24 |
| 1543 | |
| 1544 | /* */ |
| 1545 | /* Determines the current operating mode of the 802.11n STA */ |
| 1546 | /* */ |
| 1547 | |
| 1548 | typedef enum eSirMacHTOperatingMode { |
| 1549 | eSIR_HT_OP_MODE_PURE, /* No Protection */ |
| 1550 | eSIR_HT_OP_MODE_OVERLAP_LEGACY, /* Overlap Legacy device present, protection is optional */ |
| 1551 | eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT, /* No legacy device, but 20 MHz HT present */ |
| 1552 | eSIR_HT_OP_MODE_MIXED /* Protetion is required */ |
| 1553 | } tSirMacHTOperatingMode; |
| 1554 | |
| 1555 | /* Spatial Multiplexing(SM) Power Save mode */ |
| 1556 | typedef enum eSirMacHTMIMOPowerSaveState { |
| 1557 | eSIR_HT_MIMO_PS_STATIC = 0, /* Static SM Power Save mode */ |
| 1558 | eSIR_HT_MIMO_PS_DYNAMIC = 1, /* Dynamic SM Power Save mode */ |
| 1559 | eSIR_HT_MIMO_PS_NA = 2, /* reserved */ |
| 1560 | eSIR_HT_MIMO_PS_NO_LIMIT = 3 /* SM Power Save disabled */ |
| 1561 | } tSirMacHTMIMOPowerSaveState; |
| 1562 | |
| 1563 | typedef enum eSirMacHTChannelWidth { |
| 1564 | eHT_CHANNEL_WIDTH_20MHZ = 0, |
| 1565 | eHT_CHANNEL_WIDTH_40MHZ = 1, |
| 1566 | eHT_CHANNEL_WIDTH_80MHZ = 2, |
| 1567 | eHT_CHANNEL_WIDTH_160MHZ = 3, |
| 1568 | eHT_CHANNEL_WIDTH_80P80MHZ = 4, |
| 1569 | eHT_MAX_CHANNEL_WIDTH |
| 1570 | } tSirMacHTChannelWidth; |
| 1571 | |
| 1572 | typedef enum eSirMacHTChannelType { |
| 1573 | eHT_CHAN_NO_HT = 0, |
| 1574 | eHT_CHAN_HT20 = 1, |
| 1575 | eHT_CHAN_HT40MINUS = 2, |
| 1576 | eHT_CHAN_HT40PLUS = 3 |
| 1577 | } tSirMacHTChannelType; |
| 1578 | |
| 1579 | /* Packet struct for HT capability */ |
| 1580 | typedef struct sHtCaps { |
| 1581 | uint16_t advCodingCap:1; |
| 1582 | uint16_t supportedChannelWidthSet:1; |
| 1583 | uint16_t mimoPowerSave:2; |
| 1584 | uint16_t greenField:1; |
| 1585 | uint16_t shortGI20MHz:1; |
| 1586 | uint16_t shortGI40MHz:1; |
| 1587 | uint16_t txSTBC:1; |
| 1588 | uint16_t rxSTBC:2; |
| 1589 | uint16_t delayedBA:1; |
| 1590 | uint16_t maximalAMSDUsize:1; |
| 1591 | uint16_t dsssCckMode40MHz:1; |
| 1592 | uint16_t psmp:1; |
| 1593 | uint16_t stbcControlFrame:1; |
| 1594 | uint16_t lsigTXOPProtection:1; |
| 1595 | uint8_t maxRxAMPDUFactor:2; |
| 1596 | uint8_t mpduDensity:3; |
| 1597 | uint8_t reserved1:3; |
| 1598 | uint8_t supportedMCSSet[16]; |
| 1599 | uint16_t pco:1; |
| 1600 | uint16_t transitionTime:2; |
| 1601 | uint16_t reserved2:5; |
| 1602 | uint16_t mcsFeedback:2; |
| 1603 | uint16_t reserved3:6; |
| 1604 | uint32_t txBF:1; |
| 1605 | uint32_t rxStaggeredSounding:1; |
| 1606 | uint32_t txStaggeredSounding:1; |
| 1607 | uint32_t rxZLF:1; |
| 1608 | uint32_t txZLF:1; |
| 1609 | uint32_t implicitTxBF:1; |
| 1610 | uint32_t calibration:2; |
| 1611 | uint32_t explicitCSITxBF:1; |
| 1612 | uint32_t explicitUncompressedSteeringMatrix:1; |
| 1613 | uint32_t explicitBFCSIFeedback:3; |
| 1614 | uint32_t explicitUncompressedSteeringMatrixFeedback:3; |
| 1615 | uint32_t explicitCompressedSteeringMatrixFeedback:3; |
| 1616 | uint32_t csiNumBFAntennae:2; |
| 1617 | uint32_t uncompressedSteeringMatrixBFAntennae:2; |
| 1618 | uint32_t compressedSteeringMatrixBFAntennae:2; |
| 1619 | uint32_t reserved4:7; |
| 1620 | uint8_t antennaSelection:1; |
| 1621 | uint8_t explicitCSIFeedbackTx:1; |
| 1622 | uint8_t antennaIndicesFeedbackTx:1; |
| 1623 | uint8_t explicitCSIFeedback:1; |
| 1624 | uint8_t antennaIndicesFeedback:1; |
| 1625 | uint8_t rxAS:1; |
| 1626 | uint8_t txSoundingPPDUs:1; |
| 1627 | uint8_t reserved5:1; |
| 1628 | |
| 1629 | } cdf_packed tHtCaps; |
| 1630 | |
| 1631 | /* During 11h channel switch, the AP can indicate if the |
| 1632 | * STA needs to stop the transmission or continue until the |
| 1633 | * channel-switch. |
| 1634 | * eSIR_CHANSW_MODE_NORMAL - STA can continue transmission |
| 1635 | * eSIR_CHANSW_MODE_SILENT - STA should stop transmission |
| 1636 | */ |
| 1637 | typedef enum eSirMacChanSwMode { |
| 1638 | eSIR_CHANSW_MODE_NORMAL = 0, |
| 1639 | eSIR_CHANSW_MODE_SILENT = 1 |
| 1640 | } tSirMacChanSwitchMode; |
| 1641 | |
| 1642 | typedef struct _BarControl { |
| 1643 | |
| 1644 | #ifndef ANI_BIG_BYTE_ENDIAN |
| 1645 | |
| 1646 | uint16_t barAckPolicy:1; |
| 1647 | uint16_t multiTID:1; |
| 1648 | uint16_t bitMap:1; |
| 1649 | uint16_t rsvd:9; |
| 1650 | uint16_t numTID:4; |
| 1651 | |
| 1652 | #else |
| 1653 | uint16_t numTID:4; |
| 1654 | uint16_t rsvd:9; |
| 1655 | uint16_t bitMap:1; |
| 1656 | uint16_t multiTID:1; |
| 1657 | uint16_t barAckPolicy:1; |
| 1658 | |
| 1659 | #endif |
| 1660 | |
| 1661 | } cdf_packed barCtrlType; |
| 1662 | |
| 1663 | typedef struct _BARFrmStruct { |
| 1664 | tSirMacFrameCtl fc; |
| 1665 | uint16_t duration; |
| 1666 | tSirMacAddr rxAddr; |
| 1667 | tSirMacAddr txAddr; |
| 1668 | barCtrlType barControl; |
| 1669 | tSirMacSeqCtl ssnCtrl; |
| 1670 | } cdf_packed BARFrmType; |
| 1671 | |
| 1672 | /* Supported MCS set */ |
| 1673 | #define SIZE_OF_SUPPORTED_MCS_SET 16 |
| 1674 | #define SIZE_OF_BASIC_MCS_SET 16 |
| 1675 | #define VALID_MCS_SIZE 77 /* 0-76 */ |
| 1676 | #define MCS_RX_HIGHEST_SUPPORTED_RATE_BYTE_OFFSET 10 |
| 1677 | #define VALID_MAX_MCS_INDEX 8 |
| 1678 | |
| 1679 | /* */ |
| 1680 | /* The following enums will be used to get the "current" HT Capabilities of */ |
| 1681 | /* the local STA in a generic fashion. In other words, the following enums */ |
| 1682 | /* identify the HT capabilities that can be queried or set. */ |
| 1683 | /* */ |
| 1684 | typedef enum eHTCapability { |
| 1685 | eHT_LSIG_TXOP_PROTECTION, |
| 1686 | eHT_STBC_CONTROL_FRAME, |
| 1687 | eHT_PSMP, |
| 1688 | eHT_DSSS_CCK_MODE_40MHZ, |
| 1689 | eHT_MAX_AMSDU_LENGTH, |
| 1690 | eHT_RX_STBC, |
| 1691 | eHT_TX_STBC, |
| 1692 | eHT_SHORT_GI_40MHZ, |
| 1693 | eHT_SHORT_GI_20MHZ, |
| 1694 | eHT_GREENFIELD, |
| 1695 | eHT_MIMO_POWER_SAVE, |
| 1696 | eHT_SUPPORTED_CHANNEL_WIDTH_SET, |
| 1697 | eHT_ADVANCED_CODING, |
| 1698 | eHT_MAX_RX_AMPDU_FACTOR, |
| 1699 | eHT_MPDU_DENSITY, |
| 1700 | eHT_PCO, |
| 1701 | eHT_TRANSITION_TIME, |
| 1702 | eHT_MCS_FEEDBACK, |
| 1703 | eHT_TX_BEAMFORMING, |
| 1704 | eHT_ANTENNA_SELECTION, |
| 1705 | /* The following come under Additional HT Capabilities */ |
| 1706 | eHT_SI_GRANULARITY, |
| 1707 | eHT_CONTROLLED_ACCESS, |
| 1708 | eHT_RIFS_MODE, |
| 1709 | eHT_RECOMMENDED_TX_WIDTH_SET, |
| 1710 | eHT_EXTENSION_CHANNEL_OFFSET, |
| 1711 | eHT_OP_MODE, |
| 1712 | eHT_BASIC_STBC_MCS, |
| 1713 | eHT_DUAL_CTS_PROTECTION, |
| 1714 | eHT_LSIG_TXOP_PROTECTION_FULL_SUPPORT, |
| 1715 | eHT_PCO_ACTIVE, |
| 1716 | eHT_PCO_PHASE |
| 1717 | } tHTCapability; |
| 1718 | |
| 1719 | /* HT Capabilities Info */ |
| 1720 | typedef struct sSirMacHTCapabilityInfo { |
| 1721 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1722 | uint16_t lsigTXOPProtection:1; /* Dynamic state */ |
| 1723 | uint16_t stbcControlFrame:1; /* Static via CFG */ |
| 1724 | uint16_t psmp:1; /* Static via CFG */ |
| 1725 | uint16_t dsssCckMode40MHz:1; /* Static via CFG */ |
| 1726 | uint16_t maximalAMSDUsize:1; /* Static via CFG */ |
| 1727 | uint16_t delayedBA:1; /* Static via CFG */ |
| 1728 | uint16_t rxSTBC:2; /* Static via CFG */ |
| 1729 | uint16_t txSTBC:1; /* Static via CFG */ |
| 1730 | uint16_t shortGI40MHz:1; /* Static via CFG */ |
| 1731 | uint16_t shortGI20MHz:1; /* Static via CFG */ |
| 1732 | uint16_t greenField:1; /* Static via CFG */ |
| 1733 | uint16_t mimoPowerSave:2; /* Dynamic state */ |
| 1734 | uint16_t supportedChannelWidthSet:1; /* Static via CFG */ |
| 1735 | uint16_t advCodingCap:1; /* Static via CFG */ |
| 1736 | #else |
| 1737 | uint16_t advCodingCap:1; |
| 1738 | uint16_t supportedChannelWidthSet:1; |
| 1739 | uint16_t mimoPowerSave:2; |
| 1740 | uint16_t greenField:1; |
| 1741 | uint16_t shortGI20MHz:1; |
| 1742 | uint16_t shortGI40MHz:1; |
| 1743 | uint16_t txSTBC:1; |
| 1744 | uint16_t rxSTBC:2; |
| 1745 | uint16_t delayedBA:1; |
| 1746 | uint16_t maximalAMSDUsize:1; |
| 1747 | uint16_t dsssCckMode40MHz:1; |
| 1748 | uint16_t psmp:1; |
| 1749 | uint16_t stbcControlFrame:1; |
| 1750 | uint16_t lsigTXOPProtection:1; |
| 1751 | #endif |
| 1752 | } cdf_packed tSirMacHTCapabilityInfo; |
| 1753 | |
| 1754 | /* HT Parameters Info */ |
| 1755 | typedef struct sSirMacHTParametersInfo { |
| 1756 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1757 | uint8_t reserved:3; |
| 1758 | uint8_t mpduDensity:3; /* Dynamic state */ |
| 1759 | uint8_t maxRxAMPDUFactor:2; /* Dynamic state */ |
| 1760 | #else |
| 1761 | uint8_t maxRxAMPDUFactor:2; |
| 1762 | uint8_t mpduDensity:3; |
| 1763 | uint8_t reserved:3; |
| 1764 | #endif |
| 1765 | } cdf_packed tSirMacHTParametersInfo; |
| 1766 | |
| 1767 | /* Extended HT Capabilities Info */ |
| 1768 | typedef struct sSirMacExtendedHTCapabilityInfo { |
| 1769 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1770 | uint16_t reserved2:6; |
| 1771 | uint16_t mcsFeedback:2; /* Static via CFG */ |
| 1772 | uint16_t reserved1:5; |
| 1773 | uint16_t transitionTime:2; /* Static via CFG */ |
| 1774 | uint16_t pco:1; /* Static via CFG */ |
| 1775 | #else |
| 1776 | uint16_t pco:1; |
| 1777 | uint16_t transitionTime:2; |
| 1778 | uint16_t reserved1:5; |
| 1779 | uint16_t mcsFeedback:2; |
| 1780 | uint16_t reserved2:6; |
| 1781 | #endif |
| 1782 | } cdf_packed tSirMacExtendedHTCapabilityInfo; |
| 1783 | |
| 1784 | /* IEEE 802.11n/D7.0 - 7.3.2.57.4 */ |
| 1785 | /* Part of the "supported MCS set field" */ |
| 1786 | typedef struct sSirMacRxHighestSupportRate { |
| 1787 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1788 | uint16_t reserved:6; |
| 1789 | uint16_t rate:10; |
| 1790 | #else |
| 1791 | uint16_t rate:10; |
| 1792 | uint16_t reserved:6; |
| 1793 | #endif |
| 1794 | } cdf_packed tSirMacRxHighestSupportRate, *tpSirMacRxHighestSupportRate; |
| 1795 | |
| 1796 | /* Transmit Beam Forming Capabilities Info */ |
| 1797 | typedef struct sSirMacTxBFCapabilityInfo { |
| 1798 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1799 | uint32_t reserved:7; |
| 1800 | uint32_t compressedSteeringMatrixBFAntennae:2; /* Static via CFG */ |
| 1801 | /* Static via CFG */ |
| 1802 | uint32_t uncompressedSteeringMatrixBFAntennae:2; |
| 1803 | uint32_t csiNumBFAntennae:2; /* Static via CFG */ |
| 1804 | /* Static via CFG */ |
| 1805 | uint32_t explicitCompressedSteeringMatrixFeedback:3; |
| 1806 | /* Static via CFG */ |
| 1807 | uint32_t explicitUncompressedSteeringMatrixFeedback:3; |
| 1808 | uint32_t explicitBFCSIFeedback:3; /* Static via CFG */ |
| 1809 | uint32_t explicitUncompressedSteeringMatrix:1; /* Static via CFG */ |
| 1810 | uint32_t explicitCSITxBF:1; /* Static via CFG */ |
| 1811 | uint32_t calibration:2; /* Static via CFG */ |
| 1812 | uint32_t implicitTxBF:1; /* Static via CFG */ |
| 1813 | uint32_t txZLF:1; /* Static via CFG */ |
| 1814 | uint32_t rxZLF:1; /* Static via CFG */ |
| 1815 | uint32_t txStaggeredSounding:1; /* Static via CFG */ |
| 1816 | uint32_t rxStaggeredSounding:1; /* Static via CFG */ |
| 1817 | uint32_t txBF:1; /* Static via CFG */ |
| 1818 | #else |
| 1819 | uint32_t txBF:1; |
| 1820 | uint32_t rxStaggeredSounding:1; |
| 1821 | uint32_t txStaggeredSounding:1; |
| 1822 | uint32_t rxZLF:1; |
| 1823 | uint32_t txZLF:1; |
| 1824 | uint32_t implicitTxBF:1; |
| 1825 | uint32_t calibration:2; |
| 1826 | uint32_t explicitCSITxBF:1; |
| 1827 | uint32_t explicitUncompressedSteeringMatrix:1; |
| 1828 | uint32_t explicitBFCSIFeedback:3; |
| 1829 | uint32_t explicitUncompressedSteeringMatrixFeedback:3; |
| 1830 | uint32_t explicitCompressedSteeringMatrixFeedback:3; |
| 1831 | uint32_t csiNumBFAntennae:2; |
| 1832 | uint32_t uncompressedSteeringMatrixBFAntennae:2; |
| 1833 | uint32_t compressedSteeringMatrixBFAntennae:2; |
| 1834 | uint32_t reserved:7; |
| 1835 | #endif |
| 1836 | } cdf_packed tSirMacTxBFCapabilityInfo; |
| 1837 | |
| 1838 | /* Antenna Selection Capability Info */ |
| 1839 | typedef struct sSirMacASCapabilityInfo { |
| 1840 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1841 | uint8_t reserved2:1; |
| 1842 | uint8_t txSoundingPPDUs:1; /* Static via CFG */ |
| 1843 | uint8_t rxAS:1; /* Static via CFG */ |
| 1844 | uint8_t antennaIndicesFeedback:1; /* Static via CFG */ |
| 1845 | uint8_t explicitCSIFeedback:1; /* Static via CFG */ |
| 1846 | uint8_t antennaIndicesFeedbackTx:1; /* Static via CFG */ |
| 1847 | uint8_t explicitCSIFeedbackTx:1; /* Static via CFG */ |
| 1848 | uint8_t antennaSelection:1; /* Static via CFG */ |
| 1849 | #else |
| 1850 | uint8_t antennaSelection:1; |
| 1851 | uint8_t explicitCSIFeedbackTx:1; |
| 1852 | uint8_t antennaIndicesFeedbackTx:1; |
| 1853 | uint8_t explicitCSIFeedback:1; |
| 1854 | uint8_t antennaIndicesFeedback:1; |
| 1855 | uint8_t rxAS:1; |
| 1856 | uint8_t txSoundingPPDUs:1; |
| 1857 | uint8_t reserved2:1; |
| 1858 | #endif |
| 1859 | } cdf_packed tSirMacASCapabilityInfo; |
| 1860 | |
| 1861 | /* Additional HT IE Field1 */ |
| 1862 | typedef struct sSirMacHTInfoField1 { |
| 1863 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1864 | uint8_t serviceIntervalGranularity:3; /* Dynamic state */ |
| 1865 | uint8_t controlledAccessOnly:1; /* Static via CFG */ |
| 1866 | uint8_t rifsMode:1; /* Dynamic state */ |
| 1867 | uint8_t recommendedTxWidthSet:1; /* Dynamic state */ |
| 1868 | uint8_t secondaryChannelOffset:2; /* Dynamic state */ |
| 1869 | #else |
| 1870 | uint8_t secondaryChannelOffset:2; |
| 1871 | uint8_t recommendedTxWidthSet:1; |
| 1872 | uint8_t rifsMode:1; |
| 1873 | uint8_t controlledAccessOnly:1; |
| 1874 | uint8_t serviceIntervalGranularity:3; |
| 1875 | #endif |
| 1876 | } cdf_packed tSirMacHTInfoField1; |
| 1877 | |
| 1878 | /* Additional HT IE Field2 */ |
| 1879 | typedef struct sSirMacHTInfoField2 { |
| 1880 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1881 | uint16_t reserved:11; |
| 1882 | uint16_t obssNonHTStaPresent:1; /*added for Obss */ |
| 1883 | uint16_t transmitBurstLimit:1; |
| 1884 | uint16_t nonGFDevicesPresent:1; |
| 1885 | uint16_t opMode:2; /* Dynamic state */ |
| 1886 | #else |
| 1887 | uint16_t opMode:2; |
| 1888 | uint16_t nonGFDevicesPresent:1; |
| 1889 | uint16_t transmitBurstLimit:1; |
| 1890 | uint16_t obssNonHTStaPresent:1; /*added for Obss */ |
| 1891 | uint16_t reserved:11; |
| 1892 | #endif |
| 1893 | } cdf_packed tSirMacHTInfoField2; |
| 1894 | |
| 1895 | /* Additional HT IE Field3 */ |
| 1896 | typedef struct sSirMacHTInfoField3 { |
| 1897 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 1898 | uint16_t reserved:4; |
| 1899 | uint16_t pcoPhase:1; /* Dynamic state */ |
| 1900 | uint16_t pcoActive:1; /* Dynamic state */ |
| 1901 | uint16_t lsigTXOPProtectionFullSupport:1; /* Dynamic state */ |
| 1902 | uint16_t secondaryBeacon:1; /* Dynamic state */ |
| 1903 | uint16_t dualCTSProtection:1; /* Dynamic state */ |
| 1904 | uint16_t basicSTBCMCS:7; /* Dynamic state */ |
| 1905 | #else |
| 1906 | uint16_t basicSTBCMCS:7; |
| 1907 | uint16_t dualCTSProtection:1; |
| 1908 | uint16_t secondaryBeacon:1; |
| 1909 | uint16_t lsigTXOPProtectionFullSupport:1; |
| 1910 | uint16_t pcoActive:1; |
| 1911 | uint16_t pcoPhase:1; |
| 1912 | uint16_t reserved:4; |
| 1913 | #endif |
| 1914 | } cdf_packed tSirMacHTInfoField3; |
| 1915 | |
| 1916 | typedef struct sSirMacProbeReqFrame { |
| 1917 | tSirMacSSidIE ssIdIE; |
| 1918 | tSirMacRateSetIE rateSetIE; |
| 1919 | tSirMacRateSetIE extendedRateSetIE; |
| 1920 | } cdf_packed tSirMacProbeReqFrame, *tpSirMacProbeReqFrame; |
| 1921 | |
| 1922 | typedef struct sSirMacProbeRspFrame { |
| 1923 | tSirMacTimeStamp ts; |
| 1924 | tSirMacBeaconInterval beaconInterval; |
| 1925 | tSirMacCapabilityInfo capabilityInfo; |
| 1926 | tSirMacSSidIE ssIdIE; |
| 1927 | tSirMacRateSetIE rateSetIE; |
| 1928 | tSirMacRateSetIE extendedRateSetIE; |
| 1929 | tSirMacNonErpPresentIE nonErpPresent; |
| 1930 | tSirMacDsParamSetIE dsParamsIE; |
| 1931 | tSirMacCfParamSetIE cfParamsIE; |
| 1932 | } cdf_packed tSirMacProbeRspFrame, *tpSirMacProbeRspFrame; |
| 1933 | |
| 1934 | typedef struct sSirMacAuthFrameBody { |
| 1935 | uint16_t authAlgoNumber; |
| 1936 | uint16_t authTransactionSeqNumber; |
| 1937 | uint16_t authStatusCode; |
| 1938 | uint8_t type; /* = SIR_MAC_CHALLENGE_TEXT_EID */ |
| 1939 | uint8_t length; /* = SIR_MAC_AUTH_CHALLENGE_LENGTH */ |
| 1940 | uint8_t challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH]; |
| 1941 | } cdf_packed tSirMacAuthFrameBody, *tpSirMacAuthFrameBody; |
| 1942 | |
| 1943 | typedef struct sSirMacAuthenticationFrame { |
| 1944 | tSirMacAuthFrameBody authFrameBody; |
| 1945 | } cdf_packed tSirMacAuthFrame, *tpSirMacAuthFrame; |
| 1946 | |
| 1947 | typedef struct sSirMacAssocReqFrame { |
| 1948 | tSirMacCapabilityInfo capabilityInfo; |
| 1949 | uint16_t listenInterval; |
| 1950 | tSirMacSSidIE ssIdIE; |
| 1951 | tSirMacRateSetIE rateSetIE; |
| 1952 | tSirMacRateSetIE extendedRateSetIE; |
| 1953 | } cdf_packed tSirMacAssocReqFrame, *tpSirMacAssocReqFrame; |
| 1954 | |
| 1955 | typedef struct sSirMacAssocRspFrame { |
| 1956 | tSirMacCapabilityInfo capabilityInfo; |
| 1957 | uint16_t statusCode; |
| 1958 | uint16_t aid; |
| 1959 | tSirMacRateSetIE supportedRates; |
| 1960 | tSirMacRateSetIE extendedRateSetIE; |
| 1961 | } cdf_packed tSirMacAssocRspFrame, *tpSirMacAssocRspFrame; |
| 1962 | |
| 1963 | typedef struct sSirMacDisassocFrame { |
| 1964 | uint16_t reasonCode; |
| 1965 | } cdf_packed tSirMacDisassocFrame, *tpSirMacDisassocFrame; |
| 1966 | |
| 1967 | typedef struct sDSirMacDeauthFrame { |
| 1968 | uint16_t reasonCode; |
| 1969 | } cdf_packed tSirMacDeauthFrame, *tpSirMacDeauthFrame; |
| 1970 | |
| 1971 | /* / Common header for all action frames */ |
| 1972 | typedef struct sSirMacActionFrameHdr { |
| 1973 | uint8_t category; |
| 1974 | uint8_t actionID; |
| 1975 | } cdf_packed tSirMacActionFrameHdr, *tpSirMacActionFrameHdr; |
| 1976 | |
| 1977 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR) |
| 1978 | typedef struct sSirMacVendorSpecificFrameHdr { |
| 1979 | uint8_t category; |
| 1980 | uint8_t Oui[4]; |
| 1981 | } cdf_packed tSirMacVendorSpecificFrameHdr, |
| 1982 | *tpSirMacVendorSpecificFrameHdr; |
| 1983 | #endif |
| 1984 | |
| 1985 | typedef struct sSirMacVendorSpecificPublicActionFrameHdr { |
| 1986 | uint8_t category; |
| 1987 | uint8_t actionID; |
| 1988 | uint8_t Oui[4]; |
| 1989 | uint8_t OuiSubType; |
| 1990 | uint8_t dialogToken; |
| 1991 | } cdf_packed tSirMacVendorSpecificPublicActionFrameHdr, |
| 1992 | *tpSirMacVendorSpecificPublicActionFrameHdr; |
| 1993 | |
| 1994 | typedef struct sSirMacP2PActionFrameHdr { |
| 1995 | uint8_t category; |
| 1996 | uint8_t Oui[4]; |
| 1997 | uint8_t OuiSubType; |
| 1998 | uint8_t dialogToken; |
| 1999 | } cdf_packed tSirMacP2PActionFrameHdr, *tpSirMacP2PActionFrameHdr; |
| 2000 | |
| 2001 | typedef struct sSirMacMeasActionFrameHdr { |
| 2002 | uint8_t category; |
| 2003 | uint8_t actionID; |
| 2004 | uint8_t dialogToken; |
| 2005 | } tSirMacMeasActionFrameHdr, *tpSirMacMeasActionFrameHdr; |
| 2006 | |
| 2007 | #ifdef ANI_SUPPORT_11H |
| 2008 | typedef struct sSirMacTpcReqActionFrame { |
| 2009 | tSirMacMeasActionFrameHdr actionHeader; |
| 2010 | uint8_t type; |
| 2011 | uint8_t length; |
| 2012 | } tSirMacTpcReqActionFrame, *tpSirMacTpcReqActionFrame; |
| 2013 | typedef struct sSirMacMeasReqActionFrame { |
| 2014 | tSirMacMeasActionFrameHdr actionHeader; |
| 2015 | tSirMacMeasReqIE measReqIE; |
| 2016 | } tSirMacMeasReqActionFrame, *tpSirMacMeasReqActionFrame; |
| 2017 | #endif |
| 2018 | |
| 2019 | #if defined WLAN_FEATURE_VOWIFI |
| 2020 | |
| 2021 | typedef struct sSirMacNeighborReportReq { |
| 2022 | uint8_t dialogToken; |
| 2023 | uint8_t ssid_present; |
| 2024 | tSirMacSSid ssid; |
| 2025 | } tSirMacNeighborReportReq, *tpSirMacNeighborReportReq; |
| 2026 | |
| 2027 | typedef struct sSirMacLinkReport { |
| 2028 | uint8_t dialogToken; |
| 2029 | uint8_t txPower; |
| 2030 | uint8_t rxAntenna; |
| 2031 | uint8_t txAntenna; |
| 2032 | uint8_t rcpi; |
| 2033 | uint8_t rsni; |
| 2034 | } tSirMacLinkReport, *tpSirMacLinkReport; |
| 2035 | |
| 2036 | #define BEACON_REPORT_MAX_IES 224 /* Refer IEEE 802.11k-2008, Table 7-31d */ |
| 2037 | typedef struct sSirMacBeaconReport { |
| 2038 | uint8_t regClass; |
| 2039 | uint8_t channel; |
| 2040 | uint8_t measStartTime[8]; |
| 2041 | uint8_t measDuration; |
| 2042 | uint8_t phyType; |
| 2043 | uint8_t bcnProbeRsp; |
| 2044 | uint8_t rsni; |
| 2045 | uint8_t rcpi; |
| 2046 | tSirMacAddr bssid; |
| 2047 | uint8_t antennaId; |
| 2048 | uint32_t parentTSF; |
| 2049 | uint8_t numIes; |
| 2050 | uint8_t Ies[BEACON_REPORT_MAX_IES]; |
| 2051 | |
| 2052 | } tSirMacBeaconReport, *tpSirMacBeaconReport; |
| 2053 | |
| 2054 | #define RADIO_REPORTS_MAX_IN_A_FRAME 4 |
| 2055 | typedef struct sSirMacRadioMeasureReport { |
| 2056 | uint8_t token; |
| 2057 | uint8_t refused; |
| 2058 | uint8_t incapable; |
| 2059 | uint8_t type; |
| 2060 | union { |
| 2061 | tSirMacBeaconReport beaconReport; |
| 2062 | } report; |
| 2063 | |
| 2064 | } tSirMacRadioMeasureReport, *tpSirMacRadioMeasureReport; |
| 2065 | |
| 2066 | #endif |
| 2067 | |
| 2068 | /* QOS action frame definitions */ |
| 2069 | |
| 2070 | /* max number of possible tclas elements in any frame */ |
| 2071 | #define SIR_MAC_TCLASIE_MAXNUM 2 |
| 2072 | |
| 2073 | /* 11b rate encoding in MAC format */ |
| 2074 | |
| 2075 | #define SIR_MAC_RATE_1 0x02 |
| 2076 | #define SIR_MAC_RATE_2 0x04 |
| 2077 | #define SIR_MAC_RATE_5_5 0x0B |
| 2078 | #define SIR_MAC_RATE_11 0x16 |
| 2079 | |
| 2080 | /* 11a/g rate encoding in MAC format */ |
| 2081 | |
| 2082 | #define SIR_MAC_RATE_6 0x0C |
| 2083 | #define SIR_MAC_RATE_9 0x12 |
| 2084 | #define SIR_MAC_RATE_12 0x18 |
| 2085 | #define SIR_MAC_RATE_18 0x24 |
| 2086 | #define SIR_MAC_RATE_24 0x30 |
| 2087 | #define SIR_MAC_RATE_36 0x48 |
| 2088 | #define SIR_MAC_RATE_48 0x60 |
| 2089 | #define SIR_MAC_RATE_54 0x6C |
| 2090 | |
| 2091 | /* ANI legacy supported rates */ |
| 2092 | #define SIR_MAC_RATE_72 0x01 |
| 2093 | #define SIR_MAC_RATE_96 0x03 |
| 2094 | #define SIR_MAC_RATE_108 0x05 |
| 2095 | |
| 2096 | /* ANI enhanced rates */ |
| 2097 | #define SIR_MAC_RATE_42 1000 |
| 2098 | #define SIR_MAC_RATE_84 1001 |
| 2099 | #define SIR_MAC_RATE_126 1002 |
| 2100 | #define SIR_MAC_RATE_144 1003 |
| 2101 | #define SIR_MAC_RATE_168 1004 |
| 2102 | #define SIR_MAC_RATE_192 1005 |
| 2103 | #define SIR_MAC_RATE_216 1006 |
| 2104 | #define SIR_MAC_RATE_240 1007 |
| 2105 | |
| 2106 | #define SIR_MAC_RATE_1_BITMAP (1<<0) |
| 2107 | #define SIR_MAC_RATE_2_BITMAP (1<<1) |
| 2108 | #define SIR_MAC_RATE_5_5_BITMAP (1<<2) |
| 2109 | #define SIR_MAC_RATE_11_BITMAP (1<<3) |
| 2110 | #define SIR_MAC_RATE_6_BITMAP (1<<4) |
| 2111 | #define SIR_MAC_RATE_9_BITMAP (1<<5) |
| 2112 | #define SIR_MAC_RATE_12_BITMAP (1<<6) |
| 2113 | #define SIR_MAC_RATE_18_BITMAP (1<<7) |
| 2114 | #define SIR_MAC_RATE_24_BITMAP (1<<8) |
| 2115 | #define SIR_MAC_RATE_36_BITMAP (1<<9) |
| 2116 | #define SIR_MAC_RATE_48_BITMAP (1<<10) |
| 2117 | #define SIR_MAC_RATE_54_BITMAP (1<<11) |
| 2118 | |
| 2119 | #define sirIsArate(x) ((((uint8_t)x) == SIR_MAC_RATE_6) || \ |
| 2120 | (((uint8_t)x) == SIR_MAC_RATE_9) || \ |
| 2121 | (((uint8_t)x) == SIR_MAC_RATE_12) || \ |
| 2122 | (((uint8_t)x) == SIR_MAC_RATE_18) || \ |
| 2123 | (((uint8_t)x) == SIR_MAC_RATE_24) || \ |
| 2124 | (((uint8_t)x) == SIR_MAC_RATE_36) || \ |
| 2125 | (((uint8_t)x) == SIR_MAC_RATE_48) || \ |
| 2126 | (((uint8_t)x) == SIR_MAC_RATE_54)) |
| 2127 | |
| 2128 | #define sirIsBrate(x) ((((uint8_t)x) == SIR_MAC_RATE_1) || \ |
| 2129 | (((uint8_t)x) == SIR_MAC_RATE_2) || \ |
| 2130 | (((uint8_t)x) == SIR_MAC_RATE_5_5) || \ |
| 2131 | (((uint8_t)x) == SIR_MAC_RATE_11)) |
| 2132 | |
| 2133 | #define sirIsGrate(x) ((((uint8_t)x) == SIR_MAC_RATE_1) || \ |
| 2134 | (((uint8_t)x) == SIR_MAC_RATE_2) || \ |
| 2135 | (((uint8_t)x) == SIR_MAC_RATE_5_5) || \ |
| 2136 | (((uint8_t)x) == SIR_MAC_RATE_11) || \ |
| 2137 | (((uint8_t)x) == SIR_MAC_RATE_6) || \ |
| 2138 | (((uint8_t)x) == SIR_MAC_RATE_9) || \ |
| 2139 | (((uint8_t)x) == SIR_MAC_RATE_12) || \ |
| 2140 | (((uint8_t)x) == SIR_MAC_RATE_18) || \ |
| 2141 | (((uint8_t)x) == SIR_MAC_RATE_24) || \ |
| 2142 | (((uint8_t)x) == SIR_MAC_RATE_36) || \ |
| 2143 | (((uint8_t)x) == SIR_MAC_RATE_48) || \ |
| 2144 | (((uint8_t)x) == SIR_MAC_RATE_54)) |
| 2145 | |
| 2146 | #define SIR_MAC_MIN_IE_LEN 2 /* Minimum IE length for IE validation */ |
| 2147 | |
| 2148 | #define SIR_MAC_TI_TYPE_REASSOC_DEADLINE 1 |
| 2149 | #define SIR_MAC_TI_TYPE_KEY_LIFETIME 2 |
| 2150 | #define SIR_MAC_TI_TYPE_ASSOC_COMEBACK 3 |
| 2151 | |
| 2152 | #define SIR_MAC_VHT_CAP_MAX_MPDU_LEN 0 |
| 2153 | #define SIR_MAC_VHT_CAP_SUPP_CH_WIDTH_SET 2 |
| 2154 | #define SIR_MAC_VHT_CAP_LDPC_CODING_CAP 4 |
| 2155 | #define SIR_MAC_VHT_CAP_SHORTGI_80MHZ 5 |
| 2156 | #define SIR_MAC_VHT_CAP_SHORTGI_160_80_80MHZ 6 |
| 2157 | #define SIR_MAC_VHT_CAP_TXSTBC 7 |
| 2158 | #define SIR_MAC_VHT_CAP_RXSTBC 8 |
| 2159 | #define SIR_MAC_VHT_CAP_SU_BEAMFORMER_CAP 11 |
| 2160 | #define SIR_MAC_VHT_CAP_SU_BEAMFORMEE_CAP 12 |
| 2161 | #define SIR_MAC_VHT_CAP_CSN_BEAMORMER_ANT_SUP 13 |
| 2162 | #define SIR_MAC_VHT_CAP_NUM_SOUNDING_DIM 16 |
| 2163 | #define SIR_MAC_VHT_CAP_NUM_BEAM_FORMER_CAP 19 |
| 2164 | #define SIR_MAC_VHT_CAP_NUM_BEAM_FORMEE_CAP 20 |
| 2165 | #define SIR_MAC_VHT_CAP_TXOPPS 21 |
| 2166 | #define SIR_MAC_VHT_CAP_HTC_CAP 22 |
| 2167 | #define SIR_MAC_VHT_CAP_MAX_AMDU_LEN_EXPO 23 |
| 2168 | #define SIR_MAC_VHT_CAP_LINK_ADAPT_CAP 26 |
| 2169 | #define SIR_MAC_VHT_CAP_RX_ANTENNA_PATTERN 28 |
| 2170 | #define SIR_MAC_VHT_CAP_TX_ANTENNA_PATTERN 29 |
| 2171 | #define SIR_MAC_VHT_CAP_RESERVED2 30 |
| 2172 | |
| 2173 | #define SIR_MAC_HT_CAP_ADVCODING_S 0 |
| 2174 | #define SIR_MAC_HT_CAP_CHWIDTH40_S 1 |
| 2175 | #define SIR_MAC_HT_CAP_SMPOWERSAVE_DYNAMIC_S 2 |
| 2176 | #define SIR_MAC_HT_CAP_SM_RESERVED_S 3 |
| 2177 | #define SIR_MAC_HT_CAP_GREENFIELD_S 4 |
| 2178 | #define SIR_MAC_HT_CAP_SHORTGI20MHZ_S 5 |
| 2179 | #define SIR_MAC_HT_CAP_SHORTGI40MHZ_S 6 |
| 2180 | #define SIR_MAC_HT_CAP_TXSTBC_S 7 |
| 2181 | #define SIR_MAC_HT_CAP_RXSTBC_S 8 |
| 2182 | #define SIR_MAC_HT_CAP_DELAYEDBLKACK_S 10 |
| 2183 | #define SIR_MAC_HT_CAP_MAXAMSDUSIZE_S 11 |
| 2184 | #define SIR_MAC_HT_CAP_DSSSCCK40_S 12 |
| 2185 | #define SIR_MAC_HT_CAP_PSMP_S 13 |
| 2186 | #define SIR_MAC_HT_CAP_INTOLERANT40_S 14 |
| 2187 | #define SIR_MAC_HT_CAP_LSIGTXOPPROT_S 15 |
| 2188 | |
| 2189 | #define SIR_MAC_TXSTBC 1 |
| 2190 | #define SIR_MAC_RXSTBC 1 |
| 2191 | |
| 2192 | #endif /* __MAC_PROT_DEFS_H */ |