1 /* 2 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* 21 * This file sir_api.h contains definitions exported by 22 * Sirius software. 23 * Author: Chandra Modumudi 24 * Date: 04/16/2002 25 * History:- 26 * Date Modified by Modification Information 27 * -------------------------------------------------------------------- 28 */ 29 30 #ifndef __SIR_API_H 31 #define __SIR_API_H 32 33 /* legacy definition */ 34 typedef void *tpAniSirGlobal; 35 36 struct mac_context; 37 #include "qdf_types.h" 38 #include "cds_regdomain.h" 39 #include "sir_types.h" 40 #include "sir_mac_prot_def.h" 41 #include "ani_system_defs.h" 42 #include "sir_params.h" 43 #include "cds_regdomain.h" 44 #include "wmi_unified.h" 45 #include "wmi_unified_param.h" 46 #include "ol_txrx_htt_api.h" 47 #include "wlan_reg_services_api.h" 48 #include <dot11f.h> 49 #include "wlan_policy_mgr_api.h" 50 #include "wlan_tdls_public_structs.h" 51 #include "qca_vendor.h" 52 #include "wlan_cp_stats_mc_defs.h" 53 #ifdef WLAN_FEATURE_11BE_MLO 54 #include "wlan_mlo_mgr_public_structs.h" 55 #endif 56 57 #define OFFSET_OF(structType, fldName) (&((structType *)0)->fldName) 58 #define WLAN_DOT11_BASIC_RATE_MASK (0x80) 59 #define BITS_ON(_Field, _Bitmask) ((_Field) |= (_Bitmask)) 60 #define BITS_OFF(_Field, _Bitmask) ((_Field) &= ~(_Bitmask)) 61 62 /* / Max supported channel list */ 63 #define SIR_MAX_SUPPORTED_CHANNEL_LIST 96 64 65 #define SIR_MDIE_SIZE 3 /* MD ID(2 bytes), Capability(1 byte) */ 66 67 #define SIR_MAX_ELEMENT_ID 255 68 69 #define SIR_BCN_REPORT_MAX_BSS_DESC 8 70 71 #define SIR_NUM_11B_RATES 4 /* 1,2,5.5,11 */ 72 #define SIR_NUM_11A_RATES 8 /* 6,9,12,18,24,36,48,54 */ 73 74 typedef uint8_t tSirIpv4Addr[QDF_IPV4_ADDR_SIZE]; 75 76 #define SIR_VERSION_STRING_LEN 1024 77 typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN]; 78 79 /* Periodic Tx pattern offload feature */ 80 #define PERIODIC_TX_PTRN_MAX_SIZE 1536 81 #ifndef MAXNUM_PERIODIC_TX_PTRNS 82 #define MAXNUM_PERIODIC_TX_PTRNS 6 83 #endif 84 85 /* FW response timeout values in milli seconds */ 86 #define SIR_PEER_ASSOC_TIMEOUT (4000) /* 4 seconds */ 87 88 #ifdef FEATURE_RUNTIME_PM 89 /* Add extra PMO_RESUME_TIMEOUT for runtime PM resume timeout */ 90 #define SIR_PEER_CREATE_RESPONSE_TIMEOUT (4000 + PMO_RESUME_TIMEOUT) 91 #define SIR_DELETE_STA_TIMEOUT (4000 + PMO_RESUME_TIMEOUT) 92 #define SIR_VDEV_PLCY_MGR_TIMEOUT (4000 + PMO_RESUME_TIMEOUT) 93 #else 94 #define SIR_PEER_CREATE_RESPONSE_TIMEOUT (4000) 95 #define SIR_DELETE_STA_TIMEOUT (4000) /* 4 seconds */ 96 #define SIR_VDEV_PLCY_MGR_TIMEOUT (4000) 97 #endif 98 99 #define MAX_POWER_DBG_ARGS_SUPPORTED 8 100 #define QOS_MAP_MAX_EX 21 101 #define QOS_MAP_RANGE_NUM 8 102 #define QOS_MAP_LEN_MIN (QOS_MAP_RANGE_NUM * 2) 103 #define QOS_MAP_LEN_MAX \ 104 (QOS_MAP_LEN_MIN + 2 * QOS_MAP_MAX_EX) 105 #define NUM_CHAINS_MAX 2 106 107 /* Maximum number of realms present in fils indication element */ 108 #define SIR_MAX_REALM_COUNT 7 109 /* Realm length */ 110 #define SIR_REALM_LEN 2 111 /* Cache ID length */ 112 #define CACHE_ID_LEN 2 113 114 /* Maximum peer station number query one time */ 115 #define MAX_PEER_STA 12 116 117 /* Maximum number of peers for SAP */ 118 #ifndef SIR_SAP_MAX_NUM_PEERS 119 #define SIR_SAP_MAX_NUM_PEERS 32 120 #endif 121 122 #define SIR_KEK_KEY_LEN 16 123 #define SIR_KEK_KEY_LEN_FILS 64 124 125 #define SIR_FILS_HLP_OUI_TYPE "\x5" 126 #define SIR_FILS_HLP_OUI_LEN 1 127 #define SIR_FILS_HLP_IE_LEN 2048 128 129 #define SIR_REPLAY_CTR_LEN 8 130 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 131 #define SIR_UAPSD_BITOFFSET_ACVO 0 132 #define SIR_UAPSD_BITOFFSET_ACVI 1 133 #define SIR_UAPSD_BITOFFSET_ACBK 2 134 #define SIR_UAPSD_BITOFFSET_ACBE 3 135 136 #define SIR_UAPSD_FLAG_ACVO (1 << SIR_UAPSD_BITOFFSET_ACVO) 137 #define SIR_UAPSD_FLAG_ACVI (1 << SIR_UAPSD_BITOFFSET_ACVI) 138 #define SIR_UAPSD_FLAG_ACBK (1 << SIR_UAPSD_BITOFFSET_ACBK) 139 #define SIR_UAPSD_FLAG_ACBE (1 << SIR_UAPSD_BITOFFSET_ACBE) 140 #define SIR_UAPSD_GET(ac, mask) (((mask) & (SIR_UAPSD_FLAG_ ## ac)) >> SIR_UAPSD_BITOFFSET_ ## ac) 141 142 #endif 143 144 /* Maximum management packet data unit length */ 145 #define MAX_MGMT_MPDU_LEN 2304 146 147 struct scheduler_msg; 148 149 /** 150 * enum sir_roam_op_code - Operation to be done by the callback. 151 * @SIR_ROAM_SYNCH_PROPAGATION: Propagate the new BSS info after roaming. 152 * @SIR_ROAMING_DEREGISTER_STA: Deregister the old STA after roaming. 153 * @SIR_ROAMING_START: Firmware started roaming operation 154 * @SIR_ROAMING_ABORT: Firmware aborted roaming operation, still connected. 155 * @SIR_ROAM_SYNCH_COMPLETE: Roam sync propagation is complete. 156 * @SIR_ROAMING_INVOKE_FAIL: Firmware roaming failed. 157 * @SIR_ROAMING_DEAUTH: Firmware indicates deauth. 158 */ 159 enum sir_roam_op_code { 160 SIR_ROAM_SYNCH_PROPAGATION = 1, 161 SIR_ROAMING_DEREGISTER_STA, 162 SIR_ROAMING_START, 163 SIR_ROAMING_ABORT, 164 SIR_ROAM_SYNCH_COMPLETE, 165 SIR_ROAM_SYNCH_NAPI_OFF, 166 SIR_ROAMING_INVOKE_FAIL, 167 SIR_ROAMING_DEAUTH, 168 }; 169 170 /** 171 * enum ps_state - State of the power save 172 * @FULL_POWER_MODE: for Full power mode 173 * @LEGACY_POWER_SAVE_MODE: For Legacy Power Save mode 174 * @UAPSD_MODE: for UAPSD power save 175 */ 176 enum ps_state { 177 FULL_POWER_MODE, 178 LEGACY_POWER_SAVE_MODE, 179 UAPSD_MODE 180 }; 181 182 /** 183 * \var g_phy_rates_suppt 184 * 185 * \brief Rate support lookup table 186 * 187 * 188 * This is a lookup table indexing rates & configuration parameters to 189 * support. Given a rate (in unites of 0.5Mpbs) & three bools (MIMO 190 * Enabled, Channel Bonding Enabled, & Concatenation Enabled), one can 191 * determine whether the given rate is supported by computing two 192 * indices. The first maps the rate to table row as indicated below 193 * (i.e. eHddSuppRate_6Mbps maps to row zero, eHddSuppRate_9Mbps to row 194 * 1, and so on). Index two can be computed like so: 195 * 196 * \code 197 * idx2 = ( fEsf ? 0x4 : 0x0 ) | 198 * ( fCb ? 0x2 : 0x0 ) | 199 * ( fMimo ? 0x1 : 0x0 ); 200 * \endcode 201 * 202 * 203 * Given that: 204 * 205 * \code 206 * fSupported = g_phy_rates_suppt[idx1][idx2]; 207 * \endcode 208 * 209 * 210 * This table is based on the document "PHY Supported Rates.doc". This 211 * table is permissive in that a rate is reflected as being supported 212 * even when turning off an enabled feature would be required. For 213 * instance, "PHY Supported Rates" lists 42Mpbs as unsupported when CB, 214 * ESF, & MIMO are all on. However, if we turn off either of CB or 215 * MIMO, it then becomes supported. Therefore, we mark it as supported 216 * even in index 7 of this table. 217 * 218 * 219 */ 220 221 static const bool g_phy_rates_suppt[24][8] = { 222 223 /* SSF SSF SSF SSF ESF ESF ESF ESF */ 224 /* SIMO MIMO SIMO MIMO SIMO MIMO SIMO MIMO */ 225 /* No CB No CB CB CB No CB No CB CB CB */ 226 {true, true, true, true, true, true, true, true}, /* 6Mbps */ 227 {true, true, true, true, true, true, true, true}, /* 9Mbps */ 228 {true, true, true, true, true, true, true, true}, /* 12Mbps */ 229 {true, true, true, true, true, true, true, true}, /* 18Mbps */ 230 {false, false, true, true, false, false, true, true}, /* 20Mbps */ 231 {true, true, true, true, true, true, true, true}, /* 24Mbps */ 232 {true, true, true, true, true, true, true, true}, /* 36Mbps */ 233 {false, false, true, true, false, true, true, true}, /* 40Mbps */ 234 {false, false, true, true, false, true, true, true}, /* 42Mbps */ 235 {true, true, true, true, true, true, true, true}, /* 48Mbps */ 236 {true, true, true, true, true, true, true, true}, /* 54Mbps */ 237 {false, true, true, true, false, true, true, true}, /* 72Mbps */ 238 {false, false, true, true, false, true, true, true}, /* 80Mbps */ 239 {false, false, true, true, false, true, true, true}, /* 84Mbps */ 240 {false, true, true, true, false, true, true, true}, /* 96Mbps */ 241 {false, true, true, true, false, true, true, true}, /* 108Mbps */ 242 {false, false, true, true, false, true, true, true}, /* 120Mbps */ 243 {false, false, true, true, false, true, true, true}, /* 126Mbps */ 244 {false, false, false, true, false, false, false, true}, /* 144Mbps */ 245 {false, false, false, true, false, false, false, true}, /* 160Mbps */ 246 {false, false, false, true, false, false, false, true}, /* 168Mbps */ 247 {false, false, false, true, false, false, false, true}, /* 192Mbps */ 248 {false, false, false, true, false, false, false, true}, /* 216Mbps */ 249 {false, false, false, true, false, false, false, true}, /* 240Mbps */ 250 }; 251 252 typedef enum { 253 /* 11b rates */ 254 SUPP_RATE_1_MBPS = 1 * 2, 255 SUPP_RATE_2_MBPS = 2 * 2, 256 SUPP_RATE_5_MBPS = 11, 257 SUPP_RATE_11_MBPS = 11 * 2, 258 259 /* 11a / 11g rates */ 260 SUPP_RATE_6_MBPS = 6 * 2, 261 SUPP_RATE_9_MBPS = 9 * 2, 262 SUPP_RATE_12_MBPS = 12 * 2, 263 SUPP_RATE_18_MBPS = 18 * 2, 264 SUPP_RATE_24_MBPS = 24 * 2, 265 SUPP_RATE_36_MBPS = 36 * 2, 266 SUPP_RATE_48_MBPS = 48 * 2, 267 SUPP_RATE_54_MBPS = 54 * 2, 268 269 /* Airgo prop. rates */ 270 SUPP_RATE_20_MBPS = 20 * 2, 271 SUPP_RATE_40_MBPS = 40 * 2, 272 SUPP_RATE_42_MBPS = 42 * 2, 273 SUPP_RATE_72_MBPS = 72 * 2, 274 SUPP_RATE_80_MBPS = 80 * 2, 275 SUPP_RATE_84_MBPS = 84 * 2, 276 SUPP_RATE_96_MBPS = 96 * 2, 277 SUPP_RATE_108_MBPS = 108 * 2, 278 SUPP_RATE_120_MBPS = 120 * 2, 279 SUPP_RATE_126_MBPS = 126 * 2, 280 SUPP_RATE_144_MBPS = 144 * 2, 281 SUPP_RATE_160_MBPS = 160 * 2, 282 SUPP_RATE_168_MBPS = 168 * 2, 283 SUPP_RATE_192_MBPS = 192 * 2, 284 SUPP_RATE_216_MBPS = 216 * 2, 285 SUPP_RATE_240_MBPS = 240 * 2 286 } eCsrSupportedRates; 287 288 /** 289 * struct ps_params - maintain power save state and USAPD params 290 * @mac_ctx: mac_ctx 291 * @session_id: Session Id. 292 * @ps_state : State of the power save 293 * @uapsd_per_ac_trigger_enable_mask: dynamic UPASD mask setting 294 * derived from AddTS Rsp and DelTS frame. 295 * If a particular AC bit is set, it means AC is trigger enabled. 296 * @uapsd_per_ac_delivery_enable_mask: dynamic UPASD mask setting 297 * derived from AddTS Rsp and DelTs frame. 298 * If a particular AC bit is set, it means AC is delivery enabled. 299 * @ac_admit_mask: used for AC downgrade. This is a dynamic mask 300 * setting which keep tracks of ACs being admitted. 301 * If bit is set to 0: That particular AC is not admitted 302 * If bit is set to 1: That particular AC is admitted 303 * @uapsd_per_ac_bit_mask: This is a static UAPSD mask setting 304 * derived from SME_JOIN_REQ and SME_REASSOC_REQ. 305 * If a particular AC bit is set, it means the AC is both 306 * trigger enabled and delivery enabled. 307 * @auto_ps_enable_timer: Upon expiration of this timer Power Save Offload 308 * module will try to enable sta mode ps 309 */ 310 311 struct ps_params { 312 void *mac_ctx; 313 uint32_t session_id; 314 enum ps_state ps_state; 315 uint8_t uapsd_per_ac_trigger_enable_mask; 316 uint8_t uapsd_per_ac_delivery_enable_mask; 317 uint8_t ac_admit_mask[SIR_MAC_DIRECTION_DIRECT]; 318 uint8_t uapsd_per_ac_bit_mask; 319 qdf_mc_timer_t auto_ps_enable_timer; 320 }; 321 322 /* Type declarations used by Firmware and Host software */ 323 324 /* Scan type enum used in scan request */ 325 typedef enum eSirScanType { 326 eSIR_PASSIVE_SCAN, 327 eSIR_ACTIVE_SCAN, 328 eSIR_BEACON_TABLE, 329 } tSirScanType; 330 331 /** 332 * struct roam_scan_ch_resp - roam scan chan list response to userspace 333 * @vdev_id: vdev id 334 * @num_channels: number of roam scan channels 335 * @command_resp: command response or async event 336 * @chan_list: list of roam scan channels 337 */ 338 struct roam_scan_ch_resp { 339 uint16_t vdev_id; 340 uint16_t num_channels; 341 uint32_t command_resp; 342 uint32_t *chan_list; 343 }; 344 345 /** 346 * struct wlan_beacon_report - Beacon info to be send to userspace 347 * @vdev_id: vdev id 348 * @ssid: ssid present in beacon 349 * @bssid: bssid present in beacon 350 * @frequency: channel frequency in MHz 351 * @beacon_interval: Interval between two consecutive beacons 352 * @time_stamp: time stamp at which beacon received from AP 353 * @boot_time: Boot time when beacon received 354 */ 355 struct wlan_beacon_report { 356 uint8_t vdev_id; 357 struct wlan_ssid ssid; 358 struct qdf_mac_addr bssid; 359 uint32_t frequency; 360 uint16_t beacon_interval; 361 qdf_time_t time_stamp; 362 qdf_time_t boot_time; 363 }; 364 365 366 /* / Result codes Firmware return to Host SW */ 367 typedef enum eSirResultCodes { 368 eSIR_SME_SUCCESS, 369 eSIR_LOGE_EXCEPTION, 370 eSIR_SME_INVALID_PARAMETERS = 500, 371 eSIR_SME_UNEXPECTED_REQ_RESULT_CODE, 372 eSIR_SME_RESOURCES_UNAVAILABLE, 373 /* Unable to find a BssDescription */ 374 eSIR_SME_SCAN_FAILED, 375 /* matching requested scan criteria */ 376 eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED, 377 eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE, 378 eSIR_SME_REFUSED, 379 eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA, 380 eSIR_SME_JOIN_TIMEOUT_RESULT_CODE, 381 eSIR_SME_AUTH_TIMEOUT_RESULT_CODE, 382 eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE, 383 eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE, 384 eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED, 385 eSIR_SME_AUTH_REFUSED, 386 eSIR_SME_INVALID_WEP_DEFAULT_KEY, 387 eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER, 388 eSIR_SME_ASSOC_REFUSED, 389 eSIR_SME_REASSOC_REFUSED, 390 /* Recvd Deauth while join/pre-auth */ 391 eSIR_SME_DEAUTH_WHILE_JOIN, 392 eSIR_SME_STA_NOT_AUTHENTICATED, 393 eSIR_SME_STA_NOT_ASSOCIATED, 394 eSIR_SME_ALREADY_JOINED_A_BSS, 395 /* Given in SME_SCAN_RSP msg */ 396 eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, 397 /* that more SME_SCAN_RSP */ 398 /* messages are following. */ 399 /* SME_SCAN_RSP message with */ 400 /* eSIR_SME_SUCCESS status */ 401 /* code is the last one. */ 402 /* Sent in SME_JOIN/REASSOC_RSP */ 403 eSIR_SME_INVALID_ASSOC_RSP_RXED, 404 /* messages upon receiving */ 405 /* invalid Re/Assoc Rsp frame. */ 406 /* STOP BSS triggered by MIC failures: MAC software to 407 * disassoc all stations 408 */ 409 eSIR_SME_MIC_COUNTER_MEASURES, 410 /* with MIC_FAILURE reason code and perform the stop bss operation */ 411 /* didn't get rsp from peer within timeout interval */ 412 eSIR_SME_ADDTS_RSP_TIMEOUT, 413 /* didn't get success rsp from HAL */ 414 eSIR_SME_ADDTS_RSP_FAILED, 415 /* failed to send ch switch act frm */ 416 eSIR_SME_CHANNEL_SWITCH_FAIL, 417 eSIR_SME_INVALID_STATE, 418 /* SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status */ 419 eSIR_SME_HAL_SCAN_INIT_FAILED, 420 /* SIR_HAL_END_SCAN_RSP returned failed status */ 421 eSIR_SME_HAL_SCAN_END_FAILED, 422 /* SIR_HAL_FINISH_SCAN_RSP returned failed status */ 423 eSIR_SME_HAL_SCAN_FINISH_FAILED, 424 /* Failed to send a message to HAL */ 425 eSIR_SME_HAL_SEND_MESSAGE_FAIL, 426 /* Failed to stop the bss */ 427 eSIR_SME_STOP_BSS_FAILURE, 428 eSIR_SME_WOWL_ENTER_REQ_FAILED, 429 eSIR_SME_WOWL_EXIT_REQ_FAILED, 430 eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE, 431 eSIR_SME_FT_REASSOC_FAILURE, 432 eSIR_SME_SEND_ACTION_FAIL, 433 eSIR_SME_DEAUTH_STATUS, 434 eSIR_PNO_SCAN_SUCCESS, 435 eSIR_SME_INVALID_SESSION, 436 eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE 437 } tSirResultCodes; 438 439 #ifdef WLAN_FEATURE_FILS_SK 440 struct fils_join_rsp_params { 441 uint8_t *fils_pmk; 442 uint8_t fils_pmk_len; 443 uint8_t fils_pmkid[PMKID_LEN]; 444 uint8_t kek[MAX_KEK_LEN]; 445 uint8_t kek_len; 446 uint8_t tk[MAX_TK_LEN]; 447 uint8_t tk_len; 448 uint8_t gtk_len; 449 uint8_t gtk[MAX_GTK_LEN]; 450 struct qdf_mac_addr dst_mac; 451 struct qdf_mac_addr src_mac; 452 uint16_t hlp_data_len; 453 uint8_t hlp_data[FILS_MAX_HLP_DATA_LEN]; 454 }; 455 #endif 456 457 #define RMENABLEDCAP_MAX_LEN 5 458 459 struct rrm_config_param { 460 uint8_t rrm_enabled; 461 bool sap_rrm_enabled; 462 uint8_t max_randn_interval; 463 uint8_t rm_capability[RMENABLEDCAP_MAX_LEN]; 464 }; 465 466 const char *lim_bss_type_to_string(const uint16_t bss_type); 467 /** 468 * struct supported_rates - stores rates/MCS supported 469 * @llbRates: 11b rates in unit of 500kbps 470 * @llaRates: 11a rates in unit of 500kbps 471 * @supportedMCSSet: supported basic MCS, 0-76 bits used, remaining reserved 472 * bits 0-15 and 32 should be set. 473 * @rxHighestDataRate: RX Highest Supported Data Rate defines the highest data 474 * rate that the STA is able to receive, in unites of 1Mbps 475 * This value is derived from "Supported MCS Set field" 476 * inside the HT capability element. 477 * @vhtRxMCSMap: Indicates the Maximum MCS(VHT) that can be received for each 478 * number of spacial streams 479 * @vhtRxHighestDataRate: Indicate the highest VHT data rate that the STA is 480 * able to receive 481 * @vhtTxMCSMap: Indicates the Maximum MCS(VHT) that can be transmitted for 482 * each number of spacial streams 483 * @vhtTxHighestDataRate: Indicate the highest VHT data rate that the STA is 484 * able to transmit 485 * @he_rx_mcs: Indicates the Maximum MCS(HE) that can be received for each 486 * number of spacial streams 487 * @he_tx_mcs: Indicates the Maximum MCS(HE) that can be transmitted for each 488 * number of spacial streams 489 * @bw_20_rx_max_nss_for_mcs_0_to_7: Indicates MAX RX NSS for MCS from 0 to 7 490 * @bw_20_tx_max_nss_for_mcs_0_to_7: Indicates MAX TX NSS for MCS from 0 to 7 491 * @bw_20_rx_max_nss_for_mcs_8_and_9: Indicates MAX RX NSS for MCS from 8 9 492 * @bw_20_tx_max_nss_for_mcs_8_and_9: Indicates MAX TX NSS for MCS from 8 9 493 * @bw_20_rx_max_nss_for_mcs_10_and_11:Indicates MAX RX NSS for MCS from 10 11 494 * @bw_20_tx_max_nss_for_mcs_10_and_11: Indicates MAX TX NSS for MCS from 10 11 495 * @bw_20_rx_max_nss_for_mcs_12_and_13: Indicates MAX RX NSS for MCS from 12 13 496 * @bw_20_tx_max_nss_for_mcs_12_and_13: Indicates MAX TX NSS for MCS from 12 13 497 * @bw_le_80_rx_max_nss_for_mcs_0_to_7: Indicates MAX RX NSS for MCS from 0 to 7 498 * @bw_le_80_tx_max_nss_for_mcs_0_to_7: Indicates MAX TX NSS for MCS from 0 to 7 499 * @bw_le_80_rx_max_nss_for_mcs_8_and_9: Indicates MAX RX NSS for MCS from 8 9 500 * @bw_le_80_tx_max_nss_for_mcs_8_and_9: Indicates MAX TX NSS for MCS from 8 9 501 * @bw_le_80_rx_max_nss_for_mcs_10_and_11:Indicates MAX RX NSS for MCS from 502 * 10 11 503 * @bw_le_80_tx_max_nss_for_mcs_10_and_11: Indicates MAX TX NSS for MCS from 504 * 10 11 505 * @bw_le_80_rx_max_nss_for_mcs_12_and_13: Indicates MAX RX NSS for MCS from 506 * 12 13 507 * @bw_le_80_tx_max_nss_for_mcs_12_and_13: Indicates MAX TX NSS for MCS from 508 * 12 13 509 * @bw_160_rx_max_nss_for_mcs_0_to_7: Indicates MAX RX NSS for MCS from 0 to 7 510 * @bw_160_tx_max_nss_for_mcs_0_to_7: Indicates MAX TX NSS for MCS from 0 to 7 511 * @bw_160_rx_max_nss_for_mcs_8_and_9: Indicates MAX RX NSS for MCS from 8 9 512 * @bw_160_tx_max_nss_for_mcs_8_and_9: Indicates MAX TX NSS for MCS from 8 9 513 * @bw_160_rx_max_nss_for_mcs_10_and_11:Indicates MAX RX NSS for MCS from 514 * 10 11 515 * @bw_160_tx_max_nss_for_mcs_10_and_11: Indicates MAX TX NSS for MCS from 516 * 10 11 517 * @bw_160_rx_max_nss_for_mcs_12_and_13: Indicates MAX RX NSS for MCS from 518 * 12 13 519 * @bw_160_tx_max_nss_for_mcs_12_and_13: Indicates MAX TX NSS for MCS from 520 * 12 13 521 * @bw_320_rx_max_nss_for_mcs_0_to_7: Indicates MAX RX NSS for MCS from 0 to 7 522 * @bw_320_tx_max_nss_for_mcs_0_to_7: Indicates MAX TX NSS for MCS from 0 to 7 523 * @bw_320_rx_max_nss_for_mcs_8_and_9: Indicates MAX RX NSS for MCS from 8 9 524 * @bw_320_tx_max_nss_for_mcs_8_and_9: Indicates MAX TX NSS for MCS from 8 9 525 * @bw_320_rx_max_nss_for_mcs_10_and_11:Indicates MAX RX NSS for MCS from 526 * 10 11 527 * @bw_320_tx_max_nss_for_mcs_10_and_11: Indicates MAX TX NSS for MCS from 528 * 10 11 529 * @bw_320_rx_max_nss_for_mcs_12_and_13: Indicates MAX RX NSS for MCS from 530 * 12 13 531 * @bw_320_tx_max_nss_for_mcs_12_and_13: Indicates MAX TX NSS for MCS from 532 * 12 13 533 */ 534 struct supported_rates { 535 uint16_t llbRates[SIR_NUM_11B_RATES]; 536 uint16_t llaRates[SIR_NUM_11A_RATES]; 537 uint8_t supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET]; 538 uint16_t rxHighestDataRate; 539 uint16_t vhtRxMCSMap; 540 uint16_t vhtRxHighestDataRate; 541 uint16_t vhtTxMCSMap; 542 uint16_t vhtTxHighestDataRate; 543 #ifdef WLAN_FEATURE_11AX 544 uint16_t rx_he_mcs_map_lt_80; 545 uint16_t tx_he_mcs_map_lt_80; 546 uint16_t rx_he_mcs_map_160; 547 uint16_t tx_he_mcs_map_160; 548 uint16_t rx_he_mcs_map_80_80; 549 uint16_t tx_he_mcs_map_80_80; 550 #endif 551 #ifdef WLAN_FEATURE_11BE 552 uint32_t bw_20_rx_max_nss_for_mcs_0_to_7:4; 553 uint32_t bw_20_tx_max_nss_for_mcs_0_to_7:4; 554 uint32_t bw_20_rx_max_nss_for_mcs_8_and_9:4; 555 uint32_t bw_20_tx_max_nss_for_mcs_8_and_9:4; 556 uint32_t bw_20_rx_max_nss_for_mcs_10_and_11:4; 557 uint32_t bw_20_tx_max_nss_for_mcs_10_and_11:4; 558 uint32_t bw_20_rx_max_nss_for_mcs_12_and_13:4; 559 uint32_t bw_20_tx_max_nss_for_mcs_12_and_13:4; 560 uint32_t bw_le_80_rx_max_nss_for_mcs_0_to_9:4; 561 uint32_t bw_le_80_tx_max_nss_for_mcs_0_to_9:4; 562 uint32_t bw_le_80_rx_max_nss_for_mcs_10_and_11:4; 563 uint32_t bw_le_80_tx_max_nss_for_mcs_10_and_11:4; 564 uint32_t bw_le_80_rx_max_nss_for_mcs_12_and_13:4; 565 uint32_t bw_le_80_tx_max_nss_for_mcs_12_and_13:4; 566 uint32_t bw_160_rx_max_nss_for_mcs_0_to_9:4; 567 uint32_t bw_160_tx_max_nss_for_mcs_0_to_9:4; 568 uint32_t bw_160_rx_max_nss_for_mcs_10_and_11:4; 569 uint32_t bw_160_tx_max_nss_for_mcs_10_and_11:4; 570 uint32_t bw_160_rx_max_nss_for_mcs_12_and_13:4; 571 uint32_t bw_160_tx_max_nss_for_mcs_12_and_13:4; 572 uint32_t bw_320_rx_max_nss_for_mcs_0_to_9:4; 573 uint32_t bw_320_tx_max_nss_for_mcs_0_to_9:4; 574 uint32_t bw_320_rx_max_nss_for_mcs_10_and_11:4; 575 uint32_t bw_320_tx_max_nss_for_mcs_10_and_11:4; 576 uint8_t bw_320_rx_max_nss_for_mcs_12_and_13:4; 577 uint8_t bw_320_tx_max_nss_for_mcs_12_and_13:4; 578 #endif 579 }; 580 581 struct register_mgmt_frame { 582 uint16_t messageType; 583 uint16_t length; 584 uint8_t sessionId; 585 bool registerFrame; 586 uint16_t frameType; 587 uint16_t matchLen; 588 QDF_FLEX_ARRAY(uint8_t, matchData); 589 }; 590 591 /* / Generic type for sending a response message */ 592 /* / with result code to host software */ 593 typedef struct sSirSmeRsp { 594 uint16_t messageType; /* eWNI_SME_*_RSP */ 595 uint16_t length; 596 uint8_t vdev_id; 597 tSirResultCodes status_code; 598 struct wlan_objmgr_psoc *psoc; 599 } tSirSmeRsp, *tpSirSmeRsp; 600 601 struct bss_description; 602 struct roam_offload_synch_ind; 603 struct roam_pmkid_req_event; 604 605 /** 606 * typedef pe_roam_synch_fn_t - PE roam synch callback routine pointer 607 * @mac_ctx: Global MAC context 608 * @vdev_id: vdev id 609 * @roam_sync_ind_ptr: Structure with roam synch parameters 610 * @ie_len: ie length 611 * @reason: Reason for calling the callback 612 * 613 * This type is for callbacks registered with WMA to complete the roam synch 614 * propagation at PE level. It also fills the BSS descriptor, which will be 615 * helpful to complete the roam synch propagation. 616 * 617 * Return: Success or Failure. 618 */ 619 typedef QDF_STATUS 620 (*pe_roam_synch_fn_t)(struct mac_context *mac_ctx, 621 uint8_t vdev_id, 622 struct roam_offload_synch_ind *roam_sync_ind_ptr, 623 uint16_t ie_len, 624 enum sir_roam_op_code reason); 625 626 /** 627 * typedef stop_roaming_fn_t - Stop roaming routine pointer 628 * @mac_handle: Pointer to opaque mac handle 629 * @session_id: Session Identifier 630 * @reason: Reason for calling the callback 631 * @requestor: Requestor for disabling roaming in driver 632 * 633 * This type is for callbacks registered with WMA to stop roaming on the given 634 * session ID 635 * 636 * Return: Success or Failure. 637 */ 638 typedef QDF_STATUS 639 (*stop_roaming_fn_t)(mac_handle_t mac_handle, 640 uint8_t session_id, uint8_t reason, 641 enum wlan_cm_rso_control_requestor requestor); 642 643 /** 644 * typedef set_ies_fn_t - Set IEs routine pointer 645 * @mac_ctx: Global MAC context 646 * @vdev_id: vdev id 647 * @dot11_mode: dot11 mode 648 * @opmode: device opmode 649 * 650 * This type is for callbacks registered with WMA to set the IEs for a 651 * given vdev id to the firmware. 652 * 653 * Return: Success or Failure 654 */ 655 typedef QDF_STATUS 656 (*set_ies_fn_t)(struct mac_context *mac_ctx, uint8_t vdev_id, 657 uint16_t dot11_mode, enum QDF_OPMODE device_mode); 658 659 /* / Definition for indicating all modules ready on STA */ 660 struct sme_ready_req { 661 uint16_t messageType; /* eWNI_SME_SYS_READY_IND */ 662 uint16_t length; 663 QDF_STATUS (*csr_roam_auth_event_handle_cb)(struct mac_context *mac, 664 uint8_t vdev_id, 665 struct qdf_mac_addr bssid, 666 uint32_t akm); 667 pe_roam_synch_fn_t pe_roam_synch_cb; 668 stop_roaming_fn_t stop_roaming_cb; 669 QDF_STATUS (*sme_msg_cb)(struct mac_context *mac, 670 struct scheduler_msg *msg); 671 QDF_STATUS (*pe_disconnect_cb) (struct mac_context *mac, 672 uint8_t vdev_id, 673 uint8_t *deauth_disassoc_frame, 674 uint16_t deauth_disassoc_frame_len, 675 uint16_t reason_code); 676 set_ies_fn_t pe_roam_set_ie_cb; 677 }; 678 679 /** 680 * struct s_sir_set_hw_mode - Set HW mode request 681 * @messageType: Message type 682 * @length: Length of the message 683 * @set_hw: Params containing the HW mode index and callback 684 */ 685 struct s_sir_set_hw_mode { 686 uint16_t messageType; 687 uint16_t length; 688 struct policy_mgr_hw_mode set_hw; 689 }; 690 691 /** 692 * struct sir_set_dual_mac_cfg - Set Dual mac config request 693 * @message_type: Message type 694 * @length: Length of the message 695 * @set_dual_mac: Params containing the dual mac config and callback 696 */ 697 struct sir_set_dual_mac_cfg { 698 uint16_t message_type; 699 uint16_t length; 700 struct policy_mgr_dual_mac_config set_dual_mac; 701 }; 702 703 /** 704 * struct sir_antenna_mode_param - antenna mode param 705 * @num_tx_chains: Number of TX chains 706 * @num_rx_chains: Number of RX chains 707 * @set_antenna_mode_resp: callback to set antenna mode command 708 * @set_antenna_mode_ctx: callback context to set antenna mode command 709 */ 710 struct sir_antenna_mode_param { 711 uint32_t num_tx_chains; 712 uint32_t num_rx_chains; 713 void *set_antenna_mode_resp; 714 void *set_antenna_mode_ctx; 715 }; 716 717 /** 718 * struct sir_set_antenna_mode - Set antenna mode request 719 * @message_type: Message type 720 * @length: Length of the message 721 * @set_antenna_mode: Params containing antenna mode params 722 */ 723 struct sir_set_antenna_mode { 724 uint16_t message_type; 725 uint16_t length; 726 struct sir_antenna_mode_param set_antenna_mode; 727 }; 728 729 /** 730 * enum bss_type - Enum for BSS type used in scanning/joining etc. 731 * 732 * @eSIR_INFRASTRUCTURE_MODE: Infrastructure station 733 * @eSIR_INFRA_AP_MODE: softAP mode 734 * @eSIR_AUTO_MODE: Auto role 735 * @eSIR_MONITOR_MODE: Monitor mode 736 * @eSIR_NDI_MODE: NAN datapath mode 737 */ 738 enum bss_type { 739 eSIR_INFRASTRUCTURE_MODE, 740 eSIR_INFRA_AP_MODE, 741 eSIR_AUTO_MODE, 742 eSIR_MONITOR_MODE, 743 eSIR_NDI_MODE, 744 eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE 745 }; 746 747 /* / Power Capability info used in 11H */ 748 struct power_cap_info { 749 uint8_t minTxPower; 750 uint8_t maxTxPower; 751 }; 752 753 /* / Supported Channel info used in 11H */ 754 struct supported_channels { 755 uint8_t numChnl; 756 uint8_t channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST]; 757 }; 758 759 typedef enum eSirNwType { 760 eSIR_11A_NW_TYPE, 761 eSIR_11B_NW_TYPE, 762 eSIR_11G_NW_TYPE, 763 eSIR_11N_NW_TYPE, 764 eSIR_11AC_NW_TYPE, 765 eSIR_11AX_NW_TYPE, 766 eSIR_11BE_NW_TYPE, 767 eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE 768 } tSirNwType; 769 770 struct add_ie_params { 771 uint16_t probeRespDataLen; 772 uint8_t *probeRespData_buff; 773 uint16_t assocRespDataLen; 774 uint8_t *assocRespData_buff; 775 uint16_t probeRespBCNDataLen; 776 uint8_t *probeRespBCNData_buff; 777 }; 778 779 #define GET_IE_LEN_IN_BSS(lenInBss) (lenInBss + sizeof(lenInBss) - \ 780 ((uintptr_t)OFFSET_OF(struct bss_description,\ 781 ieFields))) 782 783 #define WSCIE_PROBE_RSP_LEN (317 + 2) 784 785 #ifdef WLAN_FEATURE_FILS_SK 786 /* struct fils_ind_elements: elements parsed from fils indication present 787 * in beacon/probe resp 788 * @realm_cnt: number of realm present 789 * @realm: realms 790 * @is_fils_sk_supported: if FILS SK supported 791 * @is_cache_id_present: if cache id present 792 * @cache_id: cache id 793 */ 794 struct fils_ind_elements { 795 uint16_t realm_cnt; 796 uint8_t realm[SIR_MAX_REALM_COUNT][SIR_REALM_LEN]; 797 bool is_fils_sk_supported; 798 bool is_cache_id_present; 799 uint8_t cache_id[CACHE_ID_LEN]; 800 }; 801 #endif 802 803 struct bss_description { 804 /* offset of the ieFields from bssId. */ 805 uint16_t length; 806 tSirMacAddr bssId; 807 unsigned long scansystimensec; 808 uint32_t timeStamp[2]; 809 uint16_t beaconInterval; 810 uint16_t capabilityInfo; 811 tSirNwType nwType; /* Indicates 11a/b/g */ 812 int8_t rssi; 813 int8_t rssi_raw; 814 int8_t sinr; 815 /* channel frequency what peer sent in beacon/probersp. */ 816 uint32_t chan_freq; 817 /* Based on system time, not a relative time. */ 818 uint64_t received_time; 819 uint32_t parentTSF; 820 uint32_t startTSF[2]; 821 uint8_t mdiePresent; 822 /* MDIE for 11r, picked from the beacons */ 823 uint8_t mdie[SIR_MDIE_SIZE]; 824 #ifdef FEATURE_WLAN_ESE 825 uint16_t QBSSLoad_present; 826 uint16_t QBSSLoad_avail; 827 #endif 828 /* whether it is from a probe rsp */ 829 uint8_t fProbeRsp; 830 tSirMacSeqCtl seq_ctrl; 831 uint32_t tsf_delta; 832 struct scan_mbssid_info mbssid_info; 833 #ifdef WLAN_FEATURE_FILS_SK 834 struct fils_ind_elements fils_info_element; 835 #endif 836 uint32_t assoc_disallowed; 837 uint32_t adaptive_11r_ap; 838 uint32_t mbo_oce_enabled_ap; 839 #if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD) 840 uint32_t is_single_pmk; 841 #endif 842 /* Please keep the structure 4 bytes aligned above the ieFields */ 843 QDF_FLEX_ARRAY(uint32_t, ieFields); 844 }; 845 846 /* / Definition for response message to previously */ 847 /* / issued start BSS request */ 848 /* / MAC ---> */ 849 struct start_bss_rsp { 850 uint8_t vdev_id; 851 tSirResultCodes status_code; 852 uint32_t staId; /* Station ID for Self */ 853 }; 854 855 struct report_channel_list { 856 uint8_t num_channels; 857 uint32_t chan_freq_lst[SIR_ESE_MAX_MEAS_IE_REQS]; 858 }; 859 860 #ifdef FEATURE_OEM_DATA_SUPPORT 861 struct oem_data_req { 862 uint32_t data_len; 863 uint8_t *data; 864 }; 865 866 struct oem_data_rsp { 867 uint32_t rsp_len; 868 uint8_t *data; 869 }; 870 #endif /* FEATURE_OEM_DATA_SUPPORT */ 871 872 #ifdef FEATURE_WLAN_ESE 873 typedef struct ese_wmm_tspec_ie { 874 uint16_t traffic_type:1; 875 uint16_t tsid:4; 876 uint16_t direction:2; 877 uint16_t access_policy:2; 878 uint16_t aggregation:1; 879 uint16_t psb:1; 880 uint16_t user_priority:3; 881 uint16_t tsinfo_ack_pol:2; 882 uint8_t tsinfo_rsvd:7; 883 uint8_t burst_size_defn:1; 884 uint16_t size:15; 885 uint16_t fixed:1; 886 uint16_t max_msdu_size; 887 uint32_t min_service_int; 888 uint32_t max_service_int; 889 uint32_t inactivity_int; 890 uint32_t suspension_int; 891 uint32_t service_start_time; 892 uint32_t min_data_rate; 893 uint32_t mean_data_rate; 894 uint32_t peak_data_rate; 895 uint32_t burst_size; 896 uint32_t delay_bound; 897 uint32_t min_phy_rate; 898 uint16_t surplus_bw_allowance; 899 uint16_t medium_time; 900 } qdf_packed ese_wmm_tspec_ie; 901 902 typedef struct sTspecInfo { 903 uint8_t valid; 904 struct mac_tspec_ie tspec; 905 } tTspecInfo; 906 907 typedef struct sESETspecTspecInfo { 908 uint8_t numTspecs; 909 tTspecInfo tspec[ESE_MAX_TSPEC_IES]; 910 } tESETspecInfo; 911 912 struct tsm_ie { 913 uint8_t tsid; 914 uint8_t state; 915 uint16_t msmt_interval; 916 }; 917 918 struct tsm_ie_ind { 919 struct tsm_ie tsm_ie; 920 uint8_t sessionId; 921 }; 922 923 typedef struct sAniTrafStrmMetrics { 924 uint16_t UplinkPktQueueDly; 925 uint16_t UplinkPktQueueDlyHist[4]; 926 uint32_t UplinkPktTxDly; 927 uint16_t UplinkPktLoss; 928 uint16_t UplinkPktCount; 929 uint8_t RoamingCount; 930 uint16_t RoamingDly; 931 } tAniTrafStrmMetrics, *tpAniTrafStrmMetrics; 932 933 typedef struct sAniGetTsmStatsReq { 934 /* Common for all types are requests */ 935 uint16_t msgType; /* message type is same as the request type */ 936 uint16_t msgLen; /* length of the entire request */ 937 uint8_t tid; /* traffic id */ 938 struct qdf_mac_addr bssId; 939 void *tsmStatsCallback; 940 void *pDevContext; /* device context */ 941 } tAniGetTsmStatsReq, *tpAniGetTsmStatsReq; 942 943 typedef struct sAniGetTsmStatsRsp { 944 /* Common for all types are responses */ 945 uint16_t msgType; /* 946 * message type is same as 947 * the request type 948 */ 949 uint16_t msgLen; /* 950 * length of the entire request, 951 * includes the pStatsBuf length too 952 */ 953 uint8_t sessionId; 954 uint32_t rc; /* success/failure */ 955 struct qdf_mac_addr bssid; /* bssid to get the tsm stats for */ 956 tAniTrafStrmMetrics tsmMetrics; 957 void *tsmStatsReq; /* tsm stats request backup */ 958 } tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp; 959 960 struct ese_bcn_report_bss_info { 961 tBcnReportFields bcnReportFields; 962 uint8_t ieLen; 963 uint8_t *pBuf; 964 }; 965 966 struct ese_bcn_report_rsp { 967 uint16_t measurementToken; 968 uint8_t flag; /* Flag to report measurement done and more data */ 969 uint8_t numBss; 970 struct ese_bcn_report_bss_info 971 bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC]; 972 }; 973 974 #define TSRS_11AG_RATE_6MBPS 0xC 975 #define TSRS_11B_RATE_5_5MBPS 0xB 976 977 struct ese_tsrs_ie { 978 uint8_t tsid; 979 uint8_t rates[8]; 980 }; 981 982 struct ese_tsm_ie { 983 uint8_t tsid; 984 uint8_t state; 985 uint16_t msmt_interval; 986 }; 987 988 typedef struct sTSMStats { 989 uint8_t tid; 990 struct qdf_mac_addr bssid; 991 tTrafStrmMetrics tsmMetrics; 992 } tTSMStats, *tpTSMStats; 993 typedef struct sEseTSMContext { 994 uint8_t tid; 995 struct ese_tsm_ie tsmInfo; 996 tTrafStrmMetrics tsmMetrics; 997 } tEseTSMContext, *tpEseTSMContext; 998 typedef struct sEsePEContext { 999 tEseTSMContext tsm; 1000 } tEsePEContext, *tpEsePEContext; 1001 1002 #endif /* FEATURE_WLAN_ESE */ 1003 1004 /* Warning Do not add any new param in this struct */ 1005 struct join_req { 1006 tSirRSNie rsnIE; 1007 tSirAddie addIEScan; 1008 tSirAddie addIEAssoc; 1009 #ifdef WLAN_FEATURE_11BE_MLO 1010 struct mlo_partner_info partner_info; 1011 uint8_t assoc_link_id; 1012 bool is_ml_probe_req_sent; 1013 #endif 1014 /* Warning:::::::::::: Do not add any new param in this struct */ 1015 /* Pls make this as last variable in struct */ 1016 struct bss_description bssDescription; 1017 /* 1018 * WARNING: Pls make bssDescription as last variable in struct 1019 * join_req as it has ieFields followed after this bss 1020 * description. Adding a variable after this corrupts the ieFields 1021 */ 1022 }; 1023 1024 struct oem_channel_info { 1025 uint32_t mhz; 1026 uint32_t band_center_freq1; 1027 uint32_t band_center_freq2; 1028 uint32_t info; 1029 uint32_t reg_info_1; 1030 uint32_t reg_info_2; 1031 uint8_t nss; 1032 uint32_t rate_flags; 1033 uint8_t sec_ch_offset; 1034 enum phy_ch_width ch_width; 1035 }; 1036 1037 enum sir_sme_phy_mode { 1038 SIR_SME_PHY_MODE_LEGACY = 0, 1039 SIR_SME_PHY_MODE_HT = 1, 1040 SIR_SME_PHY_MODE_VHT = 2 1041 }; 1042 1043 /* / Definition for Association indication from peer */ 1044 /* / MAC ---> */ 1045 struct assoc_ind { 1046 uint16_t messageType; /* eWNI_SME_ASSOC_IND */ 1047 uint16_t length; 1048 uint8_t sessionId; 1049 tSirMacAddr peerMacAddr; 1050 uint16_t aid; 1051 tSirMacAddr bssId; /* Self BSSID */ 1052 uint16_t staId; /* Station ID for peer */ 1053 tAniAuthType authType; 1054 enum ani_akm_type akm_type; 1055 tAniSSID ssId; /* SSID used by STA to associate */ 1056 tSirWAPIie wapiIE; /* WAPI IE received from peer */ 1057 tSirRSNie rsnIE; /* RSN IE received from peer */ 1058 /* Additional IE received from peer, which possibly include 1059 * WSC IE and/or P2P IE 1060 */ 1061 tSirAddie addIE; 1062 1063 /* powerCap & supportedChannels are present only when */ 1064 /* spectrumMgtIndicator flag is set */ 1065 bool spectrumMgtIndicator; 1066 struct power_cap_info powerCap; 1067 struct supported_channels supportedChannels; 1068 bool wmmEnabledSta; /* if present - STA is WMM enabled */ 1069 bool reassocReq; 1070 /* Required for indicating the frames to upper layer */ 1071 uint32_t assocReqLength; 1072 uint8_t *assocReqPtr; 1073 1074 /* Timing measurement capability */ 1075 uint8_t timingMeasCap; 1076 struct oem_channel_info chan_info; 1077 bool ampdu; 1078 bool sgi_enable; 1079 bool tx_stbc; 1080 bool rx_stbc; 1081 tSirMacHTChannelWidth ch_width; 1082 enum sir_sme_phy_mode mode; 1083 uint8_t max_supp_idx; 1084 uint8_t max_ext_idx; 1085 uint8_t max_mcs_idx; 1086 uint8_t max_real_mcs_idx; 1087 uint8_t rx_mcs_map; 1088 uint8_t tx_mcs_map; 1089 /* Extended CSA capability of station */ 1090 uint8_t ecsa_capable; 1091 uint32_t ext_cap; 1092 uint8_t supported_band; 1093 tDot11fIEHTCaps HTCaps; 1094 tDot11fIEVHTCaps VHTCaps; 1095 bool he_caps_present; 1096 bool eht_caps_present; 1097 tSirMacCapabilityInfo capability_info; 1098 bool is_sae_authenticated; 1099 const uint8_t *owe_ie; 1100 uint32_t owe_ie_len; 1101 uint16_t owe_status; 1102 const uint8_t *ft_ie; 1103 uint32_t ft_ie_len; 1104 uint16_t ft_status; 1105 bool need_assoc_rsp_tx_cb; 1106 tSirMacAddr peer_mld_addr; 1107 }; 1108 1109 /** 1110 * struct owe_assoc_ind - owe association indication 1111 * @node : List entry element 1112 * @assoc_ind: pointer to assoc ind 1113 */ 1114 struct owe_assoc_ind { 1115 qdf_list_node_t node; 1116 struct assoc_ind *assoc_ind; 1117 }; 1118 1119 /** 1120 * struct ft_assoc_ind - ft association indication 1121 * @node: List entry element 1122 * @assoc_ind: pointer to assoc ind 1123 */ 1124 struct ft_assoc_ind { 1125 qdf_list_node_t node; 1126 struct assoc_ind *assoc_ind; 1127 }; 1128 1129 /* / Definition for Association confirm */ 1130 /* / ---> MAC */ 1131 struct assoc_cnf { 1132 uint16_t messageType; /* eWNI_SME_ASSOC_CNF */ 1133 uint16_t length; 1134 tSirResultCodes status_code; 1135 struct qdf_mac_addr bssid; /* Self BSSID */ 1136 struct qdf_mac_addr peer_macaddr; 1137 uint16_t aid; 1138 enum wlan_status_code mac_status_code; 1139 uint8_t *owe_ie; 1140 uint32_t owe_ie_len; 1141 uint8_t *ft_ie; 1142 uint32_t ft_ie_len; 1143 bool need_assoc_rsp_tx_cb; 1144 }; 1145 1146 /** 1147 * Table below indicates what information is passed for each of 1148 * the Wireless Media status change notifications: 1149 * 1150 * Status Change code Status change info 1151 * ---------------------------------------------------------------------- 1152 * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame 1153 * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame 1154 * eSIR_SME_LOST_LINK_WITH_PEER None 1155 * eSIR_SME_CHANNEL_SWITCH New channel number 1156 * eSIR_SME_RADAR_DETECTED Indicates that radar is detected 1157 * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP 1158 * that STA is currently associated with 1159 * have changed. 1160 */ 1161 1162 /* Definition for Disassociation request */ 1163 struct disassoc_req { 1164 uint16_t messageType; /* eWNI_SME_DISASSOC_REQ */ 1165 uint16_t length; 1166 uint8_t sessionId; /* Session ID */ 1167 struct qdf_mac_addr bssid; /* Peer BSSID */ 1168 struct qdf_mac_addr peer_macaddr; 1169 uint16_t reasonCode; 1170 /* This flag tells LIM whether to send the disassoc OTA or not */ 1171 /* This will be set in while handing off from one AP to other */ 1172 uint8_t doNotSendOverTheAir; 1173 bool process_ho_fail; 1174 }; 1175 1176 /* / Definition for Disassociation response */ 1177 struct disassoc_rsp { 1178 uint16_t messageType; /* eWNI_SME_DISASSOC_RSP */ 1179 uint16_t length; 1180 uint8_t sessionId; /* Session ID */ 1181 tSirResultCodes status_code; 1182 struct qdf_mac_addr peer_macaddr; 1183 uint16_t staId; 1184 }; 1185 1186 /* / Definition for Disassociation indication from peer */ 1187 struct disassoc_ind { 1188 uint16_t messageType; /* eWNI_SME_DISASSOC_IND */ 1189 uint16_t length; 1190 uint8_t vdev_id; 1191 tSirResultCodes status_code; 1192 struct qdf_mac_addr bssid; 1193 struct qdf_mac_addr peer_macaddr; 1194 struct qdf_mac_addr peer_mld_addr; 1195 uint16_t staId; 1196 uint32_t reasonCode; 1197 bool from_ap; 1198 }; 1199 1200 /* / Definition for Disassociation confirm */ 1201 /* / MAC ---> */ 1202 struct disassoc_cnf { 1203 uint16_t messageType; /* eWNI_SME_DISASSOC_CNF */ 1204 uint16_t length; 1205 uint8_t vdev_id; 1206 tSirResultCodes status_code; 1207 struct qdf_mac_addr bssid; 1208 struct qdf_mac_addr peer_macaddr; 1209 }; 1210 1211 /** 1212 * struct sir_sme_discon_done_ind - disconnect done indiaction 1213 * @message_type: msg type 1214 * @length: length of msg 1215 * @session_id: session id of the indication 1216 * @reason_code: reason for disconnect indication 1217 * @peer_mac: peer mac 1218 */ 1219 struct sir_sme_discon_done_ind { 1220 uint16_t message_type; 1221 uint16_t length; 1222 uint8_t session_id; 1223 tSirResultCodes reason_code; 1224 tSirMacAddr peer_mac; 1225 }; 1226 1227 /* / Definition for Deauthetication request */ 1228 struct deauth_req { 1229 uint16_t messageType; /* eWNI_SME_DEAUTH_REQ */ 1230 uint16_t length; 1231 uint8_t vdev_id; /* Session ID */ 1232 struct qdf_mac_addr bssid; /* AP BSSID */ 1233 struct qdf_mac_addr peer_macaddr; 1234 uint16_t reasonCode; 1235 }; 1236 1237 /** 1238 * struct deauth_retry_params - deauth retry params 1239 * @peer_mac: peer mac 1240 * @reason_code: reason for disconnect indication 1241 * @retry_cnt: retry count 1242 */ 1243 struct deauth_retry_params { 1244 struct qdf_mac_addr peer_macaddr; 1245 uint16_t reason_code; 1246 uint8_t retry_cnt; 1247 }; 1248 1249 /* / Definition for Deauthetication response */ 1250 struct deauth_rsp { 1251 uint16_t messageType; /* eWNI_SME_DEAUTH_RSP */ 1252 uint16_t length; 1253 uint8_t sessionId; /* Session ID */ 1254 tSirResultCodes status_code; 1255 struct qdf_mac_addr peer_macaddr; 1256 }; 1257 1258 /* / Definition for Deauthetication indication from peer */ 1259 struct deauth_ind { 1260 uint16_t messageType; /* eWNI_SME_DEAUTH_IND */ 1261 uint16_t length; 1262 uint8_t vdev_id; 1263 tSirResultCodes status_code; 1264 struct qdf_mac_addr bssid; /* AP BSSID */ 1265 struct qdf_mac_addr peer_macaddr; 1266 struct qdf_mac_addr peer_mld_addr; 1267 1268 uint16_t staId; 1269 uint32_t reasonCode; 1270 int8_t rssi; 1271 bool from_ap; 1272 }; 1273 1274 /* / Definition for Deauthetication confirm */ 1275 struct deauth_cnf { 1276 uint16_t messageType; /* eWNI_SME_DEAUTH_CNF */ 1277 uint16_t length; 1278 uint8_t vdev_id; 1279 tSirResultCodes status_code; 1280 struct qdf_mac_addr bssid; 1281 struct qdf_mac_addr peer_macaddr; 1282 }; 1283 1284 struct stop_bss_req { 1285 uint8_t vdev_id; 1286 uint32_t cmd_id; 1287 }; 1288 1289 struct stop_bss_rsp { 1290 uint8_t vdev_id; 1291 tSirResultCodes status_code; 1292 }; 1293 1294 /* / Definition for Channel Switch indication for station */ 1295 /* / MAC ---> */ 1296 struct switch_channel_ind { 1297 uint16_t messageType; /* eWNI_SME_SWITCH_CHL_IND */ 1298 uint16_t length; 1299 uint8_t sessionId; 1300 uint32_t freq; 1301 struct ch_params chan_params; 1302 struct qdf_mac_addr bssid; /* BSSID */ 1303 QDF_STATUS status; 1304 enum wlan_phymode ch_phymode; 1305 }; 1306 1307 /* / Definition for MIC failure indication */ 1308 /* / MAC ---> */ 1309 /* / MAC reports this each time a MIC failure occurs on Rx TKIP packet */ 1310 struct mic_failure_ind { 1311 uint16_t messageType; /* eWNI_SME_MIC_FAILURE_IND */ 1312 uint16_t length; 1313 uint8_t sessionId; 1314 struct qdf_mac_addr bssId; 1315 tSirMicFailureInfo info; 1316 }; 1317 1318 struct missed_beacon_ind { 1319 uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */ 1320 uint16_t length; 1321 uint8_t bss_idx; 1322 int32_t rssi; 1323 }; 1324 1325 /* / Definition for Set Context response */ 1326 /* / MAC ---> */ 1327 struct set_context_rsp { 1328 uint16_t messageType; /* eWNI_SME_SET_CONTEXT_RSP */ 1329 uint16_t length; 1330 uint8_t sessionId; /* Session ID */ 1331 tSirResultCodes status_code; 1332 struct qdf_mac_addr peer_macaddr; 1333 }; 1334 1335 typedef struct sAniGetSnrReq { 1336 /* Common for all types are requests */ 1337 uint16_t msgType; /* message type is same as the request type */ 1338 uint16_t msgLen; /* length of the entire request */ 1339 uint8_t sessionId; 1340 void *snrCallback; 1341 void *pDevContext; /* device context */ 1342 int8_t snr; 1343 } tAniGetSnrReq, *tpAniGetSnrReq; 1344 1345 /* generic country code change request MSG structure */ 1346 typedef struct sAniGenericChangeCountryCodeReq { 1347 uint16_t msgType; /* message type is same as the request type */ 1348 uint16_t msgLen; /* length of the entire request */ 1349 uint8_t countryCode[REG_ALPHA2_LEN + 1]; /* 3 char country code */ 1350 } tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq; 1351 1352 /** 1353 * struct sAniDHCPStopInd - DHCP Stop indication message 1354 * @msgType: message type is same as the request type 1355 * @msgLen: length of the entire request 1356 * @device_mode: Mode of the device(ex:STA, AP) 1357 * @adapterMacAddr: MAC address of the adapter 1358 * @peerMacAddr: MAC address of the connected peer 1359 */ 1360 typedef struct sAniDHCPStopInd { 1361 uint16_t msgType; 1362 uint16_t msgLen; 1363 uint8_t device_mode; 1364 struct qdf_mac_addr adapterMacAddr; 1365 struct qdf_mac_addr peerMacAddr; 1366 } tAniDHCPInd, *tpAniDHCPInd; 1367 1368 /**********************PE Statistics end*************************/ 1369 1370 typedef struct sSirP2PNoaAttr { 1371 #ifdef ANI_BIG_BYTE_ENDIAN 1372 uint32_t index:8; 1373 uint32_t oppPsFlag:1; 1374 uint32_t ctWin:7; 1375 uint32_t rsvd1:16; 1376 #else 1377 uint32_t rsvd1:16; 1378 uint32_t ctWin:7; 1379 uint32_t oppPsFlag:1; 1380 uint32_t index:8; 1381 #endif 1382 1383 #ifdef ANI_BIG_BYTE_ENDIAN 1384 uint32_t uNoa1IntervalCnt:8; 1385 uint32_t rsvd2:24; 1386 #else 1387 uint32_t rsvd2:24; 1388 uint32_t uNoa1IntervalCnt:8; 1389 #endif 1390 uint32_t uNoa1Duration; 1391 uint32_t uNoa1Interval; 1392 uint32_t uNoa1StartTime; 1393 1394 #ifdef ANI_BIG_BYTE_ENDIAN 1395 uint32_t uNoa2IntervalCnt:8; 1396 uint32_t rsvd3:24; 1397 #else 1398 uint32_t rsvd3:24; 1399 uint32_t uNoa2IntervalCnt:8; 1400 #endif 1401 uint32_t uNoa2Duration; 1402 uint32_t uNoa2Interval; 1403 uint32_t uNoa2StartTime; 1404 } tSirP2PNoaAttr, *tpSirP2PNoaAttr; 1405 1406 typedef struct sSirTclasInfo { 1407 tSirMacTclasIE tclas; 1408 uint8_t version; /* applies only for classifier type ip */ 1409 union { 1410 tSirMacTclasParamEthernet eth; 1411 tSirMacTclasParamIPv4 ipv4; 1412 tSirMacTclasParamIPv6 ipv6; 1413 tSirMacTclasParam8021dq t8021dq; 1414 } qdf_packed tclasParams; 1415 } qdf_packed tSirTclasInfo; 1416 1417 typedef struct sSirAddtsReqInfo { 1418 uint8_t dialogToken; 1419 struct mac_tspec_ie tspec; 1420 1421 uint8_t numTclas; /* number of Tclas elements */ 1422 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM]; 1423 uint8_t tclasProc; 1424 #if defined(FEATURE_WLAN_ESE) 1425 struct ese_tsrs_ie tsrsIE; 1426 uint8_t tsrsPresent:1; 1427 #endif 1428 uint8_t wmeTspecPresent:1; 1429 uint8_t wsmTspecPresent:1; 1430 uint8_t lleTspecPresent:1; 1431 uint8_t tclasProcPresent:1; 1432 } tSirAddtsReqInfo, *tpSirAddtsReqInfo; 1433 1434 typedef struct sSirAddtsRspInfo { 1435 uint8_t dialogToken; 1436 enum wlan_status_code status; 1437 tSirMacTsDelayIE delay; 1438 1439 struct mac_tspec_ie tspec; 1440 uint8_t numTclas; /* number of Tclas elements */ 1441 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM]; 1442 uint8_t tclasProc; 1443 tSirMacScheduleIE schedule; 1444 #ifdef FEATURE_WLAN_ESE 1445 struct ese_tsm_ie tsmIE; 1446 uint8_t tsmPresent:1; 1447 #endif 1448 uint8_t wmeTspecPresent:1; 1449 uint8_t wsmTspecPresent:1; 1450 uint8_t lleTspecPresent:1; 1451 uint8_t tclasProcPresent:1; 1452 uint8_t schedulePresent:1; 1453 } tSirAddtsRspInfo, *tpSirAddtsRspInfo; 1454 1455 /* / Add a tspec as defined */ 1456 typedef struct sSirAddtsReq { 1457 uint16_t messageType; /* eWNI_SME_ADDTS_REQ */ 1458 uint16_t length; 1459 uint8_t sessionId; /* Session ID */ 1460 struct qdf_mac_addr bssid; /* BSSID */ 1461 uint32_t timeout; /* in ms */ 1462 uint8_t rspReqd; 1463 tSirAddtsReqInfo req; 1464 } tSirAddtsReq, *tpSirAddtsReq; 1465 1466 typedef struct sSirAddtsRsp { 1467 uint16_t messageType; /* eWNI_SME_ADDTS_RSP */ 1468 uint16_t length; 1469 uint8_t sessionId; /* sme sessionId Added for BT-AMP support */ 1470 uint32_t rc; /* return code */ 1471 tSirAddtsRspInfo rsp; 1472 } tSirAddtsRsp, *tpSirAddtsRsp; 1473 1474 typedef struct sSirDeltsReq { 1475 uint16_t messageType; /* eWNI_SME_DELTS_REQ */ 1476 uint16_t length; 1477 uint8_t sessionId; /* Session ID */ 1478 struct qdf_mac_addr bssid; /* BSSID */ 1479 uint16_t aid; /* use 0 if macAddr is being specified */ 1480 struct qdf_mac_addr macaddr; /* only on AP to specify the STA */ 1481 uint8_t rspReqd; 1482 struct delts_req_info req; 1483 } tSirDeltsReq, *tpSirDeltsReq; 1484 1485 typedef struct sSirDeltsRsp { 1486 uint16_t messageType; /* eWNI_SME_DELTS_RSP */ 1487 uint16_t length; 1488 uint8_t sessionId; 1489 uint32_t rc; 1490 uint16_t aid; /* use 0 if macAddr is being specified */ 1491 struct qdf_mac_addr macaddr; /* only on AP to specify the STA */ 1492 struct delts_req_info rsp; 1493 } tSirDeltsRsp, *tpSirDeltsRsp; 1494 1495 typedef struct sSirAggrQosReqInfo { 1496 uint16_t tspecIdx; 1497 tSirAddtsReqInfo aggrAddTsInfo[QCA_WLAN_AC_ALL]; 1498 } tSirAggrQosReqInfo, *tpSirAggrQosReqInfo; 1499 1500 typedef struct sSirAggrQosReq { 1501 uint16_t messageType; /* eWNI_SME_ADDTS_REQ */ 1502 uint16_t length; 1503 uint8_t sessionId; /* Session ID */ 1504 struct qdf_mac_addr bssid; /* BSSID */ 1505 uint32_t timeout; /* in ms */ 1506 uint8_t rspReqd; 1507 tSirAggrQosReqInfo aggrInfo; 1508 } tSirAggrQosReq; 1509 1510 typedef struct sSirAggrQosRspInfo { 1511 uint16_t tspecIdx; 1512 tSirAddtsRspInfo aggrRsp[QCA_WLAN_AC_ALL]; 1513 } tSirAggrQosRspInfo, *tpSirAggrQosRspInfo; 1514 1515 typedef struct sSirAggrQosRsp { 1516 uint16_t messageType; 1517 uint16_t length; 1518 uint8_t sessionId; 1519 tSirAggrQosRspInfo aggrInfo; 1520 } tSirAggrQosRsp, *tpSirAggrQosRsp; 1521 1522 1523 struct qos_map_set { 1524 uint8_t present; 1525 uint8_t num_dscp_exceptions; 1526 uint8_t dscp_exceptions[QOS_MAP_MAX_EX][2]; 1527 uint8_t dscp_range[QOS_MAP_RANGE_NUM][2]; 1528 }; 1529 1530 typedef struct sSmeMaxAssocInd { 1531 uint16_t mesgType; /* eWNI_SME_MAX_ASSOC_EXCEEDED */ 1532 uint16_t mesgLen; 1533 uint8_t sessionId; 1534 /* the new peer that got rejected max assoc limit reached */ 1535 struct qdf_mac_addr peer_mac; 1536 } tSmeMaxAssocInd, *tpSmeMaxAssocInd; 1537 1538 #define SIR_MAX_NAME_SIZE 64 1539 #define SIR_MAX_TEXT_SIZE 32 1540 1541 typedef struct sSirName { 1542 uint8_t num_name; 1543 uint8_t name[SIR_MAX_NAME_SIZE]; 1544 } tSirName; 1545 1546 typedef struct sSirText { 1547 uint8_t num_text; 1548 uint8_t text[SIR_MAX_TEXT_SIZE]; 1549 } tSirText; 1550 1551 #define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001 1552 #define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002 1553 #define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004 1554 #define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008 1555 #define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010 1556 #define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020 1557 #define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040 1558 #define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080 1559 #define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100 1560 #define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200 1561 #define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400 1562 #define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800 1563 #define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000 1564 #define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000 1565 #define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000 1566 #define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000 1567 1568 typedef struct sSirWPSProbeRspIE { 1569 uint32_t FieldPresent; 1570 uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */ 1571 uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */ 1572 bool APSetupLocked; /* Must be included if value is true */ 1573 /* 1574 * BOOL: indicates if the user has recently activated a Registrar to 1575 * add an Enrollee. 1576 */ 1577 bool SelectedRegistra; 1578 uint16_t DevicePasswordID; /* Device Password ID */ 1579 /* Selected Registrar config method */ 1580 uint16_t SelectedRegistraCfgMethod; 1581 uint8_t ResponseType; /* Response type */ 1582 uint8_t UUID_E[16]; /* Unique identifier of the AP. */ 1583 tSirName Manufacture; 1584 tSirText ModelName; 1585 tSirText ModelNumber; 1586 tSirText SerialNumber; 1587 /* Device Category ID: 1Computer, 2Input Device, ... */ 1588 uint32_t PrimaryDeviceCategory; 1589 /* Vendor specific OUI for Device Sub Category */ 1590 uint8_t PrimaryDeviceOUI[4]; 1591 /* 1592 Device Sub Category ID: 1-PC, 2-Server if Device Category ID 1593 * is computer 1594 */ 1595 uint32_t DeviceSubCategory; 1596 tSirText DeviceName; 1597 uint16_t ConfigMethod; /* Configuration method */ 1598 uint8_t RFBand; /* RF bands available on the AP */ 1599 } tSirWPSProbeRspIE; 1600 1601 #define SIR_WPS_BEACON_VER_PRESENT 0x00000001 1602 #define SIR_WPS_BEACON_STATE_PRESENT 0x00000002 1603 #define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004 1604 #define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008 1605 #define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010 1606 #define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020 1607 #define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080 1608 #define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100 1609 #define SIR_WPS_UUID_LEN 16 1610 1611 typedef struct sSirWPSBeaconIE { 1612 uint32_t FieldPresent; 1613 uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */ 1614 uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */ 1615 bool APSetupLocked; /* Must be included if value is true */ 1616 /* 1617 * BOOL: indicates if the user has recently activated a Registrar to 1618 * add an Enrollee. 1619 */ 1620 bool SelectedRegistra; 1621 uint16_t DevicePasswordID; /* Device Password ID */ 1622 /* Selected Registrar config method */ 1623 uint16_t SelectedRegistraCfgMethod; 1624 uint8_t UUID_E[SIR_WPS_UUID_LEN]; /* Unique identifier of the AP. */ 1625 uint8_t RFBand; /* RF bands available on the AP */ 1626 } tSirWPSBeaconIE; 1627 1628 typedef struct sSirAPWPSIEs { 1629 tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Response IE */ 1630 tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE */ 1631 } tSirAPWPSIEs, *tpSiriAPWPSIEs; 1632 1633 struct update_config { 1634 uint16_t messageType; /* eWNI_SME_UPDATE_CONFIG */ 1635 uint16_t length; 1636 uint8_t vdev_id; 1637 uint16_t capab; 1638 uint32_t value; 1639 }; 1640 1641 /* 1642 * enum sir_update_session_param_type - session param type 1643 * @SIR_PARAM_SSID_HIDDEN: ssidHidden parameter 1644 */ 1645 enum sir_update_session_param_type { 1646 SIR_PARAM_SSID_HIDDEN, 1647 }; 1648 1649 /* 1650 * struct sir_update_session_param 1651 * @message_type: SME message type 1652 * @length: size of struct sir_update_session_param 1653 * @vdev_id: vdev ID 1654 * @param_type: parameter to be updated 1655 * @param_val: Parameter value to update 1656 */ 1657 struct sir_update_session_param { 1658 uint16_t message_type; 1659 uint16_t length; 1660 uint8_t vdev_id; 1661 uint32_t param_type; 1662 uint32_t param_val; 1663 }; 1664 1665 /** 1666 * struct sir_set_he_bss_color 1667 * @message_type: SME message type 1668 * @length: size of struct sir_set_he_bss_color 1669 * @vdev_id: vdev ID 1670 * @bss_color: bss color value 1671 */ 1672 struct sir_set_he_bss_color { 1673 uint16_t message_type; 1674 uint16_t length; 1675 uint8_t vdev_id; 1676 uint8_t bss_color; 1677 }; 1678 1679 /** 1680 * struct sir_cfg_obss_scan 1681 * @message_type: SME message type 1682 * @length: size of struct sir_cfg_obss_scan 1683 * @vdev_id: vdev ID 1684 * @is_scan_reconfig: true for NDP session 1685 */ 1686 struct sir_cfg_obss_scan { 1687 uint16_t message_type; 1688 uint16_t length; 1689 uint8_t vdev_id; 1690 bool is_scan_reconfig; 1691 }; 1692 1693 /** 1694 * struct sir_create_session - Used for creating session in monitor mode 1695 * @type: SME host message type. 1696 * @msg_len: Length of the message. 1697 * @bss_id: bss_id for creating the session. 1698 */ 1699 struct sir_create_session { 1700 uint16_t type; 1701 uint16_t msg_len; 1702 uint8_t vdev_id; 1703 struct qdf_mac_addr bss_id; 1704 }; 1705 1706 /** 1707 * struct sir_delete_session - Used for deleting session in monitor mode 1708 * @type: SME host message type. 1709 * @msg_len: Length of the message. 1710 * @vdev_id: vdev id. 1711 */ 1712 struct sir_delete_session { 1713 uint16_t type; 1714 uint16_t msg_len; 1715 uint8_t vdev_id; 1716 }; 1717 1718 #ifdef QCA_HT_2040_COEX 1719 struct set_ht2040_mode { 1720 uint16_t messageType; 1721 uint16_t length; 1722 uint8_t cbMode; 1723 bool obssEnabled; 1724 struct qdf_mac_addr bssid; 1725 uint8_t sessionId; /* Session ID */ 1726 }; 1727 #endif 1728 1729 #define SIR_WPS_PBC_WALK_TIME 120 /* 120 Second */ 1730 1731 typedef struct sSirWPSPBCSession { 1732 struct sSirWPSPBCSession *next; 1733 struct qdf_mac_addr addr; 1734 uint8_t uuid_e[SIR_WPS_UUID_LEN]; 1735 uint32_t timestamp; 1736 } tSirWPSPBCSession; 1737 1738 typedef struct sSirWPSPBCProbeReq { 1739 struct qdf_mac_addr peer_macaddr; 1740 uint16_t probeReqIELen; 1741 uint8_t probeReqIE[512]; 1742 } tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq; 1743 1744 /* probereq from peer, when wsc is enabled */ 1745 typedef struct sSirSmeProbeReqInd { 1746 uint16_t messageType; /* eWNI_SME_WPS_PBC_PROBE_REQ_IND */ 1747 uint16_t length; 1748 uint8_t sessionId; 1749 struct qdf_mac_addr bssid; 1750 tSirWPSPBCProbeReq WPSPBCProbeReq; 1751 } tSirSmeProbeReqInd, *tpSirSmeProbeReqInd; 1752 1753 #define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450 1754 /* Occupied channel list remains static */ 1755 #define CHANNEL_LIST_STATIC 1 1756 /* Occupied channel list can be dynamic */ 1757 #define CHANNEL_LIST_DYNAMIC 2 1758 1759 /* SME -> HAL - This is the host offload request. */ 1760 #define SIR_IPV6_NS_OFFLOAD 2 1761 #define SIR_OFFLOAD_DISABLE 0 1762 #define SIR_OFFLOAD_ENABLE 1 1763 1764 struct sir_host_offload_req { 1765 uint8_t offloadType; 1766 uint8_t enableOrDisable; 1767 uint32_t num_ns_offload_count; 1768 union { 1769 uint8_t hostIpv4Addr[QDF_IPV4_ADDR_SIZE]; 1770 uint8_t hostIpv6Addr[QDF_IPV6_ADDR_SIZE]; 1771 } params; 1772 struct qdf_mac_addr bssid; 1773 }; 1774 1775 /* Packet Types. */ 1776 #define SIR_KEEP_ALIVE_NULL_PKT 1 1777 #define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 1778 #define SIR_KEEP_ALIVE_MGMT_FRAME 5 1779 1780 /* Keep Alive request. */ 1781 struct keep_alive_req { 1782 uint8_t packetType; 1783 uint32_t timePeriod; 1784 tSirIpv4Addr hostIpv4Addr; 1785 tSirIpv4Addr destIpv4Addr; 1786 struct qdf_mac_addr dest_macaddr; 1787 struct qdf_mac_addr bssid; 1788 uint8_t sessionId; 1789 }; 1790 1791 /** 1792 * enum rxmgmt_flags - flags for received management frame. 1793 * @RXMGMT_FLAG_NONE: Default value to indicate no flags are set. 1794 * @RXMGMT_FLAG_EXTERNAL_AUTH: frame can be used for external authentication 1795 * by upper layers. 1796 */ 1797 enum rxmgmt_flags { 1798 RXMGMT_FLAG_NONE, 1799 RXMGMT_FLAG_EXTERNAL_AUTH = 1 << 1, 1800 }; 1801 1802 typedef struct sSirSmeMgmtFrameInd { 1803 uint16_t frame_len; 1804 uint32_t rx_freq; 1805 uint8_t sessionId; 1806 uint8_t frameType; 1807 int8_t rxRssi; 1808 enum rxmgmt_flags rx_flags; 1809 QDF_FLEX_ARRAY(uint8_t, frameBuf); 1810 } tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd; 1811 1812 typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind); 1813 /** 1814 * struct sir_sme_mgmt_frame_cb_req - Register a 1815 * management frame callback req 1816 * 1817 * @message_type: message id 1818 * @length: msg length 1819 * @callback: callback for management frame indication 1820 */ 1821 struct sir_sme_mgmt_frame_cb_req { 1822 uint16_t message_type; 1823 uint16_t length; 1824 sir_mgmt_frame_ind_callback callback; 1825 }; 1826 1827 typedef struct sSirSmeUnprotMgmtFrameInd { 1828 uint8_t sessionId; 1829 uint8_t frameType; 1830 uint8_t frameLen; 1831 QDF_FLEX_ARRAY(uint8_t, frameBuf); 1832 } tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd; 1833 1834 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT 1835 1836 typedef enum ext_wow_type { 1837 EXT_WOW_TYPE_APP_TYPE1, /* wow type: only enable wakeup for app type1 */ 1838 EXT_WOW_TYPE_APP_TYPE2, /* wow type: only enable wakeup for app type2 */ 1839 EXT_WOW_TYPE_APP_TYPE1_2, /* wow type: enable wakeup for app type1&2 */ 1840 } EXT_WOW_TYPE; 1841 1842 typedef struct { 1843 uint8_t vdev_id; 1844 EXT_WOW_TYPE type; 1845 uint32_t wakeup_pin_num; 1846 } tSirExtWoWParams, *tpSirExtWoWParams; 1847 1848 typedef struct { 1849 uint8_t vdev_id; 1850 struct qdf_mac_addr wakee_mac_addr; 1851 uint8_t identification_id[8]; 1852 uint8_t password[16]; 1853 uint32_t id_length; 1854 uint32_t pass_length; 1855 } tSirAppType1Params, *tpSirAppType1Params; 1856 1857 typedef struct { 1858 uint8_t vdev_id; 1859 1860 uint8_t rc4_key[16]; 1861 uint32_t rc4_key_len; 1862 1863 /** ip header parameter */ 1864 uint32_t ip_id; /* NC id */ 1865 uint32_t ip_device_ip; /* NC IP address */ 1866 uint32_t ip_server_ip; /* Push server IP address */ 1867 1868 /** tcp header parameter */ 1869 uint16_t tcp_src_port; /* NC TCP port */ 1870 uint16_t tcp_dst_port; /* Push server TCP port */ 1871 uint32_t tcp_seq; 1872 uint32_t tcp_ack_seq; 1873 1874 uint32_t keepalive_init; /* Initial ping interval */ 1875 uint32_t keepalive_min; /* Minimum ping interval */ 1876 uint32_t keepalive_max; /* Maximum ping interval */ 1877 uint32_t keepalive_inc; /* Increment of ping interval */ 1878 1879 struct qdf_mac_addr gateway_mac; 1880 uint32_t tcp_tx_timeout_val; 1881 uint32_t tcp_rx_timeout_val; 1882 } tSirAppType2Params, *tpSirAppType2Params; 1883 #endif 1884 1885 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 1886 typedef struct { 1887 uint8_t acvo_uapsd:1; 1888 uint8_t acvi_uapsd:1; 1889 uint8_t acbk_uapsd:1; 1890 uint8_t acbe_uapsd:1; 1891 uint8_t reserved:4; 1892 } tSirAcUapsd, *tpSirAcUapsd; 1893 #endif 1894 1895 /** 1896 * struct pmkid_mode_bits - Bit flags for PMKID usage in RSN IE 1897 * @fw_okc: Opportunistic key caching enable in firmware 1898 * @fw_pmksa_cache: PMKSA caching enable in firmware, remember previously 1899 * visited BSSID/PMK pairs 1900 */ 1901 struct pmkid_mode_bits { 1902 uint32_t fw_okc:1; 1903 uint32_t fw_pmksa_cache:1; 1904 uint32_t unused:30; 1905 }; 1906 1907 /** 1908 * struct roam_init_params - Firmware roam module initialization parameters 1909 * @vdev_id: vdev for which the roaming has to be enabled/disabled 1910 * @enable: flag to init/deinit roam module 1911 */ 1912 struct roam_init_params { 1913 uint8_t vdev_id; 1914 uint8_t enable; 1915 }; 1916 1917 /** 1918 * struct roam_sync_timeout_timer_info - Info related to roam sync timer 1919 * @vdev_id: Vdev id for which host waiting roam sync ind from fw 1920 */ 1921 struct roam_sync_timeout_timer_info { 1922 uint8_t vdev_id; 1923 }; 1924 1925 struct roam_offload_scan_rsp { 1926 uint8_t sessionId; 1927 uint32_t reason; 1928 }; 1929 1930 /*--------------------------------------------------------------------------- 1931 Packet Filtering Parameters 1932 ---------------------------------------------------------------------------*/ 1933 #define SIR_MAX_FILTER_TEST_DATA_LEN 8 1934 #define SIR_MAX_FILTER_TEST_DATA_OFFSET 200 1935 #define SIR_MAX_NUM_MULTICAST_ADDRESS 240 1936 1937 /* */ 1938 /* Multicast Address List Parameters */ 1939 /* */ 1940 typedef struct sSirRcvFltMcAddrList { 1941 uint32_t ulMulticastAddrCnt; 1942 struct qdf_mac_addr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS]; 1943 struct qdf_mac_addr self_macaddr; 1944 struct qdf_mac_addr bssid; 1945 uint8_t action; 1946 } tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList; 1947 1948 /** 1949 * struct sir_wifi_start_log - Structure to store the params sent to start/ 1950 * stop logging 1951 * @name: Attribute which indicates the type of logging like per packet 1952 * statistics, connectivity etc. 1953 * @verbose_level: Verbose level which can be 0,1,2,3 1954 * @is_iwpriv_command: Set 1 for iwpriv command 1955 * @ini_triggered: triggered using ini 1956 * @user_triggered: triggered by user 1957 * @size: pktlog buffer size 1958 * @is_pktlog_buff_clear: clear the pktlog buffer 1959 */ 1960 struct sir_wifi_start_log { 1961 uint32_t ring_id; 1962 uint32_t verbose_level; 1963 uint32_t is_iwpriv_command; 1964 bool ini_triggered; 1965 uint8_t user_triggered; 1966 int size; 1967 bool is_pktlog_buff_clear; 1968 }; 1969 1970 1971 /** 1972 * struct sir_pcl_list - Format of PCL 1973 * @pcl_list: List of preferred channels 1974 * @weight_list: Weights of the PCL 1975 * @pcl_len: Number of channels in the PCL 1976 */ 1977 struct sir_pcl_list { 1978 uint32_t pcl_len; 1979 uint8_t pcl_list[NUM_CHANNELS]; 1980 uint8_t weight_list[NUM_CHANNELS]; 1981 }; 1982 1983 /** 1984 * struct sir_pcl_chan_weights - Params to get the valid weighed list 1985 * @pcl_list: Preferred channel list already sorted in the order of preference 1986 * @pcl_len: Length of the PCL 1987 * @saved_chan_list: Valid channel list updated as part of 1988 * WMA_UPDATE_CHAN_LIST_REQ 1989 * @saved_num_chan: Length of the valid channel list 1990 * @weighed_valid_list: Weights of the valid channel list. This will have one 1991 * to one mapping with valid_chan_list. FW expects channel order and size to be 1992 * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID. 1993 * @weight_list: Weights assigned by policy manager 1994 */ 1995 struct sir_pcl_chan_weights { 1996 uint8_t pcl_list[NUM_CHANNELS]; 1997 uint32_t pcl_len; 1998 uint8_t saved_chan_list[NUM_CHANNELS]; 1999 uint32_t saved_num_chan; 2000 uint8_t weighed_valid_list[NUM_CHANNELS]; 2001 uint8_t weight_list[NUM_CHANNELS]; 2002 }; 2003 2004 /** 2005 * struct sir_hw_mode_params - HW mode params 2006 * @mac0_tx_ss: MAC0 Tx spatial stream 2007 * @mac0_rx_ss: MAC0 Rx spatial stream 2008 * @mac1_tx_ss: MAC1 Tx spatial stream 2009 * @mac1_rx_ss: MAC1 Rx spatial stream 2010 * @mac0_bw: MAC0 bandwidth 2011 * @mac1_bw: MAC1 bandwidth 2012 * @dbs_cap: DBS capabality 2013 * @agile_dfs_cap: Agile DFS capabality 2014 */ 2015 struct sir_hw_mode_params { 2016 uint8_t mac0_tx_ss; 2017 uint8_t mac0_rx_ss; 2018 uint8_t mac1_tx_ss; 2019 uint8_t mac1_rx_ss; 2020 uint8_t mac0_bw; 2021 uint8_t mac1_bw; 2022 uint8_t dbs_cap; 2023 uint8_t agile_dfs_cap; 2024 uint8_t sbs_cap; 2025 }; 2026 2027 /** 2028 * struct sir_set_hw_mode_resp - HW mode response 2029 * @status: Status 2030 * @cfgd_hw_mode_index: Configured HW mode index 2031 * @num_vdev_mac_entries: Number of vdev-mac id entries 2032 * @vdev_mac_map: vdev id-mac id map 2033 */ 2034 struct sir_set_hw_mode_resp { 2035 uint32_t status; 2036 uint32_t cfgd_hw_mode_index; 2037 uint32_t num_vdev_mac_entries; 2038 struct policy_mgr_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED]; 2039 }; 2040 2041 /** 2042 * struct sir_dual_mac_config_resp - Dual MAC config response 2043 * @status: Status of setting the dual mac configuration 2044 */ 2045 struct sir_dual_mac_config_resp { 2046 uint32_t status; 2047 }; 2048 2049 /** 2050 * enum set_antenna_mode_status - Status of set antenna mode 2051 * command 2052 * @SET_ANTENNA_MODE_STATUS_OK: command successful 2053 * @SET_ANTENNA_MODE_STATUS_EINVAL: invalid antenna mode 2054 * @SET_ANTENNA_MODE_STATUS_ECANCELED: mode change cancelled 2055 * @SET_ANTENNA_MODE_STATUS_ENOTSUP: mode not supported 2056 */ 2057 enum set_antenna_mode_status { 2058 SET_ANTENNA_MODE_STATUS_OK, 2059 SET_ANTENNA_MODE_STATUS_EINVAL, 2060 SET_ANTENNA_MODE_STATUS_ECANCELED, 2061 SET_ANTENNA_MODE_STATUS_ENOTSUP, 2062 }; 2063 2064 /** 2065 * struct sir_antenna_mode_resp - set antenna mode response 2066 * @status: Status of setting the antenna mode 2067 */ 2068 struct sir_antenna_mode_resp { 2069 enum set_antenna_mode_status status; 2070 }; 2071 2072 typedef struct sSirWlanExcludeUnencryptParam { 2073 bool excludeUnencrypt; 2074 struct qdf_mac_addr bssid; 2075 } tSirWlanExcludeUnencryptParam, *tpSirWlanExcludeUnencryptParam; 2076 2077 typedef enum { 2078 P2P_SCAN_TYPE_SEARCH = 1, /* P2P Search */ 2079 P2P_SCAN_TYPE_LISTEN /* P2P Listen */ 2080 } tSirP2pScanType; 2081 2082 typedef struct sAniHandoffReq { 2083 /* Common for all types are requests */ 2084 uint16_t msgType; /* message type is same as the request type */ 2085 uint16_t msgLen; /* length of the entire request */ 2086 uint8_t sessionId; 2087 uint8_t bssid[QDF_MAC_ADDR_SIZE]; 2088 uint32_t ch_freq; 2089 uint8_t handoff_src; 2090 } tAniHandoffReq, *tpAniHandoffReq; 2091 2092 /** 2093 * sir_scan_event_type - scan event types used in LIM 2094 * @SIR_SCAN_EVENT_STARTED - scan command accepted by FW 2095 * @SIR_SCAN_EVENT_COMPLETED - scan has been completed by FW 2096 * @SIR_SCAN_EVENT_BSS_CHANNEL - FW is going to move to HOME channel 2097 * @SIR_SCAN_EVENT_FOREIGN_CHANNEL - FW is going to move to FOREIGN channel 2098 * @SIR_SCAN_EVENT_DEQUEUED - scan request got dequeued 2099 * @SIR_SCAN_EVENT_PREEMPTED - preempted by other high priority scan 2100 * @SIR_SCAN_EVENT_START_FAILED - scan start failed 2101 * @SIR_SCAN_EVENT_RESTARTED - scan restarted 2102 * @SIR_SCAN_EVENT_MAX - max value for event type 2103 */ 2104 enum sir_scan_event_type { 2105 SIR_SCAN_EVENT_STARTED = 0x1, 2106 SIR_SCAN_EVENT_COMPLETED = 0x2, 2107 SIR_SCAN_EVENT_BSS_CHANNEL = 0x4, 2108 SIR_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, 2109 SIR_SCAN_EVENT_DEQUEUED = 0x10, 2110 SIR_SCAN_EVENT_PREEMPTED = 0x20, 2111 SIR_SCAN_EVENT_START_FAILED = 0x40, 2112 SIR_SCAN_EVENT_RESTARTED = 0x80, 2113 SIR_SCAN_EVENT_MAX = 0x8000 2114 }; 2115 2116 typedef struct sSirScanOffloadEvent { 2117 enum sir_scan_event_type event; 2118 tSirResultCodes reasonCode; 2119 uint32_t chanFreq; 2120 uint32_t requestor; 2121 uint32_t scanId; 2122 tSirP2pScanType p2pScanType; 2123 uint8_t sessionId; 2124 } tSirScanOffloadEvent, *tpSirScanOffloadEvent; 2125 2126 /** 2127 * struct sSirUpdateChanParam - channel parameters 2128 * @freq: Frequency of the channel 2129 * @pwr: power level 2130 * @dfsSet: is dfs supported or not 2131 * @half_rate: is the channel operating at 10MHz 2132 * @quarter_rate: is the channel operating at 5MHz 2133 * @nan_disabled: is NAN disabled on @freq 2134 */ 2135 typedef struct sSirUpdateChanParam { 2136 uint32_t freq; 2137 uint8_t pwr; 2138 bool dfsSet; 2139 bool half_rate; 2140 bool quarter_rate; 2141 bool nan_disabled; 2142 } tSirUpdateChanParam, *tpSirUpdateChanParam; 2143 2144 typedef struct sSirUpdateChan { 2145 uint8_t numChan; 2146 uint8_t ht_en; 2147 uint8_t vht_en; 2148 uint8_t vht_24_en; 2149 bool he_en; 2150 bool eht_en; 2151 QDF_FLEX_ARRAY(tSirUpdateChanParam, chanParam); 2152 } tSirUpdateChanList, *tpSirUpdateChanList; 2153 2154 typedef enum eSirAddonPsReq { 2155 eSIR_ADDON_NOTHING, 2156 eSIR_ADDON_ENABLE_UAPSD, 2157 eSIR_ADDON_DISABLE_UAPSD 2158 } tSirAddonPsReq; 2159 2160 #ifdef FEATURE_WLAN_CH_AVOID 2161 typedef struct sSirChAvoidUpdateReq { 2162 uint32_t reserved_param; 2163 } tSirChAvoidUpdateReq; 2164 #endif /* FEATURE_WLAN_CH_AVOID */ 2165 2166 struct link_speed_info { 2167 /* MAC Address for the peer */ 2168 struct qdf_mac_addr peer_macaddr; 2169 uint32_t estLinkSpeed; /* Linkspeed from firmware */ 2170 }; 2171 2172 /** 2173 * struct sir_isolation_resp - isolation info related structure 2174 * @isolation_chain0: isolation value for chain 0 2175 * @isolation_chain1: isolation value for chain 1 2176 * @isolation_chain2: isolation value for chain 2 2177 * @isolation_chain3: isolation value for chain 3 2178 */ 2179 struct sir_isolation_resp { 2180 uint32_t isolation_chain0:8, 2181 isolation_chain1:8, 2182 isolation_chain2:8, 2183 isolation_chain3:8; 2184 }; 2185 2186 typedef struct sSirAddPeriodicTxPtrn { 2187 /* MAC Address for the adapter */ 2188 struct qdf_mac_addr mac_address; 2189 uint8_t ucPtrnId; /* Pattern ID */ 2190 uint16_t ucPtrnSize; /* Pattern size */ 2191 uint32_t usPtrnIntervalMs; /* In msec */ 2192 uint8_t ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; /* Pattern buffer */ 2193 } tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn; 2194 2195 typedef struct sSirDelPeriodicTxPtrn { 2196 /* MAC Address for the adapter */ 2197 struct qdf_mac_addr mac_address; 2198 uint8_t ucPtrnId; /* Pattern ID */ 2199 } tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn; 2200 2201 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT 2202 typedef struct { 2203 uint16_t mesgType; 2204 uint16_t mesgLen; 2205 bool status; 2206 } tSirReadyToExtWoWInd, *tpSirReadyToExtWoWInd; 2207 #endif 2208 typedef struct sSirRateUpdateInd { 2209 uint8_t nss; /* 0: 1x1, 1: 2x2 */ 2210 struct qdf_mac_addr bssid; 2211 enum QDF_OPMODE dev_mode; 2212 int32_t bcastDataRate; /* bcast rate unit Mbpsx10, -1:not used */ 2213 2214 /* 2215 * 0 implies MCAST RA, positive value implies fixed rate, 2216 * -1 implies ignore this param 2217 */ 2218 int32_t reliableMcastDataRate; /* unit Mbpsx10 */ 2219 2220 /* TX flag to differentiate between HT20, HT40 etc */ 2221 enum tx_rate_info reliableMcastDataRateTxFlag; 2222 2223 /* 2224 * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10, 2225 * 0 implies ignore 2226 */ 2227 uint32_t mcastDataRate24GHz; 2228 2229 /* TX flag to differentiate between HT20, HT40 etc */ 2230 enum tx_rate_info mcastDataRate24GHzTxFlag; 2231 2232 /* 2233 * MCAST(or BCAST) fixed data rate in 5 GHz, 2234 * unit Mbpsx10, 0 implies ignore 2235 */ 2236 uint32_t mcastDataRate5GHz; 2237 2238 /* TX flag to differentiate between HT20, HT40 etc */ 2239 enum tx_rate_info mcastDataRate5GHzTxFlag; 2240 2241 } tSirRateUpdateInd, *tpSirRateUpdateInd; 2242 2243 #define SIR_DFS_MAX_20M_SUB_CH 8 2244 #define SIR_80MHZ_START_CENTER_CH_DIFF 6 2245 2246 typedef struct sSirSmeDfsChannelList { 2247 uint32_t nchannels; 2248 /* Ch num including bonded channels on which the RADAR is present */ 2249 uint8_t channels[SIR_DFS_MAX_20M_SUB_CH]; 2250 } tSirSmeDfsChannelList, *tpSirSmeDfsChannelList; 2251 2252 typedef struct sSirChanChangeResponse { 2253 uint8_t sessionId; 2254 uint32_t new_op_freq; 2255 uint8_t channelChangeStatus; 2256 } tSirChanChangeResponse, *tpSirChanChangeResponse; 2257 2258 typedef struct sSirStartBeaconIndication { 2259 uint16_t messageType; 2260 uint16_t messageLen; 2261 uint8_t beaconStartStatus; 2262 uint8_t bssid[QDF_MAC_ADDR_SIZE]; 2263 } tSirStartBeaconIndication, *tpSirStartBeaconIndication; 2264 2265 /* additional IE type */ 2266 typedef enum tUpdateIEsType { 2267 eUPDATE_IE_NONE, 2268 eUPDATE_IE_PROBE_BCN, 2269 eUPDATE_IE_PROBE_RESP, 2270 eUPDATE_IE_ASSOC_RESP, 2271 2272 /* Add type above this line */ 2273 /* this is used to reset all buffer */ 2274 eUPDATE_IE_ALL, 2275 eUPDATE_IE_MAX 2276 } eUpdateIEsType; 2277 2278 /* Modify particular IE in addition IE for prob resp Bcn */ 2279 typedef struct sSirModifyIE { 2280 struct qdf_mac_addr bssid; 2281 uint16_t vdev_id; 2282 bool notify; 2283 uint8_t ieID; 2284 uint8_t ieIDLen; /*ie length as per spec */ 2285 uint16_t ieBufferlength; 2286 uint8_t *pIEBuffer; 2287 int32_t oui_length; 2288 2289 } tSirModifyIE, *tpSirModifyIE; 2290 2291 struct send_add_ba_req { 2292 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 2293 struct addba_send_params param; 2294 }; 2295 2296 /* Message format for Update IE message sent to PE */ 2297 typedef struct sSirModifyIEsInd { 2298 uint16_t msgType; 2299 uint16_t msgLen; 2300 tSirModifyIE modifyIE; 2301 eUpdateIEsType updateType; 2302 } tSirModifyIEsInd, *tpSirModifyIEsInd; 2303 2304 /* Message format for Update IE message sent to PE */ 2305 typedef struct sSirUpdateIE { 2306 struct qdf_mac_addr bssid; 2307 uint16_t vdev_id; 2308 bool append; 2309 bool notify; 2310 uint16_t ieBufferlength; 2311 uint8_t *pAdditionIEBuffer; 2312 } tSirUpdateIE, *tpSirUpdateIE; 2313 2314 /* Message format for Update IE message sent to PE */ 2315 typedef struct sSirUpdateIEsInd { 2316 uint16_t msgType; 2317 uint16_t msgLen; 2318 tSirUpdateIE updateIE; 2319 eUpdateIEsType updateType; 2320 } tSirUpdateIEsInd, *tpSirUpdateIEsInd; 2321 2322 /* Message format for requesting channel switch announcement to lower layers */ 2323 typedef struct sSirDfsCsaIeRequest { 2324 uint16_t msgType; 2325 uint16_t msgLen; 2326 uint32_t target_chan_freq; 2327 uint8_t csaIeRequired; 2328 uint8_t bssid[QDF_MAC_ADDR_SIZE]; 2329 struct ch_params ch_params; 2330 uint8_t ch_switch_beacon_cnt; 2331 uint8_t ch_switch_mode; 2332 uint8_t dfs_ch_switch_disable; 2333 uint32_t new_chan_cac_ms; 2334 } tSirDfsCsaIeRequest, *tpSirDfsCsaIeRequest; 2335 2336 /* Indication from lower layer indicating the completion of first beacon send 2337 * after the beacon template update 2338 */ 2339 typedef struct sSirFirstBeaconTxCompleteInd { 2340 uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */ 2341 uint16_t length; 2342 uint8_t bss_idx; 2343 } tSirFirstBeaconTxCompleteInd, *tpSirFirstBeaconTxCompleteInd; 2344 2345 typedef struct sSirSmeCSAIeTxCompleteRsp { 2346 uint8_t sessionId; 2347 uint8_t chanSwIeTxStatus; 2348 } tSirSmeCSAIeTxCompleteRsp, *tpSirSmeCSAIeTxCompleteRsp; 2349 2350 /* Thermal Mitigation*/ 2351 2352 typedef struct { 2353 uint16_t minTempThreshold; 2354 uint16_t maxTempThreshold; 2355 } t_thermal_level_info, *tp_thermal_level_info; 2356 2357 typedef enum { 2358 WLAN_WMA_THERMAL_LEVEL_0, 2359 WLAN_WMA_THERMAL_LEVEL_1, 2360 WLAN_WMA_THERMAL_LEVEL_2, 2361 WLAN_WMA_THERMAL_LEVEL_3, 2362 WLAN_WMA_THERMAL_LEVEL_4, 2363 WLAN_WMA_THERMAL_LEVEL_5, 2364 WLAN_WMA_MAX_THERMAL_LEVELS 2365 } t_thermal_level; 2366 2367 #define WLAN_THROTTLE_DUTY_CYCLE_LEVEL_MAX (6) 2368 2369 typedef struct { 2370 /* Array of thermal levels */ 2371 t_thermal_level_info thermalLevels[WLAN_WMA_MAX_THERMAL_LEVELS]; 2372 uint8_t thermalCurrLevel; 2373 uint8_t thermalMgmtEnabled; 2374 uint32_t throttlePeriod; 2375 uint8_t throttle_duty_cycle_tbl[WLAN_THROTTLE_DUTY_CYCLE_LEVEL_MAX]; 2376 enum thermal_mgmt_action_code thermal_action; 2377 } t_thermal_mgmt, *tp_thermal_mgmt; 2378 2379 struct tx_power_limit { 2380 /* Thermal limits for 2g and 5g */ 2381 uint32_t txPower2g; 2382 uint32_t txPower5g; 2383 }; 2384 2385 enum bad_peer_thresh_levels { 2386 WLAN_WMA_IEEE80211_B_LEVEL = 0, 2387 WLAN_WMA_IEEE80211_AG_LEVEL, 2388 WLAN_WMA_IEEE80211_N_LEVEL, 2389 WLAN_WMA_IEEE80211_AC_LEVEL, 2390 WLAN_WMA_IEEE80211_AX_LEVEL, 2391 WLAN_WMA_IEEE80211_MAX_LEVEL, 2392 }; 2393 2394 #define NUM_OF_RATE_THRESH_MAX (4) 2395 struct t_bad_peer_info { 2396 uint32_t cond; 2397 uint32_t delta; 2398 uint32_t percentage; 2399 uint32_t thresh[NUM_OF_RATE_THRESH_MAX]; 2400 uint32_t txlimit; 2401 }; 2402 2403 struct t_bad_peer_txtcl_config { 2404 /* Array of thermal levels */ 2405 struct t_bad_peer_info threshold[WLAN_WMA_IEEE80211_MAX_LEVEL]; 2406 uint32_t enable; 2407 uint32_t period; 2408 uint32_t txq_limit; 2409 uint32_t tgt_backoff; 2410 uint32_t tgt_report_prd; 2411 }; 2412 2413 /* notify MODEM power state to FW */ 2414 typedef struct { 2415 uint32_t param; 2416 } tSirModemPowerStateInd, *tpSirModemPowerStateInd; 2417 2418 #ifdef WLAN_FEATURE_STATS_EXT 2419 typedef struct { 2420 uint32_t vdev_id; 2421 uint32_t event_data_len; 2422 uint8_t event_data[]; 2423 } tSirStatsExtEvent, *tpSirStatsExtEvent; 2424 #endif 2425 2426 /** 2427 * struct sir_wisa_params - WISA Mode Parameters 2428 * @mode: WISA mode 2429 * @session_id: Session ID of vdev 2430 */ 2431 struct sir_wisa_params { 2432 bool mode; 2433 uint8_t vdev_id; 2434 }; 2435 2436 /** 2437 * typedef enum wifi_scan_flags - wifi scan flags 2438 * @WIFI_SCAN_FLAG_INTERRUPTED: Indicates that scan results are not complete 2439 * because probes were not sent on some channels 2440 */ 2441 typedef enum { 2442 WIFI_SCAN_FLAG_INTERRUPTED = 1, 2443 } wifi_scan_flags; 2444 2445 typedef enum { 2446 WIFI_BAND_UNSPECIFIED, 2447 WIFI_BAND_BG = 1, /* 2.4 GHz */ 2448 WIFI_BAND_A = 2, /* 5 GHz without DFS */ 2449 WIFI_BAND_ABG = 3, /* 2.4 GHz + 5 GHz; no DFS */ 2450 WIFI_BAND_A_DFS_ONLY = 4, /* 5 GHz DFS only */ 2451 /* 5 is reserved */ 2452 WIFI_BAND_A_WITH_DFS = 6, /* 5 GHz with DFS */ 2453 WIFI_BAND_ABG_WITH_DFS = 7, /* 2.4 GHz + 5 GHz with DFS */ 2454 2455 /* Keep it last */ 2456 WIFI_BAND_MAX 2457 } tWifiBand; 2458 2459 #ifdef FEATURE_WLAN_EXTSCAN 2460 2461 #define WLAN_EXTSCAN_MAX_CHANNELS 36 2462 #define WLAN_EXTSCAN_MAX_BUCKETS 16 2463 #define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 2464 2465 typedef enum { 2466 eSIR_EXTSCAN_INVALID, 2467 eSIR_EXTSCAN_START_RSP, 2468 eSIR_EXTSCAN_STOP_RSP, 2469 eSIR_EXTSCAN_CACHED_RESULTS_RSP, 2470 eSIR_EXTSCAN_SET_BSSID_HOTLIST_RSP, 2471 eSIR_EXTSCAN_RESET_BSSID_HOTLIST_RSP, 2472 eSIR_EXTSCAN_SET_SIGNIFICANT_WIFI_CHANGE_RSP, 2473 eSIR_EXTSCAN_RESET_SIGNIFICANT_WIFI_CHANGE_RSP, 2474 2475 eSIR_EXTSCAN_GET_CAPABILITIES_IND, 2476 eSIR_EXTSCAN_HOTLIST_MATCH_IND, 2477 eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND, 2478 eSIR_EXTSCAN_CACHED_RESULTS_IND, 2479 eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND, 2480 eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND, 2481 eSIR_EXTSCAN_FULL_SCAN_RESULT_IND, 2482 eSIR_EPNO_NETWORK_FOUND_IND, 2483 eSIR_PASSPOINT_NETWORK_FOUND_IND, 2484 eSIR_EXTSCAN_SET_SSID_HOTLIST_RSP, 2485 eSIR_EXTSCAN_RESET_SSID_HOTLIST_RSP, 2486 2487 /* Keep this last */ 2488 eSIR_EXTSCAN_CALLBACK_TYPE_MAX, 2489 } tSirExtScanCallbackType; 2490 2491 /** 2492 * enum wifi_extscan_event_type - extscan event type 2493 * @WIFI_EXTSCAN_RESULTS_AVAILABLE: reported when REPORT_EVENTS_EACH_SCAN is set 2494 * and a scan cycle completes. WIFI_SCAN_THRESHOLD_NUM_SCANS or 2495 * WIFI_SCAN_THRESHOLD_PERCENT can be reported instead if the 2496 * reason for the event is available; however, at most one of 2497 * these events should be reported per scan. 2498 * @WIFI_EXTSCAN_THRESHOLD_NUM_SCANS: can be reported when 2499 * REPORT_EVENTS_EACH_SCAN is not set and 2500 * report_threshold_num_scans is reached. 2501 * @WIFI_EXTSCAN_THRESHOLD_PERCENT: can be reported when REPORT_EVENTS_EACH_SCAN 2502 * is not set and report_threshold_percent is reached. 2503 * @WIFI_SCAN_DISABLED: reported when currently executing gscans are disabled 2504 * start_gscan will need to be called again in order to continue 2505 * scanning. 2506 * @WIFI_EXTSCAN_BUCKET_STARTED_EVENT: Bucket started event 2507 * This event is consumed in driver only. 2508 * @WIFI_EXTSCAN_CYCLE_STARTED_EVENT: Cycle started event. 2509 * This event is consumed in driver only. 2510 * @WIFI_EXTSCAN_CYCLE_COMPLETED_EVENT: Cycle complete event. This event 2511 * triggers @WIFI_EXTSCAN_RESULTS_AVAILABLE to the user space. 2512 */ 2513 enum wifi_extscan_event_type { 2514 WIFI_EXTSCAN_RESULTS_AVAILABLE, 2515 WIFI_EXTSCAN_THRESHOLD_NUM_SCANS, 2516 WIFI_EXTSCAN_THRESHOLD_PERCENT, 2517 WIFI_SCAN_DISABLED, 2518 2519 WIFI_EXTSCAN_BUCKET_STARTED_EVENT = 0x10, 2520 WIFI_EXTSCAN_CYCLE_STARTED_EVENT, 2521 WIFI_EXTSCAN_CYCLE_COMPLETED_EVENT, 2522 }; 2523 2524 /** 2525 * enum extscan_configuration_flags - extscan config flags 2526 * @EXTSCAN_LP_EXTENDED_BATCHING: extended batching 2527 */ 2528 enum extscan_configuration_flags { 2529 EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001, 2530 }; 2531 2532 /** 2533 * struct ext_scan_capabilities_response - extscan capabilities response data 2534 * @requestId: request identifier 2535 * @status: status 2536 * @max_scan_cache_size: total space allocated for scan (in bytes) 2537 * @max_scan_buckets: maximum number of channel buckets 2538 * @max_ap_cache_per_scan: maximum number of APs that can be stored per scan 2539 * @max_rssi_sample_size: number of RSSI samples used for averaging RSSI 2540 * @ax_scan_reporting_threshold: max possible report_threshold 2541 * @max_hotlist_bssids: maximum number of entries for hotlist APs 2542 * @max_significant_wifi_change_aps: maximum number of entries for 2543 * significant wifi change APs 2544 * @max_bssid_history_entries: number of BSSID/RSSI entries that device can hold 2545 * @max_hotlist_ssids: maximum number of entries for hotlist SSIDs 2546 * @max_number_epno_networks: max number of epno entries 2547 * @max_number_epno_networks_by_ssid: max number of epno entries 2548 * if ssid is specified, that is, epno entries for 2549 * which an exact match is required, 2550 * or entries corresponding to hidden ssids 2551 * @max_number_of_allow_listed_ssid: max number of allow listed SSIDs 2552 * @max_number_of_deny_listed_bssid: max number of deny listed BSSIDs 2553 */ 2554 struct ext_scan_capabilities_response { 2555 uint32_t requestId; 2556 uint32_t status; 2557 2558 uint32_t max_scan_cache_size; 2559 uint32_t max_scan_buckets; 2560 uint32_t max_ap_cache_per_scan; 2561 uint32_t max_rssi_sample_size; 2562 uint32_t max_scan_reporting_threshold; 2563 2564 uint32_t max_hotlist_bssids; 2565 uint32_t max_significant_wifi_change_aps; 2566 2567 uint32_t max_bssid_history_entries; 2568 uint32_t max_hotlist_ssids; 2569 uint32_t max_number_epno_networks; 2570 uint32_t max_number_epno_networks_by_ssid; 2571 uint32_t max_number_of_allow_listed_ssid; 2572 uint32_t max_number_of_deny_listed_bssid; 2573 }; 2574 2575 typedef struct { 2576 /* Time of discovery */ 2577 uint64_t ts; 2578 2579 /* Null terminated SSID */ 2580 uint8_t ssid[WLAN_SSID_MAX_LEN + 1]; 2581 2582 struct qdf_mac_addr bssid; 2583 2584 /* Frequency in MHz */ 2585 uint32_t channel; 2586 2587 /* RSSI in dBm */ 2588 int32_t rssi; 2589 2590 /* RTT in nanoseconds */ 2591 uint32_t rtt; 2592 2593 /* Standard deviation in rtt */ 2594 uint32_t rtt_sd; 2595 2596 /* Period advertised in the beacon */ 2597 uint16_t beaconPeriod; 2598 2599 /* Capabilities advertised in the beacon */ 2600 uint16_t capability; 2601 2602 uint16_t ieLength; 2603 2604 uint8_t ieData[]; 2605 } tSirWifiScanResult, *tpSirWifiScanResult; 2606 2607 /** 2608 * struct extscan_hotlist_match - extscan hotlist match 2609 * @requestId: request identifier 2610 * @numOfAps: number of bssids retrieved by the scan 2611 * @moreData: 0 - for last fragment 2612 * 1 - still more fragment(s) coming 2613 * @ap: wifi scan result 2614 */ 2615 struct extscan_hotlist_match { 2616 uint32_t requestId; 2617 bool moreData; 2618 bool ap_found; 2619 uint32_t numOfAps; 2620 tSirWifiScanResult ap[]; 2621 }; 2622 2623 /** 2624 * struct extscan_cached_scan_result - extscan cached scan result 2625 * @scan_id: a unique identifier for the scan unit 2626 * @flags: a bitmask with additional information about scan 2627 * @num_results: number of bssids retrieved by the scan 2628 * @buckets_scanned: bitmask of buckets scanned in current extscan cycle 2629 * @ap: wifi scan bssid results info 2630 */ 2631 struct extscan_cached_scan_result { 2632 uint32_t scan_id; 2633 uint32_t flags; 2634 uint32_t num_results; 2635 uint32_t buckets_scanned; 2636 tSirWifiScanResult *ap; 2637 }; 2638 2639 /** 2640 * struct extscan_cached_scan_results - extscan cached scan results 2641 * @request_id: request identifier 2642 * @more_data: 0 - for last fragment 2643 * 1 - still more fragment(s) coming 2644 * @num_scan_ids: number of scan ids 2645 * @result: wifi scan result 2646 */ 2647 struct extscan_cached_scan_results { 2648 uint32_t request_id; 2649 bool more_data; 2650 uint32_t num_scan_ids; 2651 struct extscan_cached_scan_result *result; 2652 }; 2653 2654 2655 /** 2656 * struct tSirWifiFullScanResultEvent - extscan full scan event 2657 * @request_id: request identifier 2658 * @moreData: 0 - for last fragment 2659 * 1 - still more fragment(s) coming 2660 * @ap: bssid info 2661 * 2662 * Reported when each probe response is received, if report_events 2663 * enabled in struct wifi_scan_cmd_req_params 2664 */ 2665 typedef struct { 2666 uint32_t requestId; 2667 bool moreData; 2668 tSirWifiScanResult ap; 2669 } tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent; 2670 2671 /** 2672 * struct pno_match_found - epno match found 2673 * @request_id: request identifier 2674 * @moreData: 0 - for last fragment 2675 * 1 - still more fragment(s) coming 2676 * @num_results: number of bssids, driver sends this event to upper layer 2677 * for every beacon, hence %num_results is always set to 1. 2678 * @ap: bssid info 2679 * 2680 * Reported when each beacon probe response is received with 2681 * epno match found tag. 2682 */ 2683 struct pno_match_found { 2684 uint32_t request_id; 2685 bool more_data; 2686 uint32_t num_results; 2687 tSirWifiScanResult ap[]; 2688 }; 2689 2690 /** 2691 * struct sir_extscan_generic_response - 2692 * Generic ExtScan Response structure 2693 * @request_id: ID of the request 2694 * @status: operation status returned by firmware 2695 */ 2696 struct sir_extscan_generic_response { 2697 uint32_t request_id; 2698 uint32_t status; 2699 }; 2700 2701 typedef struct { 2702 struct qdf_mac_addr bssid; 2703 uint32_t channel; 2704 uint32_t numOfRssi; 2705 2706 /* Rssi history in db */ 2707 int32_t rssi[]; 2708 } tSirWifiSignificantChange, *tpSirWifiSignificantChange; 2709 2710 typedef struct { 2711 uint32_t requestId; 2712 2713 bool moreData; 2714 uint32_t numResults; 2715 tSirWifiSignificantChange ap[]; 2716 } tSirWifiSignificantChangeEvent, *tpSirWifiSignificantChangeEvent; 2717 2718 typedef struct { 2719 uint32_t requestId; 2720 uint32_t numResultsAvailable; 2721 } tSirExtScanResultsAvailableIndParams, *tpSirExtScanResultsAvailableIndParams; 2722 2723 typedef struct { 2724 uint32_t requestId; 2725 uint32_t status; 2726 uint8_t scanEventType; 2727 uint32_t buckets_scanned; 2728 } tSirExtScanOnScanEventIndParams, *tpSirExtScanOnScanEventIndParams; 2729 2730 #define MAX_EPNO_NETWORKS 64 2731 2732 #define SIR_PASSPOINT_LIST_MAX_NETWORKS 8 2733 2734 /** 2735 * struct wifi_passpoint_match - wifi passpoint network match 2736 * @id: network block identifier for the matched network 2737 * @anqp_len: length of ANQP blob 2738 * @ap: scan result, with channel and beacon information 2739 * @anqp: ANQP data, in the information_element format 2740 */ 2741 struct wifi_passpoint_match { 2742 uint32_t request_id; 2743 uint32_t id; 2744 uint32_t anqp_len; 2745 tSirWifiScanResult ap; 2746 uint8_t anqp[]; 2747 }; 2748 #endif /* FEATURE_WLAN_EXTSCAN */ 2749 2750 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN 2751 struct auto_shutdown_cmd { 2752 uint32_t timer_val; 2753 }; 2754 #endif 2755 2756 #ifdef WLAN_POWER_DEBUG 2757 /** 2758 * struct power_stats_response - Power stats response 2759 * @cumulative_sleep_time_ms: cumulative sleep time in ms 2760 * @cumulative_total_on_time_ms: total awake time in ms 2761 * @deep_sleep_enter_counter: deep sleep enter counter 2762 * @last_deep_sleep_enter_tstamp_ms: last deep sleep enter timestamp 2763 * @debug_register_fmt: debug registers format 2764 * @num_debug_register: number of debug registers 2765 * @debug_registers: Pointer to the debug registers buffer 2766 */ 2767 struct power_stats_response { 2768 uint32_t cumulative_sleep_time_ms; 2769 uint32_t cumulative_total_on_time_ms; 2770 uint32_t deep_sleep_enter_counter; 2771 uint32_t last_deep_sleep_enter_tstamp_ms; 2772 uint32_t debug_register_fmt; 2773 uint32_t num_debug_register; 2774 uint32_t *debug_registers; 2775 }; 2776 #endif 2777 2778 #ifdef WLAN_FEATURE_BEACON_RECEPTION_STATS 2779 #define MAX_BCNMISS_BITMAP 8 2780 /** 2781 * struct bcn_reception_stats_rsp - beacon stats response 2782 * @total_bcn_cnt: total beacon count (tbtt instances) 2783 * @total_bmiss_cnt: Total beacon miss count in last 255 beacons, max 255 2784 * @bmiss_bitmap: This bitmap indicates the status of the last 255 beacons. 2785 * If a bit is set, that means the corresponding beacon was missed. 2786 * Bit 0 of bmiss_bitmap[0] represents the most recent beacon. 2787 * The total_bcn_cnt field indicates how many bits within bmiss_bitmap 2788 * are valid. 2789 */ 2790 struct bcn_reception_stats_rsp { 2791 uint32_t vdev_id; 2792 uint32_t total_bcn_cnt; 2793 uint32_t total_bmiss_cnt; 2794 uint32_t bmiss_bitmap[MAX_BCNMISS_BITMAP]; 2795 }; 2796 #endif 2797 2798 /** 2799 * struct lfr_firmware_status - LFR status in firmware 2800 * @is_disabled: Is LFR disabled in FW 2801 * @disable_lfr_event: Disable attempt done in FW 2802 */ 2803 struct lfr_firmware_status { 2804 uint32_t is_disabled; 2805 struct completion disable_lfr_event; 2806 }; 2807 2808 /** 2809 * struct rso_cmd_status - RSO Command status 2810 * @vdev_id: Vdev ID for which RSO command sent 2811 * @status: Status of RSO command sent to FW 2812 */ 2813 struct rso_cmd_status { 2814 uint32_t vdev_id; 2815 bool status; 2816 }; 2817 2818 enum { 2819 SIR_AP_RX_DATA_OFFLOAD = 0x00, 2820 SIR_STA_RX_DATA_OFFLOAD = 0x01, 2821 }; 2822 2823 /** 2824 * struct sir_set_vdev_ies_per_band 2825 * @msg_type: message type 2826 * @len: message length 2827 * @vdev_id: vdev id 2828 * 2829 * Message wrapper structure for eWNI_SME_SET_VDEV_IES_PER_BAND. 2830 */ 2831 struct sir_set_vdev_ies_per_band { 2832 uint16_t msg_type; 2833 uint16_t len; 2834 uint32_t vdev_id; 2835 uint16_t dot11_mode; 2836 enum QDF_OPMODE device_mode; 2837 }; 2838 2839 /** 2840 * struct sir_set_ht_vht_cfg - ht, vht IE config 2841 * @msg_type: message type 2842 * @len: message length 2843 * @pdev_id: pdev id 2844 * @nss: Nss value 2845 * @dot11mode: Dot11 mode. 2846 * 2847 * Message wrapper structure for set HT/VHT IE req. 2848 */ 2849 struct sir_set_ht_vht_cfg { 2850 uint16_t msg_type; 2851 uint16_t len; 2852 uint32_t pdev_id; 2853 uint32_t nss; 2854 uint32_t dot11mode; 2855 }; 2856 2857 #define WIFI_INVALID_PEER_ID (-1) 2858 #define WIFI_INVALID_VDEV_ID (-1) 2859 #define WIFI_MAX_AC (4) 2860 #define RATE_STAT_MCS_MASK (0xFF00) 2861 #define RATE_STAT_GET_MCS_INDEX(x) (((x) & RATE_STAT_MCS_MASK) >> 8) 2862 2863 typedef struct { 2864 uint32_t paramId; 2865 uint8_t ifaceId; 2866 uint32_t rspId; 2867 uint32_t moreResultToFollow; 2868 uint32_t nr_received; 2869 union { 2870 uint32_t num_peers; 2871 uint32_t num_radio; 2872 }; 2873 2874 uint32_t peer_event_number; 2875 /* Variable length field - Do not add anything after this */ 2876 uint8_t results[]; 2877 } tSirLLStatsResults, *tpSirLLStatsResults; 2878 2879 #ifdef WLAN_FEATURE_LINK_LAYER_STATS 2880 /*--------------------------------------------------------------------------- 2881 WLAN_HAL_LL_NOTIFY_STATS 2882 ---------------------------------------------------------------------------*/ 2883 2884 /******************************LINK LAYER Statistics**********************/ 2885 2886 typedef struct { 2887 uint32_t reqId; 2888 uint8_t staId; 2889 uint32_t mpduSizeThreshold; 2890 uint32_t aggressiveStatisticsGathering; 2891 } tSirLLStatsSetReq, *tpSirLLStatsSetReq; 2892 2893 typedef struct { 2894 uint32_t reqId; 2895 uint8_t staId; 2896 uint32_t paramIdMask; 2897 bool is_mlo_req; 2898 uint32_t mlo_vdev_id_bitmap; 2899 } tSirLLStatsGetReq, *tpSirLLStatsGetReq; 2900 2901 typedef struct { 2902 uint32_t reqId; 2903 uint8_t staId; 2904 uint32_t statsClearReqMask; 2905 uint8_t stopReq; 2906 } tSirLLStatsClearReq, *tpSirLLStatsClearReq; 2907 2908 typedef enum { 2909 WIFI_DISCONNECTED = 0, 2910 WIFI_AUTHENTICATING = 1, 2911 WIFI_ASSOCIATING = 2, 2912 WIFI_ASSOCIATED = 3, 2913 WIFI_EAPOL_STARTED = 4, /* if done by firmware/driver */ 2914 WIFI_EAPOL_COMPLETED = 5, /* if done by firmware/driver */ 2915 } tSirWifiConnectionState; 2916 2917 typedef enum { 2918 WIFI_ROAMING_IDLE = 0, 2919 WIFI_ROAMING_ACTIVE = 1, 2920 } tSirWifiRoamState; 2921 2922 typedef enum { 2923 WIFI_INTERFACE_STA = 0, 2924 WIFI_INTERFACE_SOFTAP = 1, 2925 WIFI_INTERFACE_IBSS = 2, 2926 WIFI_INTERFACE_P2P_CLIENT = 3, 2927 WIFI_INTERFACE_P2P_GO = 4, 2928 WIFI_INTERFACE_NAN = 5, 2929 WIFI_INTERFACE_MESH = 6, 2930 WIFI_INTERFACE_NDI = 7, 2931 } tSirWifiInterfaceMode; 2932 2933 /* set for QOS association */ 2934 #define WIFI_CAPABILITY_QOS 0x00000001 2935 /* set for protected assoc (802.11 beacon frame control protected bit set) */ 2936 #define WIFI_CAPABILITY_PROTECTED 0x00000002 2937 /* set if 802.11 Extended Capabilities element interworking bit is set */ 2938 #define WIFI_CAPABILITY_INTERWORKING 0x00000004 2939 /* set for HS20 association */ 2940 #define WIFI_CAPABILITY_HS20 0x00000008 2941 /* set is 802.11 Extended Capabilities element UTF-8 SSID bit is set */ 2942 #define WIFI_CAPABILITY_SSID_UTF8 0x00000010 2943 /* set is 802.11 Country Element is present */ 2944 #define WIFI_CAPABILITY_COUNTRY 0x00000020 2945 2946 struct wifi_interface_info { 2947 /* tSirWifiInterfaceMode */ 2948 /* interface mode */ 2949 uint8_t mode; 2950 /* interface mac address (self) */ 2951 struct qdf_mac_addr macAddr; 2952 /* tSirWifiConnectionState */ 2953 /* connection state (valid for STA, CLI only) */ 2954 uint8_t state; 2955 /* tSirWifiRoamState */ 2956 /* roaming state */ 2957 uint32_t roaming; 2958 /* WIFI_CAPABILITY_XXX (self) */ 2959 uint32_t capabilities; 2960 /* null terminated SSID */ 2961 uint8_t ssid[33]; 2962 /* bssid */ 2963 struct qdf_mac_addr bssid; 2964 /* country string advertised by AP */ 2965 uint8_t apCountryStr[REG_ALPHA2_LEN + 1]; 2966 /* country string for this association */ 2967 uint8_t countryStr[REG_ALPHA2_LEN + 1]; 2968 uint8_t time_slice_duty_cycle; 2969 }; 2970 2971 /** 2972 * struct wifi_channel_info - channel information 2973 * @width: channel width (20, 40, 80, 80+80, 160) 2974 * @center_freq: primary 20 MHz channel 2975 * @center_freq0: center frequency (MHz) first segment 2976 * @center_freq1: center frequency (MHz) second segment 2977 */ 2978 struct wifi_channel_info { 2979 enum phy_ch_width width; 2980 uint32_t center_freq; 2981 uint32_t center_freq0; 2982 uint32_t center_freq1; 2983 }; 2984 2985 /** 2986 * struct wifi_rate_info - wifi rate information 2987 * @preamble: 0:OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved 2988 * @nss: 0:1x1, 1:2x2, 3:3x3, 4:4x4 2989 * @bw: 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz 2990 * @rate_or_mcs_index: 2991 * * OFDM/CCK: rate code per ieee std in units of 0.5mbps 2992 * * HT/VHT: mcs index 2993 * @reserved: reserved 2994 * @bitrate: bitrate units of 100 Kbps 2995 */ 2996 struct wifi_rate_info { 2997 uint32_t preamble:3; 2998 uint32_t nss:2; 2999 uint32_t bw:3; 3000 uint32_t rate_or_mcs_index:8; 3001 uint32_t reserved:16; 3002 uint32_t bitrate; 3003 }; 3004 3005 /** 3006 * struct wifi_channel_stats - channel statistics 3007 * @channel: channel for which the stats are applicable 3008 * @on_time: msecs the radio is awake 3009 * @cca_busy_time: secs the CCA register is busy excluding own tx_time 3010 * @tx_time: msecs the radio is transmitting on this channel 3011 * @rx_time: msecs the radio is in active receive on this channel 3012 */ 3013 struct wifi_channel_stats { 3014 struct wifi_channel_info channel; 3015 uint32_t on_time; 3016 uint32_t cca_busy_time; 3017 uint32_t tx_time; 3018 uint32_t rx_time; 3019 3020 }; 3021 3022 /** 3023 * struct wifi_radio_stats - per-radio statistics 3024 * @radio: wifi radio for which the stats are applicable 3025 * @on_time: msecs the radio is awake 3026 * @tx_time: msecs the radio is transmitting 3027 * @rx_time: msecs the radio is in active receive 3028 * @on_time_scan: msecs the radio is awake due to all scan 3029 * @on_time_nbd: msecs the radio is awake due to NAN 3030 * @on_time_gscan: msecs the radio is awake due to Gscan 3031 * @on_time_roam_scan: msecs the radio is awake due to roam scan 3032 * @on_time_pno_scan: msecs the radio is awake due to PNO scan 3033 * @on_time_hs20: msecs the radio is awake due to HS2.0 scans and GAS exchange 3034 * @on_time_host_scan: msecs the radio is awake due to Host initiated scan 3035 * @on_time_lpi_scan: msecs the radio is awake due to LPI scan 3036 * @total_num_tx_power_levels: @tx_time_per_power_level record count 3037 * @tx_time_per_power_level: tx time (in milliseconds) per TPC level (0.5 dBm) 3038 * @more_channels: If more channels are there and will come in next event 3039 * @num_channels: @channels record count 3040 * @channels: per-channel statistics 3041 */ 3042 struct wifi_radio_stats { 3043 uint32_t radio; 3044 uint32_t on_time; 3045 uint32_t tx_time; 3046 uint32_t rx_time; 3047 uint32_t on_time_scan; 3048 uint32_t on_time_nbd; 3049 uint32_t on_time_gscan; 3050 uint32_t on_time_roam_scan; 3051 uint32_t on_time_pno_scan; 3052 uint32_t on_time_hs20; 3053 uint32_t on_time_host_scan; 3054 uint32_t on_time_lpi_scan; 3055 uint32_t total_num_tx_power_levels; 3056 uint32_t *tx_time_per_power_level; 3057 uint32_t more_channels; 3058 uint32_t num_channels; 3059 struct wifi_channel_stats *channels; 3060 }; 3061 3062 /** 3063 * struct wifi_rate_stat - per rate statistics 3064 * @rate: rate information 3065 * @tx_mpdu: number of successfully transmitted data pkts (ACK rcvd) 3066 * @rx_mpdu: number of received data pkts 3067 * @mpdu_lost: number of data packet losses (no ACK) 3068 * @retries: total number of data pkt retries * 3069 * @retries_short: number of short data pkt retries 3070 * @retries_long: number of long data pkt retries 3071 */ 3072 struct wifi_rate_stat { 3073 struct wifi_rate_info rate; 3074 uint32_t tx_mpdu; 3075 uint32_t rx_mpdu; 3076 uint32_t mpdu_lost; 3077 uint32_t retries; 3078 uint32_t retries_short; 3079 uint32_t retries_long; 3080 }; 3081 3082 /* wifi peer type */ 3083 typedef enum { 3084 WIFI_PEER_STA, 3085 WIFI_PEER_AP, 3086 WIFI_PEER_P2P_GO, 3087 WIFI_PEER_P2P_CLIENT, 3088 WIFI_PEER_NAN, 3089 WIFI_PEER_TDLS, 3090 WIFI_PEER_INVALID, 3091 } tSirWifiPeerType; 3092 3093 /** 3094 * struct wifi_peer_info - per peer information 3095 * @type: peer type (AP, TDLS, GO etc.) 3096 * @peer_macaddr: mac address 3097 * @capabilities: peer WIFI_CAPABILITY_XXX 3098 * @power_saving: peer power saving mode 3099 * @num_rate: number of rates 3100 * @rate_stats: per rate statistics, number of entries = @num_rate 3101 */ 3102 struct wifi_peer_info { 3103 enum wmi_peer_type type; 3104 struct qdf_mac_addr peer_macaddr; 3105 uint32_t capabilities; 3106 union { 3107 uint32_t power_saving; 3108 uint32_t num_rate; 3109 }; 3110 struct wifi_rate_stat rate_stats[]; 3111 }; 3112 3113 /** 3114 * struct wifi_interface_stats - Interface statistics 3115 * @info: struct containing the current state of the interface 3116 * @rts_succ_cnt: number of RTS/CTS sequence success 3117 * @rts_fail_cnt: number of RTS/CTS sequence failures 3118 * @ppdu_succ_cnt: number of PPDUs transmitted 3119 * @ppdu_fail_cnt: number of PPDUs that failed to transmit 3120 * @link_stats: link-level statistics 3121 * @ac_stats: per-Access Category statistics 3122 * @num_offload_stats: @offload_stats record count 3123 * @offload_stats: per-offload statistics 3124 * @powersave_stats: powersave statistics 3125 * @vdev_id: vdev id 3126 * 3127 * Statistics corresponding to 2nd most LSB in wifi statistics bitmap 3128 * for getting statistics 3129 */ 3130 struct wifi_interface_stats { 3131 struct wifi_interface_info info; 3132 uint32_t rts_succ_cnt; 3133 uint32_t rts_fail_cnt; 3134 uint32_t ppdu_succ_cnt; 3135 uint32_t ppdu_fail_cnt; 3136 wmi_iface_link_stats link_stats; 3137 wmi_wmm_ac_stats ac_stats[WIFI_AC_MAX]; 3138 uint32_t num_offload_stats; 3139 wmi_iface_offload_stats offload_stats[WMI_OFFLOAD_STATS_TYPE_MAX]; 3140 wmi_iface_powersave_stats powersave_stats; 3141 uint8_t vdev_id; 3142 }; 3143 3144 /** 3145 * struct wifi_peer_stat - peer statistics 3146 * @num_peers: number of peers 3147 * @peer_info: per peer statistics 3148 * 3149 * Peer statistics - corresponding to 3rd most LSB in 3150 * wifi statistics bitmap for getting statistics 3151 */ 3152 struct wifi_peer_stat { 3153 uint32_t num_peers; 3154 struct wifi_peer_info peer_info[]; 3155 }; 3156 3157 /* wifi statistics bitmap for getting statistics */ 3158 #define WMI_LINK_STATS_RADIO 0x00000001 3159 #define WMI_LINK_STATS_IFACE 0x00000002 3160 #define WMI_LINK_STATS_ALL_PEER 0x00000004 3161 #define WMI_LINK_STATS_PER_PEER 0x00000008 3162 3163 /* wifi statistics bitmap for clearing statistics */ 3164 /* all radio statistics */ 3165 #define WIFI_STATS_RADIO 0x00000001 3166 /* cca_busy_time (within radio statistics) */ 3167 #define WIFI_STATS_RADIO_CCA 0x00000002 3168 /* all channel statistics (within radio statistics) */ 3169 #define WIFI_STATS_RADIO_CHANNELS 0x00000004 3170 /* all scan statistics (within radio statistics) */ 3171 #define WIFI_STATS_RADIO_SCAN 0x00000008 3172 /* all interface statistics */ 3173 #define WIFI_STATS_IFACE 0x00000010 3174 /* all tx rate statistics (within interface statistics) */ 3175 #define WIFI_STATS_IFACE_TXRATE 0x00000020 3176 /* all ac statistics (within interface statistics) */ 3177 #define WIFI_STATS_IFACE_AC 0x00000040 3178 /* all contention (min, max, avg) statistics (within ac statistics) */ 3179 #define WIFI_STATS_IFACE_CONTENTION 0x00000080 3180 /* All peer stats on this interface */ 3181 #define WIFI_STATS_IFACE_ALL_PEER 0x00000100 3182 /* Clear particular peer stats depending on the peer_mac */ 3183 #define WIFI_STATS_IFACE_PER_PEER 0x00000200 3184 3185 /** 3186 * struct sir_wifi_iface_tx_fail - TX failure event 3187 * @tid: TX TID 3188 * @msdu_num: TX MSDU failed counter 3189 * @status: TX status from HTT message. 3190 * Only failure status will be involved. 3191 */ 3192 struct sir_wifi_iface_tx_fail { 3193 uint8_t tid; 3194 uint16_t msdu_num; 3195 enum htt_tx_status status; 3196 }; 3197 3198 /** 3199 * struct sir_wifi_chan_cca_stats - channal CCA stats 3200 * @vdev_id: vdev ID 3201 * @idle_time: percentage of idle time, no TX, no RX, no interference 3202 * @tx_time: percentage of time transmitting packets 3203 * @rx_in_bss_time: percentage of time receiving packets in current BSS 3204 * @rx_out_bss_time: percentage of time receiving packets not in current BSS 3205 * @rx_busy_time: percentage of time interference detected 3206 * @rx_in_bad_cond_time: percentage of time receiving packets with errors 3207 * or packets flagged as retransmission or seqnum discontinued. 3208 * @tx_in_bad_cond_time: percentage of time the device transmitted packets 3209 * that haven't been ACKed. 3210 * @wlan_not_avail_time: percentage of time the chip is unable to 3211 * work in normal conditions. 3212 */ 3213 struct sir_wifi_chan_cca_stats { 3214 uint32_t vdev_id; 3215 uint32_t idle_time; 3216 uint32_t tx_time; 3217 uint32_t rx_in_bss_time; 3218 uint32_t rx_out_bss_time; 3219 uint32_t rx_busy_time; 3220 uint32_t rx_in_bad_cond_time; 3221 uint32_t tx_in_bad_cond_time; 3222 uint32_t wlan_not_avail_time; 3223 }; 3224 3225 #define WIFI_MAX_CHAINS 8 3226 3227 /** 3228 * struct sir_wifi_peer_signal_stats - peer signal stats 3229 * @vdev_id: vdev ID 3230 * @peer_id: peer ID 3231 * @per_ant_snr: per antenna SNR 3232 * @nf: peer background noise 3233 * @per_ant_rx_mpdus: MPDUs received per antenna 3234 * @per_ant_tx_mpdus: MPDUs transferred per antenna 3235 * @num_chain: valid chain count 3236 */ 3237 struct sir_wifi_peer_signal_stats { 3238 uint32_t vdev_id; 3239 uint32_t peer_id; 3240 3241 /* per antenna SNR in current bss */ 3242 int32_t per_ant_snr[WIFI_MAX_CHAINS]; 3243 3244 /* Background noise */ 3245 int32_t nf[WIFI_MAX_CHAINS]; 3246 3247 uint32_t per_ant_rx_mpdus[WIFI_MAX_CHAINS]; 3248 uint32_t per_ant_tx_mpdus[WIFI_MAX_CHAINS]; 3249 uint32_t num_chain; 3250 }; 3251 3252 #define WIFI_VDEV_NUM 4 3253 #define WFIF_MCS_NUM 10 3254 #define WIFI_AGGR_NUM 8 3255 #define WIFI_DELAY_SIZE 11 3256 3257 /** 3258 * struct sir_wifi_tx - per AC tx stats 3259 * @msdus: number of totoal MSDUs on MAC layer in the period 3260 * @mpdus: number of totoal MPDUs on MAC layer in the period 3261 * @ppdus: number of totoal PPDUs on PHY layer in the period 3262 * @bytes: bytes of tx data on MAC layer in the period 3263 * @drops: number of TX packets cancelled due to any reason in the period, 3264 * such as WMM limitation/bandwidth limitation/radio congestion 3265 * @drop_bytes: bytes of dropped TX packets in the period 3266 * @retries: number of unacked transmissions of MPDUs 3267 * @failed: number of packets have not been ACKed despite retried 3268 * @aggr_len: length of the MPDU aggregation size buffer 3269 * @mpdu_aggr_size: histogram of MPDU aggregation size 3270 * @success_mcs_len: length of success mcs buffer 3271 * @success_mcs: histogram of successful received MPDUs encoding rate 3272 * @fail_mcs_len: length of failed mcs buffer 3273 * @fail_mcs: histogram of failed received MPDUs encoding rate 3274 * @delay_len: length of the delay histofram buffer 3275 * @delay: histogram of delays on MAC layer 3276 */ 3277 struct sir_wifi_tx { 3278 uint32_t msdus; 3279 uint32_t mpdus; 3280 uint32_t ppdus; 3281 uint32_t bytes; 3282 uint32_t drops; 3283 uint32_t drop_bytes; 3284 uint32_t retries; 3285 uint32_t failed; 3286 uint32_t aggr_len; 3287 uint32_t *mpdu_aggr_size; 3288 uint32_t success_mcs_len; 3289 uint32_t *success_mcs; 3290 uint32_t fail_mcs_len; 3291 uint32_t *fail_mcs; 3292 uint32_t delay_len; 3293 uint32_t *delay; 3294 }; 3295 3296 /** 3297 * struct sir_wifi_rx - per AC rx stats 3298 * @mpdus: number of RX packets on MAC layer 3299 * @bytes: bytes of RX packets on MAC layer 3300 * @ppdus: number of RX packets on PHY layer 3301 * @ppdu_bytes: bytes of RX packets on PHY layer 3302 * @mpdu_lost: number of discontinuity in seqnum 3303 * @mpdu_retry: number of RX packets flagged as retransmissions 3304 * @mpdu_dup: number of RX packets identified as duplicates 3305 * @mpdu_discard: number of RX packets discarded 3306 * @aggr_len: length of MPDU aggregation histogram buffer 3307 * @mpdu_aggr: histogram of MPDU aggregation size 3308 * @mcs_len: length of mcs histogram buffer 3309 * @mcs: histogram of encoding rate. 3310 */ 3311 struct sir_wifi_rx { 3312 uint32_t mpdus; 3313 uint32_t bytes; 3314 uint32_t ppdus; 3315 uint32_t ppdu_bytes; 3316 uint32_t mpdu_lost; 3317 uint32_t mpdu_retry; 3318 uint32_t mpdu_dup; 3319 uint32_t mpdu_discard; 3320 uint32_t aggr_len; 3321 uint32_t *mpdu_aggr; 3322 uint32_t mcs_len; 3323 uint32_t *mcs; 3324 }; 3325 3326 /** 3327 * struct sir_wifi_ll_ext_wmm_ac_stats - stats for WMM AC 3328 * @type: WMM AC type 3329 * @tx_stats: pointer to TX stats 3330 * @rx_stats: pointer to RX stats 3331 */ 3332 struct sir_wifi_ll_ext_wmm_ac_stats { 3333 uint32_t type; 3334 struct sir_wifi_tx *tx_stats; 3335 struct sir_wifi_rx *rx_stats; 3336 }; 3337 3338 /** 3339 * struct sir_wifi_ll_ext_peer_stats - per peer stats 3340 * @peer_id: peer ID 3341 * @vdev_id: VDEV ID 3342 * @mac_address: MAC address 3343 * @sta_ps_inds: how many times STAs go to sleep 3344 * @sta_ps_durs: total sleep time of STAs (units in ms) 3345 * @rx_probe_reqs: number of probe requests received 3346 * @rx_oth_mgmts: number of other management frames received, 3347 * not including probe requests 3348 * @peer_signal_stat: signal stats 3349 * @ac_stats: WMM BE/BK/VI/VO stats 3350 */ 3351 struct sir_wifi_ll_ext_peer_stats { 3352 uint32_t peer_id; 3353 uint32_t vdev_id; 3354 tSirMacAddr mac_address; 3355 uint32_t sta_ps_inds; 3356 uint32_t sta_ps_durs; 3357 uint32_t rx_probe_reqs; 3358 uint32_t rx_oth_mgmts; 3359 struct sir_wifi_peer_signal_stats peer_signal_stats; 3360 struct sir_wifi_ll_ext_wmm_ac_stats ac_stats[WIFI_MAX_AC]; 3361 }; 3362 3363 /** 3364 * struct sir_wifi_ll_ext_stats - link layer stats report 3365 * @trigger_cond_id: Indicate what triggered this event. 3366 * 1: timeout. 2: threshold 3367 * @cca_chgd_bitmap: Bitmap to indicate changed channel CCA stats 3368 * which exceeded the thresholds 3369 * @sig_chgd_bitmap: Bitmap to indicate changed peer signal stats 3370 * which exceeded the thresholds 3371 * @tx_chgd_bitmap: Bitmap to indicate changed TX counters 3372 * which exceeded the thresholds 3373 * @rx_chgd_bitmap: Bitmap to indicate changed RX counters 3374 * which exceeded the thresholds 3375 * @chan_cca_stats: channel CCA stats 3376 * @peer_signal_stats: peer signal stats 3377 * @tx_mpdu_aggr_array_len: length of TX MPDU aggregation buffer 3378 * @tx_succ_mcs_array_len: length of mcs buffer for ACKed MPDUs 3379 * @tx_fail_mcs_array_len: length of mcs buffer for no-ACKed MPDUs 3380 * @tx_delay_array_len: length of delay stats buffer 3381 * @rx_mpdu_aggr_array_len: length of RX MPDU aggregation buffer 3382 * @rx_mcs_array_len: length of RX mcs stats buffer 3383 * @peer_stats: peer stats 3384 * @cca: physical channel CCA stats 3385 * @stats: pointer to stats data buffer. 3386 * 3387 * Structure of the whole statistics is like this: 3388 * --------------------------------- 3389 * | trigger_cond_i | 3390 * +-------------------------------+ 3391 * | cca_chgd_bitmap | 3392 * +-------------------------------+ 3393 * | sig_chgd_bitmap | 3394 * +-------------------------------+ 3395 * | tx_chgd_bitmap | 3396 * +-------------------------------+ 3397 * | rx_chgd_bitmap | 3398 * +-------------------------------+ 3399 * | peer_num | 3400 * +-------------------------------+ 3401 * | channel_num | 3402 * +-------------------------------+ 3403 * | tx_mpdu_aggr_array_len | 3404 * +-------------------------------+ 3405 * | tx_succ_mcs_array_len | 3406 * +-------------------------------+ 3407 * | tx_fail_mcs_array_len | 3408 * +-------------------------------+ 3409 * | tx_delay_array_len | 3410 * +-------------------------------+ 3411 * | rx_mpdu_aggr_array_len | 3412 * +-------------------------------+ 3413 * | rx_mcs_array_len | 3414 * +-------------------------------+ 3415 * | pointer to CCA stats | 3416 * +-------------------------------+ 3417 * | pointer to peer stats | 3418 * +-------------------------------+ 3419 * | CCA stats | 3420 * +-------------------------------+ 3421 * | peer_stats |----+ 3422 * +-------------------------------+ | 3423 * | per peer signals stats |<---+ 3424 * | peer0 ~ peern | | 3425 * +-------------------------------+ | 3426 * | TX aggr/mcs parameters array | | 3427 * | Length of this buffer is | | 3428 * | configurable for user layer. |<-+ | 3429 * +-------------------------------+ | | 3430 * | per peer tx stats |--+ | 3431 * | BE | <--+ 3432 * | BK | | 3433 * | VI | | 3434 * | VO | | 3435 * +-------------------------------+ | 3436 * | TX aggr/mcs parameters array | | 3437 * | Length of this buffer is | | 3438 * | configurable for user layer. |<-+ | 3439 * +-------------------------------+ | | 3440 * | peer peer rx stats |--+ | 3441 * | BE | <--+ 3442 * | BE | 3443 * | BK | 3444 * | VI | 3445 * | VO | 3446 * --------------------------------- 3447 */ 3448 struct sir_wifi_ll_ext_stats { 3449 uint32_t trigger_cond_id; 3450 uint32_t cca_chgd_bitmap; 3451 uint32_t sig_chgd_bitmap; 3452 uint32_t tx_chgd_bitmap; 3453 uint32_t rx_chgd_bitmap; 3454 uint8_t peer_num; 3455 uint8_t channel_num; 3456 uint32_t tx_mpdu_aggr_array_len; 3457 uint32_t tx_succ_mcs_array_len; 3458 uint32_t tx_fail_mcs_array_len; 3459 uint32_t tx_delay_array_len; 3460 uint32_t rx_mpdu_aggr_array_len; 3461 uint32_t rx_mcs_array_len; 3462 struct sir_wifi_ll_ext_peer_stats *peer_stats; 3463 struct sir_wifi_chan_cca_stats *cca; 3464 uint8_t stats[]; 3465 }; 3466 3467 /** 3468 * struct sir_channel_cca_threshold - threshold for channel CCA 3469 * @idle_time: idle time, no TX, no RX, no interference 3470 * @tx_time: time transmitting packets 3471 * @rx_in_bss_time: time receiving packets in current BSSs 3472 * @rx_out_bss_time: time receiving packets not in current BSSs 3473 * @rx_busy_time: time interference detected 3474 * @rx_in_bad_cond_time: receiving packets with errors 3475 * @tx_in_bad_cond_time: time transmitted packets not been ACKed 3476 * @wlan_not_avail_time: wlan card cannot work 3477 */ 3478 struct sir_channel_cca_threshold { 3479 uint32_t idle_time; 3480 uint32_t tx_time; 3481 uint32_t rx_in_bss_time; 3482 uint32_t rx_out_bss_time; 3483 uint32_t rx_busy_time; 3484 uint32_t rx_in_bad_cond_time; 3485 uint32_t tx_in_bad_cond_time; 3486 uint32_t wlan_not_avail_time; 3487 }; 3488 3489 /** 3490 * struct sir_signal_threshold - threshold for per peer sigbal 3491 * @snr: signal to noise rate 3492 * @nf: noise floor 3493 */ 3494 struct sir_signal_threshold { 3495 uint32_t snr; 3496 uint32_t nf; 3497 }; 3498 3499 /** 3500 * struct sir_tx_threshold - threshold for TX 3501 * @msdu: TX MSDUs on MAC layer 3502 * @mpdu: TX MPDUs on MAC layer 3503 * @ppdu: TX PPDUs on MAC layer 3504 * @bytes: TX bytes on MAC layer 3505 * @msdu_drop: drooped MSDUs 3506 * @byte_drop: dropped Bytes 3507 * @mpdu_retry: MPDU not acked 3508 * @ppdu_fail: PPDUs which received no block ack 3509 * @aggregation: aggregation size 3510 * @succ_mcs: histogram of encoding rate for acked PPDUs 3511 * @fail_mcs: histogram of encoding rate for no-acked PPDUs 3512 */ 3513 struct sir_tx_threshold { 3514 uint32_t msdu; 3515 uint32_t mpdu; 3516 uint32_t ppdu; 3517 uint32_t bytes; 3518 uint32_t msdu_drop; 3519 uint32_t byte_drop; 3520 uint32_t mpdu_retry; 3521 uint32_t mpdu_fail; 3522 uint32_t ppdu_fail; 3523 uint32_t aggregation; 3524 uint32_t succ_mcs; 3525 uint32_t fail_mcs; 3526 uint32_t delay; 3527 }; 3528 3529 /** 3530 * struct sir_rx_threshold - threshold for RX 3531 * @mpdu: RX MPDUs on MAC layer 3532 * @bytes: RX bytes on MAC layer 3533 * @ppdu: RX PPDU on PHY layer 3534 * @ppdu_bytes: RX bytes on PHY layer 3535 * @disorder: discontinuity in seqnum 3536 * @mpdu_retry: MPDUs flagged as retry 3537 * @mpdu_dup: MPDUs identified as duplicated 3538 * @aggregation: aggregation size 3539 * @mcs: histogram of encoding rate for PPDUs 3540 * @ps_inds: power save indication 3541 * @ps_durs: total time in power save 3542 * @probe_reqs: probe request received 3543 * @other_mgmt: other MGMT frames received 3544 */ 3545 struct sir_rx_threshold { 3546 uint32_t mpdu; 3547 uint32_t bytes; 3548 uint32_t ppdu; 3549 uint32_t ppdu_bytes; 3550 uint32_t disorder; 3551 uint32_t mpdu_lost; 3552 uint32_t mpdu_retry; 3553 uint32_t mpdu_dup; 3554 uint32_t mpdu_discard; 3555 uint32_t aggregation; 3556 uint32_t mcs; 3557 uint32_t ps_inds; 3558 uint32_t ps_durs; 3559 uint32_t probe_reqs; 3560 uint32_t other_mgmt; 3561 }; 3562 3563 /** 3564 * struct sir_wifi_ll_ext_stats_threshold - Threshold for stats update 3565 * @period: MAC counter indication period (unit in ms) 3566 * @enable: if threshold mechanism is enabled or disabled 3567 * @enable_bitmap: whether dedicated threshold is enabed. 3568 * Every MAC counter has a dedicated threshold. If the dedicated 3569 * threshold is not set in the bitmap, global threshold will take 3570 * effect. 3571 * @global: whether clobal threshold is enabled. 3572 * When both global and dedicated threshold are disabled, MAC counter 3573 * will indicate stats periodically. 3574 * @global_threshold: global threshold value 3575 * @cca_bitmap: bitmap for CCA. 3576 * Bit0: idle time 3577 * Bit1: tx time 3578 * Bit2: RX in BSS 3579 * Bit3: RX out of BSS 3580 * Bit4: medium busy 3581 * Bit5: RX bad 3582 * Bit6: TX bad 3583 * Bit7: WLAN card not available 3584 * @signal_bitmap: 3585 * Bit0: Per channel SNR counter 3586 * Bit1: Per channel noise floor counter 3587 * @tx_bitmap: bitmap for TX counters 3588 * Bit0: TX counter unit in MSDU 3589 * Bit1: TX counter unit in MPDU 3590 * Bit2: TX counter unit in PPDU 3591 * Bit3: TX counter unit in byte 3592 * Bit4: Dropped MSDUs 3593 * Bit5: Dropped Bytes 3594 * Bit6: MPDU retry counter 3595 * Bit7: MPDU failure counter 3596 * Bit8: PPDU failure counter 3597 * Bit9: MPDU aggregation counter 3598 * Bit10: MCS counter for ACKed MPDUs 3599 * Bit11: MCS counter for Failed MPDUs 3600 * Bit12: TX Delay counter 3601 * @rx_bitmap:bitmap for RX counters 3602 * Bit0: MAC RX counter unit in MPDU 3603 * Bit1: MAC RX counter unit in byte 3604 * Bit2: PHY RX counter unit in PPDU 3605 * Bit3: PHY RX counter unit in byte 3606 * Bit4: Disorder counter 3607 * Bit5: Retry counter 3608 * Bit6: Duplication counter 3609 * Bit7: Discard counter 3610 * Bit8: MPDU aggregation size counter 3611 * Bit9: MCS counter 3612 * Bit10: Peer STA power state change (wake to sleep) counter 3613 * Bit11: Peer STA power save counter, total time in PS mode 3614 * Bit12: Probe request counter 3615 * Bit13: Other management frames counter 3616 * @cca_thresh: CCA threshold 3617 * @signal_thresh: signal threshold 3618 * @tx_thresh: TX threshold 3619 * @rx_thresh: RX threshold 3620 * 3621 * Generally, Link layer statistics is reported periodically. But if the 3622 * variation of one stats of compared to the previous notification exceeds 3623 * a threshold, FW will report the new stats immediately. 3624 * This structure contains threshold for different counters. 3625 */ 3626 struct sir_ll_ext_stats_threshold { 3627 uint32_t period; 3628 uint32_t enable; 3629 uint32_t enable_bitmap; 3630 uint32_t global; 3631 uint32_t global_threshold; 3632 uint32_t cca_bitmap; 3633 uint32_t signal_bitmap; 3634 uint32_t tx_bitmap; 3635 uint32_t rx_bitmap; 3636 struct sir_channel_cca_threshold cca; 3637 struct sir_signal_threshold signal; 3638 struct sir_tx_threshold tx; 3639 struct sir_rx_threshold rx; 3640 }; 3641 3642 #define LL_STATS_MIN_PERIOD 10 3643 #define LL_STATS_INVALID_PERIOD 0xFFFFFFFF 3644 3645 /* Result ID for LL stats extension */ 3646 #define WMI_LL_STATS_EXT_PS_CHG 0x00000100 3647 #define WMI_LL_STATS_EXT_TX_FAIL 0x00000200 3648 #define WMI_LL_STATS_EXT_MAC_COUNTER 0x00000400 3649 #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ 3650 3651 typedef struct sAniGetLinkStatus { 3652 uint16_t msgType; /* message type is same as the request type */ 3653 uint16_t msgLen; /* length of the entire request */ 3654 uint8_t linkStatus; 3655 uint8_t sessionId; 3656 } tAniGetLinkStatus, *tpAniGetLinkStatus; 3657 3658 /** 3659 * struct sir_lost_link_info - lost link information structure. 3660 * 3661 * @vdev_id: vdev_id from WMA. some modules call sessionId. 3662 * @rssi: rssi at disconnection time. 3663 * 3664 * driver uses this structure to communicate information collected at 3665 * disconnection time. 3666 */ 3667 struct sir_lost_link_info { 3668 uint32_t vdev_id; 3669 int32_t rssi; 3670 }; 3671 3672 /* find the size of given member within a structure */ 3673 #ifndef member_size 3674 #define member_size(type, member) (sizeof(((type *)0)->member)) 3675 #endif 3676 3677 #define RTT_INVALID 0x00 3678 #define RTT_TIMING_MEAS_CAPABILITY 0x01 3679 #define RTT_FINE_TIME_MEAS_INITIATOR_CAPABILITY 0x02 3680 #define RTT_FINE_TIME_MEAS_RESPONDER_CAPABILITY 0x03 3681 3682 /* number of neighbor reports that we can handle in Neighbor Report Response */ 3683 #define MAX_SUPPORTED_NEIGHBOR_RPT 15 3684 3685 /** 3686 * struct sir_stats_avg_factor 3687 * @vdev_id: session id 3688 * @stats_avg_factor: average factor 3689 */ 3690 struct sir_stats_avg_factor { 3691 uint8_t vdev_id; 3692 uint16_t stats_avg_factor; 3693 }; 3694 3695 /** 3696 * struct sir_guard_time_request 3697 * @vdev_id: session id 3698 * @guard_time: guard time 3699 */ 3700 struct sir_guard_time_request { 3701 uint8_t vdev_id; 3702 uint32_t guard_time; 3703 }; 3704 3705 /* Max number of rates allowed in Supported Rates IE */ 3706 #define MAX_NUM_SUPPORTED_RATES (8) 3707 3708 /** 3709 * struct rssi_breach_event - rssi breached event structure 3710 * @request_id: request id 3711 * @session_id: session id 3712 * @curr_rssi: current rssi 3713 * @curr_bssid: current bssid 3714 */ 3715 struct rssi_breach_event { 3716 uint32_t request_id; 3717 uint32_t session_id; 3718 int8_t curr_rssi; 3719 struct qdf_mac_addr curr_bssid; 3720 }; 3721 3722 /** 3723 * struct chip_pwr_save_fail_detected_params - chip power save failure detected 3724 * event params 3725 * @failure_reason_code:failure reason code 3726 * @wake_lock_bitmap:bitmap for modules voting against sleep for long duration. 3727 */ 3728 struct chip_pwr_save_fail_detected_params { 3729 uint32_t failure_reason_code; 3730 uint32_t wake_lock_bitmap[4]; 3731 }; 3732 3733 #define MAX_NUM_FW_SEGMENTS 4 3734 3735 /** 3736 * DEFAULT_SCAN_IE_ID - Identifier for the collection of IE's added 3737 * by default to the probe request 3738 */ 3739 #define DEFAULT_SCAN_IE_ID 256 3740 3741 /* MAX_DEFAULT_SCAN_IE_LEN - Maximum length of Default Scan IE's */ 3742 #define MAX_DEFAULT_SCAN_IE_LEN 2048 3743 3744 /* Extended Capabilities IE header(IE Id + IE Length) length */ 3745 #define EXT_CAP_IE_HDR_LEN 2 3746 3747 /** 3748 * struct hdd_default_scan_ie - HDD default scan IE structure 3749 * @message_type: message type to be set with eWNI_SME_DEFAULT_SCAN_IE 3750 * @length: length of the struct hdd_default_scan_ie 3751 * @vdev_id: vdev_id 3752 * @ie_len: Default scan IE length 3753 * @ie_data: Pointer to default scan IE data 3754 */ 3755 struct hdd_default_scan_ie { 3756 uint16_t message_type; 3757 uint16_t length; 3758 uint16_t vdev_id; 3759 uint16_t ie_len; 3760 uint8_t ie_data[MAX_DEFAULT_SCAN_IE_LEN]; 3761 }; 3762 3763 /** 3764 * struct vdev_ie_info - IE info 3765 * @vdev_id - vdev for which the IE is being sent 3766 * @ie_id - ID of the IE 3767 * @length - length of the IE data 3768 * @band - indicates IE is intended for which band 3769 * @data - IE data 3770 * 3771 * This structure is used to store the IE information. 3772 */ 3773 struct vdev_ie_info { 3774 uint32_t vdev_id; 3775 uint32_t ie_id; 3776 uint32_t length; 3777 uint32_t band; 3778 uint8_t *data; 3779 }; 3780 3781 /** 3782 * struct send_extcap_ie - used to pass send_extcap_ie msg from SME to PE 3783 * @type - MSG type 3784 * @length - length of the message 3785 * @seesion_id - session_id for which the message is intended for 3786 * 3787 * This structure is used to pass send_extcap_ie msg from SME to PE 3788 */ 3789 struct send_extcap_ie { 3790 uint16_t msg_type; /* eWNI_SME_SET_IE_REQ */ 3791 uint16_t length; 3792 uint8_t session_id; 3793 }; 3794 3795 typedef void (*antenna_mode_cb)(uint32_t status, void *context); 3796 3797 /** 3798 * struct cfg_action_frm_tb_ppdu - action frame TB PPDU cfg 3799 * @vdev_id - vdev id 3800 * @cfg - enable/disable 3801 * @frm_len - frame length 3802 * @data - frame data 3803 * 3804 * This structure is used to cfg action frame tb ppdu. 3805 */ 3806 struct cfg_action_frm_tb_ppdu { 3807 uint8_t vdev_id; 3808 uint8_t cfg; 3809 uint8_t frm_len; 3810 uint8_t *data; 3811 }; 3812 3813 /** 3814 * struct sir_nss_update_request 3815 * @msgType: nss update msg type 3816 * @msgLen: length of the msg 3817 * @new_nss: new spatial stream value 3818 * @ch_width: channel width - optional 3819 * @vdev_id: session id 3820 */ 3821 struct sir_nss_update_request { 3822 uint16_t msgType; 3823 uint16_t msgLen; 3824 uint8_t new_nss; 3825 uint8_t ch_width; 3826 uint32_t vdev_id; 3827 }; 3828 3829 /** 3830 * struct sir_sap_ch_width_update 3831 * @msgType: ch_width update msg type 3832 * @msgLen: length of the msg 3833 * @ch_width: channel width 3834 * @vdev_id: vdev id 3835 */ 3836 struct sir_sap_ch_width_update { 3837 uint16_t msgType; 3838 uint16_t msgLen; 3839 enum phy_ch_width ch_width; 3840 uint32_t vdev_id; 3841 }; 3842 3843 /** 3844 * enum sir_bcn_update_reason: bcn update reason 3845 * @REASON_DEFAULT: reason default 3846 * @REASON_NSS_UPDATE: If NSS is updated 3847 * @REASON_CONFIG_UPDATE: Config update 3848 * @REASON_SET_HT2040: HT2040 update 3849 * @REASON_COLOR_CHANGE: Color change 3850 * @REASON_CHANNEL_SWITCH: channel switch 3851 * @REASON_MLO_IE_UPDATE: mlo ie update 3852 * @REASON_RNR_UPDATE: SAP is changed, notify co-located SAP 3853 */ 3854 enum sir_bcn_update_reason { 3855 REASON_DEFAULT = 0, 3856 REASON_NSS_UPDATE = 1, 3857 REASON_CONFIG_UPDATE = 2, 3858 REASON_SET_HT2040 = 3, 3859 REASON_COLOR_CHANGE = 4, 3860 REASON_CHANNEL_SWITCH = 5, 3861 REASON_MLO_IE_UPDATE = 6, 3862 REASON_RNR_UPDATE = 7, 3863 REASON_CH_WIDTH_UPDATE = 8, 3864 }; 3865 3866 /** 3867 * struct sir_bcn_update_rsp 3868 * 3869 * @vdev_id: session for which bcn was updated 3870 * @reason: bcn update reason 3871 * @status: status of the beacon sent to FW 3872 */ 3873 struct sir_bcn_update_rsp { 3874 uint8_t vdev_id; 3875 enum sir_bcn_update_reason reason; 3876 QDF_STATUS status; 3877 }; 3878 3879 struct sir_qos_params { 3880 uint8_t aifsn; 3881 uint8_t cwmin; 3882 uint8_t cwmax; 3883 }; 3884 3885 /** 3886 * struct sir_sme_ext_change_chan_req - channel change request 3887 * @message_type: message id 3888 * @length: msg length 3889 * @new_channel: new channel 3890 * @vdev_id: vdev id 3891 */ 3892 struct sir_sme_ext_cng_chan_req { 3893 uint16_t message_type; /* eWNI_SME_EXT_CHANGE_CHANNEL */ 3894 uint16_t length; 3895 uint32_t new_ch_freq; 3896 uint8_t vdev_id; 3897 }; 3898 3899 #define IGNORE_NUD_FAIL 0 3900 #define DISCONNECT_AFTER_NUD_FAIL 1 3901 #define ROAM_AFTER_NUD_FAIL 2 3902 #define DISCONNECT_AFTER_ROAM_FAIL 3 3903 3904 /** 3905 * struct sir_sme_ext_change_chan_ind. 3906 * @session_id: session id 3907 * @new_chan_freq: new channel frequency to change to 3908 */ 3909 struct sir_sme_ext_cng_chan_ind { 3910 uint8_t session_id; 3911 uint32_t new_chan_freq; 3912 }; 3913 3914 /** 3915 * struct stsf - the basic stsf structure 3916 * 3917 * @vdev_id: vdev id 3918 * @tsf_low: low 32bits of tsf 3919 * @tsf_high: high 32bits of tsf 3920 * @soc_timer_low: low 32bits of synced SOC timer value 3921 * @soc_timer_high: high 32bits of synced SOC timer value 3922 * @global_tsf_low: low 32bits of tsf64 3923 * @global_tsf_high: high 32bits of tsf64 3924 * @mac_id: MAC identifier 3925 * @mac_id_valid: Indicate if mac_id is valid or not 3926 * @tsf_id: TSF-ID corresponding to the TSF value 3927 * @tsf_id_valid: flag indicating whether TSD-ID is valid 3928 * 3929 * Driver uses this structure to store the tsf information. 3930 */ 3931 struct stsf { 3932 uint32_t vdev_id; 3933 uint32_t tsf_low; 3934 uint32_t tsf_high; 3935 uint32_t soc_timer_low; 3936 uint32_t soc_timer_high; 3937 uint32_t global_tsf_low; 3938 uint32_t global_tsf_high; 3939 uint32_t mac_id; 3940 uint32_t mac_id_valid; 3941 uint32_t tsf_id; 3942 uint32_t tsf_id_valid; 3943 }; 3944 3945 /* ie + extn ie */ 3946 #define SIR_BCN_FLT_MAX_ELEMS_IE_LIST (8 + 8) 3947 /** 3948 * struct beacon_filter_param - parameters for beacon filtering 3949 * @vdev_id: vdev id 3950 * @ie_map: bitwise map of IEs that needs to be filtered 3951 * 3952 */ 3953 struct beacon_filter_param { 3954 uint32_t vdev_id; 3955 uint32_t ie_map[SIR_BCN_FLT_MAX_ELEMS_IE_LIST]; 3956 }; 3957 3958 /** 3959 * struct adaptive_dwelltime_params - the adaptive dwelltime params 3960 * @vdev_id: vdev id 3961 * @is_enabled: Adaptive dwell time is enabled/disabled 3962 * @dwelltime_mode: global default adaptive dwell mode 3963 * @lpf_weight: weight to calculate the average low pass 3964 * filter for channel congestion 3965 * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec 3966 * @wifi_act_threshold: % of wifi activity used in passive scan 0-100 3967 * 3968 */ 3969 struct adaptive_dwelltime_params { 3970 uint32_t vdev_id; 3971 bool is_enabled; 3972 uint8_t dwelltime_mode; 3973 uint8_t lpf_weight; 3974 uint8_t passive_mon_intval; 3975 uint8_t wifi_act_threshold; 3976 }; 3977 3978 /** 3979 * enum obss_ht40_scancmd_type - obss scan command type 3980 * @HT40_OBSS_SCAN_PARAM_START: OBSS scan start 3981 * @HT40_OBSS_SCAN_PARAM_UPDATE: OBSS scan param update 3982 */ 3983 enum obss_ht40_scancmd_type { 3984 HT40_OBSS_SCAN_PARAM_START, 3985 HT40_OBSS_SCAN_PARAM_UPDATE 3986 }; 3987 3988 /** 3989 * struct sme_obss_ht40_scanind_msg - sme obss scan params 3990 * @msg_type: message type 3991 * @length: message length 3992 * @mac_addr: mac address 3993 */ 3994 struct sme_obss_ht40_scanind_msg { 3995 uint16_t msg_type; 3996 uint16_t length; 3997 struct qdf_mac_addr mac_addr; 3998 }; 3999 4000 /** 4001 * struct obss_ht40_scanind - ht40 obss scan request 4002 * @cmd: message type 4003 * @scan_type: message length 4004 * @obss_passive_dwelltime: obss passive dwelltime 4005 * @obss_active_dwelltime: obss active dwelltime 4006 * @obss_width_trigger_interval: scan interval 4007 * @obss_passive_total_per_channel: total passive scan time per channel 4008 * @obss_active_total_per_channel: total active scan time per channel 4009 * @bsswidth_ch_trans_delay: OBSS transition delay time 4010 * @obss_activity_threshold: OBSS activity threshold 4011 * @self_sta_idx: self sta identification 4012 * @bss_id: BSS index 4013 * @fortymhz_intolerent: Ht40mhz intolerance 4014 * @channel_count: channel count 4015 * @chan_freq_list: List of channel frequencies in MHz 4016 * @current_operatingclass: operating class 4017 * @iefield_len: ie's length 4018 * @iefiled: ie's information 4019 */ 4020 struct obss_ht40_scanind { 4021 enum obss_ht40_scancmd_type cmd; 4022 enum eSirScanType scan_type; 4023 /* In TUs */ 4024 uint16_t obss_passive_dwelltime; 4025 uint16_t obss_active_dwelltime; 4026 /* In seconds */ 4027 uint16_t obss_width_trigger_interval; 4028 /* In TU's */ 4029 uint16_t obss_passive_total_per_channel; 4030 uint16_t obss_active_total_per_channel; 4031 uint16_t bsswidth_ch_trans_delay; 4032 uint16_t obss_activity_threshold; 4033 uint8_t self_sta_idx; 4034 uint8_t bss_id; 4035 uint8_t fortymhz_intolerent; 4036 uint8_t channel_count; 4037 uint32_t chan_freq_list[CFG_VALID_CHANNEL_LIST_LEN]; 4038 uint8_t current_operatingclass; 4039 uint16_t iefield_len; 4040 uint8_t iefield[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE]; 4041 }; 4042 4043 /** 4044 * struct obss_scanparam - OBSS scan parameters 4045 * @obss_passive_dwelltime: message type 4046 * @obss_active_dwelltime: message length 4047 * @obss_width_trigger_interval: obss passive dwelltime 4048 * @obss_passive_total_per_channel: obss passive total scan time 4049 * @obss_active_total_per_channel: obss active total scan time 4050 * @bsswidth_ch_trans_delay: OBSS transition delay time 4051 * @obss_activity_threshold: OBSS activity threshold 4052 */ 4053 struct obss_scanparam { 4054 uint16_t obss_passive_dwelltime; 4055 uint16_t obss_active_dwelltime; 4056 uint16_t obss_width_trigger_interval; 4057 uint16_t obss_passive_total_per_channel; 4058 uint16_t obss_active_total_per_channel; 4059 uint16_t bsswidth_ch_trans_delay; 4060 uint16_t obss_activity_threshold; 4061 }; 4062 4063 /** 4064 * struct sir_apf_set_offload - set apf filter instructions 4065 * @session_id: session identifier 4066 * @version: host apf version 4067 * @filter_id: Filter ID for APF filter 4068 * @total_length: The total length of the full instruction 4069 * total_length equal to 0 means reset 4070 * @current_offset: current offset, 0 means start a new setting 4071 * @current_length: Length of current @program 4072 * @program: APF instructions 4073 */ 4074 struct sir_apf_set_offload { 4075 uint8_t session_id; 4076 uint32_t version; 4077 uint32_t filter_id; 4078 uint32_t total_length; 4079 uint32_t current_offset; 4080 uint32_t current_length; 4081 uint8_t *program; 4082 }; 4083 4084 /** 4085 * struct sir_apf_offload_capabilities - get apf Capabilities 4086 * @apf_version: fw's implement version 4087 * @max_apf_filters: max filters that fw supports 4088 * @max_bytes_for_apf_inst: the max bytes that can be used as apf instructions 4089 */ 4090 struct sir_apf_get_offload { 4091 uint32_t apf_version; 4092 uint32_t max_apf_filters; 4093 uint32_t max_bytes_for_apf_inst; 4094 }; 4095 4096 #ifdef WLAN_FEATURE_NAN 4097 /** 4098 * enum ndp_end_type - NDP end type 4099 * @NDP_END_TYPE_UNSPECIFIED: type is unspecified 4100 * @NDP_END_TYPE_PEER_UNAVAILABLE: type is peer unavailable 4101 * @NDP_END_TYPE_OTA_FRAME: NDP end frame received from peer 4102 * 4103 */ 4104 enum ndp_end_type { 4105 NDP_END_TYPE_UNSPECIFIED = 0x00, 4106 NDP_END_TYPE_PEER_UNAVAILABLE = 0x01, 4107 NDP_END_TYPE_OTA_FRAME = 0x02, 4108 }; 4109 4110 /** 4111 * enum ndp_end_reason_code - NDP end reason code 4112 * @NDP_END_REASON_UNSPECIFIED: reason is unspecified 4113 * @NDP_END_REASON_INACTIVITY: reason is peer inactivity 4114 * @NDP_END_REASON_PEER_DATA_END: data end indication received from peer 4115 * 4116 */ 4117 enum ndp_end_reason_code { 4118 NDP_END_REASON_UNSPECIFIED = 0x00, 4119 NDP_END_REASON_INACTIVITY = 0x01, 4120 NDP_END_REASON_PEER_DATA_END = 0x02, 4121 }; 4122 4123 /** 4124 * enum nan_status_type - NDP status type 4125 * @NDP_RSP_STATUS_SUCCESS: request was successful 4126 * @NDP_RSP_STATUS_ERROR: request failed 4127 */ 4128 enum nan_status_type { 4129 NDP_RSP_STATUS_SUCCESS = 0x00, 4130 NDP_RSP_STATUS_ERROR = 0x01, 4131 }; 4132 4133 /** 4134 * enum nan_reason_code - NDP command rsp reason code value 4135 * @NDP_UNSUPPORTED_CONCURRENCY: Will be used in unsupported concurrency cases 4136 * @NDP_NAN_DATA_IFACE_CREATE_FAILED: ndi create failed 4137 * @NDP_NAN_DATA_IFACE_DELETE_FAILED: ndi delete failed 4138 * @NDP_DATA_INITIATOR_REQ_FAILED: data initiator request failed 4139 * @NDP_DATA_RESPONDER_REQ_FAILED: data responder request failed 4140 * @NDP_INVALID_SERVICE_INSTANCE_ID: invalid service instance id 4141 * @NDP_INVALID_NDP_INSTANCE_ID: invalid ndp instance id 4142 * @NDP_INVALID_RSP_CODE: invalid response code in ndp responder request 4143 * @NDP_INVALID_APP_INFO_LEN: invalid app info length 4144 * @NDP_NMF_REQ_FAIL: OTA nan mgmt frame failure for data request 4145 * @NDP_NMF_RSP_FAIL: OTA nan mgmt frame failure for data response 4146 * @NDP_NMF_CNF_FAIL: OTA nan mgmt frame failure for confirm 4147 * @NDP_END_FAILED: ndp end failed 4148 * @NDP_NMF_END_REQ_FAIL: OTA nan mgmt frame failure for data end 4149 * @NDP_VENDOR_SPECIFIC_ERROR: other vendor specific failures 4150 */ 4151 enum nan_reason_code { 4152 NDP_UNSUPPORTED_CONCURRENCY = 9000, 4153 NDP_NAN_DATA_IFACE_CREATE_FAILED = 9001, 4154 NDP_NAN_DATA_IFACE_DELETE_FAILED = 9002, 4155 NDP_DATA_INITIATOR_REQ_FAILED = 9003, 4156 NDP_DATA_RESPONDER_REQ_FAILED = 9004, 4157 NDP_INVALID_SERVICE_INSTANCE_ID = 9005, 4158 NDP_INVALID_NDP_INSTANCE_ID = 9006, 4159 NDP_INVALID_RSP_CODE = 9007, 4160 NDP_INVALID_APP_INFO_LEN = 9008, 4161 NDP_NMF_REQ_FAIL = 9009, 4162 NDP_NMF_RSP_FAIL = 9010, 4163 NDP_NMF_CNF_FAIL = 9011, 4164 NDP_END_FAILED = 9012, 4165 NDP_NMF_END_REQ_FAIL = 9013, 4166 /* 9500 onwards vendor specific error codes */ 4167 NDP_VENDOR_SPECIFIC_ERROR = 9500, 4168 }; 4169 4170 /** 4171 * struct ndi_create_rsp - ndi create response params 4172 * @status: request status 4173 * @reason: reason if any 4174 * 4175 */ 4176 struct ndi_create_rsp { 4177 uint32_t status; 4178 uint32_t reason; 4179 uint8_t sta_id; 4180 }; 4181 4182 /** 4183 * struct ndi_delete_rsp - ndi delete response params 4184 * @status: request status 4185 * @reason: reason if any 4186 * 4187 */ 4188 struct ndi_delete_rsp { 4189 uint32_t status; 4190 uint32_t reason; 4191 }; 4192 4193 /** 4194 * struct peer_ndp_map - mapping of NDP instances to peer to VDEV 4195 * @vdev_id: session id of the interface over which ndp is being created 4196 * @peer_ndi_mac_addr: peer NDI mac address 4197 * @num_active_ndp_sessions: number of active NDP sessions on the peer 4198 * @type: NDP end indication type 4199 * @reason_code: NDP end indication reason code 4200 * @ndp_instance_id: NDP instance ID 4201 * 4202 */ 4203 struct peer_ndp_map { 4204 uint32_t vdev_id; 4205 struct qdf_mac_addr peer_ndi_mac_addr; 4206 uint32_t num_active_ndp_sessions; 4207 enum ndp_end_type type; 4208 enum ndp_end_reason_code reason_code; 4209 uint32_t ndp_instance_id; 4210 }; 4211 4212 #endif /* WLAN_FEATURE_NAN */ 4213 4214 /** 4215 * struct sir_p2p_lo_start - p2p listen offload start 4216 * @vdev_id: vdev identifier 4217 * @ctl_flags: control flag 4218 * @freq: p2p listen frequency 4219 * @period: listen offload period 4220 * @interval: listen offload interval 4221 * @count: number listen offload intervals 4222 * @device_types: device types 4223 * @dev_types_len: device types length 4224 * @probe_resp_tmplt: probe response template 4225 * @probe_resp_len: probe response template length 4226 */ 4227 struct sir_p2p_lo_start { 4228 uint32_t vdev_id; 4229 uint32_t ctl_flags; 4230 uint32_t freq; 4231 uint32_t period; 4232 uint32_t interval; 4233 uint32_t count; 4234 uint8_t *device_types; 4235 uint32_t dev_types_len; 4236 uint8_t *probe_resp_tmplt; 4237 uint32_t probe_resp_len; 4238 }; 4239 4240 /** 4241 * struct sir_p2p_lo_event - P2P listen offload stop event 4242 * @vdev_id: vdev identifier 4243 * @reason_code: P2P listen offload stop reason 4244 */ 4245 struct sir_p2p_lo_event { 4246 uint32_t vdev_id; 4247 uint32_t reason_code; 4248 }; 4249 4250 /** 4251 * struct sir_hal_pwr_dbg_cmd - unit test command parameters 4252 * @pdev_id: pdev id 4253 * @module_id: module id 4254 * @num_args: number of arguments 4255 * @args: arguments 4256 */ 4257 struct sir_mac_pwr_dbg_cmd { 4258 uint32_t pdev_id; 4259 uint32_t module_id; 4260 uint32_t num_args; 4261 uint32_t args[MAX_POWER_DBG_ARGS_SUPPORTED]; 4262 }; 4263 4264 /** 4265 * struct sme_send_disassoc_frm_req - send disassoc request frame 4266 * @msg_type: message type 4267 * @length: length of message 4268 * @vdev_id: vdev id 4269 * @peer_mac: peer mac address 4270 * @reason: reason for disassoc 4271 * @wait_for_ack: wait for acknowledgment 4272 **/ 4273 struct sme_send_disassoc_frm_req { 4274 uint16_t msg_type; 4275 uint16_t length; 4276 uint8_t vdev_id; 4277 uint8_t peer_mac[6]; 4278 uint16_t reason; 4279 uint8_t wait_for_ack; 4280 }; 4281 4282 /** 4283 * struct sme_update_access_policy_vendor_ie - update vendor ie and access 4284 * policy 4285 * @msg_type: message id 4286 * @msg_len: message length 4287 * @vdev_id: vdev id 4288 * @ie: vendor ie 4289 * @access_policy: access policy for vendor ie 4290 */ 4291 struct sme_update_access_policy_vendor_ie { 4292 uint16_t msg_type; 4293 uint16_t length; 4294 uint32_t vdev_id; 4295 uint8_t ie[WLAN_MAX_IE_LEN + 2]; 4296 uint8_t access_policy; 4297 }; 4298 4299 /** 4300 * struct sme_tx_fail_cnt_threshold - tx failure count for disconnect to fw 4301 * @session_id: Session id 4302 * @tx_fail_cnt_threshold: Tx failure count to do disconnect 4303 */ 4304 struct sme_tx_fail_cnt_threshold { 4305 uint8_t session_id; 4306 uint32_t tx_fail_cnt_threshold; 4307 }; 4308 4309 /** 4310 * struct sme_short_retry_limit - transmission retry limit for short frames. 4311 * @session_id: Session id 4312 * @short_retry_limit: transmission retry limit for short frame. 4313 * 4314 */ 4315 struct sme_short_retry_limit { 4316 uint8_t session_id; 4317 uint32_t short_retry_limit; 4318 }; 4319 4320 /** 4321 * struct sme_long_retry_limit - transmission retry limit for long frames 4322 * @session_id: Session id 4323 * @short_retry_limit: transmission retry limit for long frames. 4324 * 4325 */ 4326 struct sme_long_retry_limit { 4327 uint8_t session_id; 4328 uint32_t long_retry_limit; 4329 }; 4330 4331 /** 4332 * struct sme_addba_accept - Allow/reject the addba request frame 4333 * @session_id: Session id 4334 * @addba_accept: Allow/reject the addba request frame 4335 */ 4336 struct sme_addba_accept { 4337 uint8_t session_id; 4338 uint8_t addba_accept; 4339 }; 4340 4341 /** 4342 * struct sme_sta_inactivity_timeout - set sta_inactivity_timeout 4343 * @session_id: session Id. 4344 * @sta_inactivity_timeout: Timeout to disconnect STA after there 4345 * is no activity. 4346 */ 4347 struct sme_sta_inactivity_timeout { 4348 uint8_t session_id; 4349 uint32_t sta_inactivity_timeout; 4350 }; 4351 4352 /** 4353 * struct sme_vdev_pause - Pause vdev for a defined time interval 4354 * @session_id: Session id 4355 * @vdev_pause_duration: vdev pause duration 4356 */ 4357 struct sme_vdev_pause { 4358 uint8_t session_id; 4359 uint8_t vdev_pause_duration; 4360 }; 4361 4362 /* 4363 * struct wow_pulse_mode - WoW Pulse set cmd struct 4364 * @wow_pulse_enable: enable or disable this feature 4365 * @wow_pulse_pin: GPIO PIN for Pulse 4366 * @wow_pulse_interval_low: Pulse interval low 4367 * @wow_pulse_interval_high: Pulse interval high 4368 * @wow_pulse_repeat_count: Pulse repeat count 4369 * @wow_pulse_init_state: Pulse init level 4370 * 4371 * SME uses this structure to configure wow pulse info 4372 * and send it to WMA 4373 */ 4374 struct wow_pulse_mode { 4375 bool wow_pulse_enable; 4376 uint8_t wow_pulse_pin; 4377 uint16_t wow_pulse_interval_high; 4378 uint16_t wow_pulse_interval_low; 4379 uint32_t wow_pulse_repeat_count; 4380 uint32_t wow_pulse_init_state; 4381 }; 4382 4383 4384 /** 4385 * umac_send_mb_message_to_mac(): post message to umac 4386 * @msg: opaque message pointer 4387 * 4388 * Return: QDF status 4389 */ 4390 QDF_STATUS umac_send_mb_message_to_mac(void *msg); 4391 4392 /** 4393 * struct scan_chan_info - channel info 4394 * @freq: radio frequence 4395 * @cmd flag: cmd flag 4396 * @noise_floor: noise floor 4397 * @cycle_count: cycle count 4398 * @rx_clear_count: rx clear count 4399 * @tx_frame_count: TX frame count 4400 * @clock_freq: clock frequence MHZ 4401 * @cca_busy_subband_info: CCA busy for each possible 20Mhz subbands 4402 * of the wideband scan channel 4403 */ 4404 struct scan_chan_info { 4405 uint32_t freq; 4406 uint32_t cmd_flag; 4407 uint32_t noise_floor; 4408 uint32_t cycle_count; 4409 uint32_t rx_clear_count; 4410 uint32_t tx_frame_count; 4411 uint32_t clock_freq; 4412 struct wide_band_scan_chan_info subband_info; 4413 }; 4414 4415 /** 4416 * enum wow_resume_trigger - resume trigger override setting values 4417 * @WOW_RESUME_TRIGGER_DEFAULT: fw to use platform default resume trigger 4418 * @WOW_RESUME_TRIGGER_HTC_WAKEUP: force fw to use HTC Wakeup to resume 4419 * @WOW_RESUME_TRIGGER_GPIO: force fw to use GPIO to resume 4420 * @WOW_RESUME_TRIGGER_COUNT: number of resume trigger options 4421 */ 4422 enum wow_resume_trigger { 4423 /* always first */ 4424 WOW_RESUME_TRIGGER_DEFAULT = 0, 4425 WOW_RESUME_TRIGGER_HTC_WAKEUP, 4426 WOW_RESUME_TRIGGER_GPIO, 4427 /* always last */ 4428 WOW_RESUME_TRIGGER_COUNT 4429 }; 4430 4431 /** 4432 * enum wow_interface_pause - interface pause override setting values 4433 * @WOW_INTERFACE_PAUSE_DEFAULT: use platform default interface pause setting 4434 * @WOW_INTERFACE_PAUSE_ENABLE: force interface pause setting to enabled 4435 * @WOW_INTERFACE_PAUSE_DISABLE: force interface pause setting to disabled 4436 * @WOW_INTERFACE_PAUSE_COUNT: number of interface pause options 4437 */ 4438 enum wow_interface_pause { 4439 /* always first */ 4440 WOW_INTERFACE_PAUSE_DEFAULT = 0, 4441 WOW_INTERFACE_PAUSE_ENABLE, 4442 WOW_INTERFACE_PAUSE_DISABLE, 4443 /* always last */ 4444 WOW_INTERFACE_PAUSE_COUNT 4445 }; 4446 4447 /** 4448 * struct wow_enable_params - A collection of wow enable override parameters 4449 * @is_unit_test: true to notify fw this is a unit-test suspend 4450 * @interface_pause: used to override the interface pause indication sent to fw 4451 * @resume_trigger: used to force fw to use a particular resume method 4452 */ 4453 struct wow_enable_params { 4454 bool is_unit_test; 4455 enum wow_interface_pause interface_pause; 4456 enum wow_resume_trigger resume_trigger; 4457 }; 4458 4459 #define HE_LTF_1X 0 4460 #define HE_LTF_2X 1 4461 #define HE_LTF_4X 2 4462 4463 #define HE_LTF_ALL 0x7 4464 #define HE_SGI_MASK 0xFF00 4465 4466 #define AUTO_RATE_GI_400NS 8 4467 #define AUTO_RATE_GI_800NS 9 4468 #define AUTO_RATE_GI_1600NS 10 4469 #define AUTO_RATE_GI_3200NS 11 4470 4471 #define AUTO_RATE_LDPC_DIS_BIT 16 4472 4473 #define SET_AUTO_RATE_SGI_VAL(set_val, bit_mask) \ 4474 (set_val = (set_val & HE_LTF_ALL) | bit_mask) 4475 4476 #define SET_AUTO_RATE_HE_LTF_VAL(set_val, bit_mask) \ 4477 (set_val = (set_val & HE_SGI_MASK) | bit_mask) 4478 4479 #define MSCS_OUI_TYPE "\x58" 4480 #define MSCS_OUI_SIZE 1 4481 4482 #ifdef WLAN_FEATURE_11AX 4483 #define HE_CAP_OUI_TYPE "\x23" 4484 #define HE_CAP_OUI_SIZE 1 4485 #define HE_OP_OUI_TYPE "\x24" 4486 #define HE_OP_OUI_SIZE 1 4487 4488 #define HE_RU_ALLOC_INDX0_MASK (0x01 << 0) 4489 #define HE_RU_ALLOC_INDX1_MASK (0x01 << 1) 4490 #define HE_RU_ALLOC_INDX2_MASK (0x01 << 2) 4491 #define HE_RU_ALLOC_INDX3_MASK (0x01 << 3) 4492 4493 /* 3 bits for NSS and 4 bits for RU Index */ 4494 #define HE_PPET_NSS_LEN 3 4495 #define HE_PEPT_RU_IDX_LEN 4 4496 #define HE_PPET_NSS_RU_LEN (HE_PPET_NSS_LEN + HE_PEPT_RU_IDX_LEN) 4497 #define HE_PPET_SIZE 3 4498 #define HE_BYTE_SIZE 8 4499 4500 struct ppet_hdr { 4501 uint8_t nss:3; 4502 uint8_t ru_idx_mask:4; 4503 uint8_t remaining:1; 4504 }; 4505 4506 /* MAX PPET size = 7 bits + (max_nss X max_ru_number X 6) = 25 bytes */ 4507 #define HE_MAX_PPET_SIZE WNI_CFG_HE_PPET_LEN 4508 4509 #define HE_MAX_PHY_CAP_SIZE 3 4510 4511 #define HE_CH_WIDTH_GET_BIT(ch_wd, bit) (((ch_wd) >> (bit)) & 1) 4512 #define HE_CH_WIDTH_COMBINE(b0, b1, b2, b3, b4, b5, b6) \ 4513 ((uint8_t)(b0) | ((b1) << 1) | ((b2) << 2) | ((b3) << 3) | \ 4514 ((b4) << 4) | ((b5) << 5) | ((b6) << 6)) 4515 #define HE_CH_WIDTH_CLR_BIT(ch_wd, bit) (((ch_wd) >> (bit)) & ~1) 4516 4517 /* 4518 * MCS values are interpreted as in IEEE 11ax-D1.4 spec onwards 4519 * +-----------------------------------------------------+ 4520 * | SS8 | SS7 | SS6 | SS5 | SS4 | SS3 | SS2 | SS1 | 4521 * +-----------------------------------------------------+ 4522 * | 15-14 | 13-12 | 11-10 | 9-8 | 7-6 | 5-4 | 3-2 | 1-0 | 4523 * +-----------------------------------------------------+ 4524 */ 4525 #define HE_MCS_NSS_SHIFT(nss) (((nss) - 1) << 1) 4526 #define HE_MCS_MSK_4_NSS(nss) (3 << HE_MCS_NSS_SHIFT(nss)) 4527 #define HE_MCS_INV_MSK_4_NSS(nss) (~HE_MCS_MSK_4_NSS(nss)) 4528 #define HE_GET_MCS_4_NSS(mcs_set, nss) \ 4529 (((mcs_set) >> HE_MCS_NSS_SHIFT(nss)) & 3) 4530 #define HE_SET_MCS_4_NSS(mcs_set, mcs, nss) \ 4531 (((mcs_set) & HE_MCS_INV_MSK_4_NSS(nss)) | \ 4532 ((mcs) << HE_MCS_NSS_SHIFT(nss))) 4533 #define HE_MCS_IS_NSS_ENABLED(mcs_set, nss) \ 4534 ((HE_MCS_MSK_4_NSS(nss) & (mcs_set)) != HE_MCS_MSK_4_NSS(nss)) 4535 4536 #define HE_MCS_ALL_DISABLED 0xFFFF 4537 4538 #define HE_MCS_0_7 0x0 4539 #define HE_MCS_0_9 0x1 4540 #define HE_MCS_0_11 0x2 4541 #define HE_MCS_DISABLE 0x3 4542 4543 #define HE_6G_MIN_MPDU_START_SAPCE_BIT_POS 0 4544 #define HE_6G_MAX_AMPDU_LEN_EXP_BIT_POS 3 4545 #define HE_6G_MAX_MPDU_LEN_BIT_POS 6 4546 #define HE_6G_SMPS_BIT_POS 9 4547 #define HE_6G_RD_RESP_BIT_POS 11 4548 #define HE_6G_RX_ANT_PATTERN_BIT_POS 12 4549 #define HE_6G_TX_ANT_PATTERN_BIT_POS 13 4550 4551 /* 4552 * Following formuala has been arrived at using karnaugh map and unit tested 4553 * with sample code. Take MCS for each NSS as 2 bit value first and solve for 4554 * 2 bit intersection of NSS. Use following table/Matrix as guide for solving 4555 * K-Maps 4556 * MCS 1\MCS 2 00 01 10 11 4557 * 00 00 00 00 11 4558 * 01 00 01 01 11 4559 * 10 00 01 10 11 4560 * 11 11 11 11 11 4561 * if output MCS is o1o0, then as per K-map reduction: 4562 * o0 = m1.m0 | n1.n0 | (~m1).m0.(n1^n0) | (~n1).n0.(m1^m0) 4563 * o1 = m1.m0 | n1.n0 | m1.(~m0).n1.(~n0) 4564 * 4565 * Please note: Calculating MCS intersection is 80211 protocol specific and 4566 * should be implemented in PE. WMA can use this macro rather than calling any 4567 * lim API to do the intersection. 4568 */ 4569 #define HE_INTERSECT_MCS_BITS_PER_NSS(m1, m0, n1, n0) \ 4570 (((m1 & m0) | (n1 & n0) | (((~m1) & m0) & (n1 ^ n0)) | \ 4571 (((~n1) & n0) & (m1 ^ m0))) | (((m1 & m0) | (n1 & n0) | \ 4572 (m1 & ~m0 & n1 & ~n0)) << 1)) 4573 4574 /* following takes MCS as 2 bits */ 4575 #define HE_INTERSECT_MCS_PER_NSS(mcs_1, mcs_2) \ 4576 HE_INTERSECT_MCS_BITS_PER_NSS((mcs_1 >> 1), (mcs_1 & 1), \ 4577 (mcs_2 >> 1), (mcs_2 & 1)) 4578 4579 /* following takes MCS as 16 bits */ 4580 #define HE_INTERSECT_MCS(mcs_1, mcs_2) ( \ 4581 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 1), \ 4582 HE_GET_MCS_4_NSS(mcs_2, 1)) << HE_MCS_NSS_SHIFT(1) | \ 4583 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 2), \ 4584 HE_GET_MCS_4_NSS(mcs_2, 2)) << HE_MCS_NSS_SHIFT(2) | \ 4585 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 3), \ 4586 HE_GET_MCS_4_NSS(mcs_2, 3)) << HE_MCS_NSS_SHIFT(3) | \ 4587 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 4), \ 4588 HE_GET_MCS_4_NSS(mcs_2, 4)) << HE_MCS_NSS_SHIFT(4) | \ 4589 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 5), \ 4590 HE_GET_MCS_4_NSS(mcs_2, 5)) << HE_MCS_NSS_SHIFT(5) | \ 4591 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 6), \ 4592 HE_GET_MCS_4_NSS(mcs_2, 6)) << HE_MCS_NSS_SHIFT(6) | \ 4593 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 7), \ 4594 HE_GET_MCS_4_NSS(mcs_2, 7)) << HE_MCS_NSS_SHIFT(7) | \ 4595 HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 8), \ 4596 HE_GET_MCS_4_NSS(mcs_2, 8)) << HE_MCS_NSS_SHIFT(8)) 4597 4598 /** 4599 * struct he_capability - to store 11ax HE capabilities 4600 * @phy_cap: HE PHY capabilities 4601 * @mac_cap: HE MAC capabilities 4602 * @mcs: HE MCS 4603 * @ppet: HE PPE threshold 4604 */ 4605 struct he_capability { 4606 uint32_t phy_cap[HE_MAX_PHY_CAP_SIZE]; 4607 uint32_t mac_cap; 4608 uint32_t mcs; 4609 struct wlan_psoc_host_ppe_threshold ppet; 4610 }; 4611 #endif 4612 4613 #define HE_GET_NSS(mcs, nss) \ 4614 do { \ 4615 (nss) = 0; \ 4616 while ((((mcs) >> ((nss)*2)) & 3) != 3 && nss < 8) \ 4617 (nss)++; \ 4618 } while (0) 4619 4620 #ifdef WLAN_FEATURE_11BE 4621 #define EHT_MAX_PHY_CAP_SIZE 3 4622 #define EHT_OP_OUI_TYPE "\x6a" 4623 #define EHT_OP_OUI_SIZE 1 4624 4625 #define MLO_IE_OUI_TYPE "\x6b" 4626 #define MLO_IE_OUI_SIZE 1 4627 4628 #define EHT_CAP_OUI_TYPE "\x6c" 4629 #define EHT_CAP_OUI_SIZE 1 4630 4631 /** 4632 * struct eht_capability - to store 11be EHT capabilities 4633 * @phy_cap: EHT PHY capabilities 4634 * @mac_cap: EHT MAC capabilities 4635 * @mcs: EHT MCS 4636 */ 4637 struct eht_capability { 4638 uint32_t phy_cap[EHT_MAX_PHY_CAP_SIZE]; 4639 uint32_t mac_cap; 4640 uint32_t mcs; 4641 }; 4642 #endif 4643 /** 4644 * struct rsp_stats - arp packet stats 4645 * @arp_req_enqueue: fw tx count 4646 * @arp_req_tx_success: tx ack count 4647 * @arp_req_tx_failure: tx ack fail count 4648 * @arp_rsp_recvd: rx fw count 4649 * @out_of_order_arp_rsp_drop_cnt: out of order count 4650 * @dad_detected: dad detected 4651 * @connect_status: connection status 4652 * @ba_session_establishment_status: BA session status 4653 * @connect_stats_present: connectivity stats present or not 4654 * @tcp_ack_recvd: tcp syn ack's count 4655 * @icmpv4_rsp_recvd: icmpv4 responses count 4656 */ 4657 struct rsp_stats { 4658 uint32_t vdev_id; 4659 uint32_t arp_req_enqueue; 4660 uint32_t arp_req_tx_success; 4661 uint32_t arp_req_tx_failure; 4662 uint32_t arp_rsp_recvd; 4663 uint32_t out_of_order_arp_rsp_drop_cnt; 4664 uint32_t dad_detected; 4665 uint32_t connect_status; 4666 uint32_t ba_session_establishment_status; 4667 bool connect_stats_present; 4668 uint32_t tcp_ack_recvd; 4669 uint32_t icmpv4_rsp_recvd; 4670 }; 4671 4672 /** 4673 * struct set_arp_stats_params - set/reset arp stats 4674 * @vdev_id: session id 4675 * @flag: enable/disable stats 4676 * @pkt_type: type of packet(1 - arp) 4677 * @ip_addr: subnet ipv4 address in case of encrypted packets 4678 * @pkt_type_bitmap: pkt bitmap 4679 * @tcp_src_port: tcp src port for pkt tracking 4680 * @tcp_dst_port: tcp dst port for pkt tracking 4681 * @icmp_ipv4: target ipv4 address to track ping packets 4682 * @reserved: reserved 4683 */ 4684 struct set_arp_stats_params { 4685 uint32_t vdev_id; 4686 uint8_t flag; 4687 uint8_t pkt_type; 4688 uint32_t ip_addr; 4689 uint32_t pkt_type_bitmap; 4690 uint32_t tcp_src_port; 4691 uint32_t tcp_dst_port; 4692 uint32_t icmp_ipv4; 4693 uint32_t reserved; 4694 }; 4695 4696 /** 4697 * struct get_arp_stats_params - get arp stats from firmware 4698 * @pkt_type: packet type(1 - ARP) 4699 * @vdev_id: session id 4700 */ 4701 struct get_arp_stats_params { 4702 uint8_t pkt_type; 4703 uint32_t vdev_id; 4704 }; 4705 4706 typedef void (*sme_rcpi_callback)(void *context, struct qdf_mac_addr mac_addr, 4707 int32_t rcpi, QDF_STATUS status); 4708 /** 4709 * struct sme_rcpi_req - structure for querying rcpi info 4710 * @session_id: session for which rcpi is required 4711 * @measurement_type: type of measurement from enum rcpi_measurement_type 4712 * @rcpi_callback: callback function to be invoked for rcpi response 4713 * @rcpi_context: context info for rcpi callback 4714 * @mac_addr: peer addr for which rcpi is required 4715 */ 4716 struct sme_rcpi_req { 4717 uint32_t session_id; 4718 enum rcpi_measurement_type measurement_type; 4719 sme_rcpi_callback rcpi_callback; 4720 void *rcpi_context; 4721 struct qdf_mac_addr mac_addr; 4722 }; 4723 4724 /* 4725 * @SCAN_REJECT_DEFAULT: default value 4726 * @CONNECTION_IN_PROGRESS: connection is in progress 4727 * @REASSOC_IN_PROGRESS: reassociation is in progress 4728 * @EAPOL_IN_PROGRESS: STA/P2P-CLI is in middle of EAPOL/WPS exchange 4729 * @SAP_EAPOL_IN_PROGRESS: SAP/P2P-GO is in middle of EAPOL/WPS exchange 4730 * @SAP_CONNECTION_IN_PROGRESS: SAP/P2P-GO is in middle of connection. 4731 * @NAN_ENABLE_DISABLE_IN_PROGRESS: NAN is in middle of enable/disable discovery 4732 */ 4733 enum scan_reject_states { 4734 SCAN_REJECT_DEFAULT = 0, 4735 CONNECTION_IN_PROGRESS, 4736 REASSOC_IN_PROGRESS, 4737 EAPOL_IN_PROGRESS, 4738 SAP_EAPOL_IN_PROGRESS, 4739 SAP_CONNECTION_IN_PROGRESS, 4740 NAN_ENABLE_DISABLE_IN_PROGRESS, 4741 }; 4742 4743 /** 4744 * sir_sme_rx_aggr_hole_ind - sme rx aggr hole indication 4745 * @hole_cnt: num of holes detected 4746 * @hole_info_array: hole info 4747 */ 4748 struct sir_sme_rx_aggr_hole_ind { 4749 uint32_t hole_cnt; 4750 uint32_t hole_info_array[]; 4751 }; 4752 4753 /** 4754 * struct sir_set_rx_reorder_timeout_val - rx reorder timeout 4755 * @rx_timeout_pri: reorder timeout for AC 4756 * rx_timeout_pri[0] : AC_VO 4757 * rx_timeout_pri[1] : AC_VI 4758 * rx_timeout_pri[2] : AC_BE 4759 * rx_timeout_pri[3] : AC_BK 4760 */ 4761 struct sir_set_rx_reorder_timeout_val { 4762 uint32_t rx_timeout_pri[4]; 4763 }; 4764 4765 /** 4766 * struct sir_peer_set_rx_blocksize - set rx blocksize 4767 * @vdev_id: vdev id 4768 * @peer_macaddr: peer mac address 4769 * @rx_block_ack_win_limit: windows size limitation 4770 */ 4771 struct sir_peer_set_rx_blocksize { 4772 uint32_t vdev_id; 4773 struct qdf_mac_addr peer_macaddr; 4774 uint32_t rx_block_ack_win_limit; 4775 }; 4776 4777 /** 4778 * struct sir_rssi_disallow_lst - Structure holding Rssi based avoid candidate 4779 * list 4780 * @node: Node pointer 4781 * @bssid: BSSID of the AP 4782 * @retry_delay: Retry delay received during last rejection in ms 4783 * @ expected_rssi: RSSI at which STA can initiate 4784 * @time_during_rejection: Timestamp during last rejection in millisec 4785 * @reject_reason: reason to add the BSSID to DLM 4786 * @source: Source of adding the BSSID to DLM 4787 * @original_timeout: original timeout sent by the AP 4788 * @received_time: Timestamp when the AP was added to the Denylist 4789 */ 4790 struct sir_rssi_disallow_lst { 4791 qdf_list_node_t node; 4792 struct qdf_mac_addr bssid; 4793 uint32_t retry_delay; 4794 int8_t expected_rssi; 4795 qdf_time_t time_during_rejection; 4796 enum dlm_reject_ap_reason reject_reason; 4797 enum dlm_reject_ap_source source; 4798 uint32_t original_timeout; 4799 qdf_time_t received_time; 4800 }; 4801 4802 /** 4803 * struct chain_rssi_result - chain rssi result 4804 * num_chains_valid: valid chain num 4805 * @chain_rssi: chain rssi result as dBm unit 4806 * @chain_evm: error vector magnitude 4807 * @ant_id: antenna id 4808 */ 4809 #define CHAIN_MAX_NUM 8 4810 struct chain_rssi_result { 4811 uint32_t num_chains_valid; 4812 uint32_t chain_rssi[CHAIN_MAX_NUM]; 4813 int32_t chain_evm[CHAIN_MAX_NUM]; 4814 uint32_t ant_id[CHAIN_MAX_NUM]; 4815 }; 4816 4817 /** 4818 * struct get_chain_rssi_req_params - get chain rssi req params 4819 * @peer_macaddr: specific peer mac address 4820 * @session_id: session id 4821 */ 4822 struct get_chain_rssi_req_params { 4823 struct qdf_mac_addr peer_macaddr; 4824 uint8_t session_id; 4825 }; 4826 4827 /* 4828 * struct sir_limit_off_chan - limit off-channel command parameters 4829 * @vdev_id: vdev id 4830 * @is_tos_active: status of the traffic (active/inactive) 4831 * @max_off_chan_time: max allowed off channel time 4832 * @rest_time: home channel time 4833 * @skip_dfs_chans: skip dfs channels during scan 4834 */ 4835 struct sir_limit_off_chan { 4836 uint8_t vdev_id; 4837 bool is_tos_active; 4838 uint32_t max_off_chan_time; 4839 uint32_t rest_time; 4840 bool skip_dfs_chans; 4841 }; 4842 4843 typedef void (*roam_scan_stats_cb)(void *context, 4844 struct wmi_roam_scan_stats_res *res); 4845 4846 /** 4847 * struct sir_roam_scan_stats - Stores roam scan context 4848 * @vdev_id: vdev id 4849 * @cb: callback to be invoked for roam scan stats response 4850 * @context: context of callback 4851 */ 4852 struct sir_roam_scan_stats { 4853 uint32_t vdev_id; 4854 roam_scan_stats_cb cb; 4855 void *context; 4856 }; 4857 4858 /** 4859 * struct sae_info - SAE info used for commit/confirm messages 4860 * @msg_type: Message type 4861 * @msg_len: length of message 4862 * @vdev_id: vdev id 4863 * @peer_mac_addr: peer MAC address 4864 * @ssid: SSID 4865 * @akm: key mgmt suite used 4866 */ 4867 struct sir_sae_info { 4868 uint16_t msg_type; 4869 uint16_t msg_len; 4870 uint32_t vdev_id; 4871 struct qdf_mac_addr peer_mac_addr; 4872 tSirMacSSid ssid; 4873 uint32_t akm; 4874 }; 4875 4876 /** 4877 * struct sir_sae_msg - SAE msg used for message posting 4878 * @message_type: message type 4879 * @length: message length 4880 * @vdev_id: vdev id 4881 * @sae_status: SAE status, 0: Success, Non-zero: Failure. 4882 * @pmkid: PMKID derived as part of SAE authentication 4883 * @peer_mac_addr: peer MAC address 4884 * @result_code: This carries the reason of the SAE auth failure. 4885 * Currently, SAE authentication failure may happen due to 4886 * 1. Authentication failure detected as part of SAE auth frame 4887 * exchanges and validation. 4888 * 2. Deauth received from AP while SAE authentication is in 4889 * progress. 4890 */ 4891 struct sir_sae_msg { 4892 uint16_t message_type; 4893 uint16_t length; 4894 uint16_t vdev_id; 4895 uint8_t pmkid[PMKID_LEN]; 4896 uint8_t sae_status; 4897 tSirMacAddr peer_mac_addr; 4898 tSirResultCodes result_code; 4899 }; 4900 4901 #ifdef WLAN_FEATURE_MOTION_DETECTION 4902 /** 4903 * struct sir_md_evt - motion detection event status 4904 * @vdev_id: vdev id 4905 * @status: md event status 4906 */ 4907 struct sir_md_evt { 4908 uint8_t vdev_id; 4909 uint32_t status; 4910 }; 4911 4912 /** 4913 * struct sir_md_bl_evt - motion detection baseline event values 4914 * @vdev_id: vdev id 4915 * @bl_baseline_value: baseline correlation value calculated during baselining 4916 * @bl_max_corr_reserved: max corr value obtained during baselining phase in % 4917 * @bl_min_corr_reserved: min corr value obtained during baselining phase in % 4918 */ 4919 struct sir_md_bl_evt { 4920 uint8_t vdev_id; 4921 uint32_t bl_baseline_value; 4922 uint32_t bl_max_corr_reserved; 4923 uint32_t bl_min_corr_reserved; 4924 }; 4925 #endif /* WLAN_FEATURE_MOTION_DETECTION */ 4926 4927 #ifdef WLAN_MWS_INFO_DEBUGFS 4928 /** 4929 * struct sir_get_mws_coex_info - Get MWS coex info 4930 * @vdev_id: vdev id 4931 * @cmd_id: wmi mws-coex command IDs 4932 */ 4933 struct sir_get_mws_coex_info { 4934 uint32_t vdev_id; 4935 uint32_t cmd_id; 4936 }; 4937 #endif /* WLAN_MWS_INFO_DEBUGFS */ 4938 4939 /* 4940 * struct sir_update_session_txq_edca_param 4941 * @message_type: SME message type 4942 * @length: size of struct sir_update_session_txq_edca_param 4943 * @vdev_id: vdev ID 4944 * @txq_edca_params: txq edca parameter to update 4945 */ 4946 struct sir_update_session_txq_edca_param { 4947 uint16_t message_type; 4948 uint16_t length; 4949 uint8_t vdev_id; 4950 tSirMacEdcaParamRecord txq_edca_params; 4951 }; 4952 4953 /* struct channel_change_req - Change channel 4954 * request for SAP 4955 * @vdev_id: vdev id 4956 * @target_chan_freq: New channel frequency 4957 * @sec_ch_offset: second channel offset 4958 * @center_freq_seg0: channel center freq 0 4959 * @center_freq_seg1: channel center freq 1 4960 * @target_punc_bitmap: New channel puncturing bitmap 4961 * @dot11mode: dot11 mode 4962 * @nw_type: nw type 4963 * @cac_duration_ms: cac duration in ms 4964 * @dfs_regdomain: dfs regdomain 4965 * @opr_rates: operational rates 4966 * @ext_rates: extended rates 4967 */ 4968 struct channel_change_req { 4969 uint8_t vdev_id; 4970 uint32_t target_chan_freq; 4971 uint8_t sec_ch_offset; 4972 enum phy_ch_width ch_width; 4973 uint8_t center_freq_seg0; 4974 uint8_t center_freq_seg1; 4975 #ifdef WLAN_FEATURE_11BE 4976 uint16_t target_punc_bitmap; 4977 #endif 4978 uint32_t dot11mode; 4979 tSirNwType nw_type; 4980 uint32_t cac_duration_ms; 4981 uint32_t dfs_regdomain; 4982 tSirMacRateSet opr_rates; 4983 tSirMacRateSet ext_rates; 4984 }; 4985 4986 /* struct start_bss_config - Start BSS 4987 * request configurations 4988 * @vdev_id: vdev id 4989 * @cmd_id: serialization command id 4990 * @ssId: ssid 4991 * @dtimPeriod: dtim period 4992 * @ssidHidden: hidden ssid parameter 4993 * @privacy: ssid privacy 4994 * @authType: authentication type 4995 * @rsnIE: RSN IE of the AP 4996 * @add_ie_params: additional IEs 4997 * @oper_ch_freq: operating frequency 4998 * @vht_channel_width: channel width 4999 * @center_freq_seg0: channel center freq 0 5000 * @center_freq_seg1: channel center freq 1 5001 * @sec_ch_offset: secondary channel offset 5002 * @wps_state: wps config 5003 * @dot11mode: dot11 mode 5004 * @nwType: nw type 5005 * @operationalRateSet: operational rates 5006 * @extendedRateSet: extended rates 5007 * @beacon_tx_rate: Tx rate for beacon 5008 * @cac_duration_ms: cac duration in ms 5009 * @dfs_regdomain: dfs regdomain 5010 */ 5011 struct start_bss_config { 5012 uint8_t vdev_id; 5013 uint32_t cmd_id; 5014 tSirMacSSid ssId; 5015 uint16_t beaconInterval; 5016 uint32_t dtimPeriod; 5017 uint8_t ssidHidden; 5018 5019 uint8_t privacy; 5020 tAniAuthType authType; 5021 tSirRSNie rsnIE; 5022 struct add_ie_params add_ie_params; 5023 5024 uint32_t oper_ch_freq; 5025 uint8_t vht_channel_width; 5026 uint8_t center_freq_seg0; 5027 uint8_t center_freq_seg1; 5028 uint8_t sec_ch_offset; 5029 5030 uint8_t wps_state; 5031 uint8_t dot11mode; 5032 tSirNwType nwType; 5033 5034 tSirMacRateSet operationalRateSet; 5035 tSirMacRateSet extendedRateSet; 5036 uint16_t beacon_tx_rate; 5037 uint32_t cac_duration_ms; 5038 uint32_t dfs_regdomain; 5039 }; 5040 5041 #endif /* __SIR_API_H */ 5042