Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 20 | * This file sir_api.h contains definitions exported by |
| 21 | * Sirius software. |
| 22 | * Author: Chandra Modumudi |
| 23 | * Date: 04/16/2002 |
| 24 | * History:- |
| 25 | * Date Modified by Modification Information |
| 26 | * -------------------------------------------------------------------- |
| 27 | */ |
| 28 | |
| 29 | #ifndef __SIR_API_H |
| 30 | #define __SIR_API_H |
| 31 | |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 32 | |
| 33 | /* Take care to avoid redefinition of this type, if it is */ |
| 34 | /* already defined in "halWmmApi.h" */ |
| 35 | #if !defined(_HALMAC_WMM_API_H) |
| 36 | typedef struct sAniSirGlobal *tpAniSirGlobal; |
| 37 | #endif |
| 38 | |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 39 | #include "qdf_types.h" |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 40 | #include "cds_regdomain.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 41 | #include "sir_types.h" |
| 42 | #include "sir_mac_prot_def.h" |
| 43 | #include "ani_system_defs.h" |
| 44 | #include "sir_params.h" |
Naveen Rawat | 3b6068c | 2016-04-14 19:01:06 -0700 | [diff] [blame] | 45 | #include "cds_regdomain.h" |
Dustin Brown | 877a5a9 | 2016-11-17 13:56:52 -0800 | [diff] [blame] | 46 | #include "wmi_unified.h" |
Gupta, Kapil | 96c7f2f | 2016-04-25 19:13:41 +0530 | [diff] [blame] | 47 | #include "wmi_unified_param.h" |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 48 | #include "ol_txrx_htt_api.h" |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 49 | #include "wlan_reg_services_api.h" |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 50 | #include <dot11f.h> |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 51 | #include "wlan_policy_mgr_api.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 52 | |
Naveen Rawat | b0c5b6b | 2017-11-27 17:37:40 -0800 | [diff] [blame] | 53 | #define SIR_MAX_SUPPORTED_BSS 5 |
| 54 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 55 | #define OFFSET_OF(structType, fldName) (&((structType *)0)->fldName) |
| 56 | |
| 57 | /* / Max supported channel list */ |
| 58 | #define SIR_MAX_SUPPORTED_CHANNEL_LIST 96 |
| 59 | |
| 60 | #define SIR_MDIE_ELEMENT_ID 54 |
Srinivas Girigowda | d65dc5a | 2016-01-14 17:08:26 -0800 | [diff] [blame] | 61 | #define SIR_MDIE_SIZE 3 /* MD ID(2 bytes), Capability(1 byte) */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 62 | |
Sridhar Selvaraj | 8c6f5e8 | 2017-08-21 14:53:46 +0530 | [diff] [blame] | 63 | #define SIR_MAX_ELEMENT_ID 255 |
| 64 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 65 | /* Max number of channels are 165, but to access 165th element of array, |
| 66 | *array of 166 is required. |
| 67 | */ |
| 68 | #define SIR_MAX_24G_5G_CHANNEL_RANGE 166 |
| 69 | #define SIR_BCN_REPORT_MAX_BSS_DESC 4 |
| 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 | #define SIR_PM_SLEEP_MODE 0 |
| 75 | #define SIR_PM_ACTIVE_MODE 1 |
| 76 | |
| 77 | /* hidden SSID options */ |
| 78 | #define SIR_SCAN_NO_HIDDEN_SSID 0 |
| 79 | #define SIR_SCAN_HIDDEN_SSID_PE_DECISION 1 |
| 80 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 81 | #define SIR_IPV4_ADDR_LEN 4 |
| 82 | |
| 83 | typedef uint8_t tSirIpv4Addr[SIR_IPV4_ADDR_LEN]; |
| 84 | |
| 85 | #define SIR_VERSION_STRING_LEN 64 |
| 86 | typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN]; |
| 87 | |
| 88 | /* Periodic Tx pattern offload feature */ |
| 89 | #define PERIODIC_TX_PTRN_MAX_SIZE 1536 |
| 90 | #define MAXNUM_PERIODIC_TX_PTRNS 6 |
| 91 | #define WIFI_SCANNING_MAC_OUI_LENGTH 3 |
| 92 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 93 | /* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */ |
| 94 | #define MAX_VDEV_SUPPORTED 4 |
| 95 | |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 96 | #define MAX_POWER_DBG_ARGS_SUPPORTED 8 |
Agrawal Ashish | ad16bda | 2016-09-16 20:16:04 +0530 | [diff] [blame] | 97 | #define QOS_MAP_MAX_EX 21 |
| 98 | #define QOS_MAP_LEN_MIN 16 |
| 99 | #define QOS_MAP_LEN_MAX \ |
| 100 | (QOS_MAP_LEN_MIN + 2 * QOS_MAP_MAX_EX) |
Himanshu Agarwal | 37e4241 | 2016-07-21 14:35:09 +0530 | [diff] [blame] | 101 | #define NUM_CHAINS_MAX 2 |
| 102 | |
Abhishek Singh | f3756fc | 2017-06-28 16:04:06 +0530 | [diff] [blame] | 103 | #define MAX_RSSI_AVOID_BSSID_LIST 10 |
Sridhar Selvaraj | a44c19e | 2017-08-21 14:20:20 +0530 | [diff] [blame] | 104 | |
| 105 | /* Maximum number of realms present in fils indication element */ |
| 106 | #define SIR_MAX_REALM_COUNT 7 |
| 107 | /* Realm length */ |
| 108 | #define SIR_REALM_LEN 2 |
| 109 | /* Cache ID length */ |
| 110 | #define CACHE_ID_LEN 2 |
| 111 | |
Will Huang | 496b36c | 2017-07-11 16:38:50 +0800 | [diff] [blame] | 112 | /* Maximum peer station number query one time */ |
| 113 | #define MAX_PEER_STA 12 |
| 114 | |
Naveen Rawat | b0c5b6b | 2017-11-27 17:37:40 -0800 | [diff] [blame] | 115 | /* Maximum number of peers for SAP */ |
| 116 | #define SIR_SAP_MAX_NUM_PEERS 32 |
| 117 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 118 | #define SIR_KRK_KEY_LEN 16 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 119 | #define SIR_BTK_KEY_LEN 32 |
| 120 | #define SIR_KCK_KEY_LEN 16 |
| 121 | #define SIR_KEK_KEY_LEN 16 |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 122 | #define SIR_KEK_KEY_LEN_FILS 64 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 123 | #define SIR_REPLAY_CTR_LEN 8 |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 124 | #define SIR_PMK_LEN 48 |
| 125 | #define SIR_PMKID_LEN 16 |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 126 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 127 | #define SIR_UAPSD_BITOFFSET_ACVO 0 |
| 128 | #define SIR_UAPSD_BITOFFSET_ACVI 1 |
| 129 | #define SIR_UAPSD_BITOFFSET_ACBK 2 |
| 130 | #define SIR_UAPSD_BITOFFSET_ACBE 3 |
| 131 | |
| 132 | #define SIR_UAPSD_FLAG_ACVO (1 << SIR_UAPSD_BITOFFSET_ACVO) |
| 133 | #define SIR_UAPSD_FLAG_ACVI (1 << SIR_UAPSD_BITOFFSET_ACVI) |
| 134 | #define SIR_UAPSD_FLAG_ACBK (1 << SIR_UAPSD_BITOFFSET_ACBK) |
| 135 | #define SIR_UAPSD_FLAG_ACBE (1 << SIR_UAPSD_BITOFFSET_ACBE) |
| 136 | #define SIR_UAPSD_GET(ac, mask) (((mask) & (SIR_UAPSD_FLAG_ ## ac)) >> SIR_UAPSD_BITOFFSET_ ## ac) |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 137 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 138 | #endif |
| 139 | |
| 140 | /** |
Varun Reddy Yeturu | f907f91 | 2016-03-21 15:06:22 -0700 | [diff] [blame] | 141 | * enum sir_roam_op_code - Operation to be done by the callback. |
| 142 | * @SIR_ROAM_SYNCH_PROPAGATION: Propagate the new BSS info after roaming. |
| 143 | * @SIR_ROAMING_DEREGISTER_STA: Deregister the old STA after roaming. |
Naveen Rawat | 8cc23b0 | 2016-07-14 12:22:56 -0700 | [diff] [blame] | 144 | * @SIR_ROAMING_START: Firmware started roaming operation |
| 145 | * @SIR_ROAMING_ABORT: Firmware aborted roaming operation, still connected. |
| 146 | * @SIR_ROAM_SYNCH_COMPLETE: Roam sync propagation is complete. |
Arif Hussain | 43354e6 | 2017-05-24 11:24:25 -0700 | [diff] [blame] | 147 | * @SIR_ROAMING_INVOKE_FAIL: Firmware roaming failed. |
Varun Reddy Yeturu | f907f91 | 2016-03-21 15:06:22 -0700 | [diff] [blame] | 148 | */ |
| 149 | enum sir_roam_op_code { |
| 150 | SIR_ROAM_SYNCH_PROPAGATION = 1, |
| 151 | SIR_ROAMING_DEREGISTER_STA, |
Naveen Rawat | 8cc23b0 | 2016-07-14 12:22:56 -0700 | [diff] [blame] | 152 | SIR_ROAMING_START, |
| 153 | SIR_ROAMING_ABORT, |
| 154 | SIR_ROAM_SYNCH_COMPLETE, |
Varun Reddy Yeturu | 0425186 | 2016-09-16 10:33:19 -0700 | [diff] [blame] | 155 | SIR_ROAM_SYNCH_NAPI_OFF, |
Arif Hussain | 43354e6 | 2017-05-24 11:24:25 -0700 | [diff] [blame] | 156 | SIR_ROAMING_INVOKE_FAIL, |
Varun Reddy Yeturu | f907f91 | 2016-03-21 15:06:22 -0700 | [diff] [blame] | 157 | }; |
| 158 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 159 | * Module ID definitions. |
| 160 | */ |
| 161 | enum { |
| 162 | SIR_BOOT_MODULE_ID = 1, |
| 163 | SIR_HAL_MODULE_ID = 0x10, |
| 164 | SIR_CFG_MODULE_ID = 0x12, |
| 165 | SIR_LIM_MODULE_ID, |
| 166 | SIR_ARQ_MODULE_ID, |
| 167 | SIR_SCH_MODULE_ID, |
| 168 | SIR_PMM_MODULE_ID, |
| 169 | SIR_MNT_MODULE_ID, |
| 170 | SIR_DBG_MODULE_ID, |
| 171 | SIR_DPH_MODULE_ID, |
| 172 | SIR_SYS_MODULE_ID, |
| 173 | SIR_SMS_MODULE_ID, |
| 174 | }; |
| 175 | |
| 176 | #define SIR_WMA_MODULE_ID SIR_HAL_MODULE_ID |
| 177 | |
| 178 | /** |
| 179 | * First and last module definition for logging utility |
| 180 | * |
| 181 | * NOTE: The following definitions need to be updated if |
| 182 | * the above list is changed. |
| 183 | */ |
| 184 | #define SIR_FIRST_MODULE_ID SIR_HAL_MODULE_ID |
| 185 | #define SIR_LAST_MODULE_ID SIR_SMS_MODULE_ID |
| 186 | |
| 187 | /* Type declarations used by Firmware and Host software */ |
| 188 | |
| 189 | /* Scan type enum used in scan request */ |
| 190 | typedef enum eSirScanType { |
| 191 | eSIR_PASSIVE_SCAN, |
| 192 | eSIR_ACTIVE_SCAN, |
| 193 | eSIR_BEACON_TABLE, |
| 194 | } tSirScanType; |
| 195 | |
gaurank kathpalia | c63859d | 2018-05-03 18:48:41 +0530 | [diff] [blame] | 196 | /* Rsn Capabilities structure */ |
| 197 | struct rsn_caps { |
| 198 | uint16_t PreAuthSupported:1; |
| 199 | uint16_t NoPairwise:1; |
| 200 | uint16_t PTKSAReplayCounter:2; |
| 201 | uint16_t GTKSAReplayCounter:2; |
| 202 | uint16_t MFPRequired:1; |
| 203 | uint16_t MFPCapable:1; |
| 204 | uint16_t Reserved:8; |
| 205 | }; |
| 206 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 207 | /* / Result codes Firmware return to Host SW */ |
| 208 | typedef enum eSirResultCodes { |
| 209 | eSIR_SME_SUCCESS, |
Abhishek Singh | 4294f80 | 2017-08-10 16:37:07 +0530 | [diff] [blame] | 210 | eSIR_LOGE_EXCEPTION, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 211 | eSIR_SME_INVALID_PARAMETERS = 500, |
| 212 | eSIR_SME_UNEXPECTED_REQ_RESULT_CODE, |
| 213 | eSIR_SME_RESOURCES_UNAVAILABLE, |
| 214 | /* Unable to find a BssDescription */ |
| 215 | eSIR_SME_SCAN_FAILED, |
| 216 | /* matching requested scan criteria */ |
| 217 | eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED, |
| 218 | eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE, |
| 219 | eSIR_SME_REFUSED, |
| 220 | eSIR_SME_JOIN_DEAUTH_FROM_AP_DURING_ADD_STA, |
| 221 | eSIR_SME_JOIN_TIMEOUT_RESULT_CODE, |
| 222 | eSIR_SME_AUTH_TIMEOUT_RESULT_CODE, |
| 223 | eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE, |
| 224 | eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE, |
| 225 | eSIR_SME_MAX_NUM_OF_PRE_AUTH_REACHED, |
| 226 | eSIR_SME_AUTH_REFUSED, |
| 227 | eSIR_SME_INVALID_WEP_DEFAULT_KEY, |
| 228 | eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER, |
| 229 | eSIR_SME_ASSOC_REFUSED, |
| 230 | eSIR_SME_REASSOC_REFUSED, |
| 231 | /* Recvd Deauth while join/pre-auth */ |
| 232 | eSIR_SME_DEAUTH_WHILE_JOIN, |
| 233 | eSIR_SME_STA_NOT_AUTHENTICATED, |
| 234 | eSIR_SME_STA_NOT_ASSOCIATED, |
| 235 | eSIR_SME_ALREADY_JOINED_A_BSS, |
| 236 | /* Given in SME_SCAN_RSP msg */ |
| 237 | eSIR_SME_MORE_SCAN_RESULTS_FOLLOW, |
| 238 | /* that more SME_SCAN_RSP */ |
| 239 | /* messages are following. */ |
| 240 | /* SME_SCAN_RSP message with */ |
| 241 | /* eSIR_SME_SUCCESS status */ |
| 242 | /* code is the last one. */ |
| 243 | /* Sent in SME_JOIN/REASSOC_RSP */ |
| 244 | eSIR_SME_INVALID_ASSOC_RSP_RXED, |
| 245 | /* messages upon receiving */ |
| 246 | /* invalid Re/Assoc Rsp frame. */ |
| 247 | /* STOP BSS triggered by MIC failures: MAC software to |
| 248 | * disassoc all stations |
| 249 | */ |
| 250 | eSIR_SME_MIC_COUNTER_MEASURES, |
| 251 | /* with MIC_FAILURE reason code and perform the stop bss operation */ |
| 252 | /* didn't get rsp from peer within timeout interval */ |
| 253 | eSIR_SME_ADDTS_RSP_TIMEOUT, |
| 254 | /* didn't get success rsp from HAL */ |
| 255 | eSIR_SME_ADDTS_RSP_FAILED, |
| 256 | /* failed to send ch switch act frm */ |
| 257 | eSIR_SME_CHANNEL_SWITCH_FAIL, |
| 258 | eSIR_SME_INVALID_STATE, |
| 259 | /* SIR_HAL_SIR_HAL_INIT_SCAN_RSP returned failed status */ |
| 260 | eSIR_SME_HAL_SCAN_INIT_FAILED, |
| 261 | /* SIR_HAL_END_SCAN_RSP returned failed status */ |
| 262 | eSIR_SME_HAL_SCAN_END_FAILED, |
| 263 | /* SIR_HAL_FINISH_SCAN_RSP returned failed status */ |
| 264 | eSIR_SME_HAL_SCAN_FINISH_FAILED, |
| 265 | /* Failed to send a message to HAL */ |
| 266 | eSIR_SME_HAL_SEND_MESSAGE_FAIL, |
| 267 | /* Failed to stop the bss */ |
| 268 | eSIR_SME_STOP_BSS_FAILURE, |
| 269 | eSIR_SME_WOWL_ENTER_REQ_FAILED, |
| 270 | eSIR_SME_WOWL_EXIT_REQ_FAILED, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 271 | eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE, |
| 272 | eSIR_SME_FT_REASSOC_FAILURE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 273 | eSIR_SME_SEND_ACTION_FAIL, |
| 274 | eSIR_SME_DEAUTH_STATUS, |
| 275 | eSIR_PNO_SCAN_SUCCESS, |
Varun Reddy Yeturu | 371404b | 2017-11-30 15:31:35 -0800 | [diff] [blame] | 276 | eSIR_SME_INVALID_SESSION, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 277 | eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE |
| 278 | } tSirResultCodes; |
| 279 | |
Sridhar Selvaraj | 0d5d2c7 | 2017-08-17 17:30:01 +0530 | [diff] [blame] | 280 | #ifdef WLAN_FEATURE_FILS_SK |
| 281 | struct fils_join_rsp_params { |
| 282 | uint8_t *fils_pmk; |
| 283 | uint8_t fils_pmk_len; |
| 284 | uint8_t fils_pmkid[PMKID_LEN]; |
| 285 | uint8_t kek[MAX_KEK_LEN]; |
| 286 | uint8_t kek_len; |
| 287 | uint8_t tk[MAX_TK_LEN]; |
| 288 | uint8_t tk_len; |
| 289 | uint8_t gtk_len; |
| 290 | uint8_t gtk[MAX_GTK_LEN]; |
Vignesh Viswanathan | a1bb092 | 2017-09-15 12:58:48 +0530 | [diff] [blame] | 291 | struct qdf_mac_addr dst_mac; |
| 292 | struct qdf_mac_addr src_mac; |
| 293 | uint16_t hlp_data_len; |
| 294 | uint8_t hlp_data[FILS_MAX_HLP_DATA_LEN]; |
Sridhar Selvaraj | 0d5d2c7 | 2017-08-17 17:30:01 +0530 | [diff] [blame] | 295 | }; |
| 296 | #endif |
| 297 | |
Krishna Kumaar Natarajan | f599c6e | 2015-11-03 11:44:03 -0800 | [diff] [blame] | 298 | #define RMENABLEDCAP_MAX_LEN 5 |
| 299 | |
| 300 | struct rrm_config_param { |
| 301 | uint8_t rrm_enabled; |
| 302 | uint8_t max_randn_interval; |
| 303 | uint8_t rm_capability[RMENABLEDCAP_MAX_LEN]; |
| 304 | }; |
| 305 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 306 | /* |
| 307 | * although in tSirSupportedRates each IE is 16bit but PE only passes IEs in 8 |
| 308 | * bits with MSB=1 for basic rates. change the mask for bit0-7 only so HAL gets |
| 309 | * correct basic rates for setting response rates. |
| 310 | */ |
| 311 | #define IERATE_BASICRATE_MASK 0x80 |
| 312 | #define IERATE_RATE_MASK 0x7f |
| 313 | #define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK) |
| 314 | |
Sreelakshmi Konamki | 39acb13 | 2015-12-16 13:06:22 +0530 | [diff] [blame] | 315 | const char *lim_bss_type_to_string(const uint16_t bss_type); |
Krishna Kumaar Natarajan | d1cd56e | 2016-09-30 08:43:03 -0700 | [diff] [blame] | 316 | /** |
| 317 | * struct sSirSupportedRates - stores rates/MCS supported |
| 318 | * @llbRates: 11b rates in unit of 500kbps |
| 319 | * @llaRates: 11a rates in unit of 500kbps |
| 320 | * @supportedMCSSet: supported basic MCS, 0-76 bits used, remaining reserved |
| 321 | * bits 0-15 and 32 should be set. |
| 322 | * @rxHighestDataRate: RX Highest Supported Data Rate defines the highest data |
| 323 | * rate that the STA is able to receive, in unites of 1Mbps |
| 324 | * This value is derived from "Supported MCS Set field" |
| 325 | * inside the HT capability element. |
| 326 | * @vhtRxMCSMap: Indicates the Maximum MCS(VHT) that can be received for each |
| 327 | * number of spacial streams |
| 328 | * @vhtRxHighestDataRate: Indicate the highest VHT data rate that the STA is |
| 329 | * able to receive |
| 330 | * @vhtTxMCSMap: Indicates the Maximum MCS(VHT) that can be transmitted for |
| 331 | * each number of spacial streams |
| 332 | * @vhtTxHighestDataRate: Indicate the highest VHT data rate that the STA is |
| 333 | * able to transmit |
| 334 | * @he_rx_mcs: Indicates the Maximum MCS(HE) that can be received for each |
| 335 | * number of spacial streams |
| 336 | * @he_tx_mcs: Indicates the Maximum MCS(HE) that can be transmitted for each |
| 337 | * number of spacial streams |
| 338 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 339 | typedef struct sSirSupportedRates { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 340 | uint16_t llbRates[SIR_NUM_11B_RATES]; |
| 341 | uint16_t llaRates[SIR_NUM_11A_RATES]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 342 | uint8_t supportedMCSSet[SIR_MAC_MAX_SUPPORTED_MCS_SET]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 343 | uint16_t rxHighestDataRate; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 344 | uint16_t vhtRxMCSMap; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 345 | uint16_t vhtRxHighestDataRate; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 346 | uint16_t vhtTxMCSMap; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 347 | uint16_t vhtTxHighestDataRate; |
Krishna Kumaar Natarajan | d1cd56e | 2016-09-30 08:43:03 -0700 | [diff] [blame] | 348 | #ifdef WLAN_FEATURE_11AX |
Naveen Rawat | aeca1b9 | 2017-10-16 16:55:31 -0700 | [diff] [blame] | 349 | uint16_t rx_he_mcs_map_lt_80; |
| 350 | uint16_t tx_he_mcs_map_lt_80; |
| 351 | uint16_t rx_he_mcs_map_160; |
| 352 | uint16_t tx_he_mcs_map_160; |
| 353 | uint16_t rx_he_mcs_map_80_80; |
| 354 | uint16_t tx_he_mcs_map_80_80; |
Krishna Kumaar Natarajan | d1cd56e | 2016-09-30 08:43:03 -0700 | [diff] [blame] | 355 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 356 | } tSirSupportedRates, *tpSirSupportedRates; |
| 357 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 358 | typedef struct sSirRemainOnChnReq { |
| 359 | uint16_t messageType; |
| 360 | uint16_t length; |
| 361 | uint8_t sessionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 362 | struct qdf_mac_addr selfMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 363 | uint8_t chnNum; |
| 364 | uint8_t phyMode; |
| 365 | uint32_t duration; |
| 366 | uint8_t isProbeRequestAllowed; |
| 367 | uint32_t scan_id; |
| 368 | uint8_t probeRspIe[1]; |
| 369 | } tSirRemainOnChnReq, *tpSirRemainOnChnReq; |
| 370 | |
| 371 | /** |
| 372 | * struct sir_roc_rsp - Structure to store the remain on channel response |
| 373 | * @message_type: Message Type |
| 374 | * @length: Message Length |
| 375 | * @session_id: SME session Id |
| 376 | * @scan_id : scan identifier |
| 377 | * @status: result status |
| 378 | */ |
| 379 | struct sir_roc_rsp { |
| 380 | uint16_t message_type; |
| 381 | uint16_t length; |
| 382 | uint8_t session_id; |
| 383 | uint32_t scan_id; |
| 384 | tSirResultCodes status; |
| 385 | }; |
| 386 | |
| 387 | typedef struct sSirRegisterMgmtFrame { |
| 388 | uint16_t messageType; |
| 389 | uint16_t length; |
| 390 | uint8_t sessionId; |
| 391 | bool registerFrame; |
| 392 | uint16_t frameType; |
| 393 | uint16_t matchLen; |
| 394 | uint8_t matchData[1]; |
| 395 | } tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame; |
| 396 | |
| 397 | /* / Generic type for sending a response message */ |
| 398 | /* / with result code to host software */ |
| 399 | typedef struct sSirSmeRsp { |
| 400 | uint16_t messageType; /* eWNI_SME_*_RSP */ |
| 401 | uint16_t length; |
| 402 | uint8_t sessionId; /* To support BT-AMP */ |
| 403 | uint16_t transactionId; /* To support BT-AMP */ |
| 404 | tSirResultCodes statusCode; |
Kabilan Kannan | f56f9d5 | 2017-04-05 03:31:34 -0700 | [diff] [blame] | 405 | struct wlan_objmgr_psoc *psoc; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 406 | } tSirSmeRsp, *tpSirSmeRsp; |
| 407 | |
| 408 | /* / Definition for indicating all modules ready on STA */ |
| 409 | typedef struct sSirSmeReadyReq { |
| 410 | uint16_t messageType; /* eWNI_SME_SYS_READY_IND */ |
| 411 | uint16_t length; |
| 412 | uint16_t transactionId; |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 413 | void *csr_roam_synch_cb; |
| 414 | void *pe_roam_synch_cb; |
Sandeep Puligilla | 1426d61 | 2017-04-12 18:22:06 -0700 | [diff] [blame] | 415 | void *sme_msg_cb; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 416 | } tSirSmeReadyReq, *tpSirSmeReadyReq; |
| 417 | |
| 418 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 419 | * struct s_sir_set_hw_mode - Set HW mode request |
| 420 | * @messageType: Message type |
| 421 | * @length: Length of the message |
| 422 | * @set_hw: Params containing the HW mode index and callback |
| 423 | */ |
| 424 | struct s_sir_set_hw_mode { |
| 425 | uint16_t messageType; |
| 426 | uint16_t length; |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 427 | struct policy_mgr_hw_mode set_hw; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 428 | }; |
| 429 | |
| 430 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 431 | * struct sir_set_dual_mac_cfg - Set Dual mac config request |
| 432 | * @message_type: Message type |
| 433 | * @length: Length of the message |
| 434 | * @set_dual_mac: Params containing the dual mac config and callback |
| 435 | */ |
| 436 | struct sir_set_dual_mac_cfg { |
| 437 | uint16_t message_type; |
| 438 | uint16_t length; |
Srinivas Girigowda | eb6ecf3 | 2018-02-15 17:04:22 -0800 | [diff] [blame] | 439 | struct policy_mgr_dual_mac_config set_dual_mac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 440 | }; |
| 441 | |
Archana Ramachandran | d41c3ed | 2016-02-10 15:48:06 -0800 | [diff] [blame] | 442 | /** |
| 443 | * struct sir_antenna_mode_param - antenna mode param |
| 444 | * @num_tx_chains: Number of TX chains |
| 445 | * @num_rx_chains: Number of RX chains |
| 446 | * @reason: Reason for setting antenna mode |
| 447 | * @set_antenna_mode_resp: callback to set antenna mode command |
| 448 | */ |
| 449 | struct sir_antenna_mode_param { |
| 450 | uint32_t num_tx_chains; |
| 451 | uint32_t num_rx_chains; |
| 452 | void *set_antenna_mode_resp; |
| 453 | }; |
| 454 | |
| 455 | /** |
| 456 | * struct sir_set_antenna_mode - Set antenna mode request |
| 457 | * @message_type: Message type |
| 458 | * @length: Length of the message |
| 459 | * @set_antenna_mode: Params containing antenna mode params |
| 460 | */ |
| 461 | struct sir_set_antenna_mode { |
| 462 | uint16_t message_type; |
| 463 | uint16_t length; |
| 464 | struct sir_antenna_mode_param set_antenna_mode; |
| 465 | }; |
| 466 | |
Deepak Dhamdhere | c9acc44 | 2016-05-26 02:12:58 -0700 | [diff] [blame] | 467 | /** |
| 468 | * enum tSirBssType - Enum for BSS type used in scanning/joining etc. |
| 469 | * |
| 470 | * @eSIR_INFRASTRUCTURE_MODE: Infrastructure station |
| 471 | * @eSIR_INFRA_AP_MODE: softAP mode |
| 472 | * @eSIR_IBSS_MODE: IBSS mode |
| 473 | * @eSIR_AUTO_MODE: Auto role |
| 474 | * @eSIR_MONITOR_MODE: Monitor mode |
| 475 | * @eSIR_NDI_MODE: NAN datapath mode |
| 476 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 477 | typedef enum eSirBssType { |
| 478 | eSIR_INFRASTRUCTURE_MODE, |
Deepak Dhamdhere | c9acc44 | 2016-05-26 02:12:58 -0700 | [diff] [blame] | 479 | eSIR_INFRA_AP_MODE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 480 | eSIR_IBSS_MODE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 481 | eSIR_AUTO_MODE, |
Manjunathappa Prakash | 59f861d | 2016-04-21 10:33:31 -0700 | [diff] [blame] | 482 | eSIR_MONITOR_MODE, |
Deepak Dhamdhere | c9acc44 | 2016-05-26 02:12:58 -0700 | [diff] [blame] | 483 | eSIR_NDI_MODE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 484 | eSIR_DONOT_USE_BSS_TYPE = SIR_MAX_ENUM_SIZE |
| 485 | } tSirBssType; |
| 486 | |
| 487 | /* / Power Capability info used in 11H */ |
| 488 | typedef struct sSirMacPowerCapInfo { |
| 489 | uint8_t minTxPower; |
| 490 | uint8_t maxTxPower; |
| 491 | } tSirMacPowerCapInfo, *tpSirMacPowerCapInfo; |
| 492 | |
| 493 | /* / Supported Channel info used in 11H */ |
| 494 | typedef struct sSirSupChnl { |
| 495 | uint8_t numChnl; |
| 496 | uint8_t channelList[SIR_MAX_SUPPORTED_CHANNEL_LIST]; |
| 497 | } tSirSupChnl, *tpSirSupChnl; |
| 498 | |
| 499 | typedef enum eSirNwType { |
| 500 | eSIR_11A_NW_TYPE, |
| 501 | eSIR_11B_NW_TYPE, |
| 502 | eSIR_11G_NW_TYPE, |
| 503 | eSIR_11N_NW_TYPE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 504 | eSIR_11AC_NW_TYPE, |
Krishna Kumaar Natarajan | 4f1d772 | 2017-03-03 21:12:51 -0800 | [diff] [blame] | 505 | eSIR_11AX_NW_TYPE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 506 | eSIR_DONOT_USE_NW_TYPE = SIR_MAX_ENUM_SIZE |
| 507 | } tSirNwType; |
| 508 | |
| 509 | /* / Definition for new iBss peer info */ |
| 510 | typedef struct sSirNewIbssPeerInfo { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 511 | struct qdf_mac_addr peerAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 512 | uint16_t aid; |
| 513 | } tSirNewIbssPeerInfo, *tpSirNewIbssPeerInfo; |
| 514 | |
| 515 | /* HT configuration values */ |
| 516 | typedef struct sSirHtConfig { |
| 517 | /* Enable/Disable receiving LDPC coded packets */ |
| 518 | uint32_t ht_rx_ldpc:1; |
| 519 | /* Enable/Disable TX STBC */ |
| 520 | uint32_t ht_tx_stbc:1; |
| 521 | /* Enable/Disable RX STBC */ |
| 522 | uint32_t ht_rx_stbc:2; |
| 523 | /* Enable/Disable SGI */ |
Sandeep Puligilla | 607f34a | 2016-05-25 14:37:47 -0700 | [diff] [blame] | 524 | uint32_t ht_sgi20:1; |
| 525 | uint32_t ht_sgi40:1; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 526 | uint32_t unused:27; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 527 | } qdf_packed tSirHTConfig, *tpSirHTConfig; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 528 | |
Sandeep Puligilla | 9891743 | 2016-06-10 13:50:28 -0700 | [diff] [blame] | 529 | /** |
Jeff Johnson | 118a4a0 | 2018-05-06 00:14:15 -0700 | [diff] [blame] | 530 | * struct sir_vht_config - VHT capabilities |
Sandeep Puligilla | 9891743 | 2016-06-10 13:50:28 -0700 | [diff] [blame] | 531 | * @max_mpdu_len: MPDU length |
| 532 | * @supported_channel_widthset: channel width set |
| 533 | * @ldpc_coding: LDPC coding capability |
| 534 | * @shortgi80: short GI 80 support |
| 535 | * @shortgi160and80plus80: short Gi 160 & 80+80 support |
| 536 | * @tx_stbc; Tx STBC cap |
| 537 | * @tx_stbc: Rx STBC cap |
| 538 | * @su_beam_former: SU beam former cap |
| 539 | * @su_beam_formee: SU beam formee cap |
| 540 | * @csnof_beamformer_antSup: Antenna support for beamforming |
| 541 | * @num_soundingdim: Sound dimensions |
| 542 | * @mu_beam_former: MU beam former cap |
| 543 | * @mu_beam_formee: MU beam formee cap |
| 544 | * @vht_txops: TXOP power save |
| 545 | * @htc_vhtcap: HTC VHT capability |
| 546 | * @max_ampdu_lenexp: AMPDU length |
| 547 | * @vht_link_adapt: VHT link adapatation capable |
| 548 | * @rx_antpattern: Rx Antenna pattern |
| 549 | * @tx_antpattern: Tx Antenna pattern |
| 550 | */ |
| 551 | struct sir_vht_config { |
| 552 | uint32_t max_mpdu_len:2; |
| 553 | uint32_t supported_channel_widthset:2; |
| 554 | uint32_t ldpc_coding:1; |
| 555 | uint32_t shortgi80:1; |
| 556 | uint32_t shortgi160and80plus80:1; |
| 557 | uint32_t tx_stbc:1; |
| 558 | uint32_t rx_stbc:3; |
| 559 | uint32_t su_beam_former:1; |
| 560 | uint32_t su_beam_formee:1; |
| 561 | uint32_t csnof_beamformer_antSup:3; |
| 562 | uint32_t num_soundingdim:3; |
| 563 | uint32_t mu_beam_former:1; |
| 564 | uint32_t mu_beam_formee:1; |
| 565 | uint32_t vht_txops:1; |
| 566 | uint32_t htc_vhtcap:1; |
| 567 | uint32_t max_ampdu_lenexp:3; |
| 568 | uint32_t vht_link_adapt:2; |
| 569 | uint32_t rx_antpattern:1; |
| 570 | uint32_t tx_antpattern:1; |
| 571 | uint32_t unused:2; |
| 572 | }; |
| 573 | |
| 574 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 575 | typedef struct sSirAddIeParams { |
| 576 | uint16_t probeRespDataLen; |
| 577 | uint8_t *probeRespData_buff; |
| 578 | uint16_t assocRespDataLen; |
| 579 | uint8_t *assocRespData_buff; |
| 580 | uint16_t probeRespBCNDataLen; |
| 581 | uint8_t *probeRespBCNData_buff; |
| 582 | } tSirAddIeParams, *tpSirAddIeParams; |
| 583 | |
| 584 | /* / Definition for kick starting BSS */ |
| 585 | /* / ---> MAC */ |
| 586 | /** |
| 587 | * Usage of ssId, numSSID & ssIdList: |
| 588 | * --------------------------------- |
| 589 | * 1. ssId.length of zero indicates that Broadcast/Suppress SSID |
| 590 | * feature is enabled. |
| 591 | * 2. If ssId.length is zero, MAC SW will advertise NULL SSID |
| 592 | * and interpret the SSID list from numSSID & ssIdList. |
| 593 | * 3. If ssId.length is non-zero, MAC SW will advertise the SSID |
| 594 | * specified in the ssId field and it is expected that |
| 595 | * application will set numSSID to one (only one SSID present |
| 596 | * in the list) and SSID in the list is same as ssId field. |
| 597 | * 4. Application will always set numSSID >= 1. |
| 598 | */ |
| 599 | /* ***** NOTE: Please make sure all codes are updated if inserting field into |
| 600 | * this structure..********** */ |
| 601 | typedef struct sSirSmeStartBssReq { |
| 602 | uint16_t messageType; /* eWNI_SME_START_BSS_REQ */ |
| 603 | uint16_t length; |
| 604 | uint8_t sessionId; /* Added for BT-AMP Support */ |
| 605 | uint16_t transactionId; /* Added for BT-AMP Support */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 606 | struct qdf_mac_addr bssid; /* Added for BT-AMP Support */ |
| 607 | struct qdf_mac_addr self_macaddr; /* Added for BT-AMP Support */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 608 | uint16_t beaconInterval; /* Added for BT-AMP Support */ |
| 609 | uint8_t dot11mode; |
| 610 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 611 | uint8_t cc_switch_mode; |
| 612 | #endif |
| 613 | tSirBssType bssType; |
| 614 | tSirMacSSid ssId; |
| 615 | uint8_t channelId; |
| 616 | ePhyChanBondState cbMode; |
| 617 | uint8_t vht_channel_width; |
| 618 | uint8_t center_freq_seg0; |
| 619 | uint8_t center_freq_seg1; |
| 620 | uint8_t sec_ch_offset; |
| 621 | |
| 622 | uint8_t privacy; |
| 623 | uint8_t apUapsdEnable; |
| 624 | uint8_t ssidHidden; |
| 625 | bool fwdWPSPBCProbeReq; |
| 626 | bool protEnabled; |
| 627 | bool obssProtEnabled; |
| 628 | uint16_t ht_capab; |
| 629 | tAniAuthType authType; |
| 630 | uint32_t dtimPeriod; |
| 631 | uint8_t wps_state; |
| 632 | uint8_t isCoalesingInIBSSAllowed; /* Coalesing on/off knob */ |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 633 | enum QDF_OPMODE bssPersona; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 634 | |
| 635 | uint8_t txLdpcIniFeatureEnabled; |
| 636 | |
| 637 | tSirRSNie rsnIE; /* RSN IE to be sent in */ |
| 638 | /* Beacon and Probe */ |
| 639 | /* Response frames */ |
| 640 | tSirNwType nwType; /* Indicates 11a/b/g */ |
| 641 | tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */ |
| 642 | tSirMacRateSet extendedRateSet; /* Has 11g rates */ |
| 643 | tSirHTConfig htConfig; |
Sandeep Puligilla | 9891743 | 2016-06-10 13:50:28 -0700 | [diff] [blame] | 644 | struct sir_vht_config vht_config; |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 645 | #ifdef WLAN_FEATURE_11AX |
Naveen Rawat | d8feac1 | 2017-09-08 15:08:39 -0700 | [diff] [blame] | 646 | tDot11fIEhe_cap he_config; |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 647 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 648 | #ifdef WLAN_FEATURE_11W |
| 649 | bool pmfCapable; |
| 650 | bool pmfRequired; |
| 651 | #endif |
| 652 | |
| 653 | tSirAddIeParams addIeParams; |
| 654 | |
| 655 | bool obssEnabled; |
| 656 | uint8_t sap_dot11mc; |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 657 | uint16_t beacon_tx_rate; |
Kapil Gupta | 4b2efbb | 2016-10-03 13:07:20 +0530 | [diff] [blame] | 658 | bool vendor_vht_sap; |
Arif Hussain | 671a190 | 2017-03-17 09:08:32 -0700 | [diff] [blame] | 659 | uint32_t cac_duration_ms; |
| 660 | uint32_t dfs_regdomain; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 661 | |
| 662 | } tSirSmeStartBssReq, *tpSirSmeStartBssReq; |
| 663 | |
| 664 | #define GET_IE_LEN_IN_BSS(lenInBss) (lenInBss + sizeof(lenInBss) - \ |
| 665 | ((uintptr_t)OFFSET_OF(tSirBssDescription,\ |
| 666 | ieFields))) |
| 667 | |
| 668 | #define WSCIE_PROBE_RSP_LEN (317 + 2) |
| 669 | |
Sridhar Selvaraj | a44c19e | 2017-08-21 14:20:20 +0530 | [diff] [blame] | 670 | #ifdef WLAN_FEATURE_FILS_SK |
| 671 | /* struct fils_ind_elements: elements parsed from fils indication present |
| 672 | * in beacon/probe resp |
| 673 | * @realm_cnt: number of realm present |
| 674 | * @realm: realms |
| 675 | * @is_fils_sk_supported: if FILS SK supported |
| 676 | * @is_cache_id_present: if cache id present |
| 677 | * @cache_id: cache id |
| 678 | */ |
| 679 | struct fils_ind_elements { |
| 680 | uint16_t realm_cnt; |
| 681 | uint8_t realm[SIR_MAX_REALM_COUNT][SIR_REALM_LEN]; |
| 682 | bool is_fils_sk_supported; |
| 683 | bool is_cache_id_present; |
| 684 | uint8_t cache_id[CACHE_ID_LEN]; |
| 685 | }; |
| 686 | #endif |
| 687 | |
Jeff Johnson | e58271f | 2017-10-06 09:58:59 -0700 | [diff] [blame] | 688 | struct bss_description { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 689 | /* offset of the ieFields from bssId. */ |
| 690 | uint16_t length; |
| 691 | tSirMacAddr bssId; |
Arun Khandavalli | 8a711cb | 2017-01-03 20:23:56 +0530 | [diff] [blame] | 692 | unsigned long scansystimensec; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 693 | uint32_t timeStamp[2]; |
| 694 | uint16_t beaconInterval; |
| 695 | uint16_t capabilityInfo; |
| 696 | tSirNwType nwType; /* Indicates 11a/b/g */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 697 | int8_t rssi; |
Deepak Dhamdhere | 68929ec | 2015-08-05 15:16:35 -0700 | [diff] [blame] | 698 | int8_t rssi_raw; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 699 | int8_t sinr; |
| 700 | /* channelId what peer sent in beacon/probersp. */ |
| 701 | uint8_t channelId; |
| 702 | /* channelId on which we are parked at. */ |
| 703 | /* used only in scan case. */ |
| 704 | uint8_t channelIdSelf; |
| 705 | uint8_t sSirBssDescriptionRsvd[3]; |
Deepthi Gowri | 6acee34 | 2016-10-28 15:00:38 +0530 | [diff] [blame] | 706 | /* Based on system time, not a relative time. */ |
| 707 | uint64_t received_time; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 708 | uint32_t parentTSF; |
| 709 | uint32_t startTSF[2]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 710 | uint8_t mdiePresent; |
| 711 | /* MDIE for 11r, picked from the beacons */ |
| 712 | uint8_t mdie[SIR_MDIE_SIZE]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 713 | #ifdef FEATURE_WLAN_ESE |
| 714 | uint16_t QBSSLoad_present; |
| 715 | uint16_t QBSSLoad_avail; |
| 716 | /* To achieve 8-byte alignment with ESE enabled */ |
| 717 | uint32_t reservedPadding5; |
| 718 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 719 | /* whether it is from a probe rsp */ |
| 720 | uint8_t fProbeRsp; |
Deepak Dhamdhere | 652d7e8 | 2015-08-06 14:16:53 -0700 | [diff] [blame] | 721 | /* Actual channel the beacon/probe response was received on */ |
| 722 | uint8_t rx_channel; |
Krishna Kumaar Natarajan | 89a99d4 | 2016-08-04 15:44:38 -0700 | [diff] [blame] | 723 | tSirMacSeqCtl seq_ctrl; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 724 | uint32_t WscIeLen; |
| 725 | uint8_t WscIeProbeRsp[WSCIE_PROBE_RSP_LEN]; |
| 726 | uint8_t reservedPadding4; |
| 727 | uint32_t tsf_delta; |
Sridhar Selvaraj | a44c19e | 2017-08-21 14:20:20 +0530 | [diff] [blame] | 728 | #ifdef WLAN_FEATURE_FILS_SK |
| 729 | struct fils_ind_elements fils_info_element; |
| 730 | #endif |
| 731 | /* Please keep the structure 4 bytes aligned above the ieFields */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 732 | uint32_t ieFields[1]; |
Jeff Johnson | e58271f | 2017-10-06 09:58:59 -0700 | [diff] [blame] | 733 | }; |
| 734 | typedef struct bss_description tSirBssDescription, *tpSirBssDescription; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 735 | |
| 736 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 737 | typedef struct sSirSmeHTProfile { |
| 738 | uint8_t dot11mode; |
| 739 | uint8_t htCapability; |
| 740 | uint8_t htSupportedChannelWidthSet; |
| 741 | uint8_t htRecommendedTxWidthSet; |
| 742 | ePhyChanBondState htSecondaryChannelOffset; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 743 | uint8_t vhtCapability; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 744 | uint8_t apCenterChan; |
| 745 | uint8_t apChanWidth; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 746 | } tSirSmeHTProfile; |
| 747 | #endif |
| 748 | /* / Definition for response message to previously */ |
| 749 | /* / issued start BSS request */ |
| 750 | /* / MAC ---> */ |
| 751 | typedef struct sSirSmeStartBssRsp { |
| 752 | uint16_t messageType; /* eWNI_SME_START_BSS_RSP */ |
| 753 | uint16_t length; |
| 754 | uint8_t sessionId; |
| 755 | uint16_t transactionId; /* transaction ID for cmd */ |
| 756 | tSirResultCodes statusCode; |
| 757 | tSirBssType bssType; /* Add new type for WDS mode */ |
| 758 | uint16_t beaconInterval; /* Beacon Interval for both type */ |
Jeff Johnson | 179fd8a | 2018-05-11 14:20:05 -0700 | [diff] [blame] | 759 | uint32_t staId; /* Station ID for Self */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 760 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 761 | tSirSmeHTProfile HTProfile; |
| 762 | #endif |
| 763 | tSirBssDescription bssDescription; /* Peer BSS description */ |
| 764 | } tSirSmeStartBssRsp, *tpSirSmeStartBssRsp; |
| 765 | |
| 766 | typedef struct sSirChannelList { |
| 767 | uint8_t numChannels; |
| 768 | uint8_t channelNumber[SIR_ESE_MAX_MEAS_IE_REQS]; |
| 769 | } tSirChannelList, *tpSirChannelList; |
| 770 | |
| 771 | typedef struct sSirDFSChannelList { |
| 772 | uint32_t timeStamp[SIR_MAX_24G_5G_CHANNEL_RANGE]; |
| 773 | |
| 774 | } tSirDFSChannelList, *tpSirDFSChannelList; |
| 775 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 776 | /* / Two Background Scan mode */ |
| 777 | typedef enum eSirBackgroundScanMode { |
| 778 | eSIR_ROAMING_SCAN = 2, |
| 779 | } tSirBackgroundScanMode; |
| 780 | |
| 781 | /* / Two types of traffic check */ |
| 782 | typedef enum eSirLinkTrafficCheck { |
| 783 | eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 0, |
| 784 | eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN = 1, |
| 785 | eSIR_CHECK_ROAMING_SCAN = 2, |
| 786 | } tSirLinkTrafficCheck; |
| 787 | |
| 788 | #define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0 |
| 789 | #define SIR_BG_SCAN_PURGE_RESUTLS 0x80 |
| 790 | #define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01 |
| 791 | #define SIR_SCAN_MAX_NUM_SSID 0x0A |
| 792 | #define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02 |
| 793 | #define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40 |
| 794 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 795 | typedef struct sSirSmeScanAbortReq { |
| 796 | uint16_t type; |
| 797 | uint16_t msgLen; |
| 798 | uint8_t sessionId; |
| 799 | uint32_t scan_id; |
| 800 | } tSirSmeScanAbortReq, *tpSirSmeScanAbortReq; |
| 801 | |
| 802 | typedef struct sSirSmeScanChanReq { |
| 803 | uint16_t type; |
| 804 | uint16_t msgLen; |
| 805 | uint8_t sessionId; |
| 806 | uint16_t transcationId; |
| 807 | } tSirSmeGetScanChanReq, *tpSirSmeGetScanChanReq; |
| 808 | |
| 809 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 810 | struct oem_data_req { |
Gupta, Kapil | 8a605e1 | 2016-06-08 14:14:35 +0530 | [diff] [blame] | 811 | uint32_t data_len; |
Krishna Kumaar Natarajan | 9ac8efd | 2015-11-20 13:40:24 -0800 | [diff] [blame] | 812 | uint8_t *data; |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 813 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 814 | |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 815 | struct oem_data_rsp { |
Krishna Kumaar Natarajan | 608291e | 2015-12-14 18:17:27 -0800 | [diff] [blame] | 816 | uint32_t rsp_len; |
Krishna Kumaar Natarajan | 73ea9f2 | 2016-06-30 18:38:47 -0700 | [diff] [blame] | 817 | uint8_t *data; |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 818 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 819 | #endif /* FEATURE_OEM_DATA_SUPPORT */ |
| 820 | |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 821 | #ifdef FEATURE_WLAN_ESE |
yeshwanth sriram guntuka | 27e4ffc | 2016-12-01 18:00:17 +0530 | [diff] [blame] | 822 | typedef struct ese_wmm_tspec_ie { |
| 823 | uint16_t traffic_type:1; |
| 824 | uint16_t tsid:4; |
| 825 | uint16_t direction:2; |
| 826 | uint16_t access_policy:2; |
| 827 | uint16_t aggregation:1; |
| 828 | uint16_t psb:1; |
| 829 | uint16_t user_priority:3; |
| 830 | uint16_t tsinfo_ack_pol:2; |
| 831 | uint8_t tsinfo_rsvd:7; |
| 832 | uint8_t burst_size_defn:1; |
| 833 | uint16_t size:15; |
| 834 | uint16_t fixed:1; |
| 835 | uint16_t max_msdu_size; |
| 836 | uint32_t min_service_int; |
| 837 | uint32_t max_service_int; |
| 838 | uint32_t inactivity_int; |
| 839 | uint32_t suspension_int; |
| 840 | uint32_t service_start_time; |
| 841 | uint32_t min_data_rate; |
| 842 | uint32_t mean_data_rate; |
| 843 | uint32_t peak_data_rate; |
| 844 | uint32_t burst_size; |
| 845 | uint32_t delay_bound; |
| 846 | uint32_t min_phy_rate; |
| 847 | uint16_t surplus_bw_allowance; |
| 848 | uint16_t medium_time; |
| 849 | } qdf_packed ese_wmm_tspec_ie; |
| 850 | |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 851 | typedef struct sTspecInfo { |
| 852 | uint8_t valid; |
| 853 | tSirMacTspecIE tspec; |
| 854 | } tTspecInfo; |
| 855 | |
| 856 | #define SIR_ESE_MAX_TSPEC_IES 4 |
| 857 | typedef struct sESETspecTspecInfo { |
| 858 | uint8_t numTspecs; |
| 859 | tTspecInfo tspec[SIR_ESE_MAX_TSPEC_IES]; |
| 860 | } tESETspecInfo; |
| 861 | |
| 862 | typedef struct sSirTsmIE { |
| 863 | uint8_t tsid; |
| 864 | uint8_t state; |
| 865 | uint16_t msmt_interval; |
| 866 | } tSirTsmIE, *tpSirTsmIE; |
| 867 | typedef struct sSirSmeTsmIEInd { |
| 868 | tSirTsmIE tsmIe; |
| 869 | uint8_t sessionId; |
| 870 | } tSirSmeTsmIEInd, *tpSirSmeTsmIEInd; |
| 871 | typedef struct sAniTrafStrmMetrics { |
| 872 | uint16_t UplinkPktQueueDly; |
| 873 | uint16_t UplinkPktQueueDlyHist[4]; |
| 874 | uint32_t UplinkPktTxDly; |
| 875 | uint16_t UplinkPktLoss; |
| 876 | uint16_t UplinkPktCount; |
| 877 | uint8_t RoamingCount; |
| 878 | uint16_t RoamingDly; |
| 879 | } tAniTrafStrmMetrics, *tpAniTrafStrmMetrics; |
| 880 | |
| 881 | typedef struct sAniGetTsmStatsReq { |
| 882 | /* Common for all types are requests */ |
| 883 | uint16_t msgType; /* message type is same as the request type */ |
| 884 | uint16_t msgLen; /* length of the entire request */ |
| 885 | uint8_t staId; |
| 886 | uint8_t tid; /* traffic id */ |
| 887 | struct qdf_mac_addr bssId; |
| 888 | void *tsmStatsCallback; |
| 889 | void *pDevContext; /* device context */ |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 890 | } tAniGetTsmStatsReq, *tpAniGetTsmStatsReq; |
| 891 | |
| 892 | typedef struct sAniGetTsmStatsRsp { |
| 893 | /* Common for all types are responses */ |
| 894 | uint16_t msgType; /* |
| 895 | * message type is same as |
| 896 | * the request type |
| 897 | */ |
| 898 | uint16_t msgLen; /* |
| 899 | * length of the entire request, |
| 900 | * includes the pStatsBuf length too |
| 901 | */ |
| 902 | uint8_t sessionId; |
| 903 | uint32_t rc; /* success/failure */ |
| 904 | uint32_t staId; /* |
| 905 | * Per STA stats request must |
| 906 | * contain valid |
| 907 | */ |
| 908 | tAniTrafStrmMetrics tsmMetrics; |
| 909 | void *tsmStatsReq; /* tsm stats request backup */ |
| 910 | } tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp; |
| 911 | |
| 912 | typedef struct sSirEseBcnReportBssInfo { |
| 913 | tBcnReportFields bcnReportFields; |
| 914 | uint8_t ieLen; |
| 915 | uint8_t *pBuf; |
| 916 | } tSirEseBcnReportBssInfo, *tpSirEseBcnReportBssInfo; |
| 917 | |
| 918 | typedef struct sSirEseBcnReportRsp { |
| 919 | uint16_t measurementToken; |
| 920 | uint8_t flag; /* Flag to report measurement done and more data */ |
| 921 | uint8_t numBss; |
| 922 | tSirEseBcnReportBssInfo bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC]; |
| 923 | } tSirEseBcnReportRsp, *tpSirEseBcnReportRsp; |
| 924 | |
| 925 | #define TSRS_11AG_RATE_6MBPS 0xC |
| 926 | #define TSRS_11B_RATE_5_5MBPS 0xB |
| 927 | typedef struct sSirMacESETSRSIE { |
| 928 | uint8_t tsid; |
| 929 | uint8_t rates[8]; |
| 930 | } tSirMacESETSRSIE; |
| 931 | typedef struct sSirMacESETSMIE { |
| 932 | uint8_t tsid; |
| 933 | uint8_t state; |
| 934 | uint16_t msmt_interval; |
| 935 | } tSirMacESETSMIE; |
| 936 | typedef struct sTSMStats { |
| 937 | uint8_t tid; |
| 938 | struct qdf_mac_addr bssid; |
| 939 | tTrafStrmMetrics tsmMetrics; |
| 940 | } tTSMStats, *tpTSMStats; |
| 941 | typedef struct sEseTSMContext { |
| 942 | uint8_t tid; |
| 943 | tSirMacESETSMIE tsmInfo; |
| 944 | tTrafStrmMetrics tsmMetrics; |
| 945 | } tEseTSMContext, *tpEseTSMContext; |
| 946 | typedef struct sEsePEContext { |
| 947 | tEseTSMContext tsm; |
| 948 | } tEsePEContext, *tpEsePEContext; |
| 949 | |
| 950 | typedef struct sSirPlmReq { |
| 951 | uint16_t diag_token; /* Dialog token */ |
| 952 | uint16_t meas_token; /* measurement token */ |
| 953 | uint16_t numBursts; /* total number of bursts */ |
| 954 | uint16_t burstInt; /* burst interval in seconds */ |
| 955 | uint16_t measDuration; /* in TU's,STA goes off-ch */ |
| 956 | /* no of times the STA should cycle through PLM ch list */ |
| 957 | uint8_t burstLen; |
| 958 | int8_t desiredTxPwr; /* desired tx power */ |
| 959 | struct qdf_mac_addr mac_addr; /* MC dest addr */ |
| 960 | /* no of channels */ |
| 961 | uint8_t plmNumCh; |
| 962 | /* channel numbers */ |
| 963 | uint8_t plmChList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 964 | uint8_t sessionId; |
| 965 | bool enable; |
| 966 | } tSirPlmReq, *tpSirPlmReq; |
| 967 | |
| 968 | #endif /* FEATURE_WLAN_ESE */ |
| 969 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 970 | /* / Definition for response message to previously issued scan request */ |
| 971 | typedef struct sSirSmeScanRsp { |
| 972 | uint16_t messageType; /* eWNI_SME_SCAN_RSP */ |
| 973 | uint16_t length; |
| 974 | uint8_t sessionId; |
| 975 | tSirResultCodes statusCode; |
| 976 | uint16_t transcationId; |
| 977 | uint32_t scan_id; |
| 978 | } tSirSmeScanRsp, *tpSirSmeScanRsp; |
| 979 | |
| 980 | /* / Definition for join request */ |
| 981 | /* / ---> MAC */ |
| 982 | /* / WARNING! If you add a field in JOIN REQ. */ |
| 983 | /* / Make sure to add it in REASSOC REQ */ |
| 984 | /* / The Serdes function is the same and its */ |
| 985 | /* / shared with REASSOC. So if we add a field */ |
| 986 | /* here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC. */ |
| 987 | typedef struct sSirSmeJoinReq { |
| 988 | uint16_t messageType; /* eWNI_SME_JOIN_REQ */ |
| 989 | uint16_t length; |
| 990 | uint8_t sessionId; |
| 991 | uint16_t transactionId; |
| 992 | tSirMacSSid ssId; |
| 993 | tSirMacAddr selfMacAddr; /* self Mac address */ |
| 994 | tSirBssType bsstype; /* add new type for BT-AMP STA and AP Modules */ |
| 995 | uint8_t dot11mode; /* to support BT-AMP */ |
| 996 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 997 | uint8_t cc_switch_mode; |
| 998 | #endif |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 999 | enum QDF_OPMODE staPersona; /* Persona */ |
Abhishek Singh | f78bd2d | 2016-04-27 16:47:56 +0530 | [diff] [blame] | 1000 | bool wps_registration; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1001 | ePhyChanBondState cbMode; /* Pass CB mode value in Join. */ |
| 1002 | |
| 1003 | /*This contains the UAPSD Flag for all 4 AC |
| 1004 | * B0: AC_VO UAPSD FLAG |
| 1005 | * B1: AC_VI UAPSD FLAG |
| 1006 | * B2: AC_BK UAPSD FLAG |
| 1007 | * B3: AC_BE UASPD FLAG |
| 1008 | */ |
| 1009 | uint8_t uapsdPerAcBitmask; |
| 1010 | |
| 1011 | tSirMacRateSet operationalRateSet; /* Has 11a or 11b rates */ |
| 1012 | tSirMacRateSet extendedRateSet; /* Has 11g rates */ |
| 1013 | tSirRSNie rsnIE; /* RSN IE to be sent in */ |
| 1014 | /* (Re) Association Request */ |
| 1015 | #ifdef FEATURE_WLAN_ESE |
| 1016 | /* CCMK IE to be included as handler for join and reassoc is */ |
| 1017 | tSirCCKMie cckmIE; |
| 1018 | /* the same. The join will never carry cckm, but will be set to */ |
| 1019 | /* 0. */ |
| 1020 | #endif |
| 1021 | |
| 1022 | tSirAddie addIEScan; /* Additional IE to be sent in */ |
| 1023 | /* (unicast) Probe Request at the time of join */ |
| 1024 | |
| 1025 | tSirAddie addIEAssoc; /* Additional IE to be sent in */ |
| 1026 | /* (Re) Association Request */ |
| 1027 | |
| 1028 | tAniEdType UCEncryptionType; |
| 1029 | |
| 1030 | tAniEdType MCEncryptionType; |
| 1031 | |
| 1032 | #ifdef WLAN_FEATURE_11W |
| 1033 | tAniEdType MgmtEncryptionType; |
| 1034 | #endif |
| 1035 | |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 1036 | bool is11Rconnection; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1037 | #ifdef FEATURE_WLAN_ESE |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 1038 | bool isESEFeatureIniEnabled; |
| 1039 | bool isESEconnection; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1040 | tESETspecInfo eseTspecInfo; |
| 1041 | #endif |
| 1042 | |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 1043 | bool isFastTransitionEnabled; |
| 1044 | bool isFastRoamIniFeatureEnabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1045 | |
| 1046 | uint8_t txLdpcIniFeatureEnabled; |
| 1047 | tSirHTConfig htConfig; |
Sandeep Puligilla | 9891743 | 2016-06-10 13:50:28 -0700 | [diff] [blame] | 1048 | struct sir_vht_config vht_config; |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 1049 | #ifdef WLAN_FEATURE_11AX |
Naveen Rawat | d8feac1 | 2017-09-08 15:08:39 -0700 | [diff] [blame] | 1050 | tDot11fIEhe_cap he_config; |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 1051 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1052 | uint8_t enableVhtpAid; |
| 1053 | uint8_t enableVhtGid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1054 | uint8_t enableAmpduPs; |
| 1055 | uint8_t enableHtSmps; |
| 1056 | uint8_t htSmps; |
Archana Ramachandran | fec2481 | 2016-02-16 16:31:56 -0800 | [diff] [blame] | 1057 | bool send_smps_action; |
Kiran Kumar Lokere | 722dccd | 2018-02-23 13:23:52 -0800 | [diff] [blame] | 1058 | bool he_with_wep_tkip; |
Deepak Dhamdhere | 612392c | 2016-08-28 02:56:51 -0700 | [diff] [blame] | 1059 | uint8_t max_amsdu_num; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 1060 | bool isWMEenabled; |
| 1061 | bool isQosEnabled; |
| 1062 | bool isOSENConnection; |
Krishna Kumaar Natarajan | f599c6e | 2015-11-03 11:44:03 -0800 | [diff] [blame] | 1063 | struct rrm_config_param rrm_config; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 1064 | bool spectrumMgtIndicator; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1065 | tSirMacPowerCapInfo powerCap; |
| 1066 | tSirSupChnl supportedChannels; |
Selvaraj, Sridhar | 05ea079 | 2017-05-17 12:17:03 +0530 | [diff] [blame] | 1067 | bool enable_bcast_probe_rsp; |
Sridhar Selvaraj | 8c6f5e8 | 2017-08-21 14:53:46 +0530 | [diff] [blame] | 1068 | #ifdef WLAN_FEATURE_FILS_SK |
| 1069 | struct cds_fils_connection_info fils_con_info; |
| 1070 | #endif |
Padma, Santhosh Kumar | b8f65d9 | 2017-09-14 13:05:42 +0530 | [diff] [blame] | 1071 | bool sae_pmk_cached; |
Sridhar Selvaraj | 8c6f5e8 | 2017-08-21 14:53:46 +0530 | [diff] [blame] | 1072 | /* Pls make this as last variable in struct */ |
Abhishek Singh | b59f8d4 | 2017-07-31 14:42:47 +0530 | [diff] [blame] | 1073 | bool force_24ghz_in_ht20; |
Abhishek Singh | 6454ad3 | 2017-12-20 10:42:21 +0530 | [diff] [blame] | 1074 | bool force_rsne_override; |
Selvaraj, Sridhar | 81ab80d | 2017-06-08 12:21:39 +0530 | [diff] [blame] | 1075 | tSirBssDescription bssDescription; |
| 1076 | /* |
| 1077 | * WARNING: Pls make bssDescription as last variable in struct |
| 1078 | * tSirSmeJoinReq as it has ieFields followed after this bss |
| 1079 | * description. Adding a variable after this corrupts the ieFields |
| 1080 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1081 | } tSirSmeJoinReq, *tpSirSmeJoinReq; |
| 1082 | |
Jeff Johnson | 47d7524 | 2018-05-12 15:58:53 -0700 | [diff] [blame] | 1083 | /* / Definition for response message to previously issued join request */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1084 | /* / MAC ---> */ |
| 1085 | typedef struct sSirSmeJoinRsp { |
| 1086 | uint16_t messageType; /* eWNI_SME_JOIN_RSP */ |
| 1087 | uint16_t length; |
| 1088 | uint8_t sessionId; /* Session ID */ |
| 1089 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 1090 | tSirResultCodes statusCode; |
| 1091 | tAniAuthType authType; |
| 1092 | uint32_t vht_channel_width; |
| 1093 | /* It holds reasonCode when join fails due to deauth/disassoc frame. |
| 1094 | * Otherwise it holds status code. |
| 1095 | */ |
| 1096 | uint16_t protStatusCode; |
| 1097 | uint16_t aid; |
| 1098 | uint32_t beaconLength; |
| 1099 | uint32_t assocReqLength; |
| 1100 | uint32_t assocRspLength; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1101 | uint32_t parsedRicRspLen; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1102 | #ifdef FEATURE_WLAN_ESE |
| 1103 | uint32_t tspecIeLen; |
| 1104 | #endif |
| 1105 | uint32_t staId; /* Station ID for peer */ |
| 1106 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1107 | /*Timing measurement capability */ |
| 1108 | uint8_t timingMeasCap; |
| 1109 | |
| 1110 | #ifdef FEATURE_WLAN_TDLS |
| 1111 | /* TDLS prohibited and TDLS channel switch prohibited are set as |
| 1112 | * per ExtCap IE in received assoc/re-assoc response from AP |
| 1113 | */ |
| 1114 | bool tdls_prohibited; |
| 1115 | bool tdls_chan_swit_prohibited; |
| 1116 | #endif |
Kanchanapally, Vidyullatha | e306281 | 2015-05-22 17:28:57 +0530 | [diff] [blame] | 1117 | uint8_t nss; |
| 1118 | uint32_t max_rate_flags; |
| 1119 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1120 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 1121 | tSirSmeHTProfile HTProfile; |
| 1122 | #endif |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1123 | bool supported_nss_1x1; |
Anurag Chouhan | 5de8d17 | 2016-07-13 14:44:28 +0530 | [diff] [blame] | 1124 | tDot11fIEHTCaps ht_caps; |
| 1125 | tDot11fIEVHTCaps vht_caps; |
| 1126 | tDot11fIEHTInfo ht_operation; |
| 1127 | tDot11fIEVHTOperation vht_operation; |
| 1128 | tDot11fIEhs20vendor_ie hs20vendor_ie; |
Sridhar Selvaraj | 0d5d2c7 | 2017-08-17 17:30:01 +0530 | [diff] [blame] | 1129 | bool is_fils_connection; |
Sridhar Selvaraj | 0d5d2c7 | 2017-08-17 17:30:01 +0530 | [diff] [blame] | 1130 | uint16_t fils_seq_num; |
Vignesh Viswanathan | 0b0fa27 | 2017-09-18 17:12:04 +0530 | [diff] [blame] | 1131 | #ifdef WLAN_FEATURE_FILS_SK |
Sridhar Selvaraj | 0d5d2c7 | 2017-08-17 17:30:01 +0530 | [diff] [blame] | 1132 | struct fils_join_rsp_params *fils_join_rsp; |
| 1133 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1134 | uint8_t frames[1]; |
| 1135 | } tSirSmeJoinRsp, *tpSirSmeJoinRsp; |
| 1136 | |
| 1137 | /* / probereq from peer, when wsc is enabled */ |
| 1138 | typedef struct sSirSmeProbereq { |
| 1139 | uint16_t messageType; |
| 1140 | uint16_t length; |
| 1141 | uint8_t sessionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1142 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1143 | uint16_t devicePasswdId; |
| 1144 | } tSirSmeProbeReq, *tpSirSmeProbeReq; |
| 1145 | |
| 1146 | typedef struct sSirSmeChanInfo { |
| 1147 | uint8_t chan_id; |
| 1148 | uint32_t mhz; |
| 1149 | uint32_t band_center_freq1; |
| 1150 | uint32_t band_center_freq2; |
| 1151 | uint32_t info; |
| 1152 | uint32_t reg_info_1; |
| 1153 | uint32_t reg_info_2; |
Kanchanapally, Vidyullatha | e306281 | 2015-05-22 17:28:57 +0530 | [diff] [blame] | 1154 | uint8_t nss; |
| 1155 | uint32_t rate_flags; |
Manishekar Chandrasekaran | ec26759 | 2016-05-26 19:10:04 +0530 | [diff] [blame] | 1156 | uint8_t sec_ch_offset; |
| 1157 | enum phy_ch_width ch_width; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1158 | } tSirSmeChanInfo, *tpSirSmeChanInfo; |
Kanchanapally, Vidyullatha | e306281 | 2015-05-22 17:28:57 +0530 | [diff] [blame] | 1159 | |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 1160 | enum sir_sme_phy_mode { |
| 1161 | SIR_SME_PHY_MODE_LEGACY = 0, |
| 1162 | SIR_SME_PHY_MODE_HT = 1, |
| 1163 | SIR_SME_PHY_MODE_VHT = 2 |
| 1164 | }; |
| 1165 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1166 | /* / Definition for Association indication from peer */ |
| 1167 | /* / MAC ---> */ |
| 1168 | typedef struct sSirSmeAssocInd { |
| 1169 | uint16_t messageType; /* eWNI_SME_ASSOC_IND */ |
| 1170 | uint16_t length; |
| 1171 | uint8_t sessionId; |
| 1172 | tSirMacAddr peerMacAddr; |
| 1173 | uint16_t aid; |
| 1174 | tSirMacAddr bssId; /* Self BSSID */ |
| 1175 | uint16_t staId; /* Station ID for peer */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1176 | tAniAuthType authType; |
| 1177 | tAniSSID ssId; /* SSID used by STA to associate */ |
| 1178 | tSirWAPIie wapiIE; /* WAPI IE received from peer */ |
| 1179 | tSirRSNie rsnIE; /* RSN IE received from peer */ |
| 1180 | /* Additional IE received from peer, which possibly include |
| 1181 | * WSC IE and/or P2P IE |
| 1182 | */ |
| 1183 | tSirAddie addIE; |
| 1184 | |
| 1185 | /* powerCap & supportedChannels are present only when */ |
| 1186 | /* spectrumMgtIndicator flag is set */ |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 1187 | bool spectrumMgtIndicator; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1188 | tSirMacPowerCapInfo powerCap; |
| 1189 | tSirSupChnl supportedChannels; |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 1190 | bool wmmEnabledSta; /* if present - STA is WMM enabled */ |
| 1191 | bool reassocReq; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1192 | /* Required for indicating the frames to upper layer */ |
| 1193 | uint32_t beaconLength; |
| 1194 | uint8_t *beaconPtr; |
| 1195 | uint32_t assocReqLength; |
| 1196 | uint8_t *assocReqPtr; |
| 1197 | |
| 1198 | /* Timing measurement capability */ |
| 1199 | uint8_t timingMeasCap; |
| 1200 | tSirSmeChanInfo chan_info; |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 1201 | bool ampdu; |
| 1202 | bool sgi_enable; |
| 1203 | bool tx_stbc; |
| 1204 | bool rx_stbc; |
| 1205 | tSirMacHTChannelWidth ch_width; |
| 1206 | enum sir_sme_phy_mode mode; |
| 1207 | uint8_t max_supp_idx; |
| 1208 | uint8_t max_ext_idx; |
| 1209 | uint8_t max_mcs_idx; |
| 1210 | uint8_t rx_mcs_map; |
| 1211 | uint8_t tx_mcs_map; |
gaolez | 7bb1e74 | 2017-03-21 16:37:38 +0800 | [diff] [blame] | 1212 | /* Extended CSA capability of station */ |
| 1213 | uint8_t ecsa_capable; |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 1214 | tDot11fIEHTCaps HTCaps; |
| 1215 | tDot11fIEVHTCaps VHTCaps; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1216 | } tSirSmeAssocInd, *tpSirSmeAssocInd; |
| 1217 | |
| 1218 | /* / Definition for Association confirm */ |
| 1219 | /* / ---> MAC */ |
| 1220 | typedef struct sSirSmeAssocCnf { |
| 1221 | uint16_t messageType; /* eWNI_SME_ASSOC_CNF */ |
| 1222 | uint16_t length; |
| 1223 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1224 | struct qdf_mac_addr bssid; /* Self BSSID */ |
| 1225 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1226 | uint16_t aid; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1227 | struct qdf_mac_addr alternate_bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1228 | uint8_t alternateChannelId; |
| 1229 | } tSirSmeAssocCnf, *tpSirSmeAssocCnf; |
| 1230 | |
| 1231 | /* / Enum definition for Wireless medium status change codes */ |
| 1232 | typedef enum eSirSmeStatusChangeCode { |
| 1233 | eSIR_SME_DEAUTH_FROM_PEER, |
| 1234 | eSIR_SME_DISASSOC_FROM_PEER, |
| 1235 | eSIR_SME_LOST_LINK_WITH_PEER, |
| 1236 | eSIR_SME_CHANNEL_SWITCH, |
| 1237 | eSIR_SME_JOINED_NEW_BSS, |
| 1238 | eSIR_SME_LEAVING_BSS, |
| 1239 | eSIR_SME_IBSS_ACTIVE, |
| 1240 | eSIR_SME_IBSS_INACTIVE, |
| 1241 | eSIR_SME_IBSS_PEER_DEPARTED, |
| 1242 | eSIR_SME_RADAR_DETECTED, |
| 1243 | eSIR_SME_IBSS_NEW_PEER, |
| 1244 | eSIR_SME_AP_CAPS_CHANGED, |
| 1245 | } tSirSmeStatusChangeCode; |
| 1246 | |
| 1247 | typedef struct sSirSmeNewBssInfo { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1248 | struct qdf_mac_addr bssId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1249 | uint8_t channelNumber; |
| 1250 | uint8_t reserved; |
| 1251 | tSirMacSSid ssId; |
| 1252 | } tSirSmeNewBssInfo, *tpSirSmeNewBssInfo; |
| 1253 | |
| 1254 | typedef struct sSirSmeApNewCaps { |
| 1255 | uint16_t capabilityInfo; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1256 | struct qdf_mac_addr bssId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1257 | uint8_t channelId; |
| 1258 | uint8_t reserved[3]; |
| 1259 | tSirMacSSid ssId; |
| 1260 | } tSirSmeApNewCaps, *tpSirSmeApNewCaps; |
| 1261 | |
| 1262 | /** |
| 1263 | * Table below indicates what information is passed for each of |
| 1264 | * the Wireless Media status change notifications: |
| 1265 | * |
| 1266 | * Status Change code Status change info |
| 1267 | * ---------------------------------------------------------------------- |
| 1268 | * eSIR_SME_DEAUTH_FROM_PEER Reason code received in DEAUTH frame |
| 1269 | * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame |
| 1270 | * eSIR_SME_LOST_LINK_WITH_PEER None |
| 1271 | * eSIR_SME_CHANNEL_SWITCH New channel number |
| 1272 | * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number |
| 1273 | * eSIR_SME_LEAVING_BSS None |
| 1274 | * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined |
| 1275 | * IBSS apart from this STA that |
| 1276 | * started IBSS |
| 1277 | * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left |
| 1278 | * in IBSS |
| 1279 | * eSIR_SME_RADAR_DETECTED Indicates that radar is detected |
| 1280 | * eSIR_SME_IBSS_NEW_PEER Indicates that a new peer is detected |
| 1281 | * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP |
| 1282 | * that STA is currently associated with |
| 1283 | * have changed. |
| 1284 | */ |
| 1285 | |
| 1286 | /* / Definition for Wireless medium status change notification */ |
| 1287 | typedef struct sSirSmeWmStatusChangeNtf { |
| 1288 | uint16_t messageType; /* eWNI_SME_WM_STATUS_CHANGE_NTF */ |
| 1289 | uint16_t length; |
| 1290 | uint8_t sessionId; /* Session ID */ |
| 1291 | tSirSmeStatusChangeCode statusChangeCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1292 | struct qdf_mac_addr bssid; /* Self BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1293 | union { |
| 1294 | uint16_t deAuthReasonCode; /* eSIR_SME_DEAUTH_FROM_PEER */ |
| 1295 | /* eSIR_SME_DISASSOC_FROM_PEER */ |
| 1296 | uint16_t disassocReasonCode; |
| 1297 | /* none for eSIR_SME_LOST_LINK_WITH_PEER */ |
| 1298 | uint8_t newChannelId; /* eSIR_SME_CHANNEL_SWITCH */ |
| 1299 | tSirSmeNewBssInfo newBssInfo; /* eSIR_SME_JOINED_NEW_BSS */ |
| 1300 | /* none for eSIR_SME_LEAVING_BSS */ |
| 1301 | /* none for eSIR_SME_IBSS_ACTIVE */ |
| 1302 | /* none for eSIR_SME_IBSS_INACTIVE */ |
| 1303 | /* eSIR_SME_IBSS_NEW_PEER */ |
| 1304 | tSirNewIbssPeerInfo newIbssPeerInfo; |
| 1305 | tSirSmeApNewCaps apNewCaps; /* eSIR_SME_AP_CAPS_CHANGED */ |
| 1306 | } statusChangeInfo; |
| 1307 | } tSirSmeWmStatusChangeNtf, *tpSirSmeWmStatusChangeNtf; |
| 1308 | |
| 1309 | /* Definition for Disassociation request */ |
| 1310 | typedef struct sSirSmeDisassocReq { |
| 1311 | uint16_t messageType; /* eWNI_SME_DISASSOC_REQ */ |
| 1312 | uint16_t length; |
| 1313 | uint8_t sessionId; /* Session ID */ |
| 1314 | uint16_t transactionId; /* Transaction ID for cmd */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1315 | struct qdf_mac_addr bssid; /* Peer BSSID */ |
| 1316 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1317 | uint16_t reasonCode; |
| 1318 | /* This flag tells LIM whether to send the disassoc OTA or not */ |
| 1319 | /* This will be set in while handing off from one AP to other */ |
| 1320 | uint8_t doNotSendOverTheAir; |
Deepak Dhamdhere | 2dae1bd | 2016-10-27 10:58:29 -0700 | [diff] [blame] | 1321 | bool process_ho_fail; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1322 | } qdf_packed tSirSmeDisassocReq, *tpSirSmeDisassocReq; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1323 | |
| 1324 | /* / Definition for Tkip countermeasures request */ |
| 1325 | typedef struct sSirSmeTkipCntrMeasReq { |
| 1326 | uint16_t messageType; /* eWNI_SME_DISASSOC_REQ */ |
| 1327 | uint16_t length; |
| 1328 | uint8_t sessionId; /* Session ID */ |
| 1329 | uint16_t transactionId; /* Transaction ID for cmd */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1330 | struct qdf_mac_addr bssId; /* Peer BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1331 | bool bEnable; /* Start/stop countermeasures */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1332 | } qdf_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1333 | |
| 1334 | typedef struct sAni64BitCounters { |
| 1335 | uint32_t Hi; |
| 1336 | uint32_t Lo; |
| 1337 | } tAni64BitCounters, *tpAni64BitCounters; |
| 1338 | |
| 1339 | typedef struct sAniSecurityStat { |
| 1340 | tAni64BitCounters txBlks; |
| 1341 | tAni64BitCounters rxBlks; |
| 1342 | tAni64BitCounters formatErrorCnt; |
| 1343 | tAni64BitCounters decryptErr; |
| 1344 | tAni64BitCounters protExclCnt; |
| 1345 | tAni64BitCounters unDecryptableCnt; |
| 1346 | tAni64BitCounters decryptOkCnt; |
| 1347 | |
| 1348 | } tAniSecurityStat, *tpAniSecurityStat; |
| 1349 | |
| 1350 | typedef struct sAniTxRxStats { |
| 1351 | tAni64BitCounters txFrames; |
| 1352 | tAni64BitCounters rxFrames; |
| 1353 | tAni64BitCounters nRcvBytes; |
| 1354 | tAni64BitCounters nXmitBytes; |
| 1355 | |
| 1356 | } tAniTxRxStats, *tpAniTxRxStats; |
| 1357 | |
| 1358 | typedef struct sAniSecStats { |
| 1359 | tAniSecurityStat aes; |
| 1360 | tAni64BitCounters aesReplays; |
| 1361 | tAniSecurityStat tkip; |
| 1362 | tAni64BitCounters tkipReplays; |
| 1363 | tAni64BitCounters tkipMicError; |
| 1364 | |
| 1365 | tAniSecurityStat wep; |
| 1366 | #if defined(FEATURE_WLAN_WAPI) && !defined(LIBRA_WAPI_SUPPORT) |
| 1367 | tAniSecurityStat wpi; |
| 1368 | tAni64BitCounters wpiReplays; |
| 1369 | tAni64BitCounters wpiMicError; |
| 1370 | #endif |
| 1371 | } tAniSecStats, *tpAniSecStats; |
| 1372 | |
| 1373 | #define SIR_MAX_RX_CHAINS 3 |
| 1374 | |
| 1375 | typedef struct sAniStaStatStruct { |
| 1376 | /* following statistic elements till expandPktRxCntLo are not filled |
| 1377 | * with valid data. These are kept as it is, since WSM is using this |
| 1378 | * structure. These elements can be removed whenever WSM is updated. |
| 1379 | * Phystats is used to hold phystats from BD. |
| 1380 | */ |
| 1381 | uint32_t sentAesBlksUcastHi; |
| 1382 | uint32_t sentAesBlksUcastLo; |
| 1383 | uint32_t recvAesBlksUcastHi; |
| 1384 | uint32_t recvAesBlksUcastLo; |
| 1385 | uint32_t aesFormatErrorUcastCnts; |
| 1386 | uint32_t aesReplaysUcast; |
| 1387 | uint32_t aesDecryptErrUcast; |
| 1388 | uint32_t singleRetryPkts; |
| 1389 | uint32_t failedTxPkts; |
| 1390 | uint32_t ackTimeouts; |
| 1391 | uint32_t multiRetryPkts; |
| 1392 | uint32_t fragTxCntsHi; |
| 1393 | uint32_t fragTxCntsLo; |
| 1394 | uint32_t transmittedPktsHi; |
| 1395 | uint32_t transmittedPktsLo; |
| 1396 | uint32_t phyStatHi; /* These are used to fill in the phystats. */ |
| 1397 | uint32_t phyStatLo; /* This is only for private use. */ |
| 1398 | |
| 1399 | uint32_t uplinkRssi; |
| 1400 | uint32_t uplinkSinr; |
| 1401 | uint32_t uplinkRate; |
| 1402 | uint32_t downlinkRssi; |
| 1403 | uint32_t downlinkSinr; |
| 1404 | uint32_t downlinkRate; |
| 1405 | uint32_t nRcvBytes; |
| 1406 | uint32_t nXmitBytes; |
| 1407 | |
| 1408 | /* |
| 1409 | * Following elements are valid and filled in correctly. They have |
| 1410 | * valid values. |
| 1411 | */ |
| 1412 | |
| 1413 | /* Unicast frames and bytes. */ |
| 1414 | tAniTxRxStats ucStats; |
| 1415 | |
| 1416 | /* Broadcast frames and bytes. */ |
| 1417 | tAniTxRxStats bcStats; |
| 1418 | |
| 1419 | /* Multicast frames and bytes. */ |
| 1420 | tAniTxRxStats mcStats; |
| 1421 | |
| 1422 | uint32_t currentTxRate; |
| 1423 | uint32_t currentRxRate; /* Rate in 100Kbps */ |
| 1424 | |
| 1425 | uint32_t maxTxRate; |
| 1426 | uint32_t maxRxRate; |
| 1427 | |
| 1428 | int8_t rssi[SIR_MAX_RX_CHAINS]; |
| 1429 | |
| 1430 | tAniSecStats securityStats; |
| 1431 | |
| 1432 | uint8_t currentRxRateIdx; /* This the softmac rate Index. */ |
| 1433 | uint8_t currentTxRateIdx; |
| 1434 | |
| 1435 | } tAniStaStatStruct, *tpAniStaStatStruct; |
| 1436 | |
| 1437 | typedef enum sPacketType { |
| 1438 | ePACKET_TYPE_UNKNOWN, |
| 1439 | ePACKET_TYPE_11A, |
| 1440 | ePACKET_TYPE_11G, |
| 1441 | ePACKET_TYPE_11B, |
| 1442 | ePACKET_TYPE_11N |
| 1443 | } tPacketType, *tpPacketType; |
| 1444 | |
| 1445 | /* / Definition for Disassociation response */ |
| 1446 | typedef struct sSirSmeDisassocRsp { |
| 1447 | uint16_t messageType; /* eWNI_SME_DISASSOC_RSP */ |
| 1448 | uint16_t length; |
| 1449 | uint8_t sessionId; /* Session ID */ |
| 1450 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 1451 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1452 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1453 | tAniStaStatStruct perStaStats; /* STA stats */ |
| 1454 | uint16_t staId; |
Srinivas Girigowda | eaf136a | 2017-06-12 19:03:19 -0700 | [diff] [blame] | 1455 | } tSirSmeDisassocRsp, *tpSirSmeDisassocRsp; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1456 | |
| 1457 | /* / Definition for Disassociation indication from peer */ |
| 1458 | typedef struct sSirSmeDisassocInd { |
| 1459 | uint16_t messageType; /* eWNI_SME_DISASSOC_IND */ |
| 1460 | uint16_t length; |
| 1461 | uint8_t sessionId; /* Session Identifier */ |
| 1462 | uint16_t transactionId; /* Transaction Identifier with PE */ |
| 1463 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1464 | struct qdf_mac_addr bssid; |
| 1465 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1466 | tAniStaStatStruct perStaStats; /* STA stats */ |
| 1467 | uint16_t staId; |
| 1468 | uint32_t reasonCode; |
| 1469 | } tSirSmeDisassocInd, *tpSirSmeDisassocInd; |
| 1470 | |
| 1471 | /* / Definition for Disassociation confirm */ |
| 1472 | /* / MAC ---> */ |
| 1473 | typedef struct sSirSmeDisassocCnf { |
| 1474 | uint16_t messageType; /* eWNI_SME_DISASSOC_CNF */ |
| 1475 | uint16_t length; |
Vignesh Viswanathan | b2dcdd0 | 2018-05-24 11:48:12 +0530 | [diff] [blame] | 1476 | uint8_t sme_session_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1477 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1478 | struct qdf_mac_addr bssid; |
| 1479 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1480 | } tSirSmeDisassocCnf, *tpSirSmeDisassocCnf, |
| 1481 | tSirSmeDeauthCnf, *tpSirSmeDeauthCnf; |
| 1482 | |
Hanumantha Reddy Pothula | 3e5d6aa | 2016-09-08 15:21:54 +0530 | [diff] [blame] | 1483 | /** |
| 1484 | * struct sir_sme_discon_done_ind - disconnect done indiaction |
| 1485 | * @message_type: msg type |
| 1486 | * @length: length of msg |
| 1487 | * @session_id: session id of the indication |
| 1488 | * @reason_code: reason for disconnect indication |
| 1489 | * @peer_mac: peer mac |
| 1490 | */ |
| 1491 | struct sir_sme_discon_done_ind { |
| 1492 | uint16_t message_type; |
| 1493 | uint16_t length; |
| 1494 | uint8_t session_id; |
| 1495 | tSirResultCodes reason_code; |
| 1496 | tSirMacAddr peer_mac; |
| 1497 | }; |
| 1498 | |
| 1499 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1500 | /* / Definition for Deauthetication request */ |
| 1501 | typedef struct sSirSmeDeauthReq { |
| 1502 | uint16_t messageType; /* eWNI_SME_DEAUTH_REQ */ |
| 1503 | uint16_t length; |
| 1504 | uint8_t sessionId; /* Session ID */ |
| 1505 | uint16_t transactionId; /* Transaction ID for cmd */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1506 | struct qdf_mac_addr bssid; /* AP BSSID */ |
| 1507 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1508 | uint16_t reasonCode; |
| 1509 | } tSirSmeDeauthReq, *tpSirSmeDeauthReq; |
| 1510 | |
| 1511 | /* / Definition for Deauthetication response */ |
| 1512 | typedef struct sSirSmeDeauthRsp { |
| 1513 | uint16_t messageType; /* eWNI_SME_DEAUTH_RSP */ |
| 1514 | uint16_t length; |
| 1515 | uint8_t sessionId; /* Session ID */ |
| 1516 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 1517 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1518 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1519 | } tSirSmeDeauthRsp, *tpSirSmeDeauthRsp; |
| 1520 | |
| 1521 | /* / Definition for Deauthetication indication from peer */ |
| 1522 | typedef struct sSirSmeDeauthInd { |
| 1523 | uint16_t messageType; /* eWNI_SME_DEAUTH_IND */ |
| 1524 | uint16_t length; |
| 1525 | uint8_t sessionId; /* Added for BT-AMP */ |
| 1526 | uint16_t transactionId; /* Added for BT-AMP */ |
| 1527 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1528 | struct qdf_mac_addr bssid; /* AP BSSID */ |
| 1529 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1530 | |
| 1531 | uint16_t staId; |
| 1532 | uint32_t reasonCode; |
Kiran Kumar Lokere | 37d3aa2 | 2015-11-03 14:58:26 -0800 | [diff] [blame] | 1533 | int8_t rssi; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1534 | } tSirSmeDeauthInd, *tpSirSmeDeauthInd; |
| 1535 | |
| 1536 | /* / Definition for stop BSS request message */ |
| 1537 | typedef struct sSirSmeStopBssReq { |
| 1538 | uint16_t messageType; /* eWNI_SME_STOP_BSS_REQ */ |
| 1539 | uint16_t length; |
| 1540 | uint8_t sessionId; /* Session ID */ |
| 1541 | uint16_t transactionId; /* tranSaction ID for cmd */ |
| 1542 | tSirResultCodes reasonCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1543 | struct qdf_mac_addr bssid; /* Self BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1544 | } tSirSmeStopBssReq, *tpSirSmeStopBssReq; |
| 1545 | |
| 1546 | /* / Definition for stop BSS response message */ |
| 1547 | typedef struct sSirSmeStopBssRsp { |
| 1548 | uint16_t messageType; /* eWNI_SME_STOP_BSS_RSP */ |
| 1549 | uint16_t length; |
| 1550 | tSirResultCodes statusCode; |
| 1551 | uint8_t sessionId; /* Session ID */ |
| 1552 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 1553 | } tSirSmeStopBssRsp, *tpSirSmeStopBssRsp; |
| 1554 | |
| 1555 | /* / Definition for Channel Switch indication for station */ |
| 1556 | /* / MAC ---> */ |
| 1557 | typedef struct sSirSmeSwitchChannelInd { |
| 1558 | uint16_t messageType; /* eWNI_SME_SWITCH_CHL_IND */ |
| 1559 | uint16_t length; |
| 1560 | uint8_t sessionId; |
| 1561 | uint16_t newChannelId; |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 1562 | struct ch_params chan_params; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1563 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1564 | } tSirSmeSwitchChannelInd, *tpSirSmeSwitchChannelInd; |
| 1565 | |
| 1566 | /* / Definition for Neighbor BSS indication */ |
| 1567 | /* / MAC ---> */ |
| 1568 | /* / MAC reports this each time a new I/BSS is detected */ |
| 1569 | typedef struct sSirSmeNeighborBssInd { |
| 1570 | uint16_t messageType; /* eWNI_SME_NEIGHBOR_BSS_IND */ |
| 1571 | uint16_t length; |
| 1572 | uint8_t sessionId; |
| 1573 | tSirBssDescription bssDescription[1]; |
| 1574 | } tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd; |
| 1575 | |
| 1576 | /* / Definition for MIC failure indication */ |
| 1577 | /* / MAC ---> */ |
| 1578 | /* / MAC reports this each time a MIC failure occures on Rx TKIP packet */ |
| 1579 | typedef struct sSirSmeMicFailureInd { |
| 1580 | uint16_t messageType; /* eWNI_SME_MIC_FAILURE_IND */ |
| 1581 | uint16_t length; |
| 1582 | uint8_t sessionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1583 | struct qdf_mac_addr bssId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1584 | tSirMicFailureInfo info; |
| 1585 | } tSirSmeMicFailureInd, *tpSirSmeMicFailureInd; |
| 1586 | |
| 1587 | typedef struct sSirSmeMissedBeaconInd { |
| 1588 | uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */ |
| 1589 | uint16_t length; |
| 1590 | uint8_t bssIdx; |
| 1591 | } tSirSmeMissedBeaconInd, *tpSirSmeMissedBeaconInd; |
| 1592 | |
| 1593 | /* / Definition for Set Context request */ |
| 1594 | /* / ---> MAC */ |
| 1595 | typedef struct sSirSmeSetContextReq { |
| 1596 | uint16_t messageType; /* eWNI_SME_SET_CONTEXT_REQ */ |
| 1597 | uint16_t length; |
| 1598 | uint8_t sessionId; /* Session ID */ |
| 1599 | uint16_t transactionId; /* Transaction ID for cmd */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1600 | struct qdf_mac_addr peer_macaddr; |
| 1601 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1602 | tSirKeyMaterial keyMaterial; |
| 1603 | } tSirSmeSetContextReq, *tpSirSmeSetContextReq; |
| 1604 | |
| 1605 | /* / Definition for Set Context response */ |
| 1606 | /* / MAC ---> */ |
| 1607 | typedef struct sSirSmeSetContextRsp { |
| 1608 | uint16_t messageType; /* eWNI_SME_SET_CONTEXT_RSP */ |
| 1609 | uint16_t length; |
| 1610 | uint8_t sessionId; /* Session ID */ |
| 1611 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 1612 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1613 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1614 | } tSirSmeSetContextRsp, *tpSirSmeSetContextRsp; |
| 1615 | |
| 1616 | /* / Statistic definitions */ |
| 1617 | /* ============================================================= */ |
| 1618 | /* Per STA statistic structure; This same struct will be used for Aggregate */ |
| 1619 | /* STA stats as well. */ |
| 1620 | |
| 1621 | /* Clear radio stats and clear per sta stats */ |
| 1622 | typedef enum { |
| 1623 | eANI_CLEAR_ALL_STATS, /* Clears all stats */ |
| 1624 | eANI_CLEAR_RX_STATS, /* Clears RX stats of the radio interface */ |
| 1625 | eANI_CLEAR_TX_STATS, /* Clears TX stats of the radio interface */ |
| 1626 | eANI_CLEAR_RADIO_STATS, /* Clears all the radio stats */ |
| 1627 | eANI_CLEAR_PER_STA_STATS, /* Clears Per STA stats */ |
| 1628 | eANI_CLEAR_AGGR_PER_STA_STATS, /* Clears aggregate stats */ |
| 1629 | |
| 1630 | /* Used to distinguish between per sta to security stats. */ |
| 1631 | /* Used only by AP, FW just returns the same param as it received. */ |
| 1632 | eANI_LINK_STATS, /* Get Per STA stats */ |
| 1633 | eANI_SECURITY_STATS, /* Get Per STA security stats */ |
| 1634 | |
| 1635 | eANI_CLEAR_STAT_TYPES_END |
| 1636 | } tAniStatSubTypes; |
| 1637 | |
| 1638 | typedef struct sAniTxCtrs { |
| 1639 | /* add the rate counters here */ |
| 1640 | uint32_t tx1Mbps; |
| 1641 | uint32_t tx2Mbps; |
| 1642 | uint32_t tx5_5Mbps; |
| 1643 | uint32_t tx6Mbps; |
| 1644 | uint32_t tx9Mbps; |
| 1645 | uint32_t tx11Mbps; |
| 1646 | uint32_t tx12Mbps; |
| 1647 | uint32_t tx18Mbps; |
| 1648 | uint32_t tx24Mbps; |
| 1649 | uint32_t tx36Mbps; |
| 1650 | uint32_t tx48Mbps; |
| 1651 | uint32_t tx54Mbps; |
| 1652 | uint32_t tx72Mbps; |
| 1653 | uint32_t tx96Mbps; |
| 1654 | uint32_t tx108Mbps; |
| 1655 | |
| 1656 | /* tx path radio counts */ |
| 1657 | uint32_t txFragHi; |
| 1658 | uint32_t txFragLo; |
| 1659 | uint32_t txFrameHi; |
| 1660 | uint32_t txFrameLo; |
| 1661 | uint32_t txMulticastFrameHi; |
| 1662 | uint32_t txMulticastFrameLo; |
| 1663 | uint32_t txFailedHi; |
| 1664 | uint32_t txFailedLo; |
| 1665 | uint32_t multipleRetryHi; |
| 1666 | uint32_t multipleRetryLo; |
| 1667 | uint32_t singleRetryHi; |
| 1668 | uint32_t singleRetryLo; |
| 1669 | uint32_t ackFailureHi; |
| 1670 | uint32_t ackFailureLo; |
| 1671 | uint32_t xmitBeacons; |
| 1672 | } tAniTxCtrs, *tpAniTxCtrs; |
| 1673 | |
| 1674 | typedef struct sAniRxCtrs { |
| 1675 | /* receive frame rate counters */ |
| 1676 | uint32_t rx1Mbps; |
| 1677 | uint32_t rx2Mbps; |
| 1678 | uint32_t rx5_5Mbps; |
| 1679 | uint32_t rx6Mbps; |
| 1680 | uint32_t rx9Mbps; |
| 1681 | uint32_t rx11Mbps; |
| 1682 | uint32_t rx12Mbps; |
| 1683 | uint32_t rx18Mbps; |
| 1684 | uint32_t rx24Mbps; |
| 1685 | uint32_t rx36Mbps; |
| 1686 | uint32_t rx48Mbps; |
| 1687 | uint32_t rx54Mbps; |
| 1688 | uint32_t rx72Mbps; |
| 1689 | uint32_t rx96Mbps; |
| 1690 | uint32_t rx108Mbps; |
| 1691 | |
| 1692 | /* receive size counters; 'Lte' = Less than or equal to */ |
| 1693 | uint32_t rxLte64; |
| 1694 | uint32_t rxLte128Gt64; |
| 1695 | uint32_t rxLte256Gt128; |
| 1696 | uint32_t rxLte512Gt256; |
| 1697 | uint32_t rxLte1kGt512; |
| 1698 | uint32_t rxLte1518Gt1k; |
| 1699 | uint32_t rxLte2kGt1518; |
| 1700 | uint32_t rxLte4kGt2k; |
| 1701 | |
| 1702 | /* rx radio stats */ |
| 1703 | uint32_t rxFrag; |
| 1704 | uint32_t rxFrame; |
| 1705 | uint32_t fcsError; |
| 1706 | uint32_t rxMulticast; |
| 1707 | uint32_t duplicate; |
| 1708 | uint32_t rtsSuccess; |
| 1709 | uint32_t rtsFailed; |
| 1710 | uint32_t wepUndecryptables; |
| 1711 | uint32_t drops; |
| 1712 | uint32_t aesFormatErrorUcastCnts; |
| 1713 | uint32_t aesReplaysUcast; |
| 1714 | uint32_t aesDecryptErrUcast; |
| 1715 | } tAniRxCtrs, *tpAniRxCtrs; |
| 1716 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1717 | /* *************************************************************** */ |
| 1718 | |
| 1719 | /*******************PE Statistics*************************/ |
| 1720 | |
| 1721 | /* |
| 1722 | * tpAniGetPEStatsReq is tied to |
| 1723 | * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and |
| 1724 | * for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId |
| 1725 | */ |
| 1726 | typedef struct sAniGetPEStatsReq { |
| 1727 | /* Common for all types are requests */ |
| 1728 | uint16_t msgType; /* message type is same as the request type */ |
| 1729 | uint16_t msgLen; /* length of the entire request */ |
| 1730 | uint32_t staId; /* Per STA stats request must contain valid */ |
| 1731 | /* categories of stats requested. look at ePEStatsMask */ |
| 1732 | uint32_t statsMask; |
| 1733 | uint8_t sessionId; |
| 1734 | } tAniGetPEStatsReq, *tpAniGetPEStatsReq; |
| 1735 | |
| 1736 | /* |
| 1737 | * tpAniGetPEStatsRsp is tied to |
| 1738 | * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and |
| 1739 | * for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId |
| 1740 | */ |
| 1741 | typedef struct sAniGetPEStatsRsp { |
| 1742 | /* Common for all types are responses */ |
| 1743 | uint16_t msgType; /* message type is same as the request type */ |
| 1744 | /* length of the entire request, includes the pStatsBuf length too */ |
| 1745 | uint16_t msgLen; |
| 1746 | uint8_t sessionId; |
| 1747 | uint32_t rc; /* success/failure */ |
| 1748 | uint32_t staId; /* Per STA stats request must contain valid */ |
| 1749 | /* categories of stats requested. look at ePEStatsMask */ |
| 1750 | uint32_t statsMask; |
| 1751 | /* void *pStatsBuf; */ |
| 1752 | /* |
| 1753 | * The Stats buffer starts here and can be an aggregate of more than one |
| 1754 | * statistics structure depending on statsMask. The void pointer |
| 1755 | * "pStatsBuf" is commented out intentionally and the src code that uses |
| 1756 | * this structure should take that into account. |
| 1757 | */ |
| 1758 | } tAniGetPEStatsRsp, *tpAniGetPEStatsRsp; |
| 1759 | |
| 1760 | typedef struct sAniGetRssiReq { |
| 1761 | /* Common for all types are requests */ |
| 1762 | uint16_t msgType; /* message type is same as the request type */ |
| 1763 | uint16_t msgLen; /* length of the entire request */ |
| 1764 | uint8_t sessionId; |
| 1765 | uint8_t staId; |
| 1766 | int8_t lastRSSI; /* in case of error, return last RSSI */ |
| 1767 | void *rssiCallback; |
| 1768 | void *pDevContext; /* device context */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1769 | } tAniGetRssiReq, *tpAniGetRssiReq; |
| 1770 | |
| 1771 | typedef struct sAniGetSnrReq { |
| 1772 | /* Common for all types are requests */ |
| 1773 | uint16_t msgType; /* message type is same as the request type */ |
| 1774 | uint16_t msgLen; /* length of the entire request */ |
| 1775 | uint8_t sessionId; |
| 1776 | uint8_t staId; |
| 1777 | void *snrCallback; |
| 1778 | void *pDevContext; /* device context */ |
| 1779 | int8_t snr; |
| 1780 | } tAniGetSnrReq, *tpAniGetSnrReq; |
| 1781 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1782 | /** |
| 1783 | * struct ani_scan_req - Scan request |
| 1784 | * @msg_type: Message type |
| 1785 | * @msg_len: Message Length |
| 1786 | * @session_id: SME session Id |
| 1787 | * @scan_param: scan request parameter |
| 1788 | * @callback: call back function for scan result |
| 1789 | * @ctx: Global context |
| 1790 | * |
| 1791 | * Scan request message structure |
| 1792 | */ |
| 1793 | struct ani_scan_req { |
| 1794 | /* message type is same as the request type */ |
| 1795 | uint16_t msg_type; |
| 1796 | /* length of the entire request */ |
| 1797 | uint16_t msg_len; |
| 1798 | uint16_t session_id; |
| 1799 | void *scan_param; |
| 1800 | void *callback; |
| 1801 | void *ctx; |
| 1802 | }; |
| 1803 | |
| 1804 | /** |
| 1805 | * struct ani_roc_req - Remain on channel request |
| 1806 | * @msg_type: Message type |
| 1807 | * @msg_len: Message Length |
| 1808 | * @session_id: SME session Id |
| 1809 | * @channel: channel number |
| 1810 | * @callback: call back function for scan result |
| 1811 | * @duration: Roc duration |
| 1812 | * @is_p2pprobe_allowed : flag for p2p probe request |
| 1813 | * @ctx: Global context |
| 1814 | * @scan_id: Scan Identifier |
| 1815 | * |
| 1816 | * Remain on channel request message structure |
| 1817 | */ |
| 1818 | struct ani_roc_req { |
| 1819 | /* message type is same as the request type */ |
| 1820 | uint16_t msg_type; |
| 1821 | /* length of the entire request */ |
| 1822 | uint16_t msg_len; |
| 1823 | uint16_t session_id; |
| 1824 | uint8_t channel; |
| 1825 | uint32_t duration; |
| 1826 | uint8_t is_p2pprobe_allowed; |
| 1827 | void *callback; |
| 1828 | void *ctx; |
| 1829 | uint32_t scan_id; |
| 1830 | }; |
| 1831 | |
| 1832 | /* generic country code change request MSG structure */ |
| 1833 | typedef struct sAniGenericChangeCountryCodeReq { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1834 | uint16_t msgType; /* message type is same as the request type */ |
| 1835 | uint16_t msgLen; /* length of the entire request */ |
| 1836 | uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; /* 3 char country code */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1837 | } tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq; |
| 1838 | |
Srinivas Girigowda | 296105a | 2015-09-24 16:31:16 -0700 | [diff] [blame] | 1839 | /** |
| 1840 | * struct sAniDHCPStopInd - DHCP Stop indication message |
| 1841 | * @msgType: message type is same as the request type |
| 1842 | * @msgLen: length of the entire request |
| 1843 | * @device_mode: Mode of the device(ex:STA, AP) |
| 1844 | * @adapterMacAddr: MAC address of the adapter |
| 1845 | * @peerMacAddr: MAC address of the connected peer |
| 1846 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1847 | typedef struct sAniDHCPStopInd { |
Srinivas Girigowda | 296105a | 2015-09-24 16:31:16 -0700 | [diff] [blame] | 1848 | uint16_t msgType; |
| 1849 | uint16_t msgLen; |
| 1850 | uint8_t device_mode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1851 | struct qdf_mac_addr adapterMacAddr; |
| 1852 | struct qdf_mac_addr peerMacAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1853 | } tAniDHCPInd, *tpAniDHCPInd; |
| 1854 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1855 | typedef struct sAniTXFailMonitorInd { |
| 1856 | uint16_t msgType; /* message type is same as the request type */ |
| 1857 | uint16_t msgLen; /* length of the entire request */ |
| 1858 | uint8_t tx_fail_count; |
| 1859 | void *txFailIndCallback; |
| 1860 | } tAniTXFailMonitorInd, *tpAniTXFailMonitorInd; |
| 1861 | |
Naveen Rawat | ea1564b | 2018-05-17 15:56:11 -0700 | [diff] [blame] | 1862 | #ifndef QCA_SUPPORT_CP_STATS |
| 1863 | /** |
| 1864 | * enum tx_rate_info - tx_rate flags |
| 1865 | * @TX_RATE_LEGACY: Legacy rates |
| 1866 | * @TX_RATE_HT20: HT20 rates |
| 1867 | * @TX_RATE_HT40: HT40 rates |
| 1868 | * @TX_RATE_SGI: Rate with Short guard interval |
| 1869 | * @TX_RATE_LGI: Rate with Long guard interval |
| 1870 | * @TX_RATE_VHT20: VHT 20 rates |
| 1871 | * @TX_RATE_VHT40: VHT 40 rates |
| 1872 | * @TX_RATE_VHT80: VHT 80 rates |
| 1873 | */ |
| 1874 | enum tx_rate_info { |
| 1875 | TX_RATE_LEGACY = 0x1, |
| 1876 | TX_RATE_HT20 = 0x2, |
| 1877 | TX_RATE_HT40 = 0x4, |
| 1878 | TX_RATE_SGI = 0x8, |
| 1879 | TX_RATE_LGI = 0x10, |
| 1880 | TX_RATE_VHT20 = 0x20, |
| 1881 | TX_RATE_VHT40 = 0x40, |
| 1882 | TX_RATE_VHT80 = 0x80 |
| 1883 | }; |
| 1884 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1885 | /**********************PE Statistics end*************************/ |
| 1886 | |
| 1887 | typedef struct sSirP2PNoaStart { |
| 1888 | uint32_t status; |
| 1889 | uint32_t bssIdx; |
| 1890 | } tSirP2PNoaStart, *tpSirP2PNoaStart; |
| 1891 | |
| 1892 | typedef struct sSirTdlsInd { |
| 1893 | uint16_t status; |
| 1894 | uint16_t assocId; |
| 1895 | uint16_t staIdx; |
| 1896 | uint16_t reasonCode; |
| 1897 | } tSirTdlsInd, *tpSirTdlsInd; |
| 1898 | |
| 1899 | typedef struct sSirP2PNoaAttr { |
| 1900 | #ifdef ANI_BIG_BYTE_ENDIAN |
| 1901 | uint32_t index:8; |
| 1902 | uint32_t oppPsFlag:1; |
| 1903 | uint32_t ctWin:7; |
| 1904 | uint32_t rsvd1:16; |
| 1905 | #else |
| 1906 | uint32_t rsvd1:16; |
| 1907 | uint32_t ctWin:7; |
| 1908 | uint32_t oppPsFlag:1; |
| 1909 | uint32_t index:8; |
| 1910 | #endif |
| 1911 | |
| 1912 | #ifdef ANI_BIG_BYTE_ENDIAN |
| 1913 | uint32_t uNoa1IntervalCnt:8; |
| 1914 | uint32_t rsvd2:24; |
| 1915 | #else |
| 1916 | uint32_t rsvd2:24; |
| 1917 | uint32_t uNoa1IntervalCnt:8; |
| 1918 | #endif |
| 1919 | uint32_t uNoa1Duration; |
| 1920 | uint32_t uNoa1Interval; |
| 1921 | uint32_t uNoa1StartTime; |
| 1922 | |
| 1923 | #ifdef ANI_BIG_BYTE_ENDIAN |
| 1924 | uint32_t uNoa2IntervalCnt:8; |
| 1925 | uint32_t rsvd3:24; |
| 1926 | #else |
| 1927 | uint32_t rsvd3:24; |
| 1928 | uint32_t uNoa2IntervalCnt:8; |
| 1929 | #endif |
| 1930 | uint32_t uNoa2Duration; |
| 1931 | uint32_t uNoa2Interval; |
| 1932 | uint32_t uNoa2StartTime; |
| 1933 | } tSirP2PNoaAttr, *tpSirP2PNoaAttr; |
| 1934 | |
| 1935 | typedef struct sSirTclasInfo { |
| 1936 | tSirMacTclasIE tclas; |
| 1937 | uint8_t version; /* applies only for classifier type ip */ |
| 1938 | union { |
| 1939 | tSirMacTclasParamEthernet eth; |
| 1940 | tSirMacTclasParamIPv4 ipv4; |
| 1941 | tSirMacTclasParamIPv6 ipv6; |
| 1942 | tSirMacTclasParam8021dq t8021dq; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1943 | } qdf_packed tclasParams; |
| 1944 | } qdf_packed tSirTclasInfo; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1945 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1946 | typedef struct sSirAddtsReqInfo { |
| 1947 | uint8_t dialogToken; |
| 1948 | tSirMacTspecIE tspec; |
| 1949 | |
| 1950 | uint8_t numTclas; /* number of Tclas elements */ |
| 1951 | tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM]; |
| 1952 | uint8_t tclasProc; |
| 1953 | #if defined(FEATURE_WLAN_ESE) |
| 1954 | tSirMacESETSRSIE tsrsIE; |
| 1955 | uint8_t tsrsPresent:1; |
| 1956 | #endif |
| 1957 | uint8_t wmeTspecPresent:1; |
| 1958 | uint8_t wsmTspecPresent:1; |
| 1959 | uint8_t lleTspecPresent:1; |
| 1960 | uint8_t tclasProcPresent:1; |
| 1961 | } tSirAddtsReqInfo, *tpSirAddtsReqInfo; |
| 1962 | |
| 1963 | typedef struct sSirAddtsRspInfo { |
| 1964 | uint8_t dialogToken; |
| 1965 | tSirMacStatusCodes status; |
| 1966 | tSirMacTsDelayIE delay; |
| 1967 | |
| 1968 | tSirMacTspecIE tspec; |
| 1969 | uint8_t numTclas; /* number of Tclas elements */ |
| 1970 | tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM]; |
| 1971 | uint8_t tclasProc; |
| 1972 | tSirMacScheduleIE schedule; |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 1973 | #ifdef FEATURE_WLAN_ESE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1974 | tSirMacESETSMIE tsmIE; |
| 1975 | uint8_t tsmPresent:1; |
| 1976 | #endif |
| 1977 | uint8_t wmeTspecPresent:1; |
| 1978 | uint8_t wsmTspecPresent:1; |
| 1979 | uint8_t lleTspecPresent:1; |
| 1980 | uint8_t tclasProcPresent:1; |
| 1981 | uint8_t schedulePresent:1; |
| 1982 | } tSirAddtsRspInfo, *tpSirAddtsRspInfo; |
| 1983 | |
| 1984 | typedef struct sSirDeltsReqInfo { |
| 1985 | tSirMacTSInfo tsinfo; |
| 1986 | tSirMacTspecIE tspec; |
| 1987 | uint8_t wmeTspecPresent:1; |
| 1988 | uint8_t wsmTspecPresent:1; |
| 1989 | uint8_t lleTspecPresent:1; |
| 1990 | } tSirDeltsReqInfo, *tpSirDeltsReqInfo; |
| 1991 | |
| 1992 | /* / Add a tspec as defined */ |
| 1993 | typedef struct sSirAddtsReq { |
| 1994 | uint16_t messageType; /* eWNI_SME_ADDTS_REQ */ |
| 1995 | uint16_t length; |
| 1996 | uint8_t sessionId; /* Session ID */ |
| 1997 | uint16_t transactionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1998 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1999 | uint32_t timeout; /* in ms */ |
| 2000 | uint8_t rspReqd; |
| 2001 | tSirAddtsReqInfo req; |
| 2002 | } tSirAddtsReq, *tpSirAddtsReq; |
| 2003 | |
| 2004 | typedef struct sSirAddtsRsp { |
| 2005 | uint16_t messageType; /* eWNI_SME_ADDTS_RSP */ |
| 2006 | uint16_t length; |
| 2007 | uint8_t sessionId; /* sme sessionId Added for BT-AMP support */ |
| 2008 | uint16_t transactionId; /* sme transaction Id - for BT-AMP Support */ |
| 2009 | uint32_t rc; /* return code */ |
| 2010 | tSirAddtsRspInfo rsp; |
| 2011 | } tSirAddtsRsp, *tpSirAddtsRsp; |
| 2012 | |
| 2013 | typedef struct sSirDeltsReq { |
| 2014 | uint16_t messageType; /* eWNI_SME_DELTS_REQ */ |
| 2015 | uint16_t length; |
| 2016 | uint8_t sessionId; /* Session ID */ |
| 2017 | uint16_t transactionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2018 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2019 | uint16_t aid; /* use 0 if macAddr is being specified */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2020 | struct qdf_mac_addr macaddr; /* only on AP to specify the STA */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2021 | uint8_t rspReqd; |
| 2022 | tSirDeltsReqInfo req; |
| 2023 | } tSirDeltsReq, *tpSirDeltsReq; |
| 2024 | |
| 2025 | typedef struct sSirDeltsRsp { |
| 2026 | uint16_t messageType; /* eWNI_SME_DELTS_RSP */ |
| 2027 | uint16_t length; |
| 2028 | uint8_t sessionId; /* sme sessionId Added for BT-AMP support */ |
| 2029 | uint16_t transactionId; /* sme transaction Id - for BT-AMP Support */ |
| 2030 | uint32_t rc; |
| 2031 | uint16_t aid; /* use 0 if macAddr is being specified */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2032 | struct qdf_mac_addr macaddr; /* only on AP to specify the STA */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2033 | tSirDeltsReqInfo rsp; |
| 2034 | } tSirDeltsRsp, *tpSirDeltsRsp; |
| 2035 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2036 | #define SIR_QOS_NUM_AC_MAX 4 |
| 2037 | |
| 2038 | typedef struct sSirAggrQosReqInfo { |
| 2039 | uint16_t tspecIdx; |
| 2040 | tSirAddtsReqInfo aggrAddTsInfo[SIR_QOS_NUM_AC_MAX]; |
| 2041 | } tSirAggrQosReqInfo, *tpSirAggrQosReqInfo; |
| 2042 | |
| 2043 | typedef struct sSirAggrQosReq { |
| 2044 | uint16_t messageType; /* eWNI_SME_ADDTS_REQ */ |
| 2045 | uint16_t length; |
| 2046 | uint8_t sessionId; /* Session ID */ |
| 2047 | uint16_t transactionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2048 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2049 | uint32_t timeout; /* in ms */ |
| 2050 | uint8_t rspReqd; |
| 2051 | tSirAggrQosReqInfo aggrInfo; |
| 2052 | } tSirAggrQosReq, *tpSirAggrQosReq; |
| 2053 | |
| 2054 | typedef struct sSirAggrQosRspInfo { |
| 2055 | uint16_t tspecIdx; |
| 2056 | tSirAddtsRspInfo aggrRsp[SIR_QOS_NUM_AC_MAX]; |
| 2057 | } tSirAggrQosRspInfo, *tpSirAggrQosRspInfo; |
| 2058 | |
| 2059 | typedef struct sSirAggrQosRsp { |
| 2060 | uint16_t messageType; |
| 2061 | uint16_t length; |
| 2062 | uint8_t sessionId; |
| 2063 | tSirAggrQosRspInfo aggrInfo; |
| 2064 | } tSirAggrQosRsp, *tpSirAggrQosRsp; |
| 2065 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2066 | |
| 2067 | typedef struct sSirQosMapSet { |
| 2068 | uint8_t present; |
| 2069 | uint8_t num_dscp_exceptions; |
| 2070 | uint8_t dscp_exceptions[21][2]; |
| 2071 | uint8_t dscp_range[8][2]; |
| 2072 | } tSirQosMapSet, *tpSirQosMapSet; |
| 2073 | |
| 2074 | typedef struct sSmeIbssPeerInd { |
| 2075 | uint16_t mesgType; |
| 2076 | uint16_t mesgLen; |
| 2077 | uint8_t sessionId; |
| 2078 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2079 | struct qdf_mac_addr peer_addr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2080 | uint16_t staId; |
| 2081 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2082 | /* Beacon will be appended for new Peer indication. */ |
| 2083 | } tSmeIbssPeerInd, *tpSmeIbssPeerInd; |
| 2084 | |
| 2085 | typedef struct sSirIbssPeerInactivityInd { |
| 2086 | uint8_t bssIdx; |
| 2087 | uint8_t staIdx; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2088 | struct qdf_mac_addr peer_addr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2089 | } tSirIbssPeerInactivityInd, *tpSirIbssPeerInactivityInd; |
| 2090 | |
| 2091 | typedef struct sLimScanChn { |
| 2092 | uint16_t numTimeScan; /* how many time this channel is scan */ |
| 2093 | uint8_t channelId; |
| 2094 | } tLimScanChn; |
| 2095 | |
gaolez | e510894 | 2017-03-31 16:56:42 +0800 | [diff] [blame] | 2096 | /** |
| 2097 | * struct lim_channel_status |
| 2098 | * @channelfreq: Channel freq |
| 2099 | * @noise_floor: Noise Floor value |
| 2100 | * @rx_clear_count: rx clear count |
| 2101 | * @cycle_count: cycle count |
| 2102 | * @chan_tx_pwr_range: channel tx power per range in 0.5dBm steps |
| 2103 | * @chan_tx_pwr_throughput: channel tx power per throughput |
| 2104 | * @rx_frame_count: rx frame count (cumulative) |
| 2105 | * @bss_rx_cycle_count: BSS rx cycle count |
| 2106 | * @rx_11b_mode_data_duration: b-mode data rx time (units are microseconds) |
| 2107 | * @tx_frame_count: BSS tx cycle count |
| 2108 | * @mac_clk_mhz: sample frequency |
| 2109 | * @channel_id: channel index |
| 2110 | * @cmd_flags: indicate which stat event is this status coming from |
| 2111 | */ |
| 2112 | struct lim_channel_status { |
| 2113 | uint32_t channelfreq; |
| 2114 | uint32_t noise_floor; |
| 2115 | uint32_t rx_clear_count; |
| 2116 | uint32_t cycle_count; |
| 2117 | uint32_t chan_tx_pwr_range; |
| 2118 | uint32_t chan_tx_pwr_throughput; |
| 2119 | uint32_t rx_frame_count; |
| 2120 | uint32_t bss_rx_cycle_count; |
| 2121 | uint32_t rx_11b_mode_data_duration; |
| 2122 | uint32_t tx_frame_count; |
| 2123 | uint32_t mac_clk_mhz; |
| 2124 | uint32_t channel_id; |
| 2125 | uint32_t cmd_flags; |
| 2126 | }; |
| 2127 | |
| 2128 | /** |
| 2129 | * struct lim_scan_channel_status |
| 2130 | * @total_channel: total number of be scanned channel |
| 2131 | * @channel_status_list: channel status info store in this array |
| 2132 | */ |
| 2133 | struct lim_scan_channel_status { |
| 2134 | uint8_t total_channel; |
| 2135 | struct lim_channel_status |
| 2136 | channel_status_list[SIR_MAX_SUPPORTED_CHANNEL_LIST]; |
| 2137 | }; |
| 2138 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2139 | typedef struct sSmeGetScanChnRsp { |
| 2140 | /* Message Type */ |
| 2141 | uint16_t mesgType; |
| 2142 | /* Message Length */ |
| 2143 | uint16_t mesgLen; |
| 2144 | uint8_t sessionId; |
| 2145 | uint8_t numChn; |
| 2146 | tLimScanChn scanChn[1]; |
| 2147 | } tSmeGetScanChnRsp, *tpSmeGetScanChnRsp; |
| 2148 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2149 | typedef struct sSirSmeGetAssocSTAsReq { |
| 2150 | uint16_t messageType; /* eWNI_SME_GET_ASSOC_STAS_REQ */ |
| 2151 | uint16_t length; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2152 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2153 | uint16_t modId; |
| 2154 | void *pUsrContext; |
| 2155 | void *pSapEventCallback; |
| 2156 | /* Pointer to allocated mem passed in wlansap_get_assoc_stations API */ |
| 2157 | void *pAssocStasArray; |
| 2158 | } tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq; |
| 2159 | |
| 2160 | typedef struct sSmeMaxAssocInd { |
| 2161 | uint16_t mesgType; /* eWNI_SME_MAX_ASSOC_EXCEEDED */ |
| 2162 | uint16_t mesgLen; |
| 2163 | uint8_t sessionId; |
| 2164 | /* the new peer that got rejected max assoc limit reached */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2165 | struct qdf_mac_addr peer_mac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2166 | } tSmeMaxAssocInd, *tpSmeMaxAssocInd; |
| 2167 | |
| 2168 | typedef struct sSmeCsaOffloadInd { |
| 2169 | uint16_t mesgType; /* eWNI_SME_CSA_OFFLOAD_EVENT */ |
| 2170 | uint16_t mesgLen; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2171 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2172 | } tSmeCsaOffloadInd, *tpSmeCsaOffloadInd; |
| 2173 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2174 | #define SIR_MAX_NAME_SIZE 64 |
| 2175 | #define SIR_MAX_TEXT_SIZE 32 |
| 2176 | |
| 2177 | typedef struct sSirName { |
| 2178 | uint8_t num_name; |
| 2179 | uint8_t name[SIR_MAX_NAME_SIZE]; |
| 2180 | } tSirName; |
| 2181 | |
| 2182 | typedef struct sSirText { |
| 2183 | uint8_t num_text; |
| 2184 | uint8_t text[SIR_MAX_TEXT_SIZE]; |
| 2185 | } tSirText; |
| 2186 | |
| 2187 | #define SIR_WPS_PROBRSP_VER_PRESENT 0x00000001 |
| 2188 | #define SIR_WPS_PROBRSP_STATE_PRESENT 0x00000002 |
| 2189 | #define SIR_WPS_PROBRSP_APSETUPLOCK_PRESENT 0x00000004 |
| 2190 | #define SIR_WPS_PROBRSP_SELECTEDREGISTRA_PRESENT 0x00000008 |
| 2191 | #define SIR_WPS_PROBRSP_DEVICEPASSWORDID_PRESENT 0x00000010 |
| 2192 | #define SIR_WPS_PROBRSP_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020 |
| 2193 | #define SIR_WPS_PROBRSP_RESPONSETYPE_PRESENT 0x00000040 |
| 2194 | #define SIR_WPS_PROBRSP_UUIDE_PRESENT 0x00000080 |
| 2195 | #define SIR_WPS_PROBRSP_MANUFACTURE_PRESENT 0x00000100 |
| 2196 | #define SIR_WPS_PROBRSP_MODELNAME_PRESENT 0x00000200 |
| 2197 | #define SIR_WPS_PROBRSP_MODELNUMBER_PRESENT 0x00000400 |
| 2198 | #define SIR_WPS_PROBRSP_SERIALNUMBER_PRESENT 0x00000800 |
| 2199 | #define SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT 0x00001000 |
| 2200 | #define SIR_WPS_PROBRSP_DEVICENAME_PRESENT 0x00002000 |
| 2201 | #define SIR_WPS_PROBRSP_CONFIGMETHODS_PRESENT 0x00004000 |
| 2202 | #define SIR_WPS_PROBRSP_RF_BANDS_PRESENT 0x00008000 |
| 2203 | |
| 2204 | typedef struct sSirWPSProbeRspIE { |
| 2205 | uint32_t FieldPresent; |
| 2206 | uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */ |
| 2207 | uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */ |
| 2208 | bool APSetupLocked; /* Must be included if value is true */ |
| 2209 | /* |
| 2210 | * BOOL: indicates if the user has recently activated a Registrar to |
| 2211 | * add an Enrollee. |
| 2212 | */ |
| 2213 | bool SelectedRegistra; |
| 2214 | uint16_t DevicePasswordID; /* Device Password ID */ |
| 2215 | /* Selected Registrar config method */ |
| 2216 | uint16_t SelectedRegistraCfgMethod; |
| 2217 | uint8_t ResponseType; /* Response type */ |
| 2218 | uint8_t UUID_E[16]; /* Unique identifier of the AP. */ |
| 2219 | tSirName Manufacture; |
| 2220 | tSirText ModelName; |
| 2221 | tSirText ModelNumber; |
| 2222 | tSirText SerialNumber; |
| 2223 | /* Device Category ID: 1Computer, 2Input Device, ... */ |
| 2224 | uint32_t PrimaryDeviceCategory; |
| 2225 | /* Vendor specific OUI for Device Sub Category */ |
| 2226 | uint8_t PrimaryDeviceOUI[4]; |
| 2227 | /* |
| 2228 | Device Sub Category ID: 1-PC, 2-Server if Device Category ID |
| 2229 | * is computer |
| 2230 | */ |
| 2231 | uint32_t DeviceSubCategory; |
| 2232 | tSirText DeviceName; |
| 2233 | uint16_t ConfigMethod; /* Configuaration method */ |
| 2234 | uint8_t RFBand; /* RF bands available on the AP */ |
| 2235 | } tSirWPSProbeRspIE; |
| 2236 | |
| 2237 | #define SIR_WPS_BEACON_VER_PRESENT 0x00000001 |
| 2238 | #define SIR_WPS_BEACON_STATE_PRESENT 0x00000002 |
| 2239 | #define SIR_WPS_BEACON_APSETUPLOCK_PRESENT 0x00000004 |
| 2240 | #define SIR_WPS_BEACON_SELECTEDREGISTRA_PRESENT 0x00000008 |
| 2241 | #define SIR_WPS_BEACON_DEVICEPASSWORDID_PRESENT 0x00000010 |
| 2242 | #define SIR_WPS_BEACON_SELECTEDREGISTRACFGMETHOD_PRESENT 0x00000020 |
| 2243 | #define SIR_WPS_BEACON_UUIDE_PRESENT 0x00000080 |
| 2244 | #define SIR_WPS_BEACON_RF_BANDS_PRESENT 0x00000100 |
| 2245 | #define SIR_WPS_UUID_LEN 16 |
| 2246 | |
| 2247 | typedef struct sSirWPSBeaconIE { |
| 2248 | uint32_t FieldPresent; |
| 2249 | uint32_t Version; /* Version. 0x10 = version 1.0, 0x11 = etc. */ |
| 2250 | uint32_t wpsState; /* 1 = unconfigured, 2 = configured. */ |
| 2251 | bool APSetupLocked; /* Must be included if value is true */ |
| 2252 | /* |
| 2253 | * BOOL: indicates if the user has recently activated a Registrar to |
| 2254 | * add an Enrollee. |
| 2255 | */ |
| 2256 | bool SelectedRegistra; |
| 2257 | uint16_t DevicePasswordID; /* Device Password ID */ |
| 2258 | /* Selected Registrar config method */ |
| 2259 | uint16_t SelectedRegistraCfgMethod; |
| 2260 | uint8_t UUID_E[SIR_WPS_UUID_LEN]; /* Unique identifier of the AP. */ |
| 2261 | uint8_t RFBand; /* RF bands available on the AP */ |
| 2262 | } tSirWPSBeaconIE; |
| 2263 | |
| 2264 | #define SIR_WPS_ASSOCRSP_VER_PRESENT 0x00000001 |
| 2265 | #define SIR_WPS_ASSOCRSP_RESPONSETYPE_PRESENT 0x00000002 |
| 2266 | |
| 2267 | typedef struct sSirWPSAssocRspIE { |
| 2268 | uint32_t FieldPresent; |
| 2269 | uint32_t Version; |
| 2270 | uint8_t ResposeType; |
| 2271 | } tSirWPSAssocRspIE; |
| 2272 | |
| 2273 | typedef struct sSirAPWPSIEs { |
| 2274 | tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE */ |
| 2275 | tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE */ |
| 2276 | tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE */ |
| 2277 | } tSirAPWPSIEs, *tpSiriAPWPSIEs; |
| 2278 | |
| 2279 | typedef struct sSirUpdateAPWPSIEsReq { |
| 2280 | uint16_t messageType; /* eWNI_SME_UPDATE_APWPSIE_REQ */ |
| 2281 | uint16_t length; |
| 2282 | uint16_t transactionId; /* Transaction ID for cmd */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2283 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2284 | uint8_t sessionId; /* Session ID */ |
| 2285 | tSirAPWPSIEs APWPSIEs; |
| 2286 | } tSirUpdateAPWPSIEsReq, *tpSirUpdateAPWPSIEsReq; |
| 2287 | |
Naveen Rawat | 8029a40 | 2017-06-01 10:54:19 -0700 | [diff] [blame] | 2288 | struct update_config { |
| 2289 | uint16_t messageType; /* eWNI_SME_UPDATE_CONFIG */ |
| 2290 | uint16_t length; |
| 2291 | uint8_t sme_session_id; |
| 2292 | uint16_t capab; |
| 2293 | uint32_t value; |
| 2294 | }; |
| 2295 | |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 2296 | /* |
| 2297 | * enum sir_update_session_param_type - session param type |
| 2298 | * @SIR_PARAM_SSID_HIDDEN: ssidHidden parameter |
Selvaraj, Sridhar | ac4fcf3 | 2016-09-28 12:57:32 +0530 | [diff] [blame] | 2299 | * @SIR_PARAM_IGNORE_ASSOC_DISALLOWED: ignore_assoc_disallowed parameter |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 2300 | */ |
| 2301 | enum sir_update_session_param_type { |
| 2302 | SIR_PARAM_SSID_HIDDEN, |
Selvaraj, Sridhar | ac4fcf3 | 2016-09-28 12:57:32 +0530 | [diff] [blame] | 2303 | SIR_PARAM_IGNORE_ASSOC_DISALLOWED, |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 2304 | }; |
| 2305 | |
| 2306 | /* |
| 2307 | * struct sir_update_session_param |
| 2308 | * @message_type: SME message type |
| 2309 | * @length: size of struct sir_update_session_param |
| 2310 | * @session_id: Session ID |
| 2311 | * @param_type: parameter to be updated |
| 2312 | * @param_val: Parameter value to update |
| 2313 | */ |
| 2314 | struct sir_update_session_param { |
| 2315 | uint16_t message_type; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2316 | uint16_t length; |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 2317 | uint8_t session_id; |
| 2318 | uint32_t param_type; |
| 2319 | uint32_t param_val; |
| 2320 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2321 | |
Manjunathappa Prakash | 59f861d | 2016-04-21 10:33:31 -0700 | [diff] [blame] | 2322 | /** |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 2323 | * struct sir_set_he_bss_color |
| 2324 | * @message_type: SME message type |
| 2325 | * @length: size of struct sir_set_he_bss_color |
| 2326 | * @session_id: Session ID |
| 2327 | * @bss_color: bss color value |
| 2328 | */ |
| 2329 | struct sir_set_he_bss_color { |
| 2330 | uint16_t message_type; |
| 2331 | uint16_t length; |
| 2332 | uint8_t session_id; |
| 2333 | uint8_t bss_color; |
| 2334 | }; |
| 2335 | |
| 2336 | /** |
Manjunathappa Prakash | 59f861d | 2016-04-21 10:33:31 -0700 | [diff] [blame] | 2337 | * struct sir_create_session - Used for creating session in monitor mode |
| 2338 | * @type: SME host message type. |
| 2339 | * @msg_len: Length of the message. |
| 2340 | * @bss_id: bss_id for creating the session. |
| 2341 | */ |
| 2342 | struct sir_create_session { |
| 2343 | uint16_t type; |
| 2344 | uint16_t msg_len; |
| 2345 | struct qdf_mac_addr bss_id; |
| 2346 | }; |
| 2347 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2348 | /* Beacon Interval */ |
| 2349 | typedef struct sSirChangeBIParams { |
| 2350 | uint16_t messageType; |
| 2351 | uint16_t length; |
| 2352 | uint16_t beaconInterval; /* Beacon Interval */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2353 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2354 | uint8_t sessionId; /* Session ID */ |
| 2355 | } tSirChangeBIParams, *tpSirChangeBIParams; |
| 2356 | |
| 2357 | #ifdef QCA_HT_2040_COEX |
| 2358 | typedef struct sSirSetHT2040Mode { |
| 2359 | uint16_t messageType; |
| 2360 | uint16_t length; |
| 2361 | uint8_t cbMode; |
| 2362 | bool obssEnabled; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2363 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2364 | uint8_t sessionId; /* Session ID */ |
| 2365 | } tSirSetHT2040Mode, *tpSirSetHT2040Mode; |
| 2366 | #endif |
| 2367 | |
| 2368 | #define SIR_WPS_PBC_WALK_TIME 120 /* 120 Second */ |
| 2369 | |
| 2370 | typedef struct sSirWPSPBCSession { |
| 2371 | struct sSirWPSPBCSession *next; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2372 | struct qdf_mac_addr addr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2373 | uint8_t uuid_e[SIR_WPS_UUID_LEN]; |
| 2374 | uint32_t timestamp; |
| 2375 | } tSirWPSPBCSession; |
| 2376 | |
| 2377 | typedef struct sSirSmeGetWPSPBCSessionsReq { |
| 2378 | uint16_t messageType; /* eWNI_SME_GET_WPSPBC_SESSION_REQ */ |
| 2379 | uint16_t length; |
| 2380 | void *pUsrContext; |
| 2381 | void *pSapEventCallback; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2382 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2383 | /* MAC Address of STA in WPS Session to be removed */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2384 | struct qdf_mac_addr remove_mac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2385 | } tSirSmeGetWPSPBCSessionsReq, *tpSirSmeGetWPSPBCSessionsReq; |
| 2386 | |
| 2387 | typedef struct sSirWPSPBCProbeReq { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2388 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2389 | uint16_t probeReqIELen; |
| 2390 | uint8_t probeReqIE[512]; |
| 2391 | } tSirWPSPBCProbeReq, *tpSirWPSPBCProbeReq; |
| 2392 | |
| 2393 | /* probereq from peer, when wsc is enabled */ |
| 2394 | typedef struct sSirSmeProbeReqInd { |
| 2395 | uint16_t messageType; /* eWNI_SME_WPS_PBC_PROBE_REQ_IND */ |
| 2396 | uint16_t length; |
| 2397 | uint8_t sessionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2398 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2399 | tSirWPSPBCProbeReq WPSPBCProbeReq; |
| 2400 | } tSirSmeProbeReqInd, *tpSirSmeProbeReqInd; |
| 2401 | |
| 2402 | typedef struct sSirUpdateAPWPARSNIEsReq { |
| 2403 | uint16_t messageType; /* eWNI_SME_SET_APWPARSNIEs_REQ */ |
| 2404 | uint16_t length; |
| 2405 | uint16_t transactionId; /* Transaction ID for cmd */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2406 | struct qdf_mac_addr bssid; /* BSSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2407 | uint8_t sessionId; /* Session ID */ |
| 2408 | tSirRSNie APWPARSNIEs; |
| 2409 | } tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq; |
| 2410 | |
| 2411 | #define SIR_ROAM_MAX_CHANNELS 80 |
| 2412 | #define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450 |
| 2413 | /* Occupied channel list remains static */ |
| 2414 | #define CHANNEL_LIST_STATIC 1 |
Himanshu Agarwal | b23aa57 | 2018-06-14 17:04:44 +0530 | [diff] [blame] | 2415 | /* Occupied channel list can be dynamic */ |
| 2416 | #define CHANNEL_LIST_DYNAMIC 2 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2417 | #define SIR_ROAM_SCAN_24G_DEFAULT_CH 1 |
| 2418 | #define SIR_ROAM_SCAN_5G_DEFAULT_CH 36 |
| 2419 | #define SIR_ROAM_SCAN_RESERVED_BYTES 61 |
| 2420 | |
| 2421 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 2422 | #define SIR_ROAM_SCAN_PSK_SIZE 32 |
| 2423 | #define SIR_ROAM_R0KH_ID_MAX_LEN 48 |
| 2424 | #endif |
| 2425 | /* SME -> HAL - This is the host offload request. */ |
| 2426 | #define SIR_IPV4_ARP_REPLY_OFFLOAD 0 |
| 2427 | #define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1 |
| 2428 | #define SIR_IPV6_NS_OFFLOAD 2 |
| 2429 | #define SIR_OFFLOAD_DISABLE 0 |
| 2430 | #define SIR_OFFLOAD_ENABLE 1 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2431 | |
| 2432 | #ifdef WLAN_NS_OFFLOAD |
| 2433 | typedef struct sSirNsOffloadReq { |
Srinivas Girigowda | c79a710 | 2015-12-08 15:18:26 -0800 | [diff] [blame] | 2434 | uint8_t srcIPv6Addr[SIR_MAC_IPV6_ADDR_LEN]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2435 | uint8_t selfIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][SIR_MAC_IPV6_ADDR_LEN]; |
| 2436 | uint8_t targetIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][SIR_MAC_IPV6_ADDR_LEN]; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2437 | struct qdf_mac_addr self_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2438 | uint8_t srcIPv6AddrValid; |
| 2439 | uint8_t targetIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]; |
Sravan Kumar Kairam | c087358 | 2016-07-26 17:34:57 +0530 | [diff] [blame] | 2440 | uint8_t target_ipv6_addr_ac_type[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2441 | uint8_t slotIdx; |
| 2442 | } tSirNsOffloadReq, *tpSirNsOffloadReq; |
| 2443 | #endif /* WLAN_NS_OFFLOAD */ |
| 2444 | |
| 2445 | typedef struct sSirHostOffloadReq { |
| 2446 | uint8_t offloadType; |
| 2447 | uint8_t enableOrDisable; |
| 2448 | uint32_t num_ns_offload_count; |
| 2449 | union { |
Srinivas Girigowda | c79a710 | 2015-12-08 15:18:26 -0800 | [diff] [blame] | 2450 | uint8_t hostIpv4Addr[SIR_IPV4_ADDR_LEN]; |
| 2451 | uint8_t hostIpv6Addr[SIR_MAC_IPV6_ADDR_LEN]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2452 | } params; |
| 2453 | #ifdef WLAN_NS_OFFLOAD |
| 2454 | tSirNsOffloadReq nsOffloadInfo; |
| 2455 | #endif /* WLAN_NS_OFFLOAD */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2456 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2457 | } tSirHostOffloadReq, *tpSirHostOffloadReq; |
| 2458 | |
| 2459 | /* Packet Types. */ |
| 2460 | #define SIR_KEEP_ALIVE_NULL_PKT 1 |
| 2461 | #define SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 |
| 2462 | |
| 2463 | /* Keep Alive request. */ |
| 2464 | typedef struct sSirKeepAliveReq { |
| 2465 | uint8_t packetType; |
| 2466 | uint32_t timePeriod; |
| 2467 | tSirIpv4Addr hostIpv4Addr; |
| 2468 | tSirIpv4Addr destIpv4Addr; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2469 | struct qdf_mac_addr dest_macaddr; |
| 2470 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2471 | uint8_t sessionId; |
| 2472 | } tSirKeepAliveReq, *tpSirKeepAliveReq; |
| 2473 | |
| 2474 | typedef struct sSirSmeMgmtFrameInd { |
Abhishek Singh | 7996eb7 | 2015-12-30 17:24:02 +0530 | [diff] [blame] | 2475 | uint16_t frame_len; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2476 | uint32_t rxChan; |
| 2477 | uint8_t sessionId; |
| 2478 | uint8_t frameType; |
| 2479 | int8_t rxRssi; |
| 2480 | uint8_t frameBuf[1]; /* variable */ |
| 2481 | } tSirSmeMgmtFrameInd, *tpSirSmeMgmtFrameInd; |
| 2482 | |
Abhishek Singh | 7996eb7 | 2015-12-30 17:24:02 +0530 | [diff] [blame] | 2483 | typedef void (*sir_mgmt_frame_ind_callback)(tSirSmeMgmtFrameInd *frame_ind); |
| 2484 | /** |
| 2485 | * struct sir_sme_mgmt_frame_cb_req - Register a |
| 2486 | * management frame callback req |
| 2487 | * |
| 2488 | * @message_type: message id |
| 2489 | * @length: msg length |
| 2490 | * @callback: callback for management frame indication |
| 2491 | */ |
| 2492 | struct sir_sme_mgmt_frame_cb_req { |
| 2493 | uint16_t message_type; |
| 2494 | uint16_t length; |
| 2495 | sir_mgmt_frame_ind_callback callback; |
| 2496 | }; |
| 2497 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2498 | #ifdef WLAN_FEATURE_11W |
| 2499 | typedef struct sSirSmeUnprotMgmtFrameInd { |
| 2500 | uint8_t sessionId; |
| 2501 | uint8_t frameType; |
| 2502 | uint8_t frameLen; |
| 2503 | uint8_t frameBuf[1]; /* variable */ |
| 2504 | } tSirSmeUnprotMgmtFrameInd, *tpSirSmeUnprotMgmtFrameInd; |
| 2505 | #endif |
| 2506 | |
| 2507 | #define SIR_IS_FULL_POWER_REASON_DISCONNECTED(eReason) \ |
| 2508 | ((eSME_LINK_DISCONNECTED_BY_HDD == (eReason)) || \ |
| 2509 | (eSME_LINK_DISCONNECTED_BY_OTHER == (eReason))) |
| 2510 | #define SIR_IS_FULL_POWER_NEEDED_BY_HDD(eReason) \ |
| 2511 | ((eSME_LINK_DISCONNECTED_BY_HDD == (eReason)) || \ |
| 2512 | (eSME_FULL_PWR_NEEDED_BY_HDD == (eReason))) |
| 2513 | |
| 2514 | /* P2P Power Save Related */ |
| 2515 | typedef struct sSirNoAParam { |
| 2516 | uint8_t ctWindow:7; |
| 2517 | uint8_t OppPS:1; |
| 2518 | uint8_t count; |
| 2519 | uint32_t duration; |
| 2520 | uint32_t interval; |
| 2521 | uint32_t singleNoADuration; |
| 2522 | uint8_t psSelection; |
| 2523 | } tSirNoAParam, *tpSirNoAParam; |
| 2524 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2525 | typedef struct sSirWlanResumeParam { |
| 2526 | uint8_t configuredMcstBcstFilterSetting; |
| 2527 | } tSirWlanResumeParam, *tpSirWlanResumeParam; |
| 2528 | |
| 2529 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
| 2530 | |
| 2531 | typedef enum ext_wow_type { |
| 2532 | EXT_WOW_TYPE_APP_TYPE1, /* wow type: only enable wakeup for app type1 */ |
| 2533 | EXT_WOW_TYPE_APP_TYPE2, /* wow type: only enable wakeup for app type2 */ |
| 2534 | EXT_WOW_TYPE_APP_TYPE1_2, /* wow type: enable wakeup for app type1&2 */ |
| 2535 | } EXT_WOW_TYPE; |
| 2536 | |
| 2537 | typedef struct { |
| 2538 | uint8_t vdev_id; |
| 2539 | EXT_WOW_TYPE type; |
| 2540 | uint32_t wakeup_pin_num; |
| 2541 | } tSirExtWoWParams, *tpSirExtWoWParams; |
| 2542 | |
| 2543 | typedef struct { |
| 2544 | uint8_t vdev_id; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2545 | struct qdf_mac_addr wakee_mac_addr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2546 | uint8_t identification_id[8]; |
| 2547 | uint8_t password[16]; |
| 2548 | uint32_t id_length; |
| 2549 | uint32_t pass_length; |
| 2550 | } tSirAppType1Params, *tpSirAppType1Params; |
| 2551 | |
| 2552 | typedef struct { |
| 2553 | uint8_t vdev_id; |
| 2554 | |
| 2555 | uint8_t rc4_key[16]; |
| 2556 | uint32_t rc4_key_len; |
| 2557 | |
| 2558 | /** ip header parameter */ |
| 2559 | uint32_t ip_id; /* NC id */ |
| 2560 | uint32_t ip_device_ip; /* NC IP address */ |
| 2561 | uint32_t ip_server_ip; /* Push server IP address */ |
| 2562 | |
| 2563 | /** tcp header parameter */ |
| 2564 | uint16_t tcp_src_port; /* NC TCP port */ |
| 2565 | uint16_t tcp_dst_port; /* Push server TCP port */ |
| 2566 | uint32_t tcp_seq; |
| 2567 | uint32_t tcp_ack_seq; |
| 2568 | |
| 2569 | uint32_t keepalive_init; /* Initial ping interval */ |
| 2570 | uint32_t keepalive_min; /* Minimum ping interval */ |
| 2571 | uint32_t keepalive_max; /* Maximum ping interval */ |
| 2572 | uint32_t keepalive_inc; /* Increment of ping interval */ |
| 2573 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2574 | struct qdf_mac_addr gateway_mac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2575 | uint32_t tcp_tx_timeout_val; |
| 2576 | uint32_t tcp_rx_timeout_val; |
| 2577 | } tSirAppType2Params, *tpSirAppType2Params; |
| 2578 | #endif |
| 2579 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2580 | #define ANI_MAX_IBSS_ROUTE_TABLE_ENTRY 100 |
| 2581 | |
| 2582 | typedef struct sAniDestIpNextHopMacPair { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2583 | uint8_t destIpv4Addr[QDF_IPV4_ADDR_SIZE]; |
| 2584 | uint8_t nextHopMacAddr[QDF_MAC_ADDR_SIZE]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2585 | } tAniDestIpNextHopMacPair; |
| 2586 | |
| 2587 | typedef struct sAniIbssRouteTable { |
| 2588 | uint8_t sessionId; |
| 2589 | uint16_t numEntries; |
| 2590 | tAniDestIpNextHopMacPair destIpNextHopPair[1]; |
| 2591 | } tAniIbssRouteTable; |
| 2592 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2593 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 2594 | typedef struct { |
| 2595 | uint8_t acvo_uapsd:1; |
| 2596 | uint8_t acvi_uapsd:1; |
| 2597 | uint8_t acbk_uapsd:1; |
| 2598 | uint8_t acbe_uapsd:1; |
| 2599 | uint8_t reserved:4; |
| 2600 | } tSirAcUapsd, *tpSirAcUapsd; |
| 2601 | #endif |
| 2602 | |
| 2603 | typedef struct { |
| 2604 | tSirMacSSid ssId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2605 | uint8_t currAPbssid[QDF_MAC_ADDR_SIZE]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2606 | uint32_t authentication; |
| 2607 | uint8_t encryption; |
| 2608 | uint8_t mcencryption; |
| 2609 | uint8_t ChannelCount; |
| 2610 | uint8_t ChannelCache[SIR_ROAM_MAX_CHANNELS]; |
| 2611 | #ifdef WLAN_FEATURE_11W |
| 2612 | bool mfp_enabled; |
| 2613 | #endif |
| 2614 | |
| 2615 | } tSirRoamNetworkType; |
| 2616 | |
| 2617 | typedef struct SirMobilityDomainInfo { |
| 2618 | uint8_t mdiePresent; |
| 2619 | uint16_t mobilityDomain; |
| 2620 | } tSirMobilityDomainInfo; |
| 2621 | |
| 2622 | typedef enum { |
| 2623 | SIR_ROAMING_DFS_CHANNEL_DISABLED = 0, |
| 2624 | SIR_ROAMING_DFS_CHANNEL_ENABLED_NORMAL = 1, |
| 2625 | SIR_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE = 2 |
| 2626 | } eSirDFSRoamScanMode; |
| 2627 | #define MAX_SSID_ALLOWED_LIST 4 |
| 2628 | #define MAX_BSSID_AVOID_LIST 16 |
| 2629 | #define MAX_BSSID_FAVORED 16 |
| 2630 | /** |
| 2631 | * struct roam_ext_params - Structure holding roaming parameters |
| 2632 | * @num_bssid_avoid_list: The number of BSSID's that we should |
| 2633 | * avoid connecting to. It is like a |
| 2634 | * blacklist of BSSID's. |
| 2635 | * @num_ssid_allowed_list: The number of SSID profiles that are |
| 2636 | * in the Whitelist. When roaming, we |
| 2637 | * consider the BSSID's with this SSID |
| 2638 | * also for roaming apart from the connected one's |
| 2639 | * @num_bssid_favored: Number of BSSID's which have a preference over |
| 2640 | * others |
| 2641 | * @ssid_allowed_list: Whitelist SSID's |
| 2642 | * @bssid_avoid_list: Blacklist SSID's |
| 2643 | * @bssid_favored: Favorable BSSID's |
| 2644 | * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it |
| 2645 | * @raise_rssi_thresh_5g: The RSSI threshold below which the |
| 2646 | * raise_factor_5g (boost factor) should be |
| 2647 | * applied. |
| 2648 | * @drop_rssi_thresh_5g: The RSSI threshold beyond which the |
| 2649 | * drop_factor_5g (penalty factor) should be |
| 2650 | * applied |
| 2651 | * @raise_rssi_type_5g: Algorithm to apply the boost factor |
| 2652 | * @raise_factor_5g: Boost factor |
| 2653 | * @drop_rssi_type_5g: Algorithm to apply the penalty factor |
| 2654 | * @drop_factor_5g: Penalty factor |
| 2655 | * @max_raise_rssi_5g: Maximum amount of Boost that can added |
| 2656 | * @max_drop_rssi_5g: Maximum amount of penalty that can be subtracted |
| 2657 | * @good_rssi_threshold: The Lookup UP threshold beyond which roaming |
| 2658 | * scan should be performed. |
| 2659 | * @rssi_diff: RSSI difference for the AP to be better over the |
| 2660 | * current AP to avoid ping pong effects |
| 2661 | * @good_rssi_roam: Lazy Roam |
| 2662 | * @is_5g_pref_enabled: 5GHz BSSID preference feature enable/disable. |
Varun Reddy Yeturu | faad37e | 2017-07-26 10:54:13 -0700 | [diff] [blame] | 2663 | * @bg_scan_bad_rssi_thresh: Bad RSSI threshold to perform bg scan. |
Vignesh Viswanathan | c018e98 | 2017-09-07 18:49:19 +0530 | [diff] [blame] | 2664 | * @bad_rssi_thresh_offset_2g: Offset from Bad RSSI threshold for 2G to 5G Roam |
Varun Reddy Yeturu | faad37e | 2017-07-26 10:54:13 -0700 | [diff] [blame] | 2665 | * @bg_scan_client_bitmap: Bitmap to identify the client scans to snoop. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2666 | * |
| 2667 | * This structure holds all the key parameters related to |
| 2668 | * initial connection and also roaming connections. |
| 2669 | * */ |
| 2670 | struct roam_ext_params { |
| 2671 | uint8_t num_bssid_avoid_list; |
| 2672 | uint8_t num_ssid_allowed_list; |
| 2673 | uint8_t num_bssid_favored; |
| 2674 | tSirMacSSid ssid_allowed_list[MAX_SSID_ALLOWED_LIST]; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2675 | struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST]; |
| 2676 | struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2677 | uint8_t bssid_favored_factor[MAX_BSSID_FAVORED]; |
| 2678 | int raise_rssi_thresh_5g; |
| 2679 | int drop_rssi_thresh_5g; |
| 2680 | uint8_t raise_rssi_type_5g; |
| 2681 | uint8_t raise_factor_5g; |
| 2682 | uint8_t drop_rssi_type_5g; |
| 2683 | uint8_t drop_factor_5g; |
| 2684 | int max_raise_rssi_5g; |
| 2685 | int max_drop_rssi_5g; |
| 2686 | int alert_rssi_threshold; |
| 2687 | int rssi_diff; |
| 2688 | int good_rssi_roam; |
| 2689 | bool is_5g_pref_enabled; |
Gupta, Kapil | c68ad46 | 2016-02-01 19:17:23 +0530 | [diff] [blame] | 2690 | int dense_rssi_thresh_offset; |
| 2691 | int dense_min_aps_cnt; |
| 2692 | int initial_dense_status; |
| 2693 | int traffic_threshold; |
Abhishek Singh | 4db8c15 | 2017-07-18 10:40:08 +0530 | [diff] [blame] | 2694 | uint8_t num_rssi_rejection_ap; |
| 2695 | struct rssi_disallow_bssid rssi_rejection_ap[MAX_RSSI_AVOID_BSSID_LIST]; |
Varun Reddy Yeturu | faad37e | 2017-07-26 10:54:13 -0700 | [diff] [blame] | 2696 | int8_t bg_scan_bad_rssi_thresh; |
Vignesh Viswanathan | c018e98 | 2017-09-07 18:49:19 +0530 | [diff] [blame] | 2697 | uint8_t roam_bad_rssi_thresh_offset_2g; |
Varun Reddy Yeturu | faad37e | 2017-07-26 10:54:13 -0700 | [diff] [blame] | 2698 | uint32_t bg_scan_client_bitmap; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2699 | }; |
| 2700 | |
Deepak Dhamdhere | 828f189 | 2017-02-09 11:51:19 -0800 | [diff] [blame] | 2701 | /** |
Himanshu Agarwal | 8bcec57 | 2017-09-28 11:54:37 +0530 | [diff] [blame] | 2702 | * struct sir_weight_config - weight params to |
| 2703 | * calculate best candidate |
| 2704 | * @rssi_weightage: RSSI weightage |
| 2705 | * @ht_caps_weightage: HT caps weightage |
| 2706 | * @vht_caps_weightage: VHT caps weightage |
| 2707 | * @he_caps_weightage: HE caps weightage |
| 2708 | * @chan_width_weightage: Channel width weightage |
| 2709 | * @chan_band_weightage: Channel band weightage |
| 2710 | * @nss_weightage: NSS weightage |
| 2711 | * @beamforming_cap_weightage: Beamforming caps weightage |
| 2712 | * @pcl_weightage: PCL weightage |
| 2713 | * @channel_congestion_weightage: channel congestion weightage |
| 2714 | * @oce_wan_weightage: OCE WAN metrics weightage |
| 2715 | */ |
| 2716 | struct sir_weight_config { |
| 2717 | uint8_t rssi_weightage; |
| 2718 | uint8_t ht_caps_weightage; |
| 2719 | uint8_t vht_caps_weightage; |
| 2720 | uint8_t he_caps_weightage; |
| 2721 | uint8_t chan_width_weightage; |
| 2722 | uint8_t chan_band_weightage; |
| 2723 | uint8_t nss_weightage; |
| 2724 | uint8_t beamforming_cap_weightage; |
| 2725 | uint8_t pcl_weightage; |
| 2726 | uint8_t channel_congestion_weightage; |
| 2727 | uint8_t oce_wan_weightage; |
| 2728 | }; |
| 2729 | |
| 2730 | struct sir_rssi_cfg_score { |
| 2731 | uint32_t best_rssi_threshold; |
| 2732 | uint32_t good_rssi_threshold; |
| 2733 | uint32_t bad_rssi_threshold; |
| 2734 | uint32_t good_rssi_pcnt; |
| 2735 | uint32_t bad_rssi_pcnt; |
| 2736 | uint32_t good_rssi_bucket_size; |
| 2737 | uint32_t bad_rssi_bucket_size; |
| 2738 | uint32_t rssi_pref_5g_rssi_thresh; |
| 2739 | }; |
| 2740 | |
| 2741 | /** |
| 2742 | * struct sir_per_slot_scoring - define % score for differents slots for a |
| 2743 | * scoring param. |
| 2744 | * num_slot: number of slots in which the param will be divided. |
| 2745 | * Max 15. index 0 is used for 'not_present. Num_slot will |
| 2746 | * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot |
| 2747 | * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100% |
| 2748 | * score_pcnt3_to_0: Conatins score percentage for slot 0-3 |
| 2749 | * BITS 0-7 :- the scoring pcnt when not present |
| 2750 | * BITS 8-15 :- SLOT_1 |
| 2751 | * BITS 16-23 :- SLOT_2 |
| 2752 | * BITS 24-31 :- SLOT_3 |
| 2753 | * score_pcnt7_to_4: Conatins score percentage for slot 4-7 |
| 2754 | * BITS 0-7 :- SLOT_4 |
| 2755 | * BITS 8-15 :- SLOT_5 |
| 2756 | * BITS 16-23 :- SLOT_6 |
| 2757 | * BITS 24-31 :- SLOT_7 |
| 2758 | * score_pcnt11_to_8: Conatins score percentage for slot 8-11 |
| 2759 | * BITS 0-7 :- SLOT_8 |
| 2760 | * BITS 8-15 :- SLOT_9 |
| 2761 | * BITS 16-23 :- SLOT_10 |
| 2762 | * BITS 24-31 :- SLOT_11 |
| 2763 | * score_pcnt15_to_12: Conatins score percentage for slot 12-15 |
| 2764 | * BITS 0-7 :- SLOT_12 |
| 2765 | * BITS 8-15 :- SLOT_13 |
| 2766 | * BITS 16-23 :- SLOT_14 |
| 2767 | * BITS 24-31 :- SLOT_15 |
| 2768 | */ |
| 2769 | struct sir_per_slot_scoring { |
| 2770 | uint32_t num_slot; |
| 2771 | uint32_t score_pcnt3_to_0; |
| 2772 | uint32_t score_pcnt7_to_4; |
| 2773 | uint32_t score_pcnt11_to_8; |
| 2774 | uint32_t score_pcnt15_to_12; |
| 2775 | }; |
| 2776 | |
| 2777 | struct sir_score_config { |
| 2778 | bool enable_scoring_for_roam; |
| 2779 | struct sir_weight_config weight_cfg; |
| 2780 | struct sir_rssi_cfg_score rssi_score; |
| 2781 | struct sir_per_slot_scoring esp_qbss_scoring; |
| 2782 | struct sir_per_slot_scoring oce_wan_scoring; |
| 2783 | uint32_t bandwidth_weight_per_index; |
| 2784 | uint32_t nss_weight_per_index; |
| 2785 | uint32_t band_weight_per_index; |
| 2786 | }; |
| 2787 | |
| 2788 | /** |
Deepak Dhamdhere | 828f189 | 2017-02-09 11:51:19 -0800 | [diff] [blame] | 2789 | * struct pmkid_mode_bits - Bit flags for PMKID usage in RSN IE |
| 2790 | * @fw_okc: Opportunistic key caching enable in firmware |
| 2791 | * @fw_pmksa_cache: PMKSA caching enable in firmware, remember previously |
| 2792 | * visited BSSID/PMK pairs |
| 2793 | */ |
| 2794 | struct pmkid_mode_bits { |
| 2795 | uint32_t fw_okc:1; |
| 2796 | uint32_t fw_pmksa_cache:1; |
| 2797 | uint32_t unused:30; |
| 2798 | }; |
| 2799 | |
Selvaraj, Sridhar | 57ce4df | 2017-05-29 18:30:49 +0530 | [diff] [blame] | 2800 | /** |
| 2801 | * struct lca_disallow_config_params - LCA[Last Connected AP] |
| 2802 | * disallow config params |
| 2803 | * @disallow_duration: LCA AP disallowed duration |
| 2804 | * @rssi_channel_penalization: RSSI channel Penalization |
| 2805 | * @num_disallowed_aps: Maximum number of AP's in LCA list |
| 2806 | * |
| 2807 | */ |
Srinivas Girigowda | ea4d806 | 2017-10-14 12:40:48 -0700 | [diff] [blame] | 2808 | struct lca_disallow_config_params { |
Selvaraj, Sridhar | 57ce4df | 2017-05-29 18:30:49 +0530 | [diff] [blame] | 2809 | uint32_t disallow_duration; |
| 2810 | uint32_t rssi_channel_penalization; |
| 2811 | uint32_t num_disallowed_aps; |
| 2812 | }; |
| 2813 | |
Varun Reddy Yeturu | 061d4d6 | 2017-07-20 09:39:32 -0700 | [diff] [blame] | 2814 | /** |
| 2815 | * struct mawc_params - Motion Aided Wireless Connectivity configuration |
| 2816 | * @MAWCEnabled: Global configuration for MAWC (Roaming/PNO/ExtScan) |
| 2817 | * @mawc_roam_enabled: MAWC roaming enable/disable |
| 2818 | * @mawc_roam_traffic_threshold: Traffic threshold in kBps for MAWC roaming |
| 2819 | * @mawc_roam_ap_rssi_threshold: AP RSSI threshold for MAWC roaming |
| 2820 | * @mawc_roam_rssi_high_adjust: High Adjustment value for suppressing scan |
| 2821 | * @mawc_roam_rssi_low_adjust: Low Adjustment value for suppressing scan |
| 2822 | */ |
| 2823 | struct mawc_params { |
| 2824 | bool mawc_enabled; |
| 2825 | bool mawc_roam_enabled; |
| 2826 | uint32_t mawc_roam_traffic_threshold; |
| 2827 | int8_t mawc_roam_ap_rssi_threshold; |
| 2828 | uint8_t mawc_roam_rssi_high_adjust; |
| 2829 | uint8_t mawc_roam_rssi_low_adjust; |
| 2830 | }; |
| 2831 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2832 | typedef struct sSirRoamOffloadScanReq { |
Selvaraj, Sridhar | 0174182 | 2016-08-30 18:26:19 +0530 | [diff] [blame] | 2833 | uint16_t message_type; |
| 2834 | uint16_t length; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2835 | bool RoamScanOffloadEnabled; |
Varun Reddy Yeturu | 061d4d6 | 2017-07-20 09:39:32 -0700 | [diff] [blame] | 2836 | struct mawc_params mawc_roam_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2837 | int8_t LookupThreshold; |
Varun Reddy Yeturu | 168134f | 2017-06-26 13:46:05 -0700 | [diff] [blame] | 2838 | int8_t rssi_thresh_offset_5g; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2839 | uint8_t delay_before_vdev_stop; |
| 2840 | uint8_t OpportunisticScanThresholdDiff; |
| 2841 | uint8_t RoamRescanRssiDiff; |
| 2842 | uint8_t RoamRssiDiff; |
gaurank kathpalia | c63859d | 2018-05-03 18:48:41 +0530 | [diff] [blame] | 2843 | struct rsn_caps rsn_caps; |
Abhishek Singh | 34c0e63 | 2017-09-28 14:39:29 +0530 | [diff] [blame] | 2844 | int32_t rssi_abs_thresh; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2845 | uint8_t ChannelCacheType; |
| 2846 | uint8_t Command; |
| 2847 | uint8_t reason; |
| 2848 | uint16_t NeighborScanTimerPeriod; |
Sridhar Selvaraj | 1b2330c | 2017-07-21 15:16:42 +0530 | [diff] [blame] | 2849 | uint16_t neighbor_scan_min_timer_period; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2850 | uint16_t NeighborRoamScanRefreshPeriod; |
| 2851 | uint16_t NeighborScanChannelMinTime; |
| 2852 | uint16_t NeighborScanChannelMaxTime; |
| 2853 | uint16_t EmptyRefreshScanPeriod; |
| 2854 | uint8_t ValidChannelCount; |
| 2855 | uint8_t ValidChannelList[SIR_ROAM_MAX_CHANNELS]; |
| 2856 | bool IsESEAssoc; |
Abhinav Kumar | 271f063 | 2018-03-29 16:01:30 +0530 | [diff] [blame] | 2857 | bool is_11r_assoc; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2858 | uint8_t nProbes; |
| 2859 | uint16_t HomeAwayTime; |
| 2860 | tSirRoamNetworkType ConnectedNetwork; |
| 2861 | tSirMobilityDomainInfo MDID; |
| 2862 | uint8_t sessionId; |
| 2863 | uint8_t RoamBmissFirstBcnt; |
| 2864 | uint8_t RoamBmissFinalBcnt; |
| 2865 | uint8_t RoamBeaconRssiWeight; |
| 2866 | eSirDFSRoamScanMode allowDFSChannelRoam; |
| 2867 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 2868 | uint8_t RoamOffloadEnabled; |
| 2869 | uint8_t PSK_PMK[SIR_ROAM_SCAN_PSK_SIZE]; |
| 2870 | uint32_t pmk_len; |
| 2871 | uint8_t Prefer5GHz; |
| 2872 | uint8_t RoamRssiCatGap; |
| 2873 | uint8_t Select5GHzMargin; |
| 2874 | uint8_t KRK[SIR_KRK_KEY_LEN]; |
| 2875 | uint8_t BTK[SIR_BTK_KEY_LEN]; |
| 2876 | uint32_t ReassocFailureTimeout; |
| 2877 | tSirAcUapsd AcUapsd; |
| 2878 | uint8_t R0KH_ID[SIR_ROAM_R0KH_ID_MAX_LEN]; |
| 2879 | uint32_t R0KH_ID_Length; |
| 2880 | uint8_t RoamKeyMgmtOffloadEnabled; |
Deepak Dhamdhere | 828f189 | 2017-02-09 11:51:19 -0800 | [diff] [blame] | 2881 | struct pmkid_mode_bits pmkid_modes; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2882 | #endif |
| 2883 | struct roam_ext_params roam_params; |
| 2884 | uint8_t middle_of_roaming; |
| 2885 | uint32_t hi_rssi_scan_max_count; |
| 2886 | uint32_t hi_rssi_scan_rssi_delta; |
| 2887 | uint32_t hi_rssi_scan_delay; |
| 2888 | int32_t hi_rssi_scan_rssi_ub; |
Varun Reddy Yeturu | 0518629 | 2015-09-28 17:12:33 -0700 | [diff] [blame] | 2889 | uint8_t early_stop_scan_enable; |
| 2890 | int8_t early_stop_scan_min_threshold; |
| 2891 | int8_t early_stop_scan_max_threshold; |
Sandeep Puligilla | f5ccbf6 | 2018-03-26 16:37:05 -0700 | [diff] [blame] | 2892 | enum scan_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode; |
Selvaraj, Sridhar | a7fc763 | 2016-09-04 13:13:38 +0530 | [diff] [blame] | 2893 | tSirAddie assoc_ie; |
Selvaraj, Sridhar | 57ce4df | 2017-05-29 18:30:49 +0530 | [diff] [blame] | 2894 | struct lca_disallow_config_params lca_config_params; |
Himanshu Agarwal | 8bcec57 | 2017-09-28 11:54:37 +0530 | [diff] [blame] | 2895 | struct scoring_param score_params; |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 2896 | #ifdef WLAN_FEATURE_FILS_SK |
| 2897 | bool is_fils_connection; |
| 2898 | struct roam_fils_params roam_fils_params; |
| 2899 | #endif |
yeshwanth sriram guntuka | 41f936c | 2017-09-01 17:53:49 +0530 | [diff] [blame] | 2900 | uint32_t btm_offload_config; |
Jiachao Wu | 84bb2ea | 2018-01-08 16:17:33 +0800 | [diff] [blame] | 2901 | uint32_t btm_solicited_timeout; |
| 2902 | uint32_t btm_max_attempt_cnt; |
| 2903 | uint32_t btm_sticky_time; |
Vignesh Viswanathan | fb9d075 | 2018-02-06 16:19:00 +0530 | [diff] [blame] | 2904 | struct wmi_11k_offload_params offload_11k_params; |
Abhinav Kumar | a083f21 | 2018-04-05 18:49:45 +0530 | [diff] [blame] | 2905 | uint32_t ho_delay_for_rx; |
Abhinav Kumar | a95af7c | 2018-04-06 17:08:00 +0530 | [diff] [blame] | 2906 | uint32_t min_delay_btw_roam_scans; |
| 2907 | uint32_t roam_trigger_reason_bitmask; |
Abhinav Kumar | edd1d37 | 2018-05-11 15:33:35 +0530 | [diff] [blame] | 2908 | bool roam_force_rssi_trigger; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2909 | } tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq; |
| 2910 | |
| 2911 | typedef struct sSirRoamOffloadScanRsp { |
| 2912 | uint8_t sessionId; |
| 2913 | uint32_t reason; |
| 2914 | } tSirRoamOffloadScanRsp, *tpSirRoamOffloadScanRsp; |
| 2915 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2916 | /*--------------------------------------------------------------------------- |
| 2917 | Packet Filtering Parameters |
| 2918 | ---------------------------------------------------------------------------*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2919 | #define SIR_MAX_FILTER_TEST_DATA_LEN 8 |
Dustin Brown | 4d1e846 | 2016-12-14 12:12:24 -0800 | [diff] [blame] | 2920 | #define SIR_MAX_FILTER_TEST_DATA_OFFSET 200 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2921 | #define SIR_MAX_NUM_MULTICAST_ADDRESS 240 |
| 2922 | #define SIR_MAX_NUM_FILTERS 20 |
| 2923 | #define SIR_MAX_NUM_TESTS_PER_FILTER 10 |
| 2924 | |
Qiwei Cai | 4505fc6 | 2018-05-17 18:35:19 +0800 | [diff] [blame] | 2925 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2926 | /* */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2927 | /* Filter Packet Match Count Parameters */ |
| 2928 | /* */ |
| 2929 | typedef struct sSirRcvFltPktMatchCnt { |
| 2930 | uint8_t filterId; |
| 2931 | uint32_t matchCnt; |
| 2932 | } tSirRcvFltPktMatchCnt, tpSirRcvFltPktMatchCnt; |
| 2933 | |
| 2934 | typedef struct sSirRcvFltPktMatchRsp { |
| 2935 | uint16_t mesgType; |
| 2936 | uint16_t mesgLen; |
| 2937 | |
| 2938 | /* Success or Failure */ |
| 2939 | uint32_t status; |
| 2940 | tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS]; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2941 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2942 | } tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp; |
| 2943 | |
| 2944 | /* */ |
| 2945 | /* Receive Filter Clear Parameters */ |
| 2946 | /* */ |
| 2947 | typedef struct sSirRcvFltPktClearParam { |
| 2948 | uint32_t status; /* only valid for response message */ |
| 2949 | uint8_t filterId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2950 | struct qdf_mac_addr self_macaddr; |
| 2951 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2952 | } tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam; |
Qiwei Cai | 4505fc6 | 2018-05-17 18:35:19 +0800 | [diff] [blame] | 2953 | #endif /* WLAN_FEATURE_PACKET_FILTERING */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2954 | |
| 2955 | /* */ |
| 2956 | /* Multicast Address List Parameters */ |
| 2957 | /* */ |
| 2958 | typedef struct sSirRcvFltMcAddrList { |
| 2959 | uint32_t ulMulticastAddrCnt; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 2960 | struct qdf_mac_addr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS]; |
| 2961 | struct qdf_mac_addr self_macaddr; |
| 2962 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2963 | uint8_t action; |
| 2964 | } tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2965 | |
| 2966 | /* */ |
| 2967 | /* Generic version information */ |
| 2968 | /* */ |
| 2969 | typedef struct { |
| 2970 | uint8_t revision; |
| 2971 | uint8_t version; |
| 2972 | uint8_t minor; |
| 2973 | uint8_t major; |
| 2974 | } tSirVersionType; |
| 2975 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2976 | /** |
| 2977 | * struct sir_wifi_start_log - Structure to store the params sent to start/ |
| 2978 | * stop logging |
| 2979 | * @name: Attribute which indicates the type of logging like per packet |
| 2980 | * statistics, connectivity etc. |
| 2981 | * @verbose_level: Verbose level which can be 0,1,2,3 |
Poddar, Siddarth | eefe348 | 2016-09-21 18:12:59 +0530 | [diff] [blame] | 2982 | * @is_iwpriv_command: Set 1 for iwpriv command |
Srinivas Girigowda | c34f11d | 2016-02-25 16:02:42 -0800 | [diff] [blame] | 2983 | * @ini_triggered: triggered using ini |
| 2984 | * @user_triggered: triggered by user |
Poddar, Siddarth | 176c436 | 2016-10-03 12:25:00 +0530 | [diff] [blame] | 2985 | * @size: pktlog buffer size |
Poddar, Siddarth | ab99a27 | 2017-04-10 12:53:26 +0530 | [diff] [blame] | 2986 | * @is_pktlog_buff_clear: clear the pktlog buffer |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2987 | */ |
| 2988 | struct sir_wifi_start_log { |
| 2989 | uint32_t ring_id; |
| 2990 | uint32_t verbose_level; |
Poddar, Siddarth | eefe348 | 2016-09-21 18:12:59 +0530 | [diff] [blame] | 2991 | uint32_t is_iwpriv_command; |
Srinivas Girigowda | c34f11d | 2016-02-25 16:02:42 -0800 | [diff] [blame] | 2992 | bool ini_triggered; |
| 2993 | uint8_t user_triggered; |
Poddar, Siddarth | 176c436 | 2016-10-03 12:25:00 +0530 | [diff] [blame] | 2994 | int size; |
Poddar, Siddarth | ab99a27 | 2017-04-10 12:53:26 +0530 | [diff] [blame] | 2995 | bool is_pktlog_buff_clear; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2996 | }; |
| 2997 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2998 | |
| 2999 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3000 | * struct sir_pcl_list - Format of PCL |
| 3001 | * @pcl_list: List of preferred channels |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 3002 | * @weight_list: Weights of the PCL |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3003 | * @pcl_len: Number of channels in the PCL |
| 3004 | */ |
| 3005 | struct sir_pcl_list { |
| 3006 | uint8_t pcl_list[128]; |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 3007 | uint8_t weight_list[128]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3008 | uint32_t pcl_len; |
| 3009 | }; |
| 3010 | |
| 3011 | /** |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 3012 | * struct sir_pcl_chan_weights - Params to get the valid weighed list |
| 3013 | * @pcl_list: Preferred channel list already sorted in the order of preference |
| 3014 | * @pcl_len: Length of the PCL |
| 3015 | * @saved_chan_list: Valid channel list updated as part of |
| 3016 | * WMA_UPDATE_CHAN_LIST_REQ |
| 3017 | * @saved_num_chan: Length of the valid channel list |
| 3018 | * @weighed_valid_list: Weights of the valid channel list. This will have one |
| 3019 | * to one mapping with valid_chan_list. FW expects channel order and size to be |
| 3020 | * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID. |
| 3021 | * @weight_list: Weights assigned by policy manager |
| 3022 | */ |
| 3023 | struct sir_pcl_chan_weights { |
| 3024 | uint8_t pcl_list[128]; |
| 3025 | uint32_t pcl_len; |
| 3026 | uint8_t saved_chan_list[128]; |
| 3027 | uint32_t saved_num_chan; |
| 3028 | uint8_t weighed_valid_list[128]; |
| 3029 | uint8_t weight_list[128]; |
| 3030 | }; |
| 3031 | |
| 3032 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3033 | * struct sir_hw_mode_params - HW mode params |
| 3034 | * @mac0_tx_ss: MAC0 Tx spatial stream |
| 3035 | * @mac0_rx_ss: MAC0 Rx spatial stream |
| 3036 | * @mac1_tx_ss: MAC1 Tx spatial stream |
| 3037 | * @mac1_rx_ss: MAC1 Rx spatial stream |
| 3038 | * @mac0_bw: MAC0 bandwidth |
| 3039 | * @mac1_bw: MAC1 bandwidth |
| 3040 | * @dbs_cap: DBS capabality |
| 3041 | * @agile_dfs_cap: Agile DFS capabality |
| 3042 | */ |
| 3043 | struct sir_hw_mode_params { |
| 3044 | uint8_t mac0_tx_ss; |
| 3045 | uint8_t mac0_rx_ss; |
| 3046 | uint8_t mac1_tx_ss; |
| 3047 | uint8_t mac1_rx_ss; |
| 3048 | uint8_t mac0_bw; |
| 3049 | uint8_t mac1_bw; |
| 3050 | uint8_t dbs_cap; |
| 3051 | uint8_t agile_dfs_cap; |
Nitesh Shah | 5b7bae0 | 2016-09-28 18:58:33 +0530 | [diff] [blame] | 3052 | uint8_t sbs_cap; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3053 | }; |
| 3054 | |
| 3055 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3056 | * struct sir_set_hw_mode_resp - HW mode response |
| 3057 | * @status: Status |
| 3058 | * @cfgd_hw_mode_index: Configured HW mode index |
| 3059 | * @num_vdev_mac_entries: Number of vdev-mac id entries |
| 3060 | * @vdev_mac_map: vdev id-mac id map |
| 3061 | */ |
| 3062 | struct sir_set_hw_mode_resp { |
| 3063 | uint32_t status; |
| 3064 | uint32_t cfgd_hw_mode_index; |
| 3065 | uint32_t num_vdev_mac_entries; |
Tushnim Bhattacharyya | eab33dd | 2017-11-15 15:20:02 -0800 | [diff] [blame] | 3066 | struct policy_mgr_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3067 | }; |
| 3068 | |
| 3069 | /** |
| 3070 | * struct sir_hw_mode_trans_ind - HW mode transition indication |
| 3071 | * @old_hw_mode_index: Index of old HW mode |
| 3072 | * @new_hw_mode_index: Index of new HW mode |
| 3073 | * @num_vdev_mac_entries: Number of vdev-mac id entries |
| 3074 | * @vdev_mac_map: vdev id-mac id map |
| 3075 | */ |
| 3076 | struct sir_hw_mode_trans_ind { |
| 3077 | uint32_t old_hw_mode_index; |
| 3078 | uint32_t new_hw_mode_index; |
| 3079 | uint32_t num_vdev_mac_entries; |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 3080 | struct policy_mgr_vdev_mac_map vdev_mac_map[MAX_VDEV_SUPPORTED]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3081 | }; |
| 3082 | |
| 3083 | /** |
| 3084 | * struct sir_dual_mac_config_resp - Dual MAC config response |
| 3085 | * @status: Status of setting the dual mac configuration |
| 3086 | */ |
| 3087 | struct sir_dual_mac_config_resp { |
| 3088 | uint32_t status; |
| 3089 | }; |
| 3090 | |
Archana Ramachandran | d41c3ed | 2016-02-10 15:48:06 -0800 | [diff] [blame] | 3091 | /** |
| 3092 | * enum set_antenna_mode_status - Status of set antenna mode |
| 3093 | * command |
| 3094 | * @SET_ANTENNA_MODE_STATUS_OK: command successful |
| 3095 | * @SET_ANTENNA_MODE_STATUS_EINVAL: invalid antenna mode |
| 3096 | * @SET_ANTENNA_MODE_STATUS_ECANCELED: mode change cancelled |
| 3097 | * @SET_ANTENNA_MODE_STATUS_ENOTSUP: mode not supported |
| 3098 | */ |
| 3099 | enum set_antenna_mode_status { |
| 3100 | SET_ANTENNA_MODE_STATUS_OK, |
| 3101 | SET_ANTENNA_MODE_STATUS_EINVAL, |
| 3102 | SET_ANTENNA_MODE_STATUS_ECANCELED, |
| 3103 | SET_ANTENNA_MODE_STATUS_ENOTSUP, |
| 3104 | }; |
| 3105 | |
| 3106 | /** |
| 3107 | * struct sir_antenna_mode_resp - set antenna mode response |
| 3108 | * @status: Status of setting the antenna mode |
| 3109 | */ |
| 3110 | struct sir_antenna_mode_resp { |
| 3111 | enum set_antenna_mode_status status; |
| 3112 | }; |
| 3113 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3114 | /*--------------------------------------------------------------------------- |
| 3115 | sAniSetTmLevelReq |
| 3116 | ---------------------------------------------------------------------------*/ |
| 3117 | typedef struct sAniSetTmLevelReq { |
| 3118 | uint16_t tmMode; |
| 3119 | uint16_t newTmLevel; |
| 3120 | } tAniSetTmLevelReq, *tpAniSetTmLevelReq; |
| 3121 | |
| 3122 | #ifdef FEATURE_WLAN_TDLS |
| 3123 | /* TDLS Request struct SME-->PE */ |
| 3124 | typedef struct sSirTdlsSendMgmtReq { |
| 3125 | uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */ |
| 3126 | uint16_t length; |
| 3127 | uint8_t sessionId; /* Session ID */ |
| 3128 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 3129 | uint8_t reqType; |
| 3130 | uint8_t dialog; |
| 3131 | uint16_t statusCode; |
| 3132 | uint8_t responder; |
| 3133 | uint32_t peerCapability; |
| 3134 | /* For multi-session, for PE to locate peSession ID */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3135 | struct qdf_mac_addr bssid; |
| 3136 | struct qdf_mac_addr peer_mac; |
Ganesh Kondabattini | dd72652 | 2017-05-10 18:09:37 +0530 | [diff] [blame] | 3137 | enum wifi_traffic_ac ac; |
Srinivas Girigowda | a9d12f1 | 2015-11-24 11:26:40 -0800 | [diff] [blame] | 3138 | /* Variable length. Dont add any field after this. */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3139 | uint8_t addIe[1]; |
| 3140 | } tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq; |
| 3141 | |
| 3142 | typedef enum TdlsAddOper { |
| 3143 | TDLS_OPER_NONE, |
| 3144 | TDLS_OPER_ADD, |
| 3145 | TDLS_OPER_UPDATE |
| 3146 | } eTdlsAddOper; |
| 3147 | |
| 3148 | /* TDLS Request struct SME-->PE */ |
| 3149 | typedef struct sSirTdlsAddStaReq { |
| 3150 | uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */ |
| 3151 | uint16_t length; |
| 3152 | uint8_t sessionId; /* Session ID */ |
| 3153 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 3154 | /* For multi-session, for PE to locate peSession ID */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3155 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3156 | eTdlsAddOper tdlsAddOper; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3157 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3158 | uint16_t capability; |
| 3159 | uint8_t extn_capability[SIR_MAC_MAX_EXTN_CAP]; |
| 3160 | uint8_t supported_rates_length; |
| 3161 | uint8_t supported_rates[SIR_MAC_MAX_SUPP_RATES]; |
| 3162 | uint8_t htcap_present; |
| 3163 | tSirHTCap htCap; |
| 3164 | uint8_t vhtcap_present; |
| 3165 | tSirVHTCap vhtCap; |
| 3166 | uint8_t uapsd_queues; |
| 3167 | uint8_t max_sp; |
| 3168 | } tSirTdlsAddStaReq, *tpSirSmeTdlsAddStaReq; |
| 3169 | |
| 3170 | /* TDLS Response struct PE-->SME */ |
| 3171 | typedef struct sSirTdlsAddStaRsp { |
| 3172 | uint16_t messageType; |
| 3173 | uint16_t length; |
| 3174 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3175 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3176 | uint8_t sessionId; /* Session ID */ |
| 3177 | uint16_t staId; |
| 3178 | uint16_t staType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3179 | eTdlsAddOper tdlsAddOper; |
Frank Liu | d4b2fa0 | 2017-03-29 11:46:48 +0800 | [diff] [blame] | 3180 | struct wlan_objmgr_psoc *psoc; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3181 | } tSirTdlsAddStaRsp; |
| 3182 | |
| 3183 | /* TDLS Request struct SME-->PE */ |
| 3184 | typedef struct { |
| 3185 | uint16_t messageType; /* eWNI_SME_TDLS_LINK_ESTABLISH_REQ */ |
| 3186 | uint16_t length; |
| 3187 | uint8_t sessionId; /* Session ID */ |
| 3188 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 3189 | uint8_t uapsdQueues; /* Peer's uapsd Queues Information */ |
| 3190 | uint8_t maxSp; /* Peer's Supported Maximum Service Period */ |
| 3191 | uint8_t isBufSta; /* Does Peer Support as Buffer Station. */ |
| 3192 | /* Does Peer Support as TDLS Off Channel. */ |
| 3193 | uint8_t isOffChannelSupported; |
| 3194 | uint8_t isResponder; /* Is Peer a responder. */ |
| 3195 | /* For multi-session, for PE to locate peSession ID */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3196 | struct qdf_mac_addr bssid; |
| 3197 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3198 | uint8_t supportedChannelsLen; |
| 3199 | uint8_t supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS]; |
| 3200 | uint8_t supportedOperClassesLen; |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 3201 | uint8_t supportedOperClasses[REG_MAX_SUPP_OPER_CLASSES]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3202 | } tSirTdlsLinkEstablishReq, *tpSirTdlsLinkEstablishReq; |
| 3203 | |
| 3204 | /* TDLS Request struct SME-->PE */ |
| 3205 | typedef struct { |
| 3206 | uint16_t messageType; /* eWNI_SME_TDLS_LINK_ESTABLISH_RSP */ |
| 3207 | uint16_t length; |
| 3208 | uint8_t sessionId; /* Session ID */ |
| 3209 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 3210 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3211 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3212 | } tSirTdlsLinkEstablishReqRsp, *tpSirTdlsLinkEstablishReqRsp; |
| 3213 | |
| 3214 | /* TDLS Request struct SME-->PE */ |
| 3215 | typedef struct sSirTdlsDelStaReq { |
| 3216 | uint16_t messageType; /* eWNI_SME_TDLS_DISCOVERY_START_REQ */ |
| 3217 | uint16_t length; |
| 3218 | uint8_t sessionId; /* Session ID */ |
| 3219 | uint16_t transactionId; /* Transaction ID for cmd */ |
| 3220 | /* For multi-session, for PE to locate peSession ID */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3221 | struct qdf_mac_addr bssid; |
| 3222 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3223 | } tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq; |
| 3224 | /* TDLS Response struct PE-->SME */ |
| 3225 | typedef struct sSirTdlsDelStaRsp { |
| 3226 | uint16_t messageType; |
| 3227 | uint16_t length; |
| 3228 | uint8_t sessionId; /* Session ID */ |
| 3229 | tSirResultCodes statusCode; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3230 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3231 | uint16_t staId; |
Frank Liu | d4b2fa0 | 2017-03-29 11:46:48 +0800 | [diff] [blame] | 3232 | struct wlan_objmgr_psoc *psoc; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3233 | } tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp; |
| 3234 | /* TDLS Delete Indication struct PE-->SME */ |
| 3235 | typedef struct sSirTdlsDelStaInd { |
| 3236 | uint16_t messageType; |
| 3237 | uint16_t length; |
| 3238 | uint8_t sessionId; /* Session ID */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3239 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3240 | uint16_t staId; |
| 3241 | uint16_t reasonCode; |
| 3242 | } tSirTdlsDelStaInd, *tpSirTdlsDelStaInd; |
| 3243 | typedef struct sSirTdlsDelAllPeerInd { |
| 3244 | uint16_t messageType; |
| 3245 | uint16_t length; |
| 3246 | uint8_t sessionId; /* Session ID */ |
| 3247 | } tSirTdlsDelAllPeerInd, *tpSirTdlsDelAllPeerInd; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3248 | typedef struct sSirMgmtTxCompletionInd { |
| 3249 | uint16_t messageType; |
| 3250 | uint16_t length; |
| 3251 | uint8_t sessionId; /* Session ID */ |
| 3252 | uint32_t txCompleteStatus; |
Kabilan Kannan | f56f9d5 | 2017-04-05 03:31:34 -0700 | [diff] [blame] | 3253 | struct wlan_objmgr_psoc *psoc; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3254 | } tSirMgmtTxCompletionInd, *tpSirMgmtTxCompletionInd; |
| 3255 | |
| 3256 | typedef struct sSirTdlsEventnotify { |
| 3257 | uint8_t sessionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3258 | struct qdf_mac_addr peermac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3259 | uint16_t messageType; |
| 3260 | uint32_t peer_reason; |
| 3261 | } tSirTdlsEventnotify; |
| 3262 | #endif /* FEATURE_WLAN_TDLS */ |
| 3263 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3264 | /* Reset AP Caps Changed */ |
| 3265 | typedef struct sSirResetAPCapsChange { |
| 3266 | uint16_t messageType; |
| 3267 | uint16_t length; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3268 | struct qdf_mac_addr bssId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3269 | } tSirResetAPCapsChange, *tpSirResetAPCapsChange; |
| 3270 | |
| 3271 | /* / Definition for Candidate found indication from FW */ |
| 3272 | typedef struct sSirSmeCandidateFoundInd { |
| 3273 | uint16_t messageType; /* eWNI_SME_CANDIDATE_FOUND_IND */ |
| 3274 | uint16_t length; |
| 3275 | uint8_t sessionId; /* Session Identifier */ |
| 3276 | } tSirSmeCandidateFoundInd, *tpSirSmeCandidateFoundInd; |
| 3277 | |
| 3278 | #ifdef WLAN_FEATURE_11W |
| 3279 | typedef struct sSirWlanExcludeUnencryptParam { |
| 3280 | bool excludeUnencrypt; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3281 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3282 | } tSirWlanExcludeUnencryptParam, *tpSirWlanExcludeUnencryptParam; |
| 3283 | #endif |
| 3284 | |
| 3285 | typedef enum { |
| 3286 | P2P_SCAN_TYPE_SEARCH = 1, /* P2P Search */ |
| 3287 | P2P_SCAN_TYPE_LISTEN /* P2P Listen */ |
| 3288 | } tSirP2pScanType; |
| 3289 | |
| 3290 | typedef struct sAniHandoffReq { |
| 3291 | /* Common for all types are requests */ |
| 3292 | uint16_t msgType; /* message type is same as the request type */ |
| 3293 | uint16_t msgLen; /* length of the entire request */ |
| 3294 | uint8_t sessionId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3295 | uint8_t bssid[QDF_MAC_ADDR_SIZE]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3296 | uint8_t channel; |
| 3297 | uint8_t handoff_src; |
| 3298 | } tAniHandoffReq, *tpAniHandoffReq; |
| 3299 | |
Krishna Kumaar Natarajan | 3c44355 | 2016-02-19 18:34:40 -0800 | [diff] [blame] | 3300 | /** |
Krishna Kumaar Natarajan | 3eed86b | 2016-03-25 16:55:21 -0700 | [diff] [blame] | 3301 | * sir_scan_event_type - scan event types used in LIM |
| 3302 | * @SIR_SCAN_EVENT_STARTED - scan command accepted by FW |
| 3303 | * @SIR_SCAN_EVENT_COMPLETED - scan has been completed by FW |
| 3304 | * @SIR_SCAN_EVENT_BSS_CHANNEL - FW is going to move to HOME channel |
| 3305 | * @SIR_SCAN_EVENT_FOREIGN_CHANNEL - FW is going to move to FORIEGN channel |
| 3306 | * @SIR_SCAN_EVENT_DEQUEUED - scan request got dequeued |
| 3307 | * @SIR_SCAN_EVENT_PREEMPTED - preempted by other high priority scan |
| 3308 | * @SIR_SCAN_EVENT_START_FAILED - scan start failed |
| 3309 | * @SIR_SCAN_EVENT_RESTARTED - scan restarted |
| 3310 | * @SIR_SCAN_EVENT_MAX - max value for event type |
Krishna Kumaar Natarajan | 3c44355 | 2016-02-19 18:34:40 -0800 | [diff] [blame] | 3311 | */ |
Krishna Kumaar Natarajan | 3eed86b | 2016-03-25 16:55:21 -0700 | [diff] [blame] | 3312 | enum sir_scan_event_type { |
| 3313 | SIR_SCAN_EVENT_STARTED = 0x1, |
| 3314 | SIR_SCAN_EVENT_COMPLETED = 0x2, |
| 3315 | SIR_SCAN_EVENT_BSS_CHANNEL = 0x4, |
| 3316 | SIR_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, |
| 3317 | SIR_SCAN_EVENT_DEQUEUED = 0x10, |
| 3318 | SIR_SCAN_EVENT_PREEMPTED = 0x20, |
| 3319 | SIR_SCAN_EVENT_START_FAILED = 0x40, |
| 3320 | SIR_SCAN_EVENT_RESTARTED = 0x80, |
| 3321 | SIR_SCAN_EVENT_MAX = 0x8000 |
Krishna Kumaar Natarajan | 3c44355 | 2016-02-19 18:34:40 -0800 | [diff] [blame] | 3322 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3323 | |
| 3324 | typedef struct sSirScanOffloadEvent { |
Krishna Kumaar Natarajan | 3eed86b | 2016-03-25 16:55:21 -0700 | [diff] [blame] | 3325 | enum sir_scan_event_type event; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3326 | tSirResultCodes reasonCode; |
| 3327 | uint32_t chanFreq; |
| 3328 | uint32_t requestor; |
| 3329 | uint32_t scanId; |
| 3330 | tSirP2pScanType p2pScanType; |
| 3331 | uint8_t sessionId; |
| 3332 | } tSirScanOffloadEvent, *tpSirScanOffloadEvent; |
| 3333 | |
| 3334 | /** |
| 3335 | * struct sSirUpdateChanParam - channel parameters |
| 3336 | * @chanId: ID of the channel |
| 3337 | * @pwr: power level |
| 3338 | * @dfsSet: is dfs supported or not |
| 3339 | * @half_rate: is the channel operating at 10MHz |
| 3340 | * @quarter_rate: is the channel operating at 5MHz |
| 3341 | */ |
| 3342 | typedef struct sSirUpdateChanParam { |
| 3343 | uint8_t chanId; |
| 3344 | uint8_t pwr; |
| 3345 | bool dfsSet; |
| 3346 | bool half_rate; |
| 3347 | bool quarter_rate; |
| 3348 | } tSirUpdateChanParam, *tpSirUpdateChanParam; |
| 3349 | |
| 3350 | typedef struct sSirUpdateChan { |
| 3351 | uint8_t numChan; |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 3352 | uint8_t ht_en; |
| 3353 | uint8_t vht_en; |
| 3354 | uint8_t vht_24_en; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3355 | tSirUpdateChanParam chanParam[1]; |
| 3356 | } tSirUpdateChanList, *tpSirUpdateChanList; |
| 3357 | |
| 3358 | typedef enum eSirAddonPsReq { |
| 3359 | eSIR_ADDON_NOTHING, |
| 3360 | eSIR_ADDON_ENABLE_UAPSD, |
| 3361 | eSIR_ADDON_DISABLE_UAPSD |
| 3362 | } tSirAddonPsReq; |
| 3363 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3364 | #ifdef FEATURE_WLAN_CH_AVOID |
| 3365 | typedef struct sSirChAvoidUpdateReq { |
| 3366 | uint32_t reserved_param; |
| 3367 | } tSirChAvoidUpdateReq; |
| 3368 | #endif /* FEATURE_WLAN_CH_AVOID */ |
| 3369 | |
| 3370 | typedef struct sSirLinkSpeedInfo { |
| 3371 | /* MAC Address for the peer */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3372 | struct qdf_mac_addr peer_macaddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3373 | uint32_t estLinkSpeed; /* Linkspeed from firmware */ |
| 3374 | } tSirLinkSpeedInfo, *tpSirLinkSpeedInfo; |
| 3375 | |
Will Huang | a981459 | 2017-05-24 15:47:58 +0800 | [diff] [blame] | 3376 | /** |
| 3377 | * struct sir_peer_info_req - peer info request struct |
| 3378 | * @peer_macaddr: MAC address |
| 3379 | * @sessionid: vdev id |
| 3380 | * |
| 3381 | * peer info request message's struct |
| 3382 | */ |
| 3383 | struct sir_peer_info_req { |
| 3384 | struct qdf_mac_addr peer_macaddr; |
| 3385 | uint8_t sessionid; |
| 3386 | }; |
| 3387 | |
| 3388 | /** |
| 3389 | * struct sir_peer_info - peer information struct |
| 3390 | * @peer_macaddr: MAC address |
| 3391 | * @rssi: rssi |
| 3392 | * @tx_rate: last tx rate |
| 3393 | * @rx_rate: last rx rate |
| 3394 | * |
| 3395 | * a station's information |
| 3396 | */ |
| 3397 | struct sir_peer_info { |
| 3398 | struct qdf_mac_addr peer_macaddr; |
| 3399 | int8_t rssi; |
| 3400 | uint32_t tx_rate; |
| 3401 | uint32_t rx_rate; |
| 3402 | }; |
| 3403 | |
| 3404 | /** |
| 3405 | * struct sir_peer_info_resp - all peers information struct |
| 3406 | * @count: peer's number |
| 3407 | * @info: peer information |
| 3408 | * |
| 3409 | * all station's information |
| 3410 | */ |
| 3411 | struct sir_peer_info_resp { |
| 3412 | uint8_t count; |
| 3413 | struct sir_peer_info info[0]; |
| 3414 | }; |
| 3415 | |
| 3416 | /** |
| 3417 | * struct sir_peer_info_ext_req - peer info request struct |
| 3418 | * @peer_macaddr: MAC address |
| 3419 | * @sessionid: vdev id |
| 3420 | * @reset_after_request: fw reset statistics after query |
| 3421 | * |
| 3422 | * peer info request message's struct |
| 3423 | */ |
| 3424 | struct sir_peer_info_ext_req { |
| 3425 | struct qdf_mac_addr peer_macaddr; |
| 3426 | uint8_t sessionid; |
| 3427 | uint8_t reset_after_request; |
| 3428 | }; |
| 3429 | |
| 3430 | /** |
| 3431 | * struct sir_peer_info_ext - peer info information struct |
| 3432 | * (refer to station_info struct in Kernel) |
| 3433 | * @peer_macaddr: MAC address |
| 3434 | * @tx_packets: packets transmitted to this station |
| 3435 | * @tx_bytes: bytes transmitted to this station |
| 3436 | * @rx_packets: packets received from this station |
| 3437 | * @rx_bytes: bytes received from this station |
| 3438 | * @rx_retries: cumulative retry counts |
| 3439 | * @tx_failed: number of failed transmissions |
| 3440 | * @rssi: The signal strength |
| 3441 | * @tx_rate: last used tx bitrate (kbps) |
| 3442 | * @tx_rate_code: last tx rate code (last_tx_rate_code of wmi_peer_stats_info) |
| 3443 | * @rx_rate: last used rx bitrate (kbps) |
| 3444 | * @rx_rate_code: last rx rate code (last_rx_rate_code of wmi_peer_stats_info) |
| 3445 | * |
| 3446 | * a station's information |
| 3447 | */ |
| 3448 | struct sir_peer_info_ext { |
| 3449 | struct qdf_mac_addr peer_macaddr; |
| 3450 | uint32_t tx_packets; |
| 3451 | uint64_t tx_bytes; |
| 3452 | uint32_t rx_packets; |
| 3453 | uint64_t rx_bytes; |
| 3454 | uint32_t tx_retries; |
| 3455 | uint32_t tx_failed; |
| 3456 | int32_t rssi; |
| 3457 | uint32_t tx_rate; |
| 3458 | uint32_t tx_rate_code; |
| 3459 | uint32_t rx_rate; |
| 3460 | uint32_t rx_rate_code; |
| 3461 | }; |
| 3462 | |
| 3463 | /** |
| 3464 | * struct sir_peer_info_ext_resp - all peers' information struct |
| 3465 | * @count: peer's number |
| 3466 | * @info: peer information |
| 3467 | * |
| 3468 | * all station's information |
| 3469 | */ |
| 3470 | struct sir_peer_info_ext_resp { |
| 3471 | uint8_t count; |
| 3472 | struct sir_peer_info_ext info[0]; |
| 3473 | }; |
| 3474 | |
Will Huang | 496b36c | 2017-07-11 16:38:50 +0800 | [diff] [blame] | 3475 | /** |
| 3476 | * @sta_num: number of peer station which has valid info |
| 3477 | * @info: peer information |
| 3478 | * |
| 3479 | * all SAP peer station's information retrieved |
| 3480 | */ |
| 3481 | struct sir_peer_sta_info { |
| 3482 | uint8_t sta_num; |
| 3483 | struct sir_peer_info info[MAX_PEER_STA]; |
| 3484 | }; |
| 3485 | |
| 3486 | /** |
| 3487 | * @sta_num: number of peer station which has valid info |
| 3488 | * @info: peer extended information |
| 3489 | * |
| 3490 | * all SAP peer station's extended information retrieved |
| 3491 | */ |
| 3492 | struct sir_peer_sta_ext_info { |
| 3493 | uint8_t sta_num; |
| 3494 | struct sir_peer_info_ext info[MAX_PEER_STA]; |
| 3495 | }; |
| 3496 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3497 | typedef struct sSirAddPeriodicTxPtrn { |
| 3498 | /* MAC Address for the adapter */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3499 | struct qdf_mac_addr mac_address; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3500 | uint8_t ucPtrnId; /* Pattern ID */ |
| 3501 | uint16_t ucPtrnSize; /* Pattern size */ |
| 3502 | uint32_t usPtrnIntervalMs; /* In msec */ |
| 3503 | uint8_t ucPattern[PERIODIC_TX_PTRN_MAX_SIZE]; /* Pattern buffer */ |
| 3504 | } tSirAddPeriodicTxPtrn, *tpSirAddPeriodicTxPtrn; |
| 3505 | |
| 3506 | typedef struct sSirDelPeriodicTxPtrn { |
| 3507 | /* MAC Address for the adapter */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3508 | struct qdf_mac_addr mac_address; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3509 | /* Bitmap of pattern IDs that need to be deleted */ |
| 3510 | uint32_t ucPatternIdBitmap; |
| 3511 | uint8_t ucPtrnId; /* Pattern ID */ |
| 3512 | } tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn; |
| 3513 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 3514 | /*--------------------------------------------------------------------------- |
| 3515 | * tSirIbssGetPeerInfoReqParams |
| 3516 | *--------------------------------------------------------------------------*/ |
| 3517 | typedef struct { |
| 3518 | bool allPeerInfoReqd; /* If set, all IBSS peers stats are reported */ |
| 3519 | uint8_t staIdx; /* If allPeerInfoReqd is not set, only stats */ |
| 3520 | /* of peer with staIdx is reported */ |
| 3521 | } tSirIbssGetPeerInfoReqParams, *tpSirIbssGetPeerInfoReqParams; |
| 3522 | |
Rajeev Kumar | 94c9b45 | 2016-03-24 12:58:47 -0700 | [diff] [blame] | 3523 | /** |
| 3524 | * typedef struct - tSirIbssGetPeerInfoParams |
| 3525 | * @mac_addr: mac address received from target |
| 3526 | * @txRate: TX rate |
| 3527 | * @mcsIndex: MCS index |
| 3528 | * @txRateFlags: TX rate flags |
| 3529 | * @rssi: RSSI |
| 3530 | */ |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 3531 | typedef struct { |
Rajeev Kumar | 94c9b45 | 2016-03-24 12:58:47 -0700 | [diff] [blame] | 3532 | uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; |
| 3533 | uint32_t txRate; |
| 3534 | uint32_t mcsIndex; |
| 3535 | uint32_t txRateFlags; |
| 3536 | int8_t rssi; |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 3537 | } tSirIbssPeerInfoParams; |
| 3538 | |
| 3539 | typedef struct { |
| 3540 | uint32_t status; |
| 3541 | uint8_t numPeers; |
| 3542 | tSirIbssPeerInfoParams peerInfoParams[32]; |
| 3543 | } tSirPeerInfoRspParams, *tpSirIbssPeerInfoRspParams; |
| 3544 | |
| 3545 | /*--------------------------------------------------------------------------- |
| 3546 | * tSirIbssGetPeerInfoRspParams |
| 3547 | *--------------------------------------------------------------------------*/ |
| 3548 | typedef struct { |
| 3549 | uint16_t mesgType; |
| 3550 | uint16_t mesgLen; |
| 3551 | tSirPeerInfoRspParams ibssPeerInfoRspParams; |
| 3552 | } tSirIbssGetPeerInfoRspParams, *tpSirIbssGetPeerInfoRspParams; |
| 3553 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3554 | typedef struct { |
| 3555 | uint16_t mesgType; |
| 3556 | uint16_t mesgLen; |
| 3557 | bool suspended; |
| 3558 | } tSirReadyToSuspendInd, *tpSirReadyToSuspendInd; |
| 3559 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
| 3560 | typedef struct { |
| 3561 | uint16_t mesgType; |
| 3562 | uint16_t mesgLen; |
| 3563 | bool status; |
| 3564 | } tSirReadyToExtWoWInd, *tpSirReadyToExtWoWInd; |
| 3565 | #endif |
| 3566 | typedef struct sSirRateUpdateInd { |
| 3567 | uint8_t nss; /* 0: 1x1, 1: 2x2 */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3568 | struct qdf_mac_addr bssid; |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 3569 | enum QDF_OPMODE dev_mode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3570 | int32_t bcastDataRate; /* bcast rate unit Mbpsx10, -1:not used */ |
| 3571 | /* |
| 3572 | * 0 implies RA, positive value implies fixed rate, -1 implies ignore |
| 3573 | * this param. |
| 3574 | */ |
| 3575 | int32_t ucastDataRate; |
| 3576 | |
| 3577 | /* TX flag to differentiate between HT20, HT40 etc */ |
Naveen Rawat | ea1564b | 2018-05-17 15:56:11 -0700 | [diff] [blame] | 3578 | enum tx_rate_info ucastDataRateTxFlag; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3579 | |
| 3580 | /* |
| 3581 | * 0 implies MCAST RA, positive value implies fixed rate, |
| 3582 | * -1 implies ignore this param |
| 3583 | */ |
| 3584 | int32_t reliableMcastDataRate; /* unit Mbpsx10 */ |
| 3585 | |
| 3586 | /* TX flag to differentiate between HT20, HT40 etc */ |
Naveen Rawat | ea1564b | 2018-05-17 15:56:11 -0700 | [diff] [blame] | 3587 | enum tx_rate_info reliableMcastDataRateTxFlag; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3588 | |
| 3589 | /* |
| 3590 | * MCAST(or BCAST) fixed data rate in 2.4 GHz, unit Mbpsx10, |
| 3591 | * 0 implies ignore |
| 3592 | */ |
| 3593 | uint32_t mcastDataRate24GHz; |
| 3594 | |
| 3595 | /* TX flag to differentiate between HT20, HT40 etc */ |
Naveen Rawat | ea1564b | 2018-05-17 15:56:11 -0700 | [diff] [blame] | 3596 | enum tx_rate_info mcastDataRate24GHzTxFlag; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3597 | |
| 3598 | /* |
| 3599 | * MCAST(or BCAST) fixed data rate in 5 GHz, |
| 3600 | * unit Mbpsx10, 0 implies ignore |
| 3601 | */ |
| 3602 | uint32_t mcastDataRate5GHz; |
| 3603 | |
| 3604 | /* TX flag to differentiate between HT20, HT40 etc */ |
Naveen Rawat | ea1564b | 2018-05-17 15:56:11 -0700 | [diff] [blame] | 3605 | enum tx_rate_info mcastDataRate5GHzTxFlag; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3606 | |
| 3607 | } tSirRateUpdateInd, *tpSirRateUpdateInd; |
| 3608 | |
| 3609 | #if defined(FEATURE_WLAN_CH_AVOID) || defined(FEATURE_WLAN_FORCE_SAP_SCC) |
| 3610 | #define SIR_CH_AVOID_MAX_RANGE 4 |
| 3611 | |
| 3612 | typedef struct sSirChAvoidFreqType { |
| 3613 | uint32_t start_freq; |
| 3614 | uint32_t end_freq; |
| 3615 | } tSirChAvoidFreqType; |
| 3616 | |
| 3617 | typedef struct sSirChAvoidIndType { |
| 3618 | uint32_t avoid_range_count; |
| 3619 | tSirChAvoidFreqType avoid_freq_range[SIR_CH_AVOID_MAX_RANGE]; |
| 3620 | } tSirChAvoidIndType; |
| 3621 | #endif /* FEATURE_WLAN_CH_AVOID || FEATURE_WLAN_FORCE_SAP_SCC */ |
| 3622 | |
| 3623 | #define SIR_DFS_MAX_20M_SUB_CH 8 |
Sandeep Puligilla | 949eaa7 | 2015-12-17 18:43:52 -0800 | [diff] [blame] | 3624 | #define SIR_80MHZ_START_CENTER_CH_DIFF 6 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3625 | |
| 3626 | typedef struct sSirSmeDfsChannelList { |
| 3627 | uint32_t nchannels; |
| 3628 | /* Ch num including bonded channels on which the RADAR is present */ |
| 3629 | uint8_t channels[SIR_DFS_MAX_20M_SUB_CH]; |
| 3630 | } tSirSmeDfsChannelList, *tpSirSmeDfsChannelList; |
| 3631 | |
| 3632 | typedef struct sSirSmeDfsEventInd { |
| 3633 | uint32_t sessionId; |
| 3634 | tSirSmeDfsChannelList chan_list; |
| 3635 | uint32_t dfs_radar_status; |
| 3636 | int use_nol; |
| 3637 | } tSirSmeDfsEventInd, *tpSirSmeDfsEventInd; |
| 3638 | |
| 3639 | typedef struct sSirChanChangeRequest { |
| 3640 | uint16_t messageType; |
| 3641 | uint16_t messageLen; |
| 3642 | uint8_t targetChannel; |
Kiran Kumar Lokere | 999e58c | 2016-01-07 02:18:39 -0800 | [diff] [blame] | 3643 | uint8_t sec_ch_offset; |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 3644 | enum phy_ch_width ch_width; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3645 | uint8_t center_freq_seg_0; |
| 3646 | uint8_t center_freq_seg_1; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3647 | uint8_t bssid[QDF_MAC_ADDR_SIZE]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3648 | uint32_t dot11mode; |
| 3649 | tSirMacRateSet operational_rateset; |
| 3650 | tSirMacRateSet extended_rateset; |
Arif Hussain | 671a190 | 2017-03-17 09:08:32 -0700 | [diff] [blame] | 3651 | uint32_t cac_duration_ms; |
| 3652 | uint32_t dfs_regdomain; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3653 | } tSirChanChangeRequest, *tpSirChanChangeRequest; |
| 3654 | |
| 3655 | typedef struct sSirChanChangeResponse { |
| 3656 | uint8_t sessionId; |
| 3657 | uint8_t newChannelNumber; |
| 3658 | uint8_t channelChangeStatus; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3659 | } tSirChanChangeResponse, *tpSirChanChangeResponse; |
| 3660 | |
| 3661 | typedef struct sSirStartBeaconIndication { |
| 3662 | uint16_t messageType; |
| 3663 | uint16_t messageLen; |
| 3664 | uint8_t beaconStartStatus; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3665 | uint8_t bssid[QDF_MAC_ADDR_SIZE]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3666 | } tSirStartBeaconIndication, *tpSirStartBeaconIndication; |
| 3667 | |
| 3668 | /* additional IE type */ |
| 3669 | typedef enum tUpdateIEsType { |
| 3670 | eUPDATE_IE_NONE, |
| 3671 | eUPDATE_IE_PROBE_BCN, |
| 3672 | eUPDATE_IE_PROBE_RESP, |
| 3673 | eUPDATE_IE_ASSOC_RESP, |
| 3674 | |
| 3675 | /* Add type above this line */ |
| 3676 | /* this is used to reset all buffer */ |
| 3677 | eUPDATE_IE_ALL, |
| 3678 | eUPDATE_IE_MAX |
| 3679 | } eUpdateIEsType; |
| 3680 | |
| 3681 | /* Modify particular IE in addition IE for prob resp Bcn */ |
| 3682 | typedef struct sSirModifyIE { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3683 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3684 | uint16_t smeSessionId; |
| 3685 | bool notify; |
| 3686 | uint8_t ieID; |
| 3687 | uint8_t ieIDLen; /*ie length as per spec */ |
| 3688 | uint16_t ieBufferlength; |
| 3689 | uint8_t *pIEBuffer; |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 3690 | int32_t oui_length; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3691 | |
| 3692 | } tSirModifyIE, *tpSirModifyIE; |
| 3693 | |
Kiran Kumar Lokere | bc87bec | 2018-02-27 20:06:42 -0800 | [diff] [blame] | 3694 | struct send_add_ba_req { |
| 3695 | uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; |
| 3696 | struct addba_send_params param; |
| 3697 | }; |
| 3698 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3699 | /* Message format for Update IE message sent to PE */ |
| 3700 | typedef struct sSirModifyIEsInd { |
| 3701 | uint16_t msgType; |
| 3702 | uint16_t msgLen; |
| 3703 | tSirModifyIE modifyIE; |
| 3704 | eUpdateIEsType updateType; |
| 3705 | } tSirModifyIEsInd, *tpSirModifyIEsInd; |
| 3706 | |
| 3707 | /* Message format for Update IE message sent to PE */ |
| 3708 | typedef struct sSirUpdateIE { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3709 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3710 | uint16_t smeSessionId; |
| 3711 | bool append; |
| 3712 | bool notify; |
| 3713 | uint16_t ieBufferlength; |
| 3714 | uint8_t *pAdditionIEBuffer; |
| 3715 | } tSirUpdateIE, *tpSirUpdateIE; |
| 3716 | |
| 3717 | /* Message format for Update IE message sent to PE */ |
| 3718 | typedef struct sSirUpdateIEsInd { |
| 3719 | uint16_t msgType; |
| 3720 | uint16_t msgLen; |
| 3721 | tSirUpdateIE updateIE; |
| 3722 | eUpdateIEsType updateType; |
| 3723 | } tSirUpdateIEsInd, *tpSirUpdateIEsInd; |
| 3724 | |
| 3725 | /* Message format for requesting channel switch announcement to lower layers */ |
| 3726 | typedef struct sSirDfsCsaIeRequest { |
| 3727 | uint16_t msgType; |
| 3728 | uint16_t msgLen; |
| 3729 | uint8_t targetChannel; |
| 3730 | uint8_t csaIeRequired; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3731 | uint8_t bssid[QDF_MAC_ADDR_SIZE]; |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 3732 | struct ch_params ch_params; |
gaolez | e2920bd | 2017-03-21 17:38:42 +0800 | [diff] [blame] | 3733 | uint8_t ch_switch_beacon_cnt; |
gaolez | 76d2a16 | 2017-03-21 19:23:58 +0800 | [diff] [blame] | 3734 | uint8_t ch_switch_mode; |
| 3735 | uint8_t dfs_ch_switch_disable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3736 | } tSirDfsCsaIeRequest, *tpSirDfsCsaIeRequest; |
| 3737 | |
| 3738 | /* Indication from lower layer indicating the completion of first beacon send |
| 3739 | * after the beacon template update |
| 3740 | */ |
| 3741 | typedef struct sSirFirstBeaconTxCompleteInd { |
| 3742 | uint16_t messageType; /* eWNI_SME_MISSED_BEACON_IND */ |
| 3743 | uint16_t length; |
| 3744 | uint8_t bssIdx; |
| 3745 | } tSirFirstBeaconTxCompleteInd, *tpSirFirstBeaconTxCompleteInd; |
| 3746 | |
| 3747 | typedef struct sSirSmeCSAIeTxCompleteRsp { |
| 3748 | uint8_t sessionId; |
| 3749 | uint8_t chanSwIeTxStatus; |
| 3750 | } tSirSmeCSAIeTxCompleteRsp, *tpSirSmeCSAIeTxCompleteRsp; |
| 3751 | |
| 3752 | /* Thermal Mitigation*/ |
| 3753 | |
| 3754 | typedef struct { |
| 3755 | uint16_t minTempThreshold; |
| 3756 | uint16_t maxTempThreshold; |
| 3757 | } t_thermal_level_info, *tp_thermal_level_info; |
| 3758 | |
| 3759 | typedef enum { |
| 3760 | WLAN_WMA_THERMAL_LEVEL_0, |
| 3761 | WLAN_WMA_THERMAL_LEVEL_1, |
| 3762 | WLAN_WMA_THERMAL_LEVEL_2, |
| 3763 | WLAN_WMA_THERMAL_LEVEL_3, |
| 3764 | WLAN_WMA_MAX_THERMAL_LEVELS |
| 3765 | } t_thermal_level; |
| 3766 | |
Poddar, Siddarth | 8390502 | 2016-04-16 17:56:08 -0700 | [diff] [blame] | 3767 | #define WLAN_THROTTLE_DUTY_CYCLE_LEVEL_MAX (4) |
| 3768 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3769 | typedef struct { |
| 3770 | /* Array of thermal levels */ |
| 3771 | t_thermal_level_info thermalLevels[WLAN_WMA_MAX_THERMAL_LEVELS]; |
| 3772 | uint8_t thermalCurrLevel; |
| 3773 | uint8_t thermalMgmtEnabled; |
| 3774 | uint32_t throttlePeriod; |
Poddar, Siddarth | 8390502 | 2016-04-16 17:56:08 -0700 | [diff] [blame] | 3775 | uint8_t throttle_duty_cycle_tbl[WLAN_THROTTLE_DUTY_CYCLE_LEVEL_MAX]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3776 | } t_thermal_mgmt, *tp_thermal_mgmt; |
| 3777 | |
| 3778 | typedef struct sSirTxPowerLimit { |
| 3779 | /* Thermal limits for 2g and 5g */ |
| 3780 | uint32_t txPower2g; |
| 3781 | uint32_t txPower5g; |
| 3782 | } tSirTxPowerLimit; |
| 3783 | |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 3784 | enum bad_peer_thresh_levels { |
| 3785 | WLAN_WMA_IEEE80211_B_LEVEL = 0, |
| 3786 | WLAN_WMA_IEEE80211_AG_LEVEL, |
| 3787 | WLAN_WMA_IEEE80211_N_LEVEL, |
| 3788 | WLAN_WMA_IEEE80211_AC_LEVEL, |
| 3789 | WLAN_WMA_IEEE80211_AX_LEVEL, |
| 3790 | WLAN_WMA_IEEE80211_MAX_LEVEL, |
| 3791 | }; |
| 3792 | |
| 3793 | #define NUM_OF_RATE_THRESH_MAX (4) |
| 3794 | struct t_bad_peer_info { |
| 3795 | uint32_t cond; |
| 3796 | uint32_t delta; |
| 3797 | uint32_t percentage; |
| 3798 | uint32_t thresh[NUM_OF_RATE_THRESH_MAX]; |
| 3799 | uint32_t txlimit; |
| 3800 | }; |
| 3801 | |
| 3802 | struct t_bad_peer_txtcl_config { |
| 3803 | /* Array of thermal levels */ |
| 3804 | struct t_bad_peer_info threshold[WLAN_WMA_IEEE80211_MAX_LEVEL]; |
| 3805 | uint32_t enable; |
| 3806 | uint32_t period; |
| 3807 | uint32_t txq_limit; |
| 3808 | uint32_t tgt_backoff; |
| 3809 | uint32_t tgt_report_prd; |
| 3810 | }; |
| 3811 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3812 | /* notify MODEM power state to FW */ |
| 3813 | typedef struct { |
| 3814 | uint32_t param; |
| 3815 | } tSirModemPowerStateInd, *tpSirModemPowerStateInd; |
| 3816 | |
| 3817 | #ifdef WLAN_FEATURE_STATS_EXT |
| 3818 | typedef struct { |
| 3819 | uint32_t vdev_id; |
| 3820 | uint32_t event_data_len; |
| 3821 | uint8_t event_data[]; |
| 3822 | } tSirStatsExtEvent, *tpSirStatsExtEvent; |
| 3823 | #endif |
| 3824 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3825 | typedef struct { |
| 3826 | uint32_t event_data_len; |
| 3827 | uint8_t event_data[]; |
| 3828 | } tSirNanEvent, *tpSirNanEvent; |
Mahesh Kumar Kalikot Veetil | 919e01d | 2016-09-09 17:09:10 -0700 | [diff] [blame] | 3829 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3830 | typedef struct sSirSmeRoamOffloadSynchInd { |
| 3831 | uint16_t messageType; /*eWNI_SME_ROAM_OFFLOAD_SYNCH_IND */ |
| 3832 | uint16_t length; |
| 3833 | uint16_t beaconProbeRespOffset; |
| 3834 | uint16_t beaconProbeRespLength; |
| 3835 | uint16_t reassocRespOffset; |
| 3836 | uint16_t reassocRespLength; |
Naveen Rawat | 14298b9 | 2015-11-25 16:27:41 -0800 | [diff] [blame] | 3837 | uint16_t reassoc_req_offset; |
| 3838 | uint16_t reassoc_req_length; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3839 | uint8_t isBeacon; |
| 3840 | uint8_t roamedVdevId; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3841 | struct qdf_mac_addr bssid; |
Varun Reddy Yeturu | 28925b4 | 2016-02-08 07:18:50 -0800 | [diff] [blame] | 3842 | struct qdf_mac_addr self_mac; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3843 | int8_t txMgmtPower; |
| 3844 | uint32_t authStatus; |
| 3845 | uint8_t rssi; |
| 3846 | uint8_t roamReason; |
| 3847 | uint32_t chan_freq; |
| 3848 | uint8_t kck[SIR_KCK_KEY_LEN]; |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 3849 | uint32_t kek_len; |
| 3850 | uint8_t kek[SIR_KEK_KEY_LEN_FILS]; |
| 3851 | uint32_t pmk_len; |
| 3852 | uint8_t pmk[SIR_PMK_LEN]; |
| 3853 | uint8_t pmkid[SIR_PMKID_LEN]; |
| 3854 | bool update_erp_next_seq_num; |
| 3855 | uint16_t next_erp_seq_num; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3856 | uint8_t replay_ctr[SIR_REPLAY_CTR_LEN]; |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 3857 | void *add_bss_params; |
| 3858 | tpSirSmeJoinRsp join_rsp; |
| 3859 | uint16_t aid; |
Naveen Rawat | 8cc23b0 | 2016-07-14 12:22:56 -0700 | [diff] [blame] | 3860 | struct sir_hw_mode_trans_ind hw_mode_trans_ind; |
Naveen Rawat | 746a90b | 2017-06-07 15:16:35 -0700 | [diff] [blame] | 3861 | uint8_t nss; |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 3862 | struct qdf_mac_addr dst_mac; |
| 3863 | struct qdf_mac_addr src_mac; |
| 3864 | uint16_t hlp_data_len; |
| 3865 | uint8_t hlp_data[FILS_MAX_HLP_DATA_LEN]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3866 | } roam_offload_synch_ind; |
| 3867 | |
Varun Reddy Yeturu | bbbbe23 | 2016-02-29 14:01:57 -0800 | [diff] [blame] | 3868 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3869 | typedef struct sSirSmeRoamOffloadSynchCnf { |
| 3870 | uint8_t sessionId; |
| 3871 | } tSirSmeRoamOffloadSynchCnf, *tpSirSmeRoamOffloadSynchCnf; |
| 3872 | |
| 3873 | typedef struct sSirSmeHOFailureInd { |
| 3874 | uint8_t sessionId; |
| 3875 | } tSirSmeHOFailureInd, *tpSirSmeHOFailureInd; |
| 3876 | |
| 3877 | struct roam_offload_synch_fail { |
| 3878 | uint8_t session_id; |
| 3879 | }; |
| 3880 | |
| 3881 | #endif |
| 3882 | |
Wen Gong | 7952fbd | 2018-04-18 11:27:23 +0800 | [diff] [blame] | 3883 | /** |
| 3884 | * struct sir_wisa_params - WISA Mode Parameters |
| 3885 | * @mode: WISA mode |
| 3886 | * @session_id: Session ID of vdev |
| 3887 | */ |
| 3888 | struct sir_wisa_params { |
| 3889 | bool mode; |
| 3890 | uint8_t vdev_id; |
| 3891 | }; |
| 3892 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3893 | #ifdef FEATURE_WLAN_EXTSCAN |
| 3894 | |
Wen Gong | 7952fbd | 2018-04-18 11:27:23 +0800 | [diff] [blame] | 3895 | #define WLAN_EXTSCAN_MAX_CHANNELS 36 |
| 3896 | #define WLAN_EXTSCAN_MAX_BUCKETS 16 |
| 3897 | #define WLAN_EXTSCAN_MAX_HOTLIST_APS 128 |
| 3898 | #define WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 |
| 3899 | |
| 3900 | typedef enum { |
| 3901 | eSIR_EXTSCAN_INVALID, |
| 3902 | eSIR_EXTSCAN_START_RSP, |
| 3903 | eSIR_EXTSCAN_STOP_RSP, |
| 3904 | eSIR_EXTSCAN_CACHED_RESULTS_RSP, |
| 3905 | eSIR_EXTSCAN_SET_BSSID_HOTLIST_RSP, |
| 3906 | eSIR_EXTSCAN_RESET_BSSID_HOTLIST_RSP, |
| 3907 | eSIR_EXTSCAN_SET_SIGNIFICANT_WIFI_CHANGE_RSP, |
| 3908 | eSIR_EXTSCAN_RESET_SIGNIFICANT_WIFI_CHANGE_RSP, |
| 3909 | |
| 3910 | eSIR_EXTSCAN_GET_CAPABILITIES_IND, |
| 3911 | eSIR_EXTSCAN_HOTLIST_MATCH_IND, |
| 3912 | eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND, |
| 3913 | eSIR_EXTSCAN_CACHED_RESULTS_IND, |
| 3914 | eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND, |
| 3915 | eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND, |
| 3916 | eSIR_EXTSCAN_FULL_SCAN_RESULT_IND, |
| 3917 | eSIR_EPNO_NETWORK_FOUND_IND, |
| 3918 | eSIR_PASSPOINT_NETWORK_FOUND_IND, |
| 3919 | eSIR_EXTSCAN_SET_SSID_HOTLIST_RSP, |
| 3920 | eSIR_EXTSCAN_RESET_SSID_HOTLIST_RSP, |
| 3921 | |
| 3922 | /* Keep this last */ |
| 3923 | eSIR_EXTSCAN_CALLBACK_TYPE_MAX, |
| 3924 | } tSirExtScanCallbackType; |
| 3925 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3926 | /** |
| 3927 | * typedef enum wifi_scan_flags - wifi scan flags |
| 3928 | * @WIFI_SCAN_FLAG_INTERRUPTED: Indicates that scan results are not complete |
| 3929 | * because probes were not sent on some channels |
| 3930 | */ |
| 3931 | typedef enum { |
| 3932 | WIFI_SCAN_FLAG_INTERRUPTED = 1, |
| 3933 | } wifi_scan_flags; |
| 3934 | |
| 3935 | typedef enum { |
| 3936 | WIFI_BAND_UNSPECIFIED, |
| 3937 | WIFI_BAND_BG = 1, /* 2.4 GHz */ |
| 3938 | WIFI_BAND_A = 2, /* 5 GHz without DFS */ |
| 3939 | WIFI_BAND_ABG = 3, /* 2.4 GHz + 5 GHz; no DFS */ |
| 3940 | WIFI_BAND_A_DFS_ONLY = 4, /* 5 GHz DFS only */ |
| 3941 | /* 5 is reserved */ |
| 3942 | WIFI_BAND_A_WITH_DFS = 6, /* 5 GHz with DFS */ |
| 3943 | WIFI_BAND_ABG_WITH_DFS = 7, /* 2.4 GHz + 5 GHz with DFS */ |
| 3944 | |
| 3945 | /* Keep it last */ |
| 3946 | WIFI_BAND_MAX |
| 3947 | } tWifiBand; |
| 3948 | |
Mukul Sharma | 45114d9 | 2016-08-12 19:34:14 +0530 | [diff] [blame] | 3949 | /** |
| 3950 | * enum wifi_extscan_event_type - extscan event type |
| 3951 | * @WIFI_EXTSCAN_RESULTS_AVAILABLE: reported when REPORT_EVENTS_EACH_SCAN is set |
| 3952 | * and a scan cycle completes. WIFI_SCAN_THRESHOLD_NUM_SCANS or |
| 3953 | * WIFI_SCAN_THRESHOLD_PERCENT can be reported instead if the |
| 3954 | * reason for the event is available; however, at most one of |
| 3955 | * these events should be reported per scan. |
| 3956 | * @WIFI_EXTSCAN_THRESHOLD_NUM_SCANS: can be reported when |
| 3957 | * REPORT_EVENTS_EACH_SCAN is not set and |
| 3958 | * report_threshold_num_scans is reached. |
| 3959 | * @WIFI_EXTSCAN_THRESHOLD_PERCENT: can be reported when REPORT_EVENTS_EACH_SCAN |
| 3960 | * is not set and report_threshold_percent is reached. |
| 3961 | * @WIFI_SCAN_DISABLED: reported when currently executing gscans are disabled |
| 3962 | * start_gscan will need to be called again in order to continue |
| 3963 | * scanning. |
| 3964 | * @WIFI_EXTSCAN_BUCKET_STARTED_EVENT: Bucket started event |
| 3965 | * This event is consumed in driver only. |
| 3966 | * @WIFI_EXTSCAN_CYCLE_STARTED_EVENT: Cycle started event. |
| 3967 | * This event is consumed in driver only. |
| 3968 | * @WIFI_EXTSCAN_CYCLE_COMPLETED_EVENT: Cycle complete event. This event |
| 3969 | * triggers @WIFI_EXTSCAN_RESULTS_AVAILABLE to the user space. |
| 3970 | */ |
| 3971 | enum wifi_extscan_event_type { |
Mukul Sharma | fa937be | 2016-08-12 18:13:36 +0530 | [diff] [blame] | 3972 | WIFI_EXTSCAN_RESULTS_AVAILABLE, |
Mukul Sharma | fa937be | 2016-08-12 18:13:36 +0530 | [diff] [blame] | 3973 | WIFI_EXTSCAN_THRESHOLD_NUM_SCANS, |
Mukul Sharma | fa937be | 2016-08-12 18:13:36 +0530 | [diff] [blame] | 3974 | WIFI_EXTSCAN_THRESHOLD_PERCENT, |
Mukul Sharma | fa937be | 2016-08-12 18:13:36 +0530 | [diff] [blame] | 3975 | WIFI_SCAN_DISABLED, |
| 3976 | |
Mukul Sharma | fa937be | 2016-08-12 18:13:36 +0530 | [diff] [blame] | 3977 | WIFI_EXTSCAN_BUCKET_STARTED_EVENT = 0x10, |
| 3978 | WIFI_EXTSCAN_CYCLE_STARTED_EVENT, |
| 3979 | WIFI_EXTSCAN_CYCLE_COMPLETED_EVENT, |
Mukul Sharma | 45114d9 | 2016-08-12 19:34:14 +0530 | [diff] [blame] | 3980 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3981 | |
| 3982 | /** |
| 3983 | * enum extscan_configuration_flags - extscan config flags |
| 3984 | * @EXTSCAN_LP_EXTENDED_BATCHING: extended batching |
| 3985 | */ |
| 3986 | enum extscan_configuration_flags { |
| 3987 | EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001, |
| 3988 | }; |
| 3989 | |
| 3990 | typedef struct { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 3991 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3992 | |
| 3993 | /* Low threshold */ |
| 3994 | int32_t low; |
| 3995 | |
| 3996 | /* High threshold */ |
| 3997 | int32_t high; |
| 3998 | } tSirAPThresholdParam, *tpSirAPThresholdParam; |
| 3999 | |
| 4000 | typedef struct { |
| 4001 | uint32_t requestId; |
| 4002 | uint8_t sessionId; |
| 4003 | } tSirGetExtScanCapabilitiesReqParams, *tpSirGetExtScanCapabilitiesReqParams; |
| 4004 | |
| 4005 | /** |
| 4006 | * struct ext_scan_capabilities_response - extscan capabilities response data |
| 4007 | * @requestId: request identifier |
| 4008 | * @status: status |
| 4009 | * @max_scan_cache_size: total space allocated for scan (in bytes) |
| 4010 | * @max_scan_buckets: maximum number of channel buckets |
| 4011 | * @max_ap_cache_per_scan: maximum number of APs that can be stored per scan |
| 4012 | * @max_rssi_sample_size: number of RSSI samples used for averaging RSSI |
| 4013 | * @ax_scan_reporting_threshold: max possible report_threshold |
| 4014 | * @max_hotlist_bssids: maximum number of entries for hotlist APs |
| 4015 | * @max_significant_wifi_change_aps: maximum number of entries for |
| 4016 | * significant wifi change APs |
| 4017 | * @max_bssid_history_entries: number of BSSID/RSSI entries that device can hold |
| 4018 | * @max_hotlist_ssids: maximum number of entries for hotlist SSIDs |
| 4019 | * @max_number_epno_networks: max number of epno entries |
| 4020 | * @max_number_epno_networks_by_ssid: max number of epno entries |
| 4021 | * if ssid is specified, that is, epno entries for |
| 4022 | * which an exact match is required, |
| 4023 | * or entries corresponding to hidden ssids |
| 4024 | * @max_number_of_white_listed_ssid: max number of white listed SSIDs |
Padma, Santhosh Kumar | 1ac0240 | 2016-11-02 18:04:14 +0530 | [diff] [blame] | 4025 | * @max_number_of_black_listed_bssid: max number of black listed BSSIDs |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4026 | */ |
| 4027 | struct ext_scan_capabilities_response { |
| 4028 | uint32_t requestId; |
| 4029 | uint32_t status; |
| 4030 | |
| 4031 | uint32_t max_scan_cache_size; |
| 4032 | uint32_t max_scan_buckets; |
| 4033 | uint32_t max_ap_cache_per_scan; |
| 4034 | uint32_t max_rssi_sample_size; |
| 4035 | uint32_t max_scan_reporting_threshold; |
| 4036 | |
| 4037 | uint32_t max_hotlist_bssids; |
| 4038 | uint32_t max_significant_wifi_change_aps; |
| 4039 | |
| 4040 | uint32_t max_bssid_history_entries; |
| 4041 | uint32_t max_hotlist_ssids; |
| 4042 | uint32_t max_number_epno_networks; |
| 4043 | uint32_t max_number_epno_networks_by_ssid; |
| 4044 | uint32_t max_number_of_white_listed_ssid; |
Padma, Santhosh Kumar | 1ac0240 | 2016-11-02 18:04:14 +0530 | [diff] [blame] | 4045 | uint32_t max_number_of_black_listed_bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4046 | }; |
| 4047 | |
| 4048 | typedef struct { |
| 4049 | uint32_t requestId; |
| 4050 | uint8_t sessionId; |
| 4051 | |
| 4052 | /* |
| 4053 | * 1 - return cached results and flush it |
| 4054 | * 0 - return cached results and do not flush |
| 4055 | */ |
| 4056 | bool flush; |
| 4057 | } tSirExtScanGetCachedResultsReqParams, *tpSirExtScanGetCachedResultsReqParams; |
| 4058 | |
| 4059 | typedef struct { |
| 4060 | uint32_t requestId; |
| 4061 | uint32_t status; |
| 4062 | } tSirExtScanGetCachedResultsRspParams, *tpSirExtScanGetCachedResultsRspParams; |
| 4063 | |
| 4064 | typedef struct { |
| 4065 | /* Time of discovery */ |
| 4066 | uint64_t ts; |
| 4067 | |
| 4068 | /* Null terminated SSID */ |
| 4069 | uint8_t ssid[SIR_MAC_MAX_SSID_LENGTH + 1]; |
| 4070 | |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 4071 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4072 | |
| 4073 | /* Frequency in MHz */ |
| 4074 | uint32_t channel; |
| 4075 | |
| 4076 | /* RSSI in dBm */ |
| 4077 | int32_t rssi; |
| 4078 | |
| 4079 | /* RTT in nanoseconds */ |
| 4080 | uint32_t rtt; |
| 4081 | |
| 4082 | /* Standard deviation in rtt */ |
| 4083 | uint32_t rtt_sd; |
| 4084 | |
| 4085 | /* Period advertised in the beacon */ |
| 4086 | uint16_t beaconPeriod; |
| 4087 | |
| 4088 | /* Capabilities advertised in the beacon */ |
| 4089 | uint16_t capability; |
| 4090 | |
| 4091 | uint16_t ieLength; |
| 4092 | |
| 4093 | uint8_t ieData[]; |
| 4094 | } tSirWifiScanResult, *tpSirWifiScanResult; |
| 4095 | |
| 4096 | /** |
| 4097 | * struct extscan_hotlist_match - extscan hotlist match |
| 4098 | * @requestId: request identifier |
| 4099 | * @numOfAps: number of bssids retrieved by the scan |
| 4100 | * @moreData: 0 - for last fragment |
| 4101 | * 1 - still more fragment(s) coming |
| 4102 | * @ap: wifi scan result |
| 4103 | */ |
| 4104 | struct extscan_hotlist_match { |
| 4105 | uint32_t requestId; |
| 4106 | bool moreData; |
| 4107 | bool ap_found; |
| 4108 | uint32_t numOfAps; |
| 4109 | tSirWifiScanResult ap[]; |
| 4110 | }; |
| 4111 | |
| 4112 | /** |
| 4113 | * struct extscan_cached_scan_result - extscan cached scan result |
| 4114 | * @scan_id: a unique identifier for the scan unit |
| 4115 | * @flags: a bitmask with additional information about scan |
| 4116 | * @num_results: number of bssids retrieved by the scan |
Mukul Sharma | f7cb3ab | 2016-08-12 19:53:52 +0530 | [diff] [blame] | 4117 | * @buckets_scanned: bitmask of buckets scanned in current extscan cycle |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4118 | * @ap: wifi scan bssid results info |
| 4119 | */ |
| 4120 | struct extscan_cached_scan_result { |
| 4121 | uint32_t scan_id; |
| 4122 | uint32_t flags; |
| 4123 | uint32_t num_results; |
Mukul Sharma | f7cb3ab | 2016-08-12 19:53:52 +0530 | [diff] [blame] | 4124 | uint32_t buckets_scanned; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4125 | tSirWifiScanResult *ap; |
| 4126 | }; |
| 4127 | |
| 4128 | /** |
| 4129 | * struct tSirWifiScanResultEvent - wifi scan result event |
| 4130 | * @requestId: request identifier |
| 4131 | * @ap_found: flag to indicate ap found or not |
| 4132 | * true: AP was found |
| 4133 | * false: AP was lost |
| 4134 | * @numOfAps: number of aps |
| 4135 | * @moreData: more data |
| 4136 | * @ap: bssid information |
| 4137 | * |
| 4138 | */ |
| 4139 | typedef struct { |
| 4140 | uint32_t requestId; |
| 4141 | bool ap_found; |
| 4142 | uint32_t numOfAps; |
| 4143 | bool moreData; |
| 4144 | tSirWifiScanResult ap[]; |
| 4145 | } tSirWifiScanResultEvent, *tpSirWifiScanResultEvent; |
| 4146 | |
| 4147 | /** |
| 4148 | * struct extscan_cached_scan_results - extscan cached scan results |
| 4149 | * @request_id: request identifier |
| 4150 | * @more_data: 0 - for last fragment |
| 4151 | * 1 - still more fragment(s) coming |
| 4152 | * @num_scan_ids: number of scan ids |
| 4153 | * @result: wifi scan result |
| 4154 | */ |
| 4155 | struct extscan_cached_scan_results { |
| 4156 | uint32_t request_id; |
| 4157 | bool more_data; |
| 4158 | uint32_t num_scan_ids; |
| 4159 | struct extscan_cached_scan_result *result; |
| 4160 | }; |
| 4161 | |
| 4162 | |
| 4163 | /** |
| 4164 | * struct tSirWifiFullScanResultEvent - extscan full scan event |
| 4165 | * @request_id: request identifier |
| 4166 | * @moreData: 0 - for last fragment |
| 4167 | * 1 - still more fragment(s) coming |
| 4168 | * @ap: bssid info |
| 4169 | * |
| 4170 | * Reported when each probe response is received, if reportEvents |
| 4171 | * enabled in tSirWifiScanCmdReqParams |
| 4172 | */ |
| 4173 | typedef struct { |
| 4174 | uint32_t requestId; |
| 4175 | bool moreData; |
| 4176 | tSirWifiScanResult ap; |
| 4177 | } tSirWifiFullScanResultEvent, *tpSirWifiFullScanResultEvent; |
| 4178 | |
| 4179 | /** |
| 4180 | * struct pno_match_found - epno match found |
| 4181 | * @request_id: request identifier |
| 4182 | * @moreData: 0 - for last fragment |
| 4183 | * 1 - still more fragment(s) coming |
| 4184 | * @num_results: number of bssids, driver sends this event to upper layer |
| 4185 | * for every beacon, hence %num_results is always set to 1. |
| 4186 | * @ap: bssid info |
| 4187 | * |
| 4188 | * Reported when each beacon probe response is received with |
| 4189 | * epno match found tag. |
| 4190 | */ |
| 4191 | struct pno_match_found { |
| 4192 | uint32_t request_id; |
| 4193 | bool more_data; |
| 4194 | uint32_t num_results; |
| 4195 | tSirWifiScanResult ap[]; |
| 4196 | }; |
| 4197 | |
| 4198 | typedef struct { |
| 4199 | /* Frequency in MHz */ |
| 4200 | uint32_t channel; |
| 4201 | |
| 4202 | uint32_t dwellTimeMs; |
| 4203 | |
| 4204 | /* 0 => active |
| 4205 | 1 => passive scan; ignored for DFS */ |
| 4206 | bool passive; |
| 4207 | |
| 4208 | uint8_t chnlClass; |
| 4209 | } tSirWifiScanChannelSpec, *tpSirWifiScanChannelSpec; |
| 4210 | |
| 4211 | /** |
| 4212 | * struct tSirWifiScanBucketSpec - wifi scan bucket spec |
| 4213 | * @bucket: bucket identifier |
| 4214 | * @band: wifi band |
| 4215 | * @period: Desired period, in millisecond; if this is too |
| 4216 | * low, the firmware should choose to generate results as fast as |
| 4217 | * it can instead of failing the command byte |
| 4218 | * for exponential backoff bucket this is the min_period |
| 4219 | * @reportEvents: 0 => normal reporting (reporting rssi history |
| 4220 | * only, when rssi history buffer is % full) |
| 4221 | * 1 => same as 0 + report a scan completion event after scanning |
| 4222 | * this bucket |
| 4223 | * 2 => same as 1 + forward scan results |
| 4224 | * (beacons/probe responses + IEs) in real time to HAL |
| 4225 | * @max_period: if max_period is non zero or different than period, |
| 4226 | * then this bucket is an exponential backoff bucket and |
| 4227 | * the scan period will grow exponentially as per formula: |
| 4228 | * actual_period(N) = period ^ (N/(step_count+1)) to a |
| 4229 | * maximum period of max_period |
| 4230 | * @exponent: for exponential back off bucket: multiplier: |
| 4231 | * new_period = old_period * exponent |
| 4232 | * @step_count: for exponential back off bucket, number of scans performed |
| 4233 | * at a given period and until the exponent is applied |
| 4234 | * @numChannels: channels to scan; these may include DFS channels |
| 4235 | * Note that a given channel may appear in multiple buckets |
| 4236 | * @min_dwell_time_active: per bucket minimum active dwell time |
| 4237 | * @max_dwell_time_active: per bucket maximum active dwell time |
| 4238 | * @min_dwell_time_passive: per bucket minimum passive dwell time |
| 4239 | * @max_dwell_time_passive: per bucket maximum passive dwell time |
| 4240 | * @channels: Channel list |
| 4241 | */ |
| 4242 | typedef struct { |
| 4243 | uint8_t bucket; |
| 4244 | tWifiBand band; |
| 4245 | uint32_t period; |
| 4246 | uint32_t reportEvents; |
| 4247 | uint32_t max_period; |
| 4248 | uint32_t exponent; |
| 4249 | uint32_t step_count; |
| 4250 | uint32_t numChannels; |
| 4251 | |
| 4252 | uint32_t min_dwell_time_active; |
| 4253 | uint32_t max_dwell_time_active; |
| 4254 | uint32_t min_dwell_time_passive; |
| 4255 | uint32_t max_dwell_time_passive; |
| 4256 | tSirWifiScanChannelSpec channels[WLAN_EXTSCAN_MAX_CHANNELS]; |
| 4257 | } tSirWifiScanBucketSpec, *tpSirWifiScanBucketSpec; |
| 4258 | |
| 4259 | /** |
| 4260 | * struct tSirWifiScanCmdReqParams - wifi scan command request params |
| 4261 | * @basePeriod: base timer period |
| 4262 | * @maxAPperScan: max ap per scan |
| 4263 | * @report_threshold_percent: report threshold |
| 4264 | * in %, when buffer is this much full, wake up host |
| 4265 | * @report_threshold_num_scans: report threshold number of scans |
| 4266 | * in number of scans, wake up host after these many scans |
| 4267 | * @requestId: request id |
| 4268 | * @sessionId: session id |
| 4269 | * @numBuckets: number of buckets |
| 4270 | * @min_dwell_time_active: per bucket minimum active dwell time |
| 4271 | * @max_dwell_time_active: per bucket maximum active dwell time |
| 4272 | * @min_dwell_time_passive: per bucket minimum passive dwell time |
| 4273 | * @max_dwell_time_passive: per bucket maximum passive dwell time |
| 4274 | * @configuration_flags: configuration flags |
| 4275 | * @buckets: buckets array |
| 4276 | */ |
| 4277 | typedef struct { |
| 4278 | uint32_t basePeriod; |
| 4279 | uint32_t maxAPperScan; |
| 4280 | |
| 4281 | uint32_t report_threshold_percent; |
| 4282 | uint32_t report_threshold_num_scans; |
| 4283 | |
| 4284 | uint32_t requestId; |
| 4285 | uint8_t sessionId; |
| 4286 | uint32_t numBuckets; |
| 4287 | |
| 4288 | uint32_t min_dwell_time_active; |
| 4289 | uint32_t max_dwell_time_active; |
| 4290 | uint32_t min_dwell_time_passive; |
| 4291 | uint32_t max_dwell_time_passive; |
| 4292 | uint32_t configuration_flags; |
Sandeep Puligilla | f5ccbf6 | 2018-03-26 16:37:05 -0700 | [diff] [blame] | 4293 | enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4294 | tSirWifiScanBucketSpec buckets[WLAN_EXTSCAN_MAX_BUCKETS]; |
| 4295 | } tSirWifiScanCmdReqParams, *tpSirWifiScanCmdReqParams; |
| 4296 | |
| 4297 | /** |
| 4298 | * struct sir_extscan_generic_response - |
| 4299 | * Generic ExtScan Response structure |
| 4300 | * @request_id: ID of the request |
| 4301 | * @status: operation status returned by firmware |
| 4302 | */ |
| 4303 | struct sir_extscan_generic_response { |
| 4304 | uint32_t request_id; |
| 4305 | uint32_t status; |
| 4306 | }; |
| 4307 | |
| 4308 | typedef struct { |
| 4309 | uint32_t requestId; |
| 4310 | uint8_t sessionId; |
| 4311 | } tSirExtScanStopReqParams, *tpSirExtScanStopReqParams; |
| 4312 | |
| 4313 | /** |
| 4314 | * struct tSirExtScanSetBssidHotListReqParams - set hotlist request |
| 4315 | * @requestId: request identifier |
| 4316 | * @sessionId: session identifier |
| 4317 | * @lost_ap_sample_size: number of samples to confirm AP loss |
| 4318 | * @numAp: Number of hotlist APs |
| 4319 | * @ap: hotlist APs |
| 4320 | */ |
| 4321 | typedef struct { |
| 4322 | uint32_t requestId; |
| 4323 | uint8_t sessionId; |
| 4324 | |
| 4325 | uint32_t lost_ap_sample_size; |
| 4326 | uint32_t numAp; |
| 4327 | tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_HOTLIST_APS]; |
| 4328 | } tSirExtScanSetBssidHotListReqParams, *tpSirExtScanSetBssidHotListReqParams; |
| 4329 | |
| 4330 | typedef struct { |
| 4331 | uint32_t requestId; |
| 4332 | uint8_t sessionId; |
| 4333 | } tSirExtScanResetBssidHotlistReqParams, |
| 4334 | *tpSirExtScanResetBssidHotlistReqParams; |
| 4335 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4336 | typedef struct { |
| 4337 | uint32_t requestId; |
| 4338 | uint8_t sessionId; |
| 4339 | |
| 4340 | /* Number of samples for averaging RSSI */ |
| 4341 | uint32_t rssiSampleSize; |
| 4342 | |
| 4343 | /* Number of missed samples to confirm AP loss */ |
| 4344 | uint32_t lostApSampleSize; |
| 4345 | |
| 4346 | /* Number of APs breaching threshold required for firmware |
| 4347 | * to generate event |
| 4348 | */ |
| 4349 | uint32_t minBreaching; |
| 4350 | |
| 4351 | uint32_t numAp; |
| 4352 | tSirAPThresholdParam ap[WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS]; |
| 4353 | } tSirExtScanSetSigChangeReqParams, *tpSirExtScanSetSigChangeReqParams; |
| 4354 | |
| 4355 | typedef struct { |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 4356 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4357 | uint32_t channel; |
| 4358 | uint32_t numOfRssi; |
| 4359 | |
| 4360 | /* Rssi history in db */ |
| 4361 | int32_t rssi[]; |
| 4362 | } tSirWifiSignificantChange, *tpSirWifiSignificantChange; |
| 4363 | |
| 4364 | typedef struct { |
| 4365 | uint32_t requestId; |
| 4366 | |
| 4367 | bool moreData; |
| 4368 | uint32_t numResults; |
| 4369 | tSirWifiSignificantChange ap[]; |
| 4370 | } tSirWifiSignificantChangeEvent, *tpSirWifiSignificantChangeEvent; |
| 4371 | |
| 4372 | typedef struct { |
| 4373 | uint32_t requestId; |
| 4374 | uint8_t sessionId; |
| 4375 | } tSirExtScanResetSignificantChangeReqParams, |
| 4376 | *tpSirExtScanResetSignificantChangeReqParams; |
| 4377 | |
| 4378 | typedef struct { |
| 4379 | uint32_t requestId; |
| 4380 | uint32_t numResultsAvailable; |
| 4381 | } tSirExtScanResultsAvailableIndParams, *tpSirExtScanResultsAvailableIndParams; |
| 4382 | |
| 4383 | typedef struct { |
| 4384 | uint32_t requestId; |
| 4385 | uint32_t status; |
| 4386 | uint8_t scanEventType; |
Mukul Sharma | fa937be | 2016-08-12 18:13:36 +0530 | [diff] [blame] | 4387 | uint32_t buckets_scanned; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4388 | } tSirExtScanOnScanEventIndParams, *tpSirExtScanOnScanEventIndParams; |
| 4389 | |
Mukul Sharma | e8c919f | 2016-10-02 20:35:15 +0530 | [diff] [blame] | 4390 | #define MAX_EPNO_NETWORKS 64 |
| 4391 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4392 | /** |
| 4393 | * struct wifi_epno_network - enhanced pno network block |
| 4394 | * @ssid: ssid |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4395 | * @flags: WIFI_PNO_FLAG_XXX |
| 4396 | * @auth_bit_field: auth bit field for matching WPA IE |
| 4397 | */ |
| 4398 | struct wifi_epno_network { |
| 4399 | tSirMacSSid ssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4400 | uint8_t flags; |
| 4401 | uint8_t auth_bit_field; |
| 4402 | }; |
| 4403 | |
| 4404 | /** |
| 4405 | * struct wifi_epno_params - enhanced pno network params |
Mukul Sharma | e8c919f | 2016-10-02 20:35:15 +0530 | [diff] [blame] | 4406 | * @request_id: request id number |
| 4407 | * @session_id: session_id number |
| 4408 | * @min_5ghz_rssi: minimum 5GHz RSSI for a BSSID to be considered |
| 4409 | * @min_24ghz_rssi: minimum 2.4GHz RSSI for a BSSID to be considered |
| 4410 | * @initial_score_max: maximum score that a network can have before bonuses |
| 4411 | * @current_connection_bonus: only report when there is a network's score this |
| 4412 | * much higher than the current connection |
| 4413 | * @same_network_bonus: score bonus for all n/w with the same network flag |
| 4414 | * @secure_bonus: score bonus for networks that are not open |
| 4415 | * @band_5ghz_bonus: 5GHz RSSI score bonus (applied to all 5GHz networks) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4416 | * @num_networks: number of ssids |
Mukul Sharma | e8c919f | 2016-10-02 20:35:15 +0530 | [diff] [blame] | 4417 | * @networks: EPNO networks |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4418 | */ |
| 4419 | struct wifi_epno_params { |
| 4420 | uint32_t request_id; |
| 4421 | uint32_t session_id; |
Mukul Sharma | e8c919f | 2016-10-02 20:35:15 +0530 | [diff] [blame] | 4422 | uint32_t min_5ghz_rssi; |
| 4423 | uint32_t min_24ghz_rssi; |
| 4424 | uint32_t initial_score_max; |
| 4425 | uint32_t current_connection_bonus; |
| 4426 | uint32_t same_network_bonus; |
| 4427 | uint32_t secure_bonus; |
| 4428 | uint32_t band_5ghz_bonus; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4429 | uint32_t num_networks; |
| 4430 | struct wifi_epno_network networks[]; |
| 4431 | }; |
| 4432 | |
Jeff Johnson | 96f93a3 | 2016-11-18 11:02:24 -0800 | [diff] [blame] | 4433 | #define SIR_PASSPOINT_LIST_MAX_NETWORKS 8 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4434 | #define SIR_PASSPOINT_REALM_LEN 256 |
| 4435 | #define SIR_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16 |
| 4436 | #define SIR_PASSPOINT_PLMN_LEN 3 |
| 4437 | /** |
| 4438 | * struct wifi_passpoint_network - passpoint network block |
| 4439 | * @id: identifier of this network block |
| 4440 | * @realm: null terminated UTF8 encoded realm, 0 if unspecified |
| 4441 | * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified |
| 4442 | * @plmn: mcc/mnc combination as per rules, 0s if unspecified |
| 4443 | */ |
| 4444 | struct wifi_passpoint_network { |
| 4445 | uint32_t id; |
| 4446 | uint8_t realm[SIR_PASSPOINT_REALM_LEN]; |
| 4447 | int64_t roaming_consortium_ids[SIR_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM]; |
| 4448 | uint8_t plmn[SIR_PASSPOINT_PLMN_LEN]; |
| 4449 | }; |
| 4450 | |
| 4451 | /** |
| 4452 | * struct wifi_passpoint_req - passpoint request |
| 4453 | * @request_id: request identifier |
| 4454 | * @num_networks: number of networks |
| 4455 | * @networks: passpoint networks |
| 4456 | */ |
| 4457 | struct wifi_passpoint_req { |
| 4458 | uint32_t request_id; |
| 4459 | uint32_t session_id; |
| 4460 | uint32_t num_networks; |
| 4461 | struct wifi_passpoint_network networks[]; |
| 4462 | }; |
| 4463 | |
| 4464 | /** |
| 4465 | * struct wifi_passpoint_match - wifi passpoint network match |
| 4466 | * @id: network block identifier for the matched network |
| 4467 | * @anqp_len: length of ANQP blob |
| 4468 | * @ap: scan result, with channel and beacon information |
| 4469 | * @anqp: ANQP data, in the information_element format |
| 4470 | */ |
| 4471 | struct wifi_passpoint_match { |
| 4472 | uint32_t request_id; |
| 4473 | uint32_t id; |
| 4474 | uint32_t anqp_len; |
| 4475 | tSirWifiScanResult ap; |
| 4476 | uint8_t anqp[]; |
| 4477 | }; |
| 4478 | #endif /* FEATURE_WLAN_EXTSCAN */ |
| 4479 | |
| 4480 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
| 4481 | typedef struct { |
| 4482 | uint32_t timer_val; |
| 4483 | } tSirAutoShutdownCmdParams; |
| 4484 | |
| 4485 | typedef struct { |
| 4486 | uint32_t shutdown_reason; |
| 4487 | } tSirAutoShutdownEvtParams; |
| 4488 | #endif |
| 4489 | |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 4490 | #ifdef WLAN_POWER_DEBUGFS |
| 4491 | /** |
| 4492 | * struct power_stats_response - Power stats response |
| 4493 | * @cumulative_sleep_time_ms: cumulative sleep time in ms |
| 4494 | * @cumulative_total_on_time_ms: total awake time in ms |
| 4495 | * @deep_sleep_enter_counter: deep sleep enter counter |
| 4496 | * @last_deep_sleep_enter_tstamp_ms: last deep sleep enter timestamp |
| 4497 | * @debug_register_fmt: debug registers format |
| 4498 | * @num_debug_register: number of debug registers |
| 4499 | * @debug_registers: Pointer to the debug registers buffer |
| 4500 | */ |
| 4501 | struct power_stats_response { |
| 4502 | uint32_t cumulative_sleep_time_ms; |
| 4503 | uint32_t cumulative_total_on_time_ms; |
| 4504 | uint32_t deep_sleep_enter_counter; |
| 4505 | uint32_t last_deep_sleep_enter_tstamp_ms; |
| 4506 | uint32_t debug_register_fmt; |
| 4507 | uint32_t num_debug_register; |
| 4508 | uint32_t *debug_registers; |
| 4509 | }; |
| 4510 | #endif |
| 4511 | |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 4512 | /** |
| 4513 | * struct lfr_firmware_status - LFR status in firmware |
| 4514 | * @is_disabled: Is LFR disabled in FW |
| 4515 | * @disable_lfr_event: Disable attempt done in FW |
| 4516 | */ |
| 4517 | struct lfr_firmware_status { |
| 4518 | uint32_t is_disabled; |
| 4519 | struct completion disable_lfr_event; |
| 4520 | }; |
| 4521 | |
| 4522 | /** |
| 4523 | * struct rso_cmd_status - RSO Command status |
| 4524 | * @vdev_id: Vdev ID for which RSO command sent |
| 4525 | * @status: Status of RSO command sent to FW |
| 4526 | */ |
| 4527 | struct rso_cmd_status { |
| 4528 | uint32_t vdev_id; |
| 4529 | bool status; |
| 4530 | }; |
| 4531 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4532 | typedef struct { |
| 4533 | uint8_t oui[WIFI_SCANNING_MAC_OUI_LENGTH]; |
Rajeev Kumar Sirasanagandla | 686abd9 | 2017-06-08 18:09:01 +0530 | [diff] [blame] | 4534 | uint32_t vdev_id; |
| 4535 | bool enb_probe_req_sno_randomization; |
Rajeev Kumar Sirasanagandla | aec0b08 | 2017-06-21 11:59:41 +0530 | [diff] [blame] | 4536 | struct probe_req_whitelist_attr ie_whitelist; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4537 | } tSirScanMacOui, *tpSirScanMacOui; |
| 4538 | |
| 4539 | enum { |
| 4540 | SIR_AP_RX_DATA_OFFLOAD = 0x00, |
| 4541 | SIR_STA_RX_DATA_OFFLOAD = 0x01, |
| 4542 | }; |
| 4543 | |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 4544 | /** |
Naveen Rawat | a410c5a | 2016-09-19 14:22:33 -0700 | [diff] [blame] | 4545 | * struct sir_set_vdev_ies_per_band |
| 4546 | * @msg_type: message type |
| 4547 | * @len: message length |
| 4548 | * @vdev_id: vdev id |
| 4549 | * |
| 4550 | * Message wrapper structure for eWNI_SME_SET_VDEV_IES_PER_BAND. |
| 4551 | */ |
| 4552 | struct sir_set_vdev_ies_per_band { |
| 4553 | uint16_t msg_type; |
| 4554 | uint16_t len; |
| 4555 | uint32_t vdev_id; |
| 4556 | }; |
| 4557 | |
| 4558 | /** |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 4559 | * struct sir_set_ht_vht_cfg - ht, vht IE config |
| 4560 | * @msg_type: message type |
| 4561 | * @len: message length |
| 4562 | * @pdev_id: pdev id |
| 4563 | * @nss: Nss value |
| 4564 | * @dot11mode: Dot11 mode. |
| 4565 | * |
| 4566 | * Message wrapper structure for set HT/VHT IE req. |
| 4567 | */ |
| 4568 | struct sir_set_ht_vht_cfg { |
| 4569 | uint16_t msg_type; |
| 4570 | uint16_t len; |
| 4571 | uint32_t pdev_id; |
| 4572 | uint32_t nss; |
| 4573 | uint32_t dot11mode; |
| 4574 | }; |
| 4575 | |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame^] | 4576 | #define WIFI_INVALID_PEER_ID (-1) |
| 4577 | #define WIFI_INVALID_VDEV_ID (-1) |
| 4578 | #define WIFI_MAX_AC (4) |
| 4579 | |
| 4580 | typedef struct { |
| 4581 | uint32_t paramId; |
| 4582 | uint8_t ifaceId; |
| 4583 | uint32_t rspId; |
| 4584 | uint32_t moreResultToFollow; |
| 4585 | uint32_t nr_received; |
| 4586 | union { |
| 4587 | uint32_t num_peers; |
| 4588 | uint32_t num_radio; |
| 4589 | }; |
| 4590 | |
| 4591 | uint32_t peer_event_number; |
| 4592 | /* Variable length field - Do not add anything after this */ |
| 4593 | uint8_t results[0]; |
| 4594 | } tSirLLStatsResults, *tpSirLLStatsResults; |
| 4595 | |
| 4596 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4597 | /*--------------------------------------------------------------------------- |
| 4598 | WLAN_HAL_LL_NOTIFY_STATS |
| 4599 | ---------------------------------------------------------------------------*/ |
| 4600 | |
| 4601 | /******************************LINK LAYER Statistics**********************/ |
| 4602 | |
| 4603 | typedef int tSirWifiRadio; |
| 4604 | typedef int tSirWifiChannel; |
| 4605 | typedef int tSirwifiTxRate; |
| 4606 | |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame^] | 4607 | typedef struct { |
| 4608 | uint32_t reqId; |
| 4609 | uint8_t staId; |
| 4610 | uint32_t mpduSizeThreshold; |
| 4611 | uint32_t aggressiveStatisticsGathering; |
| 4612 | } tSirLLStatsSetReq, *tpSirLLStatsSetReq; |
| 4613 | |
| 4614 | typedef struct { |
| 4615 | uint32_t reqId; |
| 4616 | uint8_t staId; |
| 4617 | uint32_t paramIdMask; |
| 4618 | } tSirLLStatsGetReq, *tpSirLLStatsGetReq; |
| 4619 | |
| 4620 | typedef struct { |
| 4621 | uint32_t reqId; |
| 4622 | uint8_t staId; |
| 4623 | uint32_t statsClearReqMask; |
| 4624 | uint8_t stopReq; |
| 4625 | } tSirLLStatsClearReq, *tpSirLLStatsClearReq; |
| 4626 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4627 | /* channel operating width */ |
| 4628 | typedef enum { |
| 4629 | WIFI_CHAN_WIDTH_20 = 0, |
| 4630 | WIFI_CHAN_WIDTH_40 = 1, |
| 4631 | WIFI_CHAN_WIDTH_80 = 2, |
| 4632 | WIFI_CHAN_WIDTH_160 = 3, |
| 4633 | WIFI_CHAN_WIDTH_80P80 = 4, |
| 4634 | WIFI_CHAN_WIDTH_5 = 5, |
| 4635 | WIFI_CHAN_WIDTH_10 = 6, |
| 4636 | } tSirWifiChannelWidth; |
| 4637 | |
| 4638 | typedef enum { |
| 4639 | WIFI_DISCONNECTED = 0, |
| 4640 | WIFI_AUTHENTICATING = 1, |
| 4641 | WIFI_ASSOCIATING = 2, |
| 4642 | WIFI_ASSOCIATED = 3, |
| 4643 | WIFI_EAPOL_STARTED = 4, /* if done by firmware/driver */ |
| 4644 | WIFI_EAPOL_COMPLETED = 5, /* if done by firmware/driver */ |
| 4645 | } tSirWifiConnectionState; |
| 4646 | |
| 4647 | typedef enum { |
| 4648 | WIFI_ROAMING_IDLE = 0, |
| 4649 | WIFI_ROAMING_ACTIVE = 1, |
| 4650 | } tSirWifiRoamState; |
| 4651 | |
| 4652 | typedef enum { |
| 4653 | WIFI_INTERFACE_STA = 0, |
| 4654 | WIFI_INTERFACE_SOFTAP = 1, |
| 4655 | WIFI_INTERFACE_IBSS = 2, |
| 4656 | WIFI_INTERFACE_P2P_CLIENT = 3, |
| 4657 | WIFI_INTERFACE_P2P_GO = 4, |
| 4658 | WIFI_INTERFACE_NAN = 5, |
| 4659 | WIFI_INTERFACE_MESH = 6, |
Deepak Dhamdhere | c9acc44 | 2016-05-26 02:12:58 -0700 | [diff] [blame] | 4660 | WIFI_INTERFACE_NDI = 7, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4661 | } tSirWifiInterfaceMode; |
| 4662 | |
| 4663 | /* set for QOS association */ |
| 4664 | #define WIFI_CAPABILITY_QOS 0x00000001 |
| 4665 | /* set for protected assoc (802.11 beacon frame control protected bit set) */ |
| 4666 | #define WIFI_CAPABILITY_PROTECTED 0x00000002 |
| 4667 | /* set if 802.11 Extended Capabilities element interworking bit is set */ |
| 4668 | #define WIFI_CAPABILITY_INTERWORKING 0x00000004 |
| 4669 | /* set for HS20 association */ |
| 4670 | #define WIFI_CAPABILITY_HS20 0x00000008 |
| 4671 | /* set is 802.11 Extended Capabilities element UTF-8 SSID bit is set */ |
| 4672 | #define WIFI_CAPABILITY_SSID_UTF8 0x00000010 |
| 4673 | /* set is 802.11 Country Element is present */ |
| 4674 | #define WIFI_CAPABILITY_COUNTRY 0x00000020 |
| 4675 | |
| 4676 | typedef struct { |
| 4677 | /* tSirWifiInterfaceMode */ |
| 4678 | /* interface mode */ |
| 4679 | uint8_t mode; |
| 4680 | /* interface mac address (self) */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 4681 | struct qdf_mac_addr macAddr; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4682 | /* tSirWifiConnectionState */ |
| 4683 | /* connection state (valid for STA, CLI only) */ |
| 4684 | uint8_t state; |
| 4685 | /* tSirWifiRoamState */ |
| 4686 | /* roaming state */ |
| 4687 | uint32_t roaming; |
| 4688 | /* WIFI_CAPABILITY_XXX (self) */ |
| 4689 | uint32_t capabilities; |
| 4690 | /* null terminated SSID */ |
| 4691 | uint8_t ssid[33]; |
| 4692 | /* bssid */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 4693 | struct qdf_mac_addr bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4694 | /* country string advertised by AP */ |
| 4695 | uint8_t apCountryStr[WNI_CFG_COUNTRY_CODE_LEN]; |
| 4696 | /* country string for this association */ |
| 4697 | uint8_t countryStr[WNI_CFG_COUNTRY_CODE_LEN]; |
| 4698 | } tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo; |
| 4699 | |
| 4700 | /* channel information */ |
| 4701 | typedef struct { |
| 4702 | /* channel width (20, 40, 80, 80+80, 160) */ |
| 4703 | tSirWifiChannelWidth width; |
| 4704 | /* primary 20 MHz channel */ |
| 4705 | tSirWifiChannel centerFreq; |
| 4706 | /* center frequency (MHz) first segment */ |
| 4707 | tSirWifiChannel centerFreq0; |
| 4708 | /* center frequency (MHz) second segment */ |
| 4709 | tSirWifiChannel centerFreq1; |
| 4710 | } tSirWifiChannelInfo, *tpSirWifiChannelInfo; |
| 4711 | |
| 4712 | /* wifi rate info */ |
| 4713 | typedef struct { |
| 4714 | /* 0: OFDM, 1:CCK, 2:HT 3:VHT 4..7 reserved */ |
| 4715 | uint32_t preamble:3; |
| 4716 | /* 0:1x1, 1:2x2, 3:3x3, 4:4x4 */ |
| 4717 | uint32_t nss:2; |
| 4718 | /* 0:20MHz, 1:40Mhz, 2:80Mhz, 3:160Mhz */ |
| 4719 | uint32_t bw:3; |
| 4720 | /* OFDM/CCK rate code would be as per ieee std in units of 0.5mbps */ |
| 4721 | /* HT/VHT it would be mcs index */ |
| 4722 | uint32_t rateMcsIdx:8; |
| 4723 | /* reserved */ |
| 4724 | uint32_t reserved:16; |
| 4725 | /* units of 100 Kbps */ |
| 4726 | uint32_t bitrate; |
| 4727 | } tSirWifiRate, *tpSirWifiRate; |
| 4728 | |
| 4729 | /* channel statistics */ |
| 4730 | typedef struct { |
| 4731 | /* channel */ |
| 4732 | tSirWifiChannelInfo channel; |
| 4733 | /* msecs the radio is awake (32 bits number accruing over time) */ |
| 4734 | uint32_t onTime; |
| 4735 | /* msecs the CCA register is busy (32 bits number accruing over time) */ |
| 4736 | uint32_t ccaBusyTime; |
| 4737 | } tSirWifiChannelStats, *tpSirWifiChannelStats; |
| 4738 | |
Srinivas Girigowda | 458f228 | 2016-10-25 11:27:52 -0700 | [diff] [blame] | 4739 | #define MAX_TPC_LEVELS 64 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4740 | /* radio statistics */ |
| 4741 | typedef struct { |
| 4742 | /* wifi radio (if multiple radio supported) */ |
| 4743 | tSirWifiRadio radio; |
| 4744 | /* msecs the radio is awake (32 bits number accruing over time) */ |
| 4745 | uint32_t onTime; |
| 4746 | /* msecs the radio is transmitting |
| 4747 | * (32 bits number accruing over time) |
| 4748 | */ |
| 4749 | uint32_t txTime; |
| 4750 | /* msecs the radio is in active receive |
| 4751 | *(32 bits number accruing over time) |
| 4752 | */ |
| 4753 | uint32_t rxTime; |
| 4754 | /* msecs the radio is awake due to all scan |
| 4755 | * (32 bits number accruing over time) |
| 4756 | */ |
| 4757 | uint32_t onTimeScan; |
| 4758 | /* msecs the radio is awake due to NAN |
| 4759 | * (32 bits number accruing over time) |
| 4760 | */ |
| 4761 | uint32_t onTimeNbd; |
| 4762 | /* msecs the radio is awake due to Gscan |
| 4763 | * (32 bits number accruing over time) |
| 4764 | */ |
| 4765 | uint32_t onTimeGscan; |
| 4766 | /* msecs the radio is awake due to roam?scan |
| 4767 | * (32 bits number accruing over time) |
| 4768 | */ |
| 4769 | uint32_t onTimeRoamScan; |
| 4770 | /* msecs the radio is awake due to PNO scan |
| 4771 | * (32 bits number accruing over time) |
| 4772 | */ |
| 4773 | uint32_t onTimePnoScan; |
| 4774 | /* msecs the radio is awake due to HS2.0 scans and GAS exchange |
| 4775 | * (32 bits number accruing over time) |
| 4776 | */ |
| 4777 | uint32_t onTimeHs20; |
Srinivas Girigowda | ad874a8 | 2016-10-25 14:08:00 -0700 | [diff] [blame] | 4778 | |
| 4779 | /* tx time (in milliseconds) per TPC level (0.5 dBm) */ |
| 4780 | uint32_t total_num_tx_power_levels; |
| 4781 | uint32_t *tx_time_per_power_level; |
| 4782 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4783 | /* number of channels */ |
| 4784 | uint32_t numChannels; |
Srinivas Girigowda | 458f228 | 2016-10-25 11:27:52 -0700 | [diff] [blame] | 4785 | |
| 4786 | /* tx time (in milliseconds) per TPC level (0.5 dBm) */ |
| 4787 | uint32_t tx_time_per_tpc[MAX_TPC_LEVELS]; |
| 4788 | |
Krishna Kumaar Natarajan | 7bff29b | 2017-03-08 16:05:05 -0800 | [diff] [blame] | 4789 | uint32_t on_time_host_scan; |
| 4790 | uint32_t on_time_lpi_scan; |
| 4791 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4792 | /* channel statistics tSirWifiChannelStats */ |
Srinivas Girigowda | 57b450e | 2016-10-27 21:00:46 -0700 | [diff] [blame] | 4793 | tSirWifiChannelStats *channels; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4794 | } tSirWifiRadioStat, *tpSirWifiRadioStat; |
| 4795 | |
| 4796 | /* per rate statistics */ |
| 4797 | typedef struct { |
| 4798 | /* rate information */ |
| 4799 | tSirWifiRate rate; |
| 4800 | /* number of successfully transmitted data pkts (ACK rcvd) */ |
| 4801 | uint32_t txMpdu; |
| 4802 | /* number of received data pkts */ |
| 4803 | uint32_t rxMpdu; |
| 4804 | /* number of data packet losses (no ACK) */ |
| 4805 | uint32_t mpduLost; |
| 4806 | /* total number of data pkt retries * */ |
| 4807 | uint32_t retries; |
| 4808 | /* number of short data pkt retries */ |
| 4809 | uint32_t retriesShort; |
| 4810 | /* number of long data pkt retries */ |
| 4811 | uint32_t retriesLong; |
| 4812 | } tSirWifiRateStat, *tpSirWifiRateStat; |
| 4813 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4814 | /* wifi peer type */ |
| 4815 | typedef enum { |
| 4816 | WIFI_PEER_STA, |
| 4817 | WIFI_PEER_AP, |
| 4818 | WIFI_PEER_P2P_GO, |
| 4819 | WIFI_PEER_P2P_CLIENT, |
| 4820 | WIFI_PEER_NAN, |
| 4821 | WIFI_PEER_TDLS, |
| 4822 | WIFI_PEER_INVALID, |
| 4823 | } tSirWifiPeerType; |
| 4824 | |
| 4825 | /* per peer statistics */ |
| 4826 | typedef struct { |
| 4827 | /* peer type (AP, TDLS, GO etc.) */ |
Dustin Brown | 877a5a9 | 2016-11-17 13:56:52 -0800 | [diff] [blame] | 4828 | enum wmi_peer_type type; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4829 | /* mac address */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 4830 | struct qdf_mac_addr peerMacAddress; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4831 | /* peer WIFI_CAPABILITY_XXX */ |
| 4832 | uint32_t capabilities; |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 4833 | union { |
| 4834 | /* peer power saving mode */ |
| 4835 | uint32_t power_saving; |
| 4836 | /* number of rates */ |
| 4837 | uint32_t numRate; |
| 4838 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4839 | /* per rate statistics, number of entries = num_rate */ |
| 4840 | tSirWifiRateStat rateStats[0]; |
| 4841 | } tSirWifiPeerInfo, *tpSirWifiPeerInfo; |
| 4842 | |
Krishna Kumaar Natarajan | 7bff29b | 2017-03-08 16:05:05 -0800 | [diff] [blame] | 4843 | /** |
| 4844 | * struct wifi_iface_offload_stat - Wifi Iface offload statistics |
| 4845 | * @type: type of offload stats (enum wmi_offload_stats_type) |
| 4846 | * @rx_count: Number of (MSDUs) frames Received |
| 4847 | * @drp_count: Number of frames Dropped |
| 4848 | * @fwd_count: |
| 4849 | * Number of frames for which FW Responded (Valid for ARP and NS only).(or) |
| 4850 | * Number of frames forwarded to Host (Valid for stats type except ARP and NS). |
| 4851 | */ |
| 4852 | struct wifi_iface_offload_stat { |
| 4853 | wmi_offload_stats_type type; |
| 4854 | uint32_t rx_count; |
| 4855 | uint32_t drp_count; |
| 4856 | uint32_t fwd_count; |
| 4857 | }; |
| 4858 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4859 | /* per access category statistics */ |
| 4860 | typedef struct { |
| 4861 | /* tSirWifiTrafficAc */ |
| 4862 | /* access category (VI, VO, BE, BK) */ |
| 4863 | uint32_t ac; |
| 4864 | /* number of successfully transmitted unicast data pkts (ACK rcvd) */ |
| 4865 | uint32_t txMpdu; |
| 4866 | /* number of received unicast mpdus */ |
| 4867 | uint32_t rxMpdu; |
Jeff Johnson | 3370f3a | 2018-05-11 09:54:12 -0700 | [diff] [blame] | 4868 | /* number of successfully transmitted multicast data packets */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4869 | /* STA case: implies ACK received from AP for the unicast */ |
| 4870 | /* packet in which mcast pkt was sent */ |
| 4871 | uint32_t txMcast; |
| 4872 | /* number of received multicast data packets */ |
| 4873 | uint32_t rxMcast; |
| 4874 | /* number of received unicast a-mpdus */ |
| 4875 | uint32_t rxAmpdu; |
| 4876 | /* number of transmitted unicast a-mpdus */ |
| 4877 | uint32_t txAmpdu; |
| 4878 | /* number of data pkt losses (no ACK) */ |
| 4879 | uint32_t mpduLost; |
| 4880 | /* total number of data pkt retries */ |
| 4881 | uint32_t retries; |
| 4882 | /* number of short data pkt retries */ |
| 4883 | uint32_t retriesShort; |
| 4884 | /* number of long data pkt retries */ |
| 4885 | uint32_t retriesLong; |
| 4886 | /* data pkt min contention time (usecs) */ |
| 4887 | uint32_t contentionTimeMin; |
| 4888 | /* data pkt max contention time (usecs) */ |
| 4889 | uint32_t contentionTimeMax; |
| 4890 | /* data pkt avg contention time (usecs) */ |
| 4891 | uint32_t contentionTimeAvg; |
| 4892 | /* num of data pkts used for contention statistics */ |
| 4893 | uint32_t contentionNumSamples; |
| 4894 | } tSirWifiWmmAcStat, *tpSirWifiWmmAcStat; |
| 4895 | |
| 4896 | /* Interface statistics - corresponding to 2nd most |
| 4897 | * LSB in wifi statistics bitmap for getting statistics |
| 4898 | */ |
| 4899 | typedef struct { |
| 4900 | /* current state of the interface */ |
| 4901 | tSirWifiInterfaceInfo info; |
| 4902 | /* access point beacon received count from connected AP */ |
| 4903 | uint32_t beaconRx; |
| 4904 | /* access point mgmt frames received count from */ |
| 4905 | /* connected AP (including Beacon) */ |
| 4906 | uint32_t mgmtRx; |
| 4907 | /* action frames received count */ |
| 4908 | uint32_t mgmtActionRx; |
| 4909 | /* action frames transmit count */ |
| 4910 | uint32_t mgmtActionTx; |
| 4911 | /* access Point Beacon and Management frames RSSI (averaged) */ |
| 4912 | uint32_t rssiMgmt; |
| 4913 | /* access Point Data Frames RSSI (averaged) from connected AP */ |
| 4914 | uint32_t rssiData; |
| 4915 | /* access Point ACK RSSI (averaged) from connected AP */ |
| 4916 | uint32_t rssiAck; |
| 4917 | /* number of peers */ |
| 4918 | uint32_t num_peers; |
| 4919 | /* |
| 4920 | * Indicates how many peer_stats events will be sent depending on the |
| 4921 | * num_peers. |
| 4922 | */ |
| 4923 | uint32_t num_peer_events; |
| 4924 | /* number of ac */ |
| 4925 | uint32_t num_ac; |
| 4926 | /* Roaming Stat */ |
| 4927 | uint32_t roam_state; |
| 4928 | /* |
| 4929 | * Average Beacon spread offset is the averaged time delay between TBTT |
| 4930 | * and beacon TSF. Upper 32 bits of averaged 64 bit beacon spread offset |
| 4931 | */ |
| 4932 | uint32_t avg_bcn_spread_offset_high; |
| 4933 | /* Lower 32 bits of averaged 64 bit beacon spread offset */ |
| 4934 | uint32_t avg_bcn_spread_offset_low; |
| 4935 | /* |
| 4936 | * Takes value of 1 if AP leaks packets after sending an ACK for PM=1 |
| 4937 | * otherwise 0 |
| 4938 | */ |
| 4939 | uint32_t is_leaky_ap; |
| 4940 | /* |
| 4941 | * Average number of frames received from AP after receiving the ACK |
| 4942 | * for a frame with PM = 1 |
| 4943 | */ |
| 4944 | uint32_t avg_rx_frms_leaked; |
| 4945 | /* |
| 4946 | * Rx leak watch window currently in force to minimize data loss |
| 4947 | * because of leaky AP. Rx leak window is the |
| 4948 | * time driver waits before shutting down the radio or switching |
| 4949 | * the channel and after receiving an ACK for |
| 4950 | * a data frame with PM bit set. |
| 4951 | */ |
| 4952 | uint32_t rx_leak_window; |
gaolez | b432ed9 | 2017-03-16 18:40:04 +0800 | [diff] [blame] | 4953 | uint32_t rts_succ_cnt; |
| 4954 | uint32_t rts_fail_cnt; |
| 4955 | uint32_t ppdu_succ_cnt; |
| 4956 | uint32_t ppdu_fail_cnt; |
Krishna Kumaar Natarajan | 7bff29b | 2017-03-08 16:05:05 -0800 | [diff] [blame] | 4957 | |
| 4958 | uint32_t tx_rts_succ_cnt; |
| 4959 | uint32_t tx_rts_fail_cnt; |
| 4960 | uint32_t tx_ppdu_succ_cnt; |
| 4961 | uint32_t tx_ppdu_fail_cnt; |
| 4962 | uint32_t connected_duration; |
| 4963 | uint32_t disconnected_duration; |
| 4964 | uint32_t rtt_ranging_duration; |
| 4965 | uint32_t rtt_responder_duration; |
| 4966 | uint32_t num_probes_tx; |
| 4967 | uint32_t num_beacon_miss; |
| 4968 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4969 | /* per ac data packet statistics */ |
| 4970 | tSirWifiWmmAcStat AccessclassStats[WIFI_AC_MAX]; |
Krishna Kumaar Natarajan | 7bff29b | 2017-03-08 16:05:05 -0800 | [diff] [blame] | 4971 | |
| 4972 | uint32_t num_offload_stats; |
| 4973 | struct wifi_iface_offload_stat offload_stat[WMI_OFFLOAD_STATS_TYPE_MAX]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4974 | } tSirWifiIfaceStat, *tpSirWifiIfaceStat; |
| 4975 | |
| 4976 | /* Peer statistics - corresponding to 3rd most LSB in |
| 4977 | * wifi statistics bitmap for getting statistics |
| 4978 | */ |
| 4979 | typedef struct { |
| 4980 | /* number of peers */ |
| 4981 | uint32_t numPeers; |
| 4982 | /* per peer statistics */ |
| 4983 | tSirWifiPeerInfo peerInfo[0]; |
| 4984 | } tSirWifiPeerStat, *tpSirWifiPeerStat; |
| 4985 | |
| 4986 | /* wifi statistics bitmap for getting statistics */ |
| 4987 | #define WMI_LINK_STATS_RADIO 0x00000001 |
| 4988 | #define WMI_LINK_STATS_IFACE 0x00000002 |
| 4989 | #define WMI_LINK_STATS_ALL_PEER 0x00000004 |
| 4990 | #define WMI_LINK_STATS_PER_PEER 0x00000008 |
| 4991 | |
| 4992 | /* wifi statistics bitmap for clearing statistics */ |
| 4993 | /* all radio statistics */ |
| 4994 | #define WIFI_STATS_RADIO 0x00000001 |
| 4995 | /* cca_busy_time (within radio statistics) */ |
| 4996 | #define WIFI_STATS_RADIO_CCA 0x00000002 |
| 4997 | /* all channel statistics (within radio statistics) */ |
| 4998 | #define WIFI_STATS_RADIO_CHANNELS 0x00000004 |
| 4999 | /* all scan statistics (within radio statistics) */ |
| 5000 | #define WIFI_STATS_RADIO_SCAN 0x00000008 |
| 5001 | /* all interface statistics */ |
| 5002 | #define WIFI_STATS_IFACE 0x00000010 |
| 5003 | /* all tx rate statistics (within interface statistics) */ |
| 5004 | #define WIFI_STATS_IFACE_TXRATE 0x00000020 |
| 5005 | /* all ac statistics (within interface statistics) */ |
| 5006 | #define WIFI_STATS_IFACE_AC 0x00000040 |
| 5007 | /* all contention (min, max, avg) statistics (within ac statistics) */ |
| 5008 | #define WIFI_STATS_IFACE_CONTENTION 0x00000080 |
Mukul Sharma | 491021c | 2016-09-29 21:39:19 +0530 | [diff] [blame] | 5009 | /* All peer stats on this interface */ |
| 5010 | #define WIFI_STATS_IFACE_ALL_PEER 0x00000100 |
| 5011 | /* Clear particular peer stats depending on the peer_mac */ |
| 5012 | #define WIFI_STATS_IFACE_PER_PEER 0x00000200 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5013 | |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 5014 | /** |
| 5015 | * struct sir_wifi_iface_tx_fail - TX failure event |
| 5016 | * @tid: TX TID |
| 5017 | * @msdu_num: TX MSDU failed counter |
| 5018 | * @status: TX status from HTT message. |
| 5019 | * Only failure status will be involved. |
| 5020 | */ |
| 5021 | struct sir_wifi_iface_tx_fail { |
| 5022 | uint8_t tid; |
| 5023 | uint16_t msdu_num; |
| 5024 | enum htt_tx_status status; |
| 5025 | }; |
| 5026 | |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 5027 | /** |
| 5028 | * struct sir_wifi_chan_cca_stats - channal CCA stats |
| 5029 | * @vdev_id: vdev ID |
| 5030 | * @idle_time: percentage of idle time, no TX, no RX, no interference |
| 5031 | * @tx_time: percentage of time transmitting packets |
| 5032 | * @rx_in_bss_time: percentage of time receiving packets in current BSS |
| 5033 | * @rx_out_bss_time: percentage of time receiving packets not in current BSS |
| 5034 | * @rx_busy_time: percentage of time interference detected |
| 5035 | * @rx_in_bad_cond_time: percentage of time receiving packets with errors |
| 5036 | * or packets flagged as retransmission or seqnum discontinued. |
| 5037 | * @tx_in_bad_cond_time: percentage of time the device transmitted packets |
| 5038 | * that haven't been ACKed. |
| 5039 | * @wlan_not_avail_time: percentage of time the chip is unable to |
| 5040 | * work in normal conditions. |
| 5041 | */ |
| 5042 | struct sir_wifi_chan_cca_stats { |
| 5043 | uint32_t vdev_id; |
| 5044 | uint32_t idle_time; |
| 5045 | uint32_t tx_time; |
| 5046 | uint32_t rx_in_bss_time; |
| 5047 | uint32_t rx_out_bss_time; |
| 5048 | uint32_t rx_busy_time; |
| 5049 | uint32_t rx_in_bad_cond_time; |
| 5050 | uint32_t tx_in_bad_cond_time; |
| 5051 | uint32_t wlan_not_avail_time; |
| 5052 | }; |
| 5053 | |
| 5054 | #define WIFI_MAX_CHAINS 8 |
| 5055 | |
| 5056 | /** |
| 5057 | * struct sir_wifi_peer_signal_stats - peer signal stats |
| 5058 | * @vdev_id: vdev ID |
| 5059 | * @peer_id: peer ID |
| 5060 | * @per_ant_snr: per antenna SNR |
| 5061 | * @nf: peer background noise |
Zhang Qian | 303ebe9 | 2017-05-18 13:59:07 +0800 | [diff] [blame] | 5062 | * @per_ant_rx_mpdus: MPDUs received per antenna |
| 5063 | * @per_ant_tx_mpdus: MPDUs transferred per antenna |
| 5064 | * @num_chain: valid chain count |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 5065 | */ |
| 5066 | struct sir_wifi_peer_signal_stats { |
| 5067 | uint32_t vdev_id; |
| 5068 | uint32_t peer_id; |
| 5069 | |
| 5070 | /* per antenna SNR in current bss */ |
| 5071 | int32_t per_ant_snr[WIFI_MAX_CHAINS]; |
| 5072 | |
| 5073 | /* Background noise */ |
| 5074 | int32_t nf[WIFI_MAX_CHAINS]; |
Zhang Qian | 303ebe9 | 2017-05-18 13:59:07 +0800 | [diff] [blame] | 5075 | |
| 5076 | int32_t per_ant_rx_mpdus[WIFI_MAX_CHAINS]; |
| 5077 | int32_t per_ant_tx_mpdus[WIFI_MAX_CHAINS]; |
| 5078 | int32_t num_chain; |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 5079 | }; |
| 5080 | |
| 5081 | #define WIFI_VDEV_NUM 4 |
| 5082 | #define WFIF_MCS_NUM 10 |
| 5083 | #define WIFI_AGGR_NUM 8 |
| 5084 | #define WIFI_DELAY_SIZE 11 |
| 5085 | |
| 5086 | /** |
| 5087 | * struct sir_wifi_tx - per AC tx stats |
| 5088 | * @msdus: number of totoal MSDUs on MAC layer in the period |
| 5089 | * @mpdus: number of totoal MPDUs on MAC layer in the period |
| 5090 | * @ppdus: number of totoal PPDUs on PHY layer in the period |
| 5091 | * @bytes: bytes of tx data on MAC layer in the period |
| 5092 | * @drops: number of TX packets cancelled due to any reason in the period, |
| 5093 | * such as WMM limitation/bandwidth limitation/radio congestion |
| 5094 | * @drop_bytes: bytes of dropped TX packets in the period |
| 5095 | * @retries: number of unacked transmissions of MPDUs |
| 5096 | * @failed: number of packets have not been ACKed despite retried |
| 5097 | * @aggr_len: length of the MPDU aggregation size buffer |
| 5098 | * @mpdu_aggr_size: histogram of MPDU aggregation size |
| 5099 | * @success_mcs_len: length of success mcs buffer |
| 5100 | * @success_mcs: histogram of successed received MPDUs encoding rate |
| 5101 | * @fail_mcs_len: length of failed mcs buffer |
| 5102 | * @fail_mcs: histogram of failed received MPDUs encoding rate |
| 5103 | * @delay_len: length of the delay histofram buffer |
| 5104 | * @delay: histogram of delays on MAC layer |
| 5105 | */ |
| 5106 | struct sir_wifi_tx { |
| 5107 | uint32_t msdus; |
| 5108 | uint32_t mpdus; |
| 5109 | uint32_t ppdus; |
| 5110 | uint32_t bytes; |
| 5111 | uint32_t drops; |
| 5112 | uint32_t drop_bytes; |
| 5113 | uint32_t retries; |
| 5114 | uint32_t failed; |
| 5115 | uint32_t aggr_len; |
| 5116 | uint32_t *mpdu_aggr_size; |
| 5117 | uint32_t success_mcs_len; |
| 5118 | uint32_t *success_mcs; |
| 5119 | uint32_t fail_mcs_len; |
| 5120 | uint32_t *fail_mcs; |
| 5121 | uint32_t delay_len; |
| 5122 | uint32_t *delay; |
| 5123 | }; |
| 5124 | |
| 5125 | /** |
| 5126 | * struct sir_wifi_rx - per AC rx stats |
| 5127 | * @mpdus: number of RX packets on MAC layer |
| 5128 | * @bytes: bytes of RX packets on MAC layer |
| 5129 | * @ppdus: number of RX packets on PHY layer |
| 5130 | * @ppdu_bytes: bytes of RX packets on PHY layer |
| 5131 | * @mpdu_lost: number of discontinuity in seqnum |
| 5132 | * @mpdu_retry: number of RX packets flagged as retransmissions |
| 5133 | * @mpdu_dup: number of RX packets identified as duplicates |
| 5134 | * @mpdu_discard: number of RX packets discarded |
| 5135 | * @aggr_len: length of MPDU aggregation histogram buffer |
| 5136 | * @mpdu_aggr: histogram of MPDU aggregation size |
| 5137 | * @mcs_len: length of mcs histogram buffer |
| 5138 | * @mcs: histogram of encoding rate. |
| 5139 | */ |
| 5140 | struct sir_wifi_rx { |
| 5141 | uint32_t mpdus; |
| 5142 | uint32_t bytes; |
| 5143 | uint32_t ppdus; |
| 5144 | uint32_t ppdu_bytes; |
| 5145 | uint32_t mpdu_lost; |
| 5146 | uint32_t mpdu_retry; |
| 5147 | uint32_t mpdu_dup; |
| 5148 | uint32_t mpdu_discard; |
| 5149 | uint32_t aggr_len; |
| 5150 | uint32_t *mpdu_aggr; |
| 5151 | uint32_t mcs_len; |
| 5152 | uint32_t *mcs; |
| 5153 | }; |
| 5154 | |
| 5155 | /** |
| 5156 | * struct sir_wifi_ll_ext_wmm_ac_stats - stats for WMM AC |
| 5157 | * @type: WMM AC type |
| 5158 | * @tx_stats: pointer to TX stats |
| 5159 | * @rx_stats: pointer to RX stats |
| 5160 | */ |
| 5161 | struct sir_wifi_ll_ext_wmm_ac_stats { |
| 5162 | uint32_t type; |
| 5163 | struct sir_wifi_tx *tx_stats; |
| 5164 | struct sir_wifi_rx *rx_stats; |
| 5165 | }; |
| 5166 | |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 5167 | /** |
| 5168 | * struct sir_wifi_ll_ext_peer_stats - per peer stats |
| 5169 | * @peer_id: peer ID |
| 5170 | * @vdev_id: VDEV ID |
| 5171 | * mac_address: MAC address |
| 5172 | * @sta_ps_inds: how many times STAs go to sleep |
| 5173 | * @sta_ps_durs: total sleep time of STAs (units in ms) |
| 5174 | * @rx_probe_reqs: number of probe requests received |
| 5175 | * @rx_oth_mgmts: number of other management frames received, |
| 5176 | * not including probe requests |
| 5177 | * @peer_signal_stat: signal stats |
| 5178 | * @ac_stats: WMM BE/BK/VI/VO stats |
| 5179 | */ |
| 5180 | struct sir_wifi_ll_ext_peer_stats { |
| 5181 | uint32_t peer_id; |
| 5182 | uint32_t vdev_id; |
| 5183 | tSirMacAddr mac_address; |
| 5184 | uint32_t sta_ps_inds; |
| 5185 | uint32_t sta_ps_durs; |
| 5186 | uint32_t rx_probe_reqs; |
| 5187 | uint32_t rx_oth_mgmts; |
| 5188 | struct sir_wifi_peer_signal_stats peer_signal_stats; |
| 5189 | struct sir_wifi_ll_ext_wmm_ac_stats ac_stats[WIFI_MAX_AC]; |
| 5190 | }; |
| 5191 | |
| 5192 | /** |
| 5193 | * struct sir_wifi_ll_ext_stats - link layer stats report |
| 5194 | * @trigger_cond_id: Indicate what triggered this event. |
| 5195 | * 1: timeout. 2: threshold |
| 5196 | * @cca_chgd_bitmap: Bitmap to indicate changed channel CCA stats |
| 5197 | * which exceeded the thresholds |
| 5198 | * @sig_chgd_bitmap: Bitmap to indicate changed peer signal stats |
| 5199 | * which exceeded the thresholds |
| 5200 | * @tx_chgd_bitmap: Bitmap to indicate changed TX counters |
| 5201 | * which exceeded the thresholds |
| 5202 | * @rx_chgd_bitmap: Bitmap to indicate changed RX counters |
| 5203 | * which exceeded the thresholds |
| 5204 | * @chan_cca_stats: channel CCA stats |
| 5205 | * @peer_signal_stats: peer signal stats |
| 5206 | * @tx_mpdu_aggr_array_len: length of TX MPDU aggregation buffer |
| 5207 | * @tx_succ_mcs_array_len: length of mcs buffer for ACKed MPDUs |
| 5208 | * @tx_fail_mcs_array_len: length of mcs buffer for no-ACKed MPDUs |
| 5209 | * @tx_delay_array_len: length of delay stats buffer |
| 5210 | * @rx_mpdu_aggr_array_len: length of RX MPDU aggregation buffer |
| 5211 | * @rx_mcs_array_len: length of RX mcs stats buffer |
| 5212 | * @peer_stats: peer stats |
| 5213 | * @cca: physical channel CCA stats |
| 5214 | * @stats: pointer to stats data buffer. |
| 5215 | * |
| 5216 | * Structure of the whole statictics is like this: |
| 5217 | * --------------------------------- |
| 5218 | * | trigger_cond_i | |
| 5219 | * +-------------------------------+ |
| 5220 | * | cca_chgd_bitmap | |
| 5221 | * +-------------------------------+ |
| 5222 | * | sig_chgd_bitmap | |
| 5223 | * +-------------------------------+ |
| 5224 | * | tx_chgd_bitmap | |
| 5225 | * +-------------------------------+ |
| 5226 | * | rx_chgd_bitmap | |
| 5227 | * +-------------------------------+ |
| 5228 | * | peer_num | |
| 5229 | * +-------------------------------+ |
| 5230 | * | channel_num | |
| 5231 | * +-------------------------------+ |
| 5232 | * | tx_mpdu_aggr_array_len | |
| 5233 | * +-------------------------------+ |
| 5234 | * | tx_succ_mcs_array_len | |
| 5235 | * +-------------------------------+ |
| 5236 | * | tx_fail_mcs_array_len | |
| 5237 | * +-------------------------------+ |
| 5238 | * | tx_delay_array_len | |
| 5239 | * +-------------------------------+ |
| 5240 | * | rx_mpdu_aggr_array_len | |
| 5241 | * +-------------------------------+ |
| 5242 | * | rx_mcs_array_len | |
| 5243 | * +-------------------------------+ |
| 5244 | * | pointer to CCA stats | |
| 5245 | * +-------------------------------+ |
| 5246 | * | pointer to peer stats | |
| 5247 | * +-------------------------------+ |
| 5248 | * | CCA stats | |
| 5249 | * +-------------------------------+ |
| 5250 | * | peer_stats |----+ |
| 5251 | * +-------------------------------+ | |
| 5252 | * | per peer signals stats |<---+ |
| 5253 | * | peer0 ~ peern | | |
| 5254 | * +-------------------------------+ | |
| 5255 | * | TX aggr/mcs parameters array | | |
| 5256 | * | Length of this buffer is | | |
| 5257 | * | configurable for user layer. |<-+ | |
| 5258 | * +-------------------------------+ | | |
| 5259 | * | per peer tx stats |--+ | |
| 5260 | * | BE | <--+ |
| 5261 | * | BK | | |
| 5262 | * | VI | | |
| 5263 | * | VO | | |
| 5264 | * +-------------------------------+ | |
| 5265 | * | TX aggr/mcs parameters array | | |
| 5266 | * | Length of this buffer is | | |
| 5267 | * | configurable for user layer. |<-+ | |
| 5268 | * +-------------------------------+ | | |
| 5269 | * | peer peer rx stats |--+ | |
| 5270 | * | BE | <--+ |
| 5271 | * | BE | |
| 5272 | * | BK | |
| 5273 | * | VI | |
| 5274 | * | VO | |
| 5275 | * --------------------------------- |
| 5276 | */ |
| 5277 | struct sir_wifi_ll_ext_stats { |
| 5278 | uint32_t trigger_cond_id; |
| 5279 | uint32_t cca_chgd_bitmap; |
| 5280 | uint32_t sig_chgd_bitmap; |
| 5281 | uint32_t tx_chgd_bitmap; |
| 5282 | uint32_t rx_chgd_bitmap; |
| 5283 | uint8_t peer_num; |
| 5284 | uint8_t channel_num; |
| 5285 | uint32_t tx_mpdu_aggr_array_len; |
| 5286 | uint32_t tx_succ_mcs_array_len; |
| 5287 | uint32_t tx_fail_mcs_array_len; |
| 5288 | uint32_t tx_delay_array_len; |
| 5289 | uint32_t rx_mpdu_aggr_array_len; |
| 5290 | uint32_t rx_mcs_array_len; |
| 5291 | struct sir_wifi_ll_ext_peer_stats *peer_stats; |
| 5292 | struct sir_wifi_chan_cca_stats *cca; |
| 5293 | uint8_t stats[]; |
| 5294 | }; |
| 5295 | |
| 5296 | /** |
| 5297 | * struct sir_channel_cca_threshold - threshold for channel CCA |
| 5298 | * @idle_time: idle time, no TX, no RX, no interference |
| 5299 | * @tx_time: time transmitting packets |
| 5300 | * @rx_in_bss_time: time receiving packets in current BSSs |
| 5301 | * @rx_out_bss_time: time receiving packets not in current BSSs |
| 5302 | * @rx_busy_time: time interference detected |
| 5303 | * @rx_in_bad_cond_time: receiving packets with errors |
| 5304 | * @tx_in_bad_cond_time: time transmitted packets not been ACKed |
| 5305 | * @wlan_not_avail_time: wlan card cannot work |
| 5306 | */ |
| 5307 | struct sir_channel_cca_threshold { |
| 5308 | uint32_t idle_time; |
| 5309 | uint32_t tx_time; |
| 5310 | uint32_t rx_in_bss_time; |
| 5311 | uint32_t rx_out_bss_time; |
| 5312 | uint32_t rx_busy_time; |
| 5313 | uint32_t rx_in_bad_cond_time; |
| 5314 | uint32_t tx_in_bad_cond_time; |
| 5315 | uint32_t wlan_not_avail_time; |
| 5316 | }; |
| 5317 | |
| 5318 | /** |
| 5319 | * struct sir_signal_threshold - threshold for per peer sigbal |
| 5320 | * @snr: signal to noise rate |
| 5321 | * @nf: noise floor |
| 5322 | */ |
| 5323 | struct sir_signal_threshold { |
| 5324 | uint32_t snr; |
| 5325 | uint32_t nf; |
| 5326 | }; |
| 5327 | |
| 5328 | /** |
| 5329 | * struct sir_tx_threshold - threshold for TX |
| 5330 | * @msdu: TX MSDUs on MAC layer |
| 5331 | * @mpdu: TX MPDUs on MAC layer |
| 5332 | * @ppdu: TX PPDUs on MAC layer |
| 5333 | * @bytes: TX bytes on MAC layer |
| 5334 | * @msdu_drop: drooped MSDUs |
| 5335 | * @byte_drop: dropped Bytes |
| 5336 | * @mpdu_retry: MPDU not acked |
| 5337 | * @ppdu_fail: PPDUs which received no block ack |
| 5338 | * @aggregation: aggregation size |
| 5339 | * @succ_mcs: histogram of encoding rate for acked PPDUs |
| 5340 | * @fail_mcs: histogram of encoding rate for no-acked PPDUs |
| 5341 | */ |
| 5342 | struct sir_tx_threshold { |
| 5343 | uint32_t msdu; |
| 5344 | uint32_t mpdu; |
| 5345 | uint32_t ppdu; |
| 5346 | uint32_t bytes; |
| 5347 | uint32_t msdu_drop; |
| 5348 | uint32_t byte_drop; |
| 5349 | uint32_t mpdu_retry; |
| 5350 | uint32_t mpdu_fail; |
| 5351 | uint32_t ppdu_fail; |
| 5352 | uint32_t aggregation; |
| 5353 | uint32_t succ_mcs; |
| 5354 | uint32_t fail_mcs; |
| 5355 | uint32_t delay; |
| 5356 | }; |
| 5357 | |
| 5358 | /** |
| 5359 | * struct sir_rx_threshold - threshold for RX |
| 5360 | * @mpdu: RX MPDUs on MAC layer |
| 5361 | * @bytes: RX bytes on MAC layer |
| 5362 | * @ppdu: RX PPDU on PHY layer |
| 5363 | * @ppdu_bytes: RX bytes on PHY layer |
| 5364 | * @disorder: discontinuity in seqnum |
| 5365 | * @mpdu_retry: MPDUs flagged as retry |
| 5366 | * @mpdu_dup: MPDUs identified as duplicated |
| 5367 | * @aggregation: aggregation size |
| 5368 | * @mcs: histogram of encoding rate for PPDUs |
| 5369 | * @ps_inds: power save indication |
| 5370 | * @ps_durs: total time in power save |
| 5371 | * @probe_reqs: probe request received |
| 5372 | * @other_mgmt: other MGMT frames received |
| 5373 | */ |
| 5374 | struct sir_rx_threshold { |
| 5375 | uint32_t mpdu; |
| 5376 | uint32_t bytes; |
| 5377 | uint32_t ppdu; |
| 5378 | uint32_t ppdu_bytes; |
| 5379 | uint32_t disorder; |
| 5380 | uint32_t mpdu_lost; |
| 5381 | uint32_t mpdu_retry; |
| 5382 | uint32_t mpdu_dup; |
| 5383 | uint32_t mpdu_discard; |
| 5384 | uint32_t aggregation; |
| 5385 | uint32_t mcs; |
| 5386 | uint32_t ps_inds; |
| 5387 | uint32_t ps_durs; |
| 5388 | uint32_t probe_reqs; |
| 5389 | uint32_t other_mgmt; |
| 5390 | }; |
| 5391 | |
| 5392 | /** |
| 5393 | * struct sir_wifi_ll_ext_stats_threshold - Threshold for stats update |
| 5394 | * @period: MAC counter indication period (unit in ms) |
| 5395 | * @enable: if threshold mechnism is enabled or disabled |
| 5396 | * @enable_bitmap: whether dedicated threshold is enabed. |
| 5397 | * Every MAC counter has a dedicated threshold. If the dedicated |
| 5398 | * threshold is not set in the bitmap, global threshold will take |
| 5399 | * effect. |
| 5400 | * @global: whether clobal threshold is enabled. |
Jeff Johnson | f2cf659 | 2018-05-06 16:27:44 -0700 | [diff] [blame] | 5401 | * When both global and dedicated threshold are disabled, MAC counter |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 5402 | * will indicate stats periodically. |
| 5403 | * @global_threshold: global threshold value |
| 5404 | * @cca_bitmap: bitmap for CCA. |
| 5405 | * Bit0: idle time |
| 5406 | * Bit1: tx time |
| 5407 | * Bit2: RX in BSS |
| 5408 | * Bit3: RX out of BSS |
| 5409 | * Bit4: medium busy |
| 5410 | * Bit5: RX bad |
| 5411 | * Bit6: TX bad |
| 5412 | * Bit7: WLAN card not available |
| 5413 | * @signal_bitmap: |
| 5414 | * Bit0: Per channel SNR counter |
| 5415 | * Bit1: Per channel noise floor counter |
| 5416 | * @tx_bitmap: bitmap for TX counters |
| 5417 | * Bit0: TX counter unit in MSDU |
| 5418 | * Bit1: TX counter unit in MPDU |
| 5419 | * Bit2: TX counter unit in PPDU |
| 5420 | * Bit3: TX counter unit in byte |
| 5421 | * Bit4: Dropped MSDUs |
| 5422 | * Bit5: Dropped Bytes |
| 5423 | * Bit6: MPDU retry counter |
| 5424 | * Bit7: MPDU failure counter |
| 5425 | * Bit8: PPDU failure counter |
| 5426 | * Bit9: MPDU aggregation counter |
| 5427 | * Bit10: MCS counter for ACKed MPDUs |
| 5428 | * Bit11: MCS counter for Failed MPDUs |
| 5429 | * Bit12: TX Delay counter |
| 5430 | * @rx_bitmap:bitmap for RX counters |
| 5431 | * Bit0: MAC RX counter unit in MPDU |
| 5432 | * Bit1: MAC RX counter unit in byte |
| 5433 | * Bit2: PHY RX counter unit in PPDU |
| 5434 | * Bit3: PHY RX counter unit in byte |
| 5435 | * Bit4: Disorder counter |
| 5436 | * Bit5: Retry counter |
| 5437 | * Bit6: Duplication counter |
| 5438 | * Bit7: Discard counter |
| 5439 | * Bit8: MPDU aggregation size counter |
| 5440 | * Bit9: MCS counter |
| 5441 | * Bit10: Peer STA power state change (wake to sleep) counter |
| 5442 | * Bit11: Peer STA power save counter, total time in PS mode |
| 5443 | * Bit12: Probe request counter |
| 5444 | * Bit13: Other management frames counter |
| 5445 | * @cca_thresh: CCA threshold |
| 5446 | * @signal_thresh: signal threshold |
| 5447 | * @tx_thresh: TX threshold |
| 5448 | * @rx_thresh: RX threshold |
| 5449 | * |
| 5450 | * Generally, Link layer statistics is reported periodically. But if the |
| 5451 | * variation of one stats of compared to the pervious notification exceeds |
| 5452 | * a threshold, FW will report the new stats immediately. |
| 5453 | * This structure contains threshold for different counters. |
| 5454 | */ |
| 5455 | struct sir_ll_ext_stats_threshold { |
| 5456 | uint32_t period; |
| 5457 | uint32_t enable; |
| 5458 | uint32_t enable_bitmap; |
| 5459 | uint32_t global; |
| 5460 | uint32_t global_threshold; |
| 5461 | uint32_t cca_bitmap; |
| 5462 | uint32_t signal_bitmap; |
| 5463 | uint32_t tx_bitmap; |
| 5464 | uint32_t rx_bitmap; |
| 5465 | struct sir_channel_cca_threshold cca; |
| 5466 | struct sir_signal_threshold signal; |
| 5467 | struct sir_tx_threshold tx; |
| 5468 | struct sir_rx_threshold rx; |
| 5469 | }; |
| 5470 | |
| 5471 | #define LL_STATS_MIN_PERIOD 10 |
| 5472 | #define LL_STATS_INVALID_PERIOD 0xFFFFFFFF |
| 5473 | |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 5474 | /* Result ID for LL stats extension */ |
| 5475 | #define WMI_LL_STATS_EXT_PS_CHG 0x00000100 |
| 5476 | #define WMI_LL_STATS_EXT_TX_FAIL 0x00000200 |
| 5477 | #define WMI_LL_STATS_EXT_MAC_COUNTER 0x00000400 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5478 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 5479 | |
| 5480 | typedef struct sAniGetLinkStatus { |
| 5481 | uint16_t msgType; /* message type is same as the request type */ |
| 5482 | uint16_t msgLen; /* length of the entire request */ |
| 5483 | uint8_t linkStatus; |
| 5484 | uint8_t sessionId; |
| 5485 | } tAniGetLinkStatus, *tpAniGetLinkStatus; |
| 5486 | |
| 5487 | #ifdef DHCP_SERVER_OFFLOAD |
| 5488 | typedef struct { |
| 5489 | uint32_t vdev_id; |
| 5490 | uint32_t dhcpSrvOffloadEnabled; |
| 5491 | uint32_t dhcpClientNum; |
| 5492 | uint32_t dhcpSrvIP; |
| 5493 | } tSirDhcpSrvOffloadInfo, *tpSirDhcpSrvOffloadInfo; |
| 5494 | #endif /* DHCP_SERVER_OFFLOAD */ |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 5495 | |
| 5496 | /** |
| 5497 | * struct sir_lost_link_info - lost link information structure. |
| 5498 | * |
| 5499 | * @vdev_id: vdev_id from WMA. some modules call sessionId. |
| 5500 | * @rssi: rssi at disconnection time. |
| 5501 | * |
| 5502 | * driver uses this structure to communicate information collected at |
| 5503 | * disconnection time. |
| 5504 | */ |
| 5505 | struct sir_lost_link_info { |
| 5506 | uint32_t vdev_id; |
| 5507 | int32_t rssi; |
| 5508 | }; |
| 5509 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5510 | /* find the size of given member within a structure */ |
| 5511 | #ifndef member_size |
| 5512 | #define member_size(type, member) (sizeof(((type *)0)->member)) |
| 5513 | #endif |
| 5514 | |
| 5515 | #define RTT_INVALID 0x00 |
| 5516 | #define RTT_TIMING_MEAS_CAPABILITY 0x01 |
| 5517 | #define RTT_FINE_TIME_MEAS_INITIATOR_CAPABILITY 0x02 |
| 5518 | #define RTT_FINE_TIME_MEAS_RESPONDER_CAPABILITY 0x03 |
| 5519 | |
| 5520 | /** |
| 5521 | * enum fine_time_meas_mask - bit mask to identify device's |
| 5522 | * fine timing measurement capability |
| 5523 | * @FINE_TIME_MEAS_STA_INITIATOR - STA role, Initiator capability is supported |
| 5524 | * @FINE_TIME_MEAS_STA_RESPONDER - STA role, Responder capability is supported |
| 5525 | * @FINE_TIME_MEAS_P2PCLI_INITIATOR - P2P-CLI supports initiator capability |
| 5526 | * @FINE_TIME_MEAS_P2PCLI_RESPONDER - P2P-CLI supports responder capability |
| 5527 | * @FINE_TIME_MEAS_P2PGO_INITIATOR - P2P-GO supports initiator capability |
| 5528 | * @FINE_TIME_MEAS_P2PGO_RESPONDER - P2P-GO supports responder capability |
| 5529 | * @FINE_TIME_MEAS_SAP_INITIATOR - SAP role, Initiator capability is supported |
| 5530 | * @FINE_TIME_MEAS_SAP_RESPONDER - SAP role, Responder capability is supported |
| 5531 | */ |
| 5532 | enum fine_time_meas_mask { |
| 5533 | FINE_TIME_MEAS_STA_INITIATOR = (1 << (0)), |
| 5534 | FINE_TIME_MEAS_STA_RESPONDER = (1 << (1)), |
| 5535 | FINE_TIME_MEAS_P2PCLI_INITIATOR = (1 << (2)), |
| 5536 | FINE_TIME_MEAS_P2PCLI_RESPONDER = (1 << (3)), |
| 5537 | FINE_TIME_MEAS_P2PGO_INITIATOR = (1 << (4)), |
| 5538 | FINE_TIME_MEAS_P2PGO_RESPONDER = (1 << (5)), |
| 5539 | FINE_TIME_MEAS_SAP_INITIATOR = (1 << (6)), |
| 5540 | FINE_TIME_MEAS_SAP_RESPONDER = (1 << (7)), |
| 5541 | }; |
| 5542 | |
| 5543 | /* number of neighbor reports that we can handle in Neighbor Report Response */ |
| 5544 | #define MAX_SUPPORTED_NEIGHBOR_RPT 15 |
| 5545 | |
| 5546 | /** |
| 5547 | * struct sir_stats_avg_factor |
| 5548 | * @vdev_id: session id |
| 5549 | * @stats_avg_factor: average factor |
| 5550 | */ |
| 5551 | struct sir_stats_avg_factor { |
| 5552 | uint8_t vdev_id; |
| 5553 | uint16_t stats_avg_factor; |
| 5554 | }; |
| 5555 | |
| 5556 | /** |
| 5557 | * struct sir_guard_time_request |
| 5558 | * @vdev_id: session id |
| 5559 | * @guard_time: guard time |
| 5560 | */ |
| 5561 | struct sir_guard_time_request { |
| 5562 | uint8_t vdev_id; |
| 5563 | uint32_t guard_time; |
| 5564 | }; |
| 5565 | |
| 5566 | /* Max number of rates allowed in Supported Rates IE */ |
| 5567 | #define MAX_NUM_SUPPORTED_RATES (8) |
| 5568 | |
| 5569 | /* |
| 5570 | * struct rssi_monitor_req - rssi monitoring |
| 5571 | * @request_id: request id |
| 5572 | * @session_id: session id |
| 5573 | * @min_rssi: minimum rssi |
| 5574 | * @max_rssi: maximum rssi |
| 5575 | * @control: flag to indicate start or stop |
| 5576 | */ |
| 5577 | struct rssi_monitor_req { |
| 5578 | uint32_t request_id; |
| 5579 | uint32_t session_id; |
| 5580 | int8_t min_rssi; |
| 5581 | int8_t max_rssi; |
| 5582 | bool control; |
| 5583 | }; |
| 5584 | |
| 5585 | /** |
| 5586 | * struct rssi_breach_event - rssi breached event structure |
| 5587 | * @request_id: request id |
| 5588 | * @session_id: session id |
| 5589 | * @curr_rssi: current rssi |
| 5590 | * @curr_bssid: current bssid |
| 5591 | */ |
| 5592 | struct rssi_breach_event { |
| 5593 | uint32_t request_id; |
| 5594 | uint32_t session_id; |
| 5595 | int8_t curr_rssi; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 5596 | struct qdf_mac_addr curr_bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5597 | }; |
| 5598 | |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 5599 | /** |
| 5600 | * struct chip_pwr_save_fail_detected_params - chip power save failure detected |
| 5601 | * event params |
| 5602 | * @failure_reason_code:failure reason code |
| 5603 | * @wake_lock_bitmap:bitmap for modules voting against sleep for long duration. |
| 5604 | */ |
| 5605 | struct chip_pwr_save_fail_detected_params { |
| 5606 | uint32_t failure_reason_code; |
| 5607 | uint32_t wake_lock_bitmap[4]; |
| 5608 | }; |
| 5609 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5610 | #define MAX_NUM_FW_SEGMENTS 4 |
| 5611 | |
| 5612 | /** |
Deepak Dhamdhere | b106ae5 | 2016-08-10 20:55:30 +0530 | [diff] [blame] | 5613 | * DEFAULT_SCAN_IE_ID - Identifier for the collection of IE's added |
| 5614 | * by default to the probe request |
| 5615 | */ |
| 5616 | #define DEFAULT_SCAN_IE_ID 256 |
| 5617 | |
| 5618 | /* MAX_DEFAULT_SCAN_IE_LEN - Maxmimum length of Default Scan IE's */ |
Selvaraj, Sridhar | 021ee0a | 2017-04-07 16:53:31 +0530 | [diff] [blame] | 5619 | #define MAX_DEFAULT_SCAN_IE_LEN 2048 |
Deepak Dhamdhere | b106ae5 | 2016-08-10 20:55:30 +0530 | [diff] [blame] | 5620 | |
| 5621 | /* Extended Capabilities IE header(IE Id + IE Length) length */ |
| 5622 | #define EXT_CAP_IE_HDR_LEN 2 |
| 5623 | |
| 5624 | /** |
| 5625 | * struct hdd_default_scan_ie - HDD default scan IE structure |
| 5626 | * @message_type: message type to be set with eWNI_SME_DEFAULT_SCAN_IE |
| 5627 | * @length: length of the struct hdd_default_scan_ie |
| 5628 | * @session_id: Session Id |
| 5629 | * @ie_len: Default scan IE length |
| 5630 | * @ie_data: Pointer to default scan IE data |
| 5631 | */ |
| 5632 | struct hdd_default_scan_ie { |
| 5633 | uint16_t message_type; |
| 5634 | uint16_t length; |
| 5635 | uint16_t session_id; |
| 5636 | uint16_t ie_len; |
| 5637 | uint8_t ie_data[MAX_DEFAULT_SCAN_IE_LEN]; |
| 5638 | }; |
| 5639 | |
| 5640 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5641 | * struct vdev_ie_info - IE info |
| 5642 | * @vdev_id - vdev for which the IE is being sent |
| 5643 | * @ie_id - ID of the IE |
| 5644 | * @length - length of the IE data |
Naveen Rawat | 03e8d95 | 2016-08-01 15:22:20 -0700 | [diff] [blame] | 5645 | * @band - indicates IE is intended for which band |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5646 | * @data - IE data |
| 5647 | * |
| 5648 | * This structure is used to store the IE information. |
| 5649 | */ |
| 5650 | struct vdev_ie_info { |
| 5651 | uint32_t vdev_id; |
| 5652 | uint32_t ie_id; |
| 5653 | uint32_t length; |
Naveen Rawat | 03e8d95 | 2016-08-01 15:22:20 -0700 | [diff] [blame] | 5654 | uint32_t band; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5655 | uint8_t *data; |
| 5656 | }; |
| 5657 | |
| 5658 | /** |
| 5659 | * struct send_extcap_ie - used to pass send_extcap_ie msg from SME to PE |
| 5660 | * @type - MSG type |
| 5661 | * @length - length of the message |
| 5662 | * @seesion_id - session_id for which the message is intended for |
| 5663 | * |
| 5664 | * This structure is used to pass send_extcap_ie msg from SME to PE |
| 5665 | */ |
| 5666 | struct send_extcap_ie { |
| 5667 | uint16_t msg_type; /* eWNI_SME_SET_IE_REQ */ |
| 5668 | uint16_t length; |
| 5669 | uint8_t session_id; |
| 5670 | }; |
| 5671 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5672 | typedef void (*hw_mode_transition_cb)(uint32_t old_hw_mode_index, |
| 5673 | uint32_t new_hw_mode_index, |
| 5674 | uint32_t num_vdev_mac_entries, |
Tushnim Bhattacharyya | eab33dd | 2017-11-15 15:20:02 -0800 | [diff] [blame] | 5675 | struct policy_mgr_vdev_mac_map *vdev_mac_map); |
Archana Ramachandran | d41c3ed | 2016-02-10 15:48:06 -0800 | [diff] [blame] | 5676 | typedef void (*antenna_mode_cb)(uint32_t status); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5677 | |
| 5678 | /** |
| 5679 | * struct sir_nss_update_request |
| 5680 | * @msgType: nss update msg type |
| 5681 | * @msgLen: length of the msg |
| 5682 | * @new_nss: new spatial stream value |
| 5683 | * @vdev_id: session id |
| 5684 | */ |
| 5685 | struct sir_nss_update_request { |
| 5686 | uint16_t msgType; |
| 5687 | uint16_t msgLen; |
| 5688 | uint8_t new_nss; |
| 5689 | uint32_t vdev_id; |
| 5690 | }; |
| 5691 | |
| 5692 | /** |
| 5693 | * struct sir_beacon_tx_complete_rsp |
| 5694 | * |
| 5695 | * @session_id: session for which beacon update happened |
| 5696 | * @tx_status: status of the beacon tx from FW |
| 5697 | */ |
| 5698 | struct sir_beacon_tx_complete_rsp { |
| 5699 | uint8_t session_id; |
| 5700 | uint8_t tx_status; |
| 5701 | }; |
| 5702 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5703 | /** |
| 5704 | * OCB structures |
| 5705 | */ |
| 5706 | |
| 5707 | #define NUM_AC (4) |
| 5708 | #define OCB_CHANNEL_MAX (5) |
| 5709 | |
| 5710 | struct sir_qos_params { |
| 5711 | uint8_t aifsn; |
| 5712 | uint8_t cwmin; |
| 5713 | uint8_t cwmax; |
| 5714 | }; |
| 5715 | |
| 5716 | /** |
| 5717 | * struct sir_ocb_set_config_response |
| 5718 | * @status: response status |
| 5719 | */ |
| 5720 | struct sir_ocb_set_config_response { |
| 5721 | uint8_t status; |
| 5722 | }; |
| 5723 | |
| 5724 | /** Callback for the dcc_stats_event */ |
| 5725 | typedef void (*dcc_stats_event_callback_t)(void *hdd_ctx, uint32_t vdev_id, |
| 5726 | uint32_t num_channels, uint32_t stats_per_channel_array_len, |
| 5727 | const void *stats_per_channel_array); |
| 5728 | |
| 5729 | /** |
| 5730 | * struct sir_ocb_config_channel |
| 5731 | * @chan_freq: frequency of the channel |
| 5732 | * @bandwidth: bandwidth of the channel, either 10 or 20 MHz |
| 5733 | * @mac_address: MAC address assigned to this channel |
| 5734 | * @qos_params: QoS parameters |
| 5735 | * @max_pwr: maximum transmit power of the channel (dBm) |
| 5736 | * @min_pwr: minimum transmit power of the channel (dBm) |
| 5737 | * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm) |
| 5738 | * @antenna_max: maximum antenna gain specified by the regulatory domain (dB) |
| 5739 | */ |
| 5740 | struct sir_ocb_config_channel { |
| 5741 | uint32_t chan_freq; |
| 5742 | uint32_t bandwidth; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 5743 | struct qdf_mac_addr mac_address; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5744 | struct sir_qos_params qos_params[MAX_NUM_AC]; |
| 5745 | uint32_t max_pwr; |
| 5746 | uint32_t min_pwr; |
| 5747 | uint8_t reg_pwr; |
| 5748 | uint8_t antenna_max; |
| 5749 | uint16_t flags; |
| 5750 | }; |
| 5751 | |
| 5752 | /** |
| 5753 | * OCB_CHANNEL_FLAG_NO_RX_HDR - Don't add the RX stats header to packets |
| 5754 | * received on this channel. |
| 5755 | */ |
| 5756 | #define OCB_CHANNEL_FLAG_DISABLE_RX_STATS_HDR (1 << 0) |
| 5757 | |
| 5758 | /** |
| 5759 | * struct sir_ocb_config_sched |
| 5760 | * @chan_freq: frequency of the channel |
| 5761 | * @total_duration: duration of the schedule |
| 5762 | * @guard_interval: guard interval on the start of the schedule |
| 5763 | */ |
| 5764 | struct sir_ocb_config_sched { |
| 5765 | uint32_t chan_freq; |
| 5766 | uint32_t total_duration; |
| 5767 | uint32_t guard_interval; |
| 5768 | }; |
| 5769 | |
| 5770 | /** |
| 5771 | * struct sir_ocb_config |
| 5772 | * @session_id: session id |
| 5773 | * @channel_count: number of channels |
| 5774 | * @schedule_size: size of the channel schedule |
| 5775 | * @flags: reserved |
| 5776 | * @channels: array of OCB channels |
| 5777 | * @schedule: array of OCB schedule elements |
| 5778 | * @dcc_ndl_chan_list_len: size of the ndl_chan array |
| 5779 | * @dcc_ndl_chan_list: array of dcc channel info |
| 5780 | * @dcc_ndl_active_state_list_len: size of the active state array |
| 5781 | * @dcc_ndl_active_state_list: array of active states |
| 5782 | * @adapter: the OCB adapter |
| 5783 | * @dcc_stats_callback: callback for the response event |
| 5784 | */ |
| 5785 | struct sir_ocb_config { |
| 5786 | uint8_t session_id; |
| 5787 | uint32_t channel_count; |
| 5788 | uint32_t schedule_size; |
| 5789 | uint32_t flags; |
| 5790 | struct sir_ocb_config_channel *channels; |
| 5791 | struct sir_ocb_config_sched *schedule; |
| 5792 | uint32_t dcc_ndl_chan_list_len; |
| 5793 | void *dcc_ndl_chan_list; |
| 5794 | uint32_t dcc_ndl_active_state_list_len; |
| 5795 | void *dcc_ndl_active_state_list; |
| 5796 | }; |
| 5797 | |
| 5798 | /* The size of the utc time in bytes. */ |
| 5799 | #define SIZE_UTC_TIME (10) |
| 5800 | /* The size of the utc time error in bytes. */ |
| 5801 | #define SIZE_UTC_TIME_ERROR (5) |
| 5802 | |
| 5803 | /** |
| 5804 | * struct sir_ocb_utc |
| 5805 | * @vdev_id: session id |
| 5806 | * @utc_time: number of nanoseconds from Jan 1st 1958 |
| 5807 | * @time_error: the error in the UTC time. All 1's for unknown |
| 5808 | */ |
| 5809 | struct sir_ocb_utc { |
| 5810 | uint32_t vdev_id; |
| 5811 | uint8_t utc_time[SIZE_UTC_TIME]; |
| 5812 | uint8_t time_error[SIZE_UTC_TIME_ERROR]; |
| 5813 | }; |
| 5814 | |
| 5815 | /** |
| 5816 | * struct sir_ocb_timing_advert |
| 5817 | * @vdev_id: session id |
| 5818 | * @chan_freq: frequency on which to advertise |
| 5819 | * @repeat_rate: the number of times it will send TA in 5 seconds |
| 5820 | * @timestamp_offset: offset of the timestamp field in the TA frame |
| 5821 | * @time_value_offset: offset of the time_value field in the TA frame |
| 5822 | * @template_length: size in bytes of the TA frame |
| 5823 | * @template_value: the TA frame |
| 5824 | */ |
| 5825 | struct sir_ocb_timing_advert { |
| 5826 | uint32_t vdev_id; |
| 5827 | uint32_t chan_freq; |
| 5828 | uint32_t repeat_rate; |
| 5829 | uint32_t timestamp_offset; |
| 5830 | uint32_t time_value_offset; |
| 5831 | uint32_t template_length; |
| 5832 | uint8_t *template_value; |
| 5833 | }; |
| 5834 | |
| 5835 | /** |
| 5836 | * struct sir_ocb_get_tsf_timer_response |
| 5837 | * @vdev_id: session id |
| 5838 | * @timer_high: higher 32-bits of the timer |
| 5839 | * @timer_low: lower 32-bits of the timer |
| 5840 | */ |
| 5841 | struct sir_ocb_get_tsf_timer_response { |
| 5842 | uint32_t vdev_id; |
| 5843 | uint32_t timer_high; |
| 5844 | uint32_t timer_low; |
| 5845 | }; |
| 5846 | |
| 5847 | /** |
| 5848 | * struct sir_ocb_get_tsf_timer |
| 5849 | * @vdev_id: session id |
| 5850 | */ |
| 5851 | struct sir_ocb_get_tsf_timer { |
| 5852 | uint32_t vdev_id; |
| 5853 | }; |
| 5854 | |
| 5855 | /** |
| 5856 | * struct sir_dcc_get_stats_response |
| 5857 | * @vdev_id: session id |
| 5858 | * @num_channels: number of dcc channels |
| 5859 | * @channel_stats_array_len: size in bytes of the stats array |
| 5860 | * @channel_stats_array: the stats array |
| 5861 | */ |
| 5862 | struct sir_dcc_get_stats_response { |
| 5863 | uint32_t vdev_id; |
| 5864 | uint32_t num_channels; |
| 5865 | uint32_t channel_stats_array_len; |
| 5866 | void *channel_stats_array; |
| 5867 | }; |
| 5868 | |
| 5869 | /** |
| 5870 | * struct sir_dcc_get_stats |
| 5871 | * @vdev_id: session id |
| 5872 | * @channel_count: number of dcc channels |
| 5873 | * @request_array_len: size in bytes of the request array |
| 5874 | * @request_array: the request array |
| 5875 | */ |
| 5876 | struct sir_dcc_get_stats { |
| 5877 | uint32_t vdev_id; |
| 5878 | uint32_t channel_count; |
| 5879 | uint32_t request_array_len; |
| 5880 | void *request_array; |
| 5881 | }; |
| 5882 | |
| 5883 | /** |
| 5884 | * struct sir_dcc_clear_stats |
| 5885 | * @vdev_id: session id |
| 5886 | * @dcc_stats_bitmap: bitmap of clear option |
| 5887 | */ |
| 5888 | struct sir_dcc_clear_stats { |
| 5889 | uint32_t vdev_id; |
| 5890 | uint32_t dcc_stats_bitmap; |
| 5891 | }; |
| 5892 | |
| 5893 | /** |
| 5894 | * struct sir_dcc_update_ndl_response |
| 5895 | * @vdev_id: session id |
| 5896 | * @status: response status |
| 5897 | */ |
| 5898 | struct sir_dcc_update_ndl_response { |
| 5899 | uint32_t vdev_id; |
| 5900 | uint32_t status; |
| 5901 | }; |
| 5902 | |
| 5903 | /** |
| 5904 | * struct sir_dcc_update_ndl |
| 5905 | * @vdev_id: session id |
| 5906 | * @channel_count: number of channels to be updated |
| 5907 | * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array |
| 5908 | * @dcc_ndl_chan_list: the ndl_chan array |
| 5909 | * @dcc_ndl_active_state_list_len: size in bytes of the active_state array |
| 5910 | * @dcc_ndl_active_state_list: the active state array |
| 5911 | */ |
| 5912 | struct sir_dcc_update_ndl { |
| 5913 | uint32_t vdev_id; |
| 5914 | uint32_t channel_count; |
| 5915 | uint32_t dcc_ndl_chan_list_len; |
| 5916 | void *dcc_ndl_chan_list; |
| 5917 | uint32_t dcc_ndl_active_state_list_len; |
| 5918 | void *dcc_ndl_active_state_list; |
| 5919 | }; |
| 5920 | |
| 5921 | /** |
| 5922 | * enum powersave_qpower_mode: QPOWER modes |
| 5923 | * @QPOWER_DISABLED: Qpower is disabled |
| 5924 | * @QPOWER_ENABLED: Qpower is enabled |
| 5925 | * @QPOWER_DUTY_CYCLING: Qpower is enabled with duty cycling |
| 5926 | */ |
| 5927 | enum powersave_qpower_mode { |
| 5928 | QPOWER_DISABLED = 0, |
| 5929 | QPOWER_ENABLED = 1, |
| 5930 | QPOWER_DUTY_CYCLING = 2 |
| 5931 | }; |
| 5932 | |
| 5933 | /** |
| 5934 | * enum powersave_qpower_mode: powersave_mode |
| 5935 | * @PS_NOT_SUPPORTED: Power save is not supported |
| 5936 | * @PS_LEGACY_NODEEPSLEEP: Legacy power save enabled and deep sleep disabled |
| 5937 | * @PS_QPOWER_NODEEPSLEEP: QPOWER enabled and deep sleep disabled |
| 5938 | * @PS_LEGACY_DEEPSLEEP: Legacy power save enabled and deep sleep enabled |
| 5939 | * @PS_QPOWER_DEEPSLEEP: QPOWER enabled and deep sleep enabled |
| 5940 | * @PS_DUTY_CYCLING_QPOWER: QPOWER enabled in duty cycling mode |
| 5941 | */ |
| 5942 | enum powersave_mode { |
| 5943 | PS_NOT_SUPPORTED = 0, |
| 5944 | PS_LEGACY_NODEEPSLEEP = 1, |
| 5945 | PS_QPOWER_NODEEPSLEEP = 2, |
| 5946 | PS_LEGACY_DEEPSLEEP = 3, |
| 5947 | PS_QPOWER_DEEPSLEEP = 4, |
| 5948 | PS_DUTY_CYCLING_QPOWER = 5 |
| 5949 | }; |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 5950 | #ifdef FEATURE_LFR_SUBNET_DETECTION |
| 5951 | /** |
| 5952 | * struct gateway_param_update_req - gateway parameter update request |
| 5953 | * @request_id: request id |
| 5954 | * @session_id: session id |
| 5955 | * @max_retries: Max ARP/NS retry attempts |
| 5956 | * @timeout: Retry interval |
| 5957 | * @ipv4_addr_type: on ipv4 network |
| 5958 | * @ipv6_addr_type: on ipv6 network |
| 5959 | * @gw_mac_addr: gateway mac addr |
| 5960 | * @ipv4_addr: ipv4 addr |
| 5961 | * @ipv6_addr: ipv6 addr |
| 5962 | */ |
| 5963 | struct gateway_param_update_req { |
| 5964 | uint32_t request_id; |
| 5965 | uint32_t session_id; |
| 5966 | uint32_t max_retries; |
| 5967 | uint32_t timeout; |
| 5968 | uint32_t ipv4_addr_type; |
| 5969 | uint32_t ipv6_addr_type; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 5970 | struct qdf_mac_addr gw_mac_addr; |
| 5971 | uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE]; |
| 5972 | uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE]; |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 5973 | }; |
| 5974 | #else |
| 5975 | struct gateway_param_update_req; |
| 5976 | #endif /* FEATURE_LFR_SUBNET_DETECTION */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5977 | |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 5978 | /** |
| 5979 | * struct sir_sme_ext_change_chan_req - channel change request |
| 5980 | * @message_type: message id |
| 5981 | * @length: msg length |
| 5982 | * @new_channel: new channel |
| 5983 | * @session_id: session id |
| 5984 | */ |
| 5985 | struct sir_sme_ext_cng_chan_req { |
| 5986 | uint16_t message_type; /* eWNI_SME_EXT_CHANGE_CHANNEL */ |
| 5987 | uint16_t length; |
| 5988 | uint32_t new_channel; |
| 5989 | uint8_t session_id; |
| 5990 | }; |
| 5991 | |
| 5992 | /** |
| 5993 | * struct sir_sme_ext_change_chan_ind. |
| 5994 | * @session_id: session id |
| 5995 | * @new_channel: new channel to change |
| 5996 | */ |
| 5997 | struct sir_sme_ext_cng_chan_ind { |
| 5998 | uint8_t session_id; |
| 5999 | uint8_t new_channel; |
| 6000 | }; |
| 6001 | |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 6002 | /** |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 6003 | * struct stsf - the basic stsf structure |
| 6004 | * |
| 6005 | * @vdev_id: vdev id |
| 6006 | * @tsf_low: low 32bits of tsf |
| 6007 | * @tsf_high: high 32bits of tsf |
Manikandan Mohan | 5356c2b | 2016-04-03 15:51:35 -0700 | [diff] [blame] | 6008 | * @soc_timer_low: low 32bits of synced SOC timer value |
| 6009 | * @soc_timer_high: high 32bits of synced SOC timer value |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 6010 | * |
| 6011 | * driver use this struct to store the tsf info |
| 6012 | */ |
| 6013 | struct stsf { |
| 6014 | uint32_t vdev_id; |
| 6015 | uint32_t tsf_low; |
| 6016 | uint32_t tsf_high; |
Manikandan Mohan | 5356c2b | 2016-04-03 15:51:35 -0700 | [diff] [blame] | 6017 | uint32_t soc_timer_low; |
| 6018 | uint32_t soc_timer_high; |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 6019 | }; |
| 6020 | |
Gupta, Kapil | 4cb1d7d | 2016-04-16 18:16:25 -0700 | [diff] [blame] | 6021 | #define SIR_BCN_FLT_MAX_ELEMS_IE_LIST 8 |
| 6022 | /** |
| 6023 | * struct beacon_filter_param - parameters for beacon filtering |
| 6024 | * @vdev_id: vdev id |
| 6025 | * @ie_map: bitwise map of IEs that needs to be filtered |
| 6026 | * |
| 6027 | */ |
| 6028 | struct beacon_filter_param { |
| 6029 | uint32_t vdev_id; |
| 6030 | uint32_t ie_map[SIR_BCN_FLT_MAX_ELEMS_IE_LIST]; |
| 6031 | }; |
| 6032 | |
Chandrasekaran, Manishekar | 5c19dc5 | 2016-02-04 14:58:26 +0530 | [diff] [blame] | 6033 | /** |
Gupta, Kapil | 96c7f2f | 2016-04-25 19:13:41 +0530 | [diff] [blame] | 6034 | * struct adaptive_dwelltime_params - the adaptive dwelltime params |
| 6035 | * @vdev_id: vdev id |
| 6036 | * @is_enabled: Adaptive dwell time is enabled/disabled |
| 6037 | * @dwelltime_mode: global default adaptive dwell mode |
| 6038 | * @lpf_weight: weight to calculate the average low pass |
| 6039 | * filter for channel congestion |
| 6040 | * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec |
| 6041 | * @wifi_act_threshold: % of wifi activity used in passive scan 0-100 |
| 6042 | * |
| 6043 | */ |
| 6044 | struct adaptive_dwelltime_params { |
| 6045 | uint32_t vdev_id; |
| 6046 | bool is_enabled; |
| 6047 | uint8_t dwelltime_mode; |
| 6048 | uint8_t lpf_weight; |
| 6049 | uint8_t passive_mon_intval; |
| 6050 | uint8_t wifi_act_threshold; |
| 6051 | }; |
| 6052 | |
| 6053 | /** |
Chandrasekaran, Manishekar | 5c19dc5 | 2016-02-04 14:58:26 +0530 | [diff] [blame] | 6054 | * struct csa_offload_params - CSA offload request parameters |
| 6055 | * @channel: channel |
| 6056 | * @switch_mode: switch mode |
| 6057 | * @sec_chan_offset: second channel offset |
| 6058 | * @new_ch_width: new channel width |
| 6059 | * @new_ch_freq_seg1: channel center freq 1 |
| 6060 | * @new_ch_freq_seg2: channel center freq 2 |
| 6061 | * @ies_present_flag: IE present flag |
| 6062 | */ |
| 6063 | struct csa_offload_params { |
| 6064 | uint8_t channel; |
| 6065 | uint8_t switch_mode; |
| 6066 | uint8_t sec_chan_offset; |
| 6067 | uint8_t new_ch_width; |
| 6068 | uint8_t new_op_class; |
| 6069 | uint8_t new_ch_freq_seg1; |
| 6070 | uint8_t new_ch_freq_seg2; |
| 6071 | uint32_t ies_present_flag; |
| 6072 | tSirMacAddr bssId; |
| 6073 | }; |
| 6074 | |
| 6075 | /** |
Sandeep Puligilla | e087566 | 2016-02-12 16:09:21 -0800 | [diff] [blame] | 6076 | * enum obss_ht40_scancmd_type - obss scan command type |
| 6077 | * @HT40_OBSS_SCAN_PARAM_START: OBSS scan start |
| 6078 | * @HT40_OBSS_SCAN_PARAM_UPDATE: OBSS scan param update |
| 6079 | */ |
| 6080 | enum obss_ht40_scancmd_type { |
| 6081 | HT40_OBSS_SCAN_PARAM_START, |
| 6082 | HT40_OBSS_SCAN_PARAM_UPDATE |
| 6083 | }; |
| 6084 | |
| 6085 | /** |
| 6086 | * struct sme_obss_ht40_scanind_msg - sme obss scan params |
| 6087 | * @msg_type: message type |
| 6088 | * @length: message length |
| 6089 | * @mac_addr: mac address |
| 6090 | */ |
| 6091 | struct sme_obss_ht40_scanind_msg { |
| 6092 | uint16_t msg_type; |
| 6093 | uint16_t length; |
| 6094 | struct qdf_mac_addr mac_addr; |
| 6095 | }; |
| 6096 | |
| 6097 | /** |
| 6098 | * struct obss_ht40_scanind - ht40 obss scan request |
| 6099 | * @cmd: message type |
| 6100 | * @scan_type: message length |
| 6101 | * @obss_passive_dwelltime: obss passive dwelltime |
| 6102 | * @obss_active_dwelltime: obss active dwelltime |
| 6103 | * @obss_width_trigger_interval: scan interval |
| 6104 | * @obss_passive_total_per_channel: total passive scan time per channel |
| 6105 | * @obss_active_total_per_channel: total active scan time per channel |
| 6106 | * @bsswidth_ch_trans_delay: OBSS transition delay time |
| 6107 | * @obss_activity_threshold: OBSS activity threshold |
| 6108 | * @self_sta_id: self sta identification |
| 6109 | * @bss_id: BSS index |
| 6110 | * @fortymhz_intolerent: Ht40mhz intolerance |
| 6111 | * @channel_count: channel count |
| 6112 | * @channels: channel information |
| 6113 | * @current_operatingclass: operating class |
| 6114 | * @iefield_len: ie's length |
| 6115 | * @iefiled: ie's information |
| 6116 | */ |
| 6117 | struct obss_ht40_scanind { |
| 6118 | enum obss_ht40_scancmd_type cmd; |
| 6119 | enum eSirScanType scan_type; |
| 6120 | /* In TUs */ |
| 6121 | uint16_t obss_passive_dwelltime; |
| 6122 | uint16_t obss_active_dwelltime; |
| 6123 | /* In seconds */ |
| 6124 | uint16_t obss_width_trigger_interval; |
| 6125 | /* In TU's */ |
| 6126 | uint16_t obss_passive_total_per_channel; |
| 6127 | uint16_t obss_active_total_per_channel; |
| 6128 | uint16_t bsswidth_ch_trans_delay; |
| 6129 | uint16_t obss_activity_threshold; |
| 6130 | uint8_t self_sta_idx; |
| 6131 | uint8_t bss_id; |
| 6132 | uint8_t fortymhz_intolerent; |
| 6133 | uint8_t channel_count; |
| 6134 | uint8_t channels[SIR_ROAM_MAX_CHANNELS]; |
| 6135 | uint8_t current_operatingclass; |
| 6136 | uint16_t iefield_len; |
| 6137 | uint8_t iefield[SIR_ROAM_SCAN_MAX_PB_REQ_SIZE]; |
| 6138 | }; |
| 6139 | |
| 6140 | /** |
| 6141 | * struct obss_scanparam - OBSS scan parameters |
| 6142 | * @obss_passive_dwelltime: message type |
| 6143 | * @obss_active_dwelltime: message length |
| 6144 | * @obss_width_trigger_interval: obss passive dwelltime |
| 6145 | * @obss_passive_total_per_channel: obss passive total scan time |
| 6146 | * @obss_active_total_per_channel: obss active total scan time |
| 6147 | * @bsswidth_ch_trans_delay: OBSS transition delay time |
| 6148 | * @obss_activity_threshold: OBSS activity threshold |
| 6149 | */ |
| 6150 | struct obss_scanparam { |
| 6151 | uint16_t obss_passive_dwelltime; |
| 6152 | uint16_t obss_active_dwelltime; |
| 6153 | uint16_t obss_width_trigger_interval; |
| 6154 | uint16_t obss_passive_total_per_channel; |
| 6155 | uint16_t obss_active_total_per_channel; |
| 6156 | uint16_t bsswidth_ch_trans_delay; |
| 6157 | uint16_t obss_activity_threshold; |
| 6158 | }; |
| 6159 | |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 6160 | /** |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 6161 | * struct sir_apf_set_offload - set apf filter instructions |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 6162 | * @session_id: session identifier |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 6163 | * @version: host apf version |
| 6164 | * @filter_id: Filter ID for APF filter |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 6165 | * @total_length: The total length of the full instruction |
| 6166 | * total_length equal to 0 means reset |
| 6167 | * @current_offset: current offset, 0 means start a new setting |
| 6168 | * @current_length: Length of current @program |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 6169 | * @program: APF instructions |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 6170 | */ |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 6171 | struct sir_apf_set_offload { |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 6172 | uint8_t session_id; |
| 6173 | uint32_t version; |
| 6174 | uint32_t filter_id; |
| 6175 | uint32_t total_length; |
| 6176 | uint32_t current_offset; |
| 6177 | uint32_t current_length; |
| 6178 | uint8_t *program; |
| 6179 | }; |
| 6180 | |
| 6181 | /** |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 6182 | * struct sir_apf_offload_capabilities - get apf Capabilities |
| 6183 | * @apf_version: fw's implement version |
| 6184 | * @max_apf_filters: max filters that fw supports |
| 6185 | * @max_bytes_for_apf_inst: the max bytes that can be used as apf instructions |
| 6186 | * @remaining_bytes_for_apf_inst: remaining bytes for apf instructions |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 6187 | * |
| 6188 | */ |
Nachiket Kukade | e547a48 | 2018-05-22 16:43:30 +0530 | [diff] [blame] | 6189 | struct sir_apf_get_offload { |
| 6190 | uint32_t apf_version; |
| 6191 | uint32_t max_apf_filters; |
| 6192 | uint32_t max_bytes_for_apf_inst; |
| 6193 | uint32_t remaining_bytes_for_apf_inst; |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 6194 | }; |
| 6195 | |
Naveen Rawat | 3ff5cff | 2018-01-29 14:31:16 -0800 | [diff] [blame] | 6196 | #ifndef QCA_SUPPORT_CP_STATS |
Sandeep Puligilla | 607f34a | 2016-05-25 14:37:47 -0700 | [diff] [blame] | 6197 | /** |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 6198 | * struct sir_wake_lock_stats - wake lock stats structure |
Dustin Brown | 9d797d6 | 2017-01-11 16:39:12 -0800 | [diff] [blame] | 6199 | * @wow_unspecified_wake_up_count: number of non-wow related wake ups |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 6200 | * @wow_ucast_wake_up_count: Unicast wakeup count |
| 6201 | * @wow_bcast_wake_up_count: Broadcast wakeup count |
| 6202 | * @wow_ipv4_mcast_wake_up_count: ipv4 multicast wakeup count |
| 6203 | * @wow_ipv6_mcast_wake_up_count: ipv6 multicast wakeup count |
| 6204 | * @wow_ipv6_mcast_ra_stats: ipv6 multicast ra stats |
| 6205 | * @wow_ipv6_mcast_ns_stats: ipv6 multicast ns stats |
| 6206 | * @wow_ipv6_mcast_na_stats: ipv6 multicast na stats |
Sreelakshmi Konamki | e1cd51f | 2016-08-19 16:58:24 +0530 | [diff] [blame] | 6207 | * @wow_icmpv4_count: ipv4 icmp packet count |
Himanshu Agarwal | 4574e28 | 2016-08-10 15:22:45 +0530 | [diff] [blame] | 6208 | * @wow_icmpv6_count: ipv6 icmp packet count |
Poddar, Siddarth | c01681a | 2016-12-21 18:36:30 +0530 | [diff] [blame] | 6209 | * @wow_rssi_breach_wake_up_count: rssi breach wakeup count |
| 6210 | * @wow_low_rssi_wake_up_count: low rssi wakeup count |
| 6211 | * @wow_gscan_wake_up_count: gscan wakeup count |
| 6212 | * @wow_pno_complete_wake_up_count: pno complete wakeup count |
| 6213 | * @wow_pno_match_wake_up_count: pno match wakeup count |
Dustin Brown | 9d797d6 | 2017-01-11 16:39:12 -0800 | [diff] [blame] | 6214 | * @wow_oem_response_wake_up_count: oem response wakeup count |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 6215 | * @pwr_save_fail_detected: pwr save fail detected wakeup count |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 6216 | */ |
| 6217 | struct sir_wake_lock_stats { |
Dustin Brown | 9d797d6 | 2017-01-11 16:39:12 -0800 | [diff] [blame] | 6218 | uint32_t wow_unspecified_wake_up_count; |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 6219 | uint32_t wow_ucast_wake_up_count; |
| 6220 | uint32_t wow_bcast_wake_up_count; |
| 6221 | uint32_t wow_ipv4_mcast_wake_up_count; |
| 6222 | uint32_t wow_ipv6_mcast_wake_up_count; |
| 6223 | uint32_t wow_ipv6_mcast_ra_stats; |
| 6224 | uint32_t wow_ipv6_mcast_ns_stats; |
| 6225 | uint32_t wow_ipv6_mcast_na_stats; |
Sreelakshmi Konamki | e1cd51f | 2016-08-19 16:58:24 +0530 | [diff] [blame] | 6226 | uint32_t wow_icmpv4_count; |
Himanshu Agarwal | 4574e28 | 2016-08-10 15:22:45 +0530 | [diff] [blame] | 6227 | uint32_t wow_icmpv6_count; |
Poddar, Siddarth | c01681a | 2016-12-21 18:36:30 +0530 | [diff] [blame] | 6228 | uint32_t wow_rssi_breach_wake_up_count; |
| 6229 | uint32_t wow_low_rssi_wake_up_count; |
| 6230 | uint32_t wow_gscan_wake_up_count; |
| 6231 | uint32_t wow_pno_complete_wake_up_count; |
| 6232 | uint32_t wow_pno_match_wake_up_count; |
Dustin Brown | 9d797d6 | 2017-01-11 16:39:12 -0800 | [diff] [blame] | 6233 | uint32_t wow_oem_response_wake_up_count; |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 6234 | uint32_t pwr_save_fail_detected; |
Dustin Brown | 9d797d6 | 2017-01-11 16:39:12 -0800 | [diff] [blame] | 6235 | }; |
| 6236 | |
| 6237 | /** |
| 6238 | * struct sir_vdev_wow_stats - container for per vdev wow related stat counters |
| 6239 | * @ucast: Unicast wakeup count |
| 6240 | * @bcast: Broadcast wakeup count |
| 6241 | * @ipv4_mcast: ipv4 multicast wakeup count |
| 6242 | * @ipv6_mcast: ipv6 multicast wakeup count |
| 6243 | * @ipv6_mcast_ra: ipv6 multicast ra stats |
| 6244 | * @ipv6_mcast_ns: ipv6 multicast ns stats |
| 6245 | * @ipv6_mcast_na: ipv6 multicast na stats |
| 6246 | * @icmpv4: ipv4 icmp packet count |
| 6247 | * @icmpv6: ipv6 icmp packet count |
| 6248 | * @rssi_breach: rssi breach wakeup count |
| 6249 | * @low_rssi: low rssi wakeup count |
| 6250 | * @gscan: gscan wakeup count |
| 6251 | * @pno_complete: pno complete wakeup count |
| 6252 | * @pno_match: pno match wakeup count |
Amar Singhal | 5eb9acb | 2017-05-26 15:25:27 -0700 | [diff] [blame] | 6253 | * @oem_response: oem response wakeup coun |
| 6254 | * @scan_11d: 11d scan wakeup count |
Dustin Brown | 9d797d6 | 2017-01-11 16:39:12 -0800 | [diff] [blame] | 6255 | */ |
| 6256 | struct sir_vdev_wow_stats { |
| 6257 | uint32_t ucast; |
| 6258 | uint32_t bcast; |
| 6259 | uint32_t ipv4_mcast; |
| 6260 | uint32_t ipv6_mcast; |
| 6261 | uint32_t ipv6_mcast_ra; |
| 6262 | uint32_t ipv6_mcast_ns; |
| 6263 | uint32_t ipv6_mcast_na; |
| 6264 | uint32_t icmpv4; |
| 6265 | uint32_t icmpv6; |
| 6266 | uint32_t rssi_breach; |
| 6267 | uint32_t low_rssi; |
| 6268 | uint32_t gscan; |
| 6269 | uint32_t pno_complete; |
| 6270 | uint32_t pno_match; |
| 6271 | uint32_t oem_response; |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 6272 | uint32_t pwr_save_fail_detected; |
Amar Singhal | 5eb9acb | 2017-05-26 15:25:27 -0700 | [diff] [blame] | 6273 | uint32_t scan_11d; |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 6274 | }; |
Naveen Rawat | 3ff5cff | 2018-01-29 14:31:16 -0800 | [diff] [blame] | 6275 | #endif |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 6276 | |
| 6277 | /** |
Sandeep Puligilla | 607f34a | 2016-05-25 14:37:47 -0700 | [diff] [blame] | 6278 | * enum ht_capability_fields - HT Capabilities bit fields |
| 6279 | * @HT_CAPS_LDPC: ldpc coding capability bit field |
| 6280 | * @HT_CAPS_SUPPORTED_CHANNEL_SET: channel width set bit field |
| 6281 | * @HT_CAPS_SM_PWR_SAVE: SM power save bit field |
| 6282 | * @HT_CAPS_GREENFIELD: greenfield capability bit field |
| 6283 | * @HT_CAPS_SHORT_GI20: short GI 20 bit field |
| 6284 | * @HT_CAPS_SHORT_GI40: short GI 40 bit field |
| 6285 | * @HT_CAPS_TX_STBC: Tx STBC bit field |
| 6286 | * @HT_CAPS_RX_STBC: Rx STBC bit fields |
| 6287 | */ |
| 6288 | enum ht_capability_fields { |
| 6289 | HT_CAPS_LDPC = 0x0001, |
| 6290 | HT_CAPS_SUPPORTED_CHANNEL_SET = 0x0002, |
| 6291 | HT_CAPS_SM_PWR_SAVE = 0x000c, |
| 6292 | HT_CAPS_GREENFIELD = 0x0010, |
| 6293 | HT_CAPS_SHORT_GI20 = 0x0020, |
| 6294 | HT_CAPS_SHORT_GI40 = 0x0040, |
| 6295 | HT_CAPS_TX_STBC = 0x0080, |
| 6296 | HT_CAPS_RX_STBC = 0x0300 |
| 6297 | }; |
| 6298 | |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6299 | #ifdef WLAN_FEATURE_NAN_DATAPATH |
| 6300 | |
| 6301 | #define IFACE_NAME_SIZE 64 |
| 6302 | |
| 6303 | /** |
| 6304 | * enum ndp_accept_policy - nan data path accept policy |
| 6305 | * @NDP_ACCEPT_POLICY_NONE: the framework will decide the policy |
| 6306 | * @NDP_ACCEPT_POLICY_ALL: accept policy offloaded to fw |
| 6307 | * |
| 6308 | */ |
| 6309 | enum ndp_accept_policy { |
| 6310 | NDP_ACCEPT_POLICY_NONE = 0, |
| 6311 | NDP_ACCEPT_POLICY_ALL = 1, |
| 6312 | }; |
| 6313 | |
| 6314 | /** |
| 6315 | * enum ndp_self_role - nan data path role |
| 6316 | * @NDP_ROLE_INITIATOR: initiator of nan data path request |
| 6317 | * @NDP_ROLE_RESPONDER: responder to nan data path request |
| 6318 | * |
| 6319 | */ |
| 6320 | enum ndp_self_role { |
| 6321 | NDP_ROLE_INITIATOR = 0, |
| 6322 | NDP_ROLE_RESPONDER = 1, |
| 6323 | }; |
| 6324 | |
| 6325 | /** |
| 6326 | * enum ndp_response_code - responder's response code to nan data path request |
| 6327 | * @NDP_RESPONSE_ACCEPT: ndp request accepted |
| 6328 | * @NDP_RESPONSE_REJECT: ndp request rejected |
| 6329 | * @NDP_RESPONSE_DEFER: ndp request deferred until later (response to follow |
| 6330 | * any time later) |
| 6331 | * |
| 6332 | */ |
| 6333 | enum ndp_response_code { |
| 6334 | NDP_RESPONSE_ACCEPT = 0, |
| 6335 | NDP_RESPONSE_REJECT = 1, |
| 6336 | NDP_RESPONSE_DEFER = 2, |
| 6337 | }; |
| 6338 | |
| 6339 | /** |
Deepak Dhamdhere | a6d2f4c | 2016-06-04 00:24:52 -0700 | [diff] [blame] | 6340 | * enum ndp_end_type - NDP end type |
| 6341 | * @NDP_END_TYPE_UNSPECIFIED: type is unspecified |
| 6342 | * @NDP_END_TYPE_PEER_UNAVAILABLE: type is peer unavailable |
| 6343 | * @NDP_END_TYPE_OTA_FRAME: NDP end frame received from peer |
| 6344 | * |
| 6345 | */ |
| 6346 | enum ndp_end_type { |
| 6347 | NDP_END_TYPE_UNSPECIFIED = 0x00, |
| 6348 | NDP_END_TYPE_PEER_UNAVAILABLE = 0x01, |
| 6349 | NDP_END_TYPE_OTA_FRAME = 0x02, |
| 6350 | }; |
| 6351 | |
| 6352 | /** |
| 6353 | * enum ndp_end_reason_code - NDP end reason code |
| 6354 | * @NDP_END_REASON_UNSPECIFIED: reason is unspecified |
| 6355 | * @NDP_END_REASON_INACTIVITY: reason is peer inactivity |
| 6356 | * @NDP_END_REASON_PEER_DATA_END: data end indication received from peer |
| 6357 | * |
| 6358 | */ |
| 6359 | enum ndp_end_reason_code { |
| 6360 | NDP_END_REASON_UNSPECIFIED = 0x00, |
| 6361 | NDP_END_REASON_INACTIVITY = 0x01, |
| 6362 | NDP_END_REASON_PEER_DATA_END = 0x02, |
| 6363 | }; |
| 6364 | |
| 6365 | /** |
Naveen Rawat | 8d63a59 | 2016-06-29 18:30:59 -0700 | [diff] [blame] | 6366 | * enum nan_status_type - NDP status type |
| 6367 | * @NDP_RSP_STATUS_SUCCESS: request was successful |
| 6368 | * @NDP_RSP_STATUS_ERROR: request failed |
| 6369 | */ |
| 6370 | enum nan_status_type { |
| 6371 | NDP_RSP_STATUS_SUCCESS = 0x00, |
| 6372 | NDP_RSP_STATUS_ERROR = 0x01, |
| 6373 | }; |
| 6374 | |
| 6375 | /** |
| 6376 | * enum nan_reason_code - NDP command rsp reason code value |
| 6377 | * @NDP_UNSUPPORTED_CONCURRENCY: Will be used in unsupported concurrency cases |
| 6378 | * @NDP_NAN_DATA_IFACE_CREATE_FAILED: ndi create failed |
| 6379 | * @NDP_NAN_DATA_IFACE_DELETE_FAILED: ndi delete failed |
| 6380 | * @NDP_DATA_INITIATOR_REQ_FAILED: data initiator request failed |
| 6381 | * @NDP_DATA_RESPONDER_REQ_FAILED: data responder request failed |
| 6382 | * @NDP_INVALID_SERVICE_INSTANCE_ID: invalid service instance id |
| 6383 | * @NDP_INVALID_NDP_INSTANCE_ID: invalid ndp instance id |
| 6384 | * @NDP_INVALID_RSP_CODE: invalid response code in ndp responder request |
| 6385 | * @NDP_INVALID_APP_INFO_LEN: invalid app info length |
| 6386 | * @NDP_NMF_REQ_FAIL: OTA nan mgmt frame failure for data request |
| 6387 | * @NDP_NMF_RSP_FAIL: OTA nan mgmt frame failure for data response |
| 6388 | * @NDP_NMF_CNF_FAIL: OTA nan mgmt frame failure for confirm |
| 6389 | * @NDP_END_FAILED: ndp end failed |
| 6390 | * @NDP_NMF_END_REQ_FAIL: OTA nan mgmt frame failure for data end |
| 6391 | * @NDP_VENDOR_SPECIFIC_ERROR: other vendor specific failures |
| 6392 | */ |
| 6393 | enum nan_reason_code { |
| 6394 | NDP_UNSUPPORTED_CONCURRENCY = 9000, |
| 6395 | NDP_NAN_DATA_IFACE_CREATE_FAILED = 9001, |
| 6396 | NDP_NAN_DATA_IFACE_DELETE_FAILED = 9002, |
| 6397 | NDP_DATA_INITIATOR_REQ_FAILED = 9003, |
| 6398 | NDP_DATA_RESPONDER_REQ_FAILED = 9004, |
| 6399 | NDP_INVALID_SERVICE_INSTANCE_ID = 9005, |
| 6400 | NDP_INVALID_NDP_INSTANCE_ID = 9006, |
| 6401 | NDP_INVALID_RSP_CODE = 9007, |
| 6402 | NDP_INVALID_APP_INFO_LEN = 9008, |
| 6403 | NDP_NMF_REQ_FAIL = 9009, |
| 6404 | NDP_NMF_RSP_FAIL = 9010, |
| 6405 | NDP_NMF_CNF_FAIL = 9011, |
| 6406 | NDP_END_FAILED = 9012, |
| 6407 | NDP_NMF_END_REQ_FAIL = 9013, |
| 6408 | /* 9500 onwards vendor specific error codes */ |
| 6409 | NDP_VENDOR_SPECIFIC_ERROR = 9500, |
| 6410 | }; |
| 6411 | |
| 6412 | /** |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6413 | * struct ndp_cfg - ndp configuration |
| 6414 | * @tag: unique identifier |
| 6415 | * @ndp_cfg_len: ndp configuration length |
| 6416 | * @ndp_cfg: variable length ndp configuration |
| 6417 | * |
| 6418 | */ |
| 6419 | struct ndp_cfg { |
| 6420 | uint32_t tag; |
| 6421 | uint32_t ndp_cfg_len; |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 6422 | uint8_t *ndp_cfg; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6423 | }; |
| 6424 | |
| 6425 | /** |
| 6426 | * struct ndp_qos_cfg - ndp qos configuration |
| 6427 | * @tag: unique identifier |
| 6428 | * @ndp_qos_cfg_len: ndp qos configuration length |
| 6429 | * @ndp_qos_cfg: variable length ndp qos configuration |
| 6430 | * |
| 6431 | */ |
| 6432 | struct ndp_qos_cfg { |
| 6433 | uint32_t tag; |
| 6434 | uint32_t ndp_qos_cfg_len; |
| 6435 | uint8_t ndp_qos_cfg[]; |
| 6436 | }; |
| 6437 | |
| 6438 | /** |
| 6439 | * struct ndp_app_info - application info shared during ndp setup |
| 6440 | * @tag: unique identifier |
| 6441 | * @ndp_app_info_len: ndp app info length |
| 6442 | * @ndp_app_info: variable length application information |
| 6443 | * |
| 6444 | */ |
| 6445 | struct ndp_app_info { |
| 6446 | uint32_t tag; |
| 6447 | uint32_t ndp_app_info_len; |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 6448 | uint8_t *ndp_app_info; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6449 | }; |
| 6450 | |
| 6451 | /** |
Naveen Rawat | 4f3983e | 2016-11-29 16:12:09 -0800 | [diff] [blame] | 6452 | * struct ndp_scid - structure to hold sceurity context identifier |
| 6453 | * @scid_len: length of scid |
| 6454 | * @scid: scid |
| 6455 | * |
| 6456 | */ |
| 6457 | struct ndp_scid { |
| 6458 | uint32_t scid_len; |
| 6459 | uint8_t *scid; |
| 6460 | }; |
| 6461 | |
| 6462 | /** |
| 6463 | * struct ndp_pmk - structure to hold pairwise master key |
| 6464 | * @pmk_len: length of pairwise master key |
| 6465 | * @pmk: buffer containing pairwise master key |
| 6466 | * |
| 6467 | */ |
| 6468 | struct ndp_pmk { |
| 6469 | uint32_t pmk_len; |
| 6470 | uint8_t *pmk; |
| 6471 | }; |
| 6472 | |
| 6473 | /** |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6474 | * struct ndi_create_req - ndi create request params |
| 6475 | * @transaction_id: unique identifier |
| 6476 | * @iface_name: interface name |
| 6477 | * |
| 6478 | */ |
| 6479 | struct ndi_create_req { |
| 6480 | uint32_t transaction_id; |
| 6481 | char iface_name[IFACE_NAME_SIZE]; |
| 6482 | }; |
| 6483 | |
| 6484 | /** |
| 6485 | * struct ndi_create_rsp - ndi create response params |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6486 | * @status: request status |
| 6487 | * @reason: reason if any |
| 6488 | * |
| 6489 | */ |
| 6490 | struct ndi_create_rsp { |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6491 | uint32_t status; |
| 6492 | uint32_t reason; |
Rakesh Sunki | cf1c9ab | 2016-08-25 14:11:25 -0700 | [diff] [blame] | 6493 | uint8_t sta_id; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6494 | }; |
| 6495 | |
| 6496 | /** |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6497 | * struct ndi_delete_rsp - ndi delete response params |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6498 | * @status: request status |
| 6499 | * @reason: reason if any |
| 6500 | * |
| 6501 | */ |
| 6502 | struct ndi_delete_rsp { |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6503 | uint32_t status; |
| 6504 | uint32_t reason; |
| 6505 | }; |
| 6506 | |
| 6507 | /** |
| 6508 | * struct ndp_initiator_req - ndp initiator request params |
| 6509 | * @transaction_id: unique identifier |
| 6510 | * @vdev_id: session id of the interface over which ndp is being created |
| 6511 | * @channel: suggested channel for ndp creation |
Naveen Rawat | 0a01705 | 2016-10-19 14:17:07 -0700 | [diff] [blame] | 6512 | * @channel_cfg: channel config, 0=no channel, 1=optional, 2=mandatory |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6513 | * @service_instance_id: Service identifier |
| 6514 | * @peer_discovery_mac_addr: Peer's discovery mac address |
| 6515 | * @self_ndi_mac_addr: self NDI mac address |
| 6516 | * @ndp_config: ndp configuration params |
| 6517 | * @ndp_info: ndp application info |
Naveen Rawat | 4f3983e | 2016-11-29 16:12:09 -0800 | [diff] [blame] | 6518 | * @ncs_sk_type: indicates NCS_SK_128 or NCS_SK_256 |
| 6519 | * @pmk: pairwise master key |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6520 | * |
| 6521 | */ |
| 6522 | struct ndp_initiator_req { |
| 6523 | uint32_t transaction_id; |
| 6524 | uint32_t vdev_id; |
| 6525 | uint32_t channel; |
Naveen Rawat | 0a01705 | 2016-10-19 14:17:07 -0700 | [diff] [blame] | 6526 | uint32_t channel_cfg; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6527 | uint32_t service_instance_id; |
| 6528 | struct qdf_mac_addr peer_discovery_mac_addr; |
| 6529 | struct qdf_mac_addr self_ndi_mac_addr; |
| 6530 | struct ndp_cfg ndp_config; |
| 6531 | struct ndp_app_info ndp_info; |
Naveen Rawat | 4f3983e | 2016-11-29 16:12:09 -0800 | [diff] [blame] | 6532 | uint32_t ncs_sk_type; |
| 6533 | struct ndp_pmk pmk; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6534 | }; |
| 6535 | |
| 6536 | /** |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 6537 | * struct ndp_initiator_rsp - response event from FW |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6538 | * @transaction_id: unique identifier |
| 6539 | * @vdev_id: session id of the interface over which ndp is being created |
| 6540 | * @ndp_instance_id: locally created NDP instance ID |
| 6541 | * @status: status of the ndp request |
| 6542 | * @reason: reason for failure if any |
| 6543 | * |
| 6544 | */ |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 6545 | struct ndp_initiator_rsp { |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6546 | uint32_t transaction_id; |
| 6547 | uint32_t vdev_id; |
| 6548 | uint32_t ndp_instance_id; |
| 6549 | uint32_t status; |
Naveen Rawat | 8d63a59 | 2016-06-29 18:30:59 -0700 | [diff] [blame] | 6550 | uint32_t reason; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6551 | }; |
| 6552 | |
| 6553 | /** |
| 6554 | * struct ndp_indication_event - create ndp indication on the responder |
| 6555 | * @vdev_id: session id of the interface over which ndp is being created |
| 6556 | * @service_instance_id: Service identifier |
| 6557 | * @peer_discovery_mac_addr: Peer's discovery mac address |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 6558 | * @peer_mac_addr: Peer's NDI mac address |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6559 | * @ndp_initiator_mac_addr: NDI mac address of the peer initiating NDP |
| 6560 | * @ndp_instance_id: locally created NDP instance ID |
| 6561 | * @role: self role for NDP |
| 6562 | * @ndp_accept_policy: accept policy configured by the upper layer |
| 6563 | * @ndp_config: ndp configuration params |
| 6564 | * @ndp_info: ndp application info |
Naveen Rawat | 4f3983e | 2016-11-29 16:12:09 -0800 | [diff] [blame] | 6565 | * @ncs_sk_type: indicates NCS_SK_128 or NCS_SK_256 |
| 6566 | * @scid: security context identifier |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6567 | * |
| 6568 | */ |
| 6569 | struct ndp_indication_event { |
| 6570 | uint32_t vdev_id; |
| 6571 | uint32_t service_instance_id; |
| 6572 | struct qdf_mac_addr peer_discovery_mac_addr; |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 6573 | struct qdf_mac_addr peer_mac_addr; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6574 | uint32_t ndp_instance_id; |
| 6575 | enum ndp_self_role role; |
| 6576 | enum ndp_accept_policy policy; |
| 6577 | struct ndp_cfg ndp_config; |
| 6578 | struct ndp_app_info ndp_info; |
Naveen Rawat | 4f3983e | 2016-11-29 16:12:09 -0800 | [diff] [blame] | 6579 | uint32_t ncs_sk_type; |
| 6580 | struct ndp_scid scid; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6581 | }; |
| 6582 | |
| 6583 | /** |
| 6584 | * struct ndp_responder_req - responder's response to ndp create request |
| 6585 | * @transaction_id: unique identifier |
| 6586 | * @vdev_id: session id of the interface over which ndp is being created |
| 6587 | * @ndp_instance_id: locally created NDP instance ID |
| 6588 | * @ndp_rsp: response to the ndp create request |
| 6589 | * @ndp_config: ndp configuration params |
| 6590 | * @ndp_info: ndp application info |
Naveen Rawat | 4f3983e | 2016-11-29 16:12:09 -0800 | [diff] [blame] | 6591 | * @pmk: pairwise master key |
| 6592 | * @ncs_sk_type: indicates NCS_SK_128 or NCS_SK_256 |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6593 | * |
| 6594 | */ |
| 6595 | struct ndp_responder_req { |
| 6596 | uint32_t transaction_id; |
| 6597 | uint32_t vdev_id; |
| 6598 | uint32_t ndp_instance_id; |
| 6599 | enum ndp_response_code ndp_rsp; |
| 6600 | struct ndp_cfg ndp_config; |
| 6601 | struct ndp_app_info ndp_info; |
Naveen Rawat | 4f3983e | 2016-11-29 16:12:09 -0800 | [diff] [blame] | 6602 | struct ndp_pmk pmk; |
| 6603 | uint32_t ncs_sk_type; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6604 | }; |
| 6605 | |
| 6606 | /** |
| 6607 | * struct ndp_responder_rsp_event - response to responder's request |
| 6608 | * @transaction_id: unique identifier |
| 6609 | * @vdev_id: session id of the interface over which ndp is being created |
| 6610 | * @status: command status |
| 6611 | * @reason: reason for failure if any |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 6612 | * @peer_mac_addr: Peer's mac address |
Rakesh Sunki | d92d108 | 2017-01-04 15:14:28 -0800 | [diff] [blame] | 6613 | * @create_peer: Flag to indicate to create peer |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6614 | */ |
| 6615 | struct ndp_responder_rsp_event { |
| 6616 | uint32_t transaction_id; |
| 6617 | uint32_t vdev_id; |
| 6618 | uint32_t status; |
| 6619 | uint32_t reason; |
Abhishek Singh | 4fef747 | 2016-06-06 11:36:03 -0700 | [diff] [blame] | 6620 | struct qdf_mac_addr peer_mac_addr; |
Rakesh Sunki | d92d108 | 2017-01-04 15:14:28 -0800 | [diff] [blame] | 6621 | bool create_peer; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6622 | }; |
| 6623 | |
| 6624 | /** |
| 6625 | * struct ndp_confirm_event - ndp confirmation event from FW |
| 6626 | * @vdev_id: session id of the interface over which ndp is being created |
| 6627 | * @ndp_instance_id: ndp instance id for which confirm is being generated |
Naveen Rawat | 460be78 | 2016-06-29 18:26:22 -0700 | [diff] [blame] | 6628 | * @reason_code : reason code(opaque to driver) |
| 6629 | * @num_active_ndps_on_peer: number of ndp instances on peer |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6630 | * @peer_ndi_mac_addr: peer NDI mac address |
| 6631 | * @rsp_code: ndp response code |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6632 | * @ndp_info: ndp application info |
| 6633 | * |
| 6634 | */ |
| 6635 | struct ndp_confirm_event { |
| 6636 | uint32_t vdev_id; |
| 6637 | uint32_t ndp_instance_id; |
Naveen Rawat | 460be78 | 2016-06-29 18:26:22 -0700 | [diff] [blame] | 6638 | uint32_t reason_code; |
| 6639 | uint32_t num_active_ndps_on_peer; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6640 | struct qdf_mac_addr peer_ndi_mac_addr; |
| 6641 | enum ndp_response_code rsp_code; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6642 | struct ndp_app_info ndp_info; |
| 6643 | }; |
| 6644 | |
| 6645 | /** |
| 6646 | * struct ndp_end_req - ndp end request |
| 6647 | * @transaction_id: unique transaction identifier |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6648 | * @num_ndp_instances: number of ndp instances to be terminated |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 6649 | * @ndp_ids: pointer to array of ndp_instance_id to be terminated |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6650 | * |
| 6651 | */ |
| 6652 | struct ndp_end_req { |
| 6653 | uint32_t transaction_id; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6654 | uint32_t num_ndp_instances; |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 6655 | uint32_t *ndp_ids; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6656 | }; |
| 6657 | |
| 6658 | /** |
| 6659 | * struct peer_ndp_map - mapping of NDP instances to peer to VDEV |
| 6660 | * @vdev_id: session id of the interface over which ndp is being created |
| 6661 | * @peer_ndi_mac_addr: peer NDI mac address |
| 6662 | * @num_active_ndp_sessions: number of active NDP sessions on the peer |
Deepak Dhamdhere | a6d2f4c | 2016-06-04 00:24:52 -0700 | [diff] [blame] | 6663 | * @type: NDP end indication type |
| 6664 | * @reason_code: NDP end indication reason code |
| 6665 | * @ndp_instance_id: NDP instance ID |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6666 | * |
| 6667 | */ |
| 6668 | struct peer_ndp_map { |
| 6669 | uint32_t vdev_id; |
| 6670 | struct qdf_mac_addr peer_ndi_mac_addr; |
| 6671 | uint32_t num_active_ndp_sessions; |
Deepak Dhamdhere | a6d2f4c | 2016-06-04 00:24:52 -0700 | [diff] [blame] | 6672 | enum ndp_end_type type; |
| 6673 | enum ndp_end_reason_code reason_code; |
| 6674 | uint32_t ndp_instance_id; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6675 | }; |
| 6676 | |
| 6677 | /** |
| 6678 | * struct ndp_end_rsp_event - firmware response to ndp end request |
| 6679 | * @transaction_id: unique identifier for the request |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 6680 | * @status: status of operation |
| 6681 | * @reason: reason(opaque to host driver) |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6682 | * |
| 6683 | */ |
| 6684 | struct ndp_end_rsp_event { |
| 6685 | uint32_t transaction_id; |
Naveen Rawat | f28315c | 2016-06-29 18:06:02 -0700 | [diff] [blame] | 6686 | uint32_t status; |
| 6687 | uint32_t reason; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6688 | }; |
| 6689 | |
| 6690 | /** |
| 6691 | * struct ndp_end_indication_event - ndp termination notification from FW |
Deepak Dhamdhere | a6d2f4c | 2016-06-04 00:24:52 -0700 | [diff] [blame] | 6692 | * @num_ndp_ids: number of NDP ids |
| 6693 | * @ndp_map: mapping of NDP instances to peer and vdev |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6694 | * |
| 6695 | */ |
| 6696 | struct ndp_end_indication_event { |
Deepak Dhamdhere | a6d2f4c | 2016-06-04 00:24:52 -0700 | [diff] [blame] | 6697 | uint32_t num_ndp_ids; |
Ravi Joshi | 412f23d | 2016-05-26 15:09:23 -0700 | [diff] [blame] | 6698 | struct peer_ndp_map ndp_map[]; |
| 6699 | }; |
| 6700 | |
| 6701 | /** |
| 6702 | * struct ndp_schedule_update_req - ndp schedule update request |
| 6703 | * @transaction_id: unique identifier |
| 6704 | * @vdev_id: session id of the interface over which ndp is being created |
| 6705 | * @ndp_instance_id: ndp instance id for which schedule update is requested |
| 6706 | * @ndp_qos: new set of qos parameters |
| 6707 | * |
| 6708 | */ |
| 6709 | struct ndp_schedule_update_req { |
| 6710 | uint32_t transaction_id; |
| 6711 | uint32_t vdev_id; |
| 6712 | uint32_t ndp_instance_id; |
| 6713 | struct ndp_qos_cfg ndp_qos; |
| 6714 | }; |
| 6715 | |
| 6716 | /** |
| 6717 | * struct ndp_schedule_update_rsp - ndp schedule update response |
| 6718 | * @transaction_id: unique identifier |
| 6719 | * @vdev_id: session id of the interface over which ndp is being created |
| 6720 | * @status: status of the request |
| 6721 | * @reason: reason code for failure if any |
| 6722 | * |
| 6723 | */ |
| 6724 | struct ndp_schedule_update_rsp { |
| 6725 | uint32_t transaction_id; |
| 6726 | uint32_t vdev_id; |
| 6727 | uint32_t status; |
| 6728 | uint32_t reason; |
| 6729 | }; |
| 6730 | |
| 6731 | /** |
| 6732 | * struct sme_ndp_peer_ind - ndp peer indication |
| 6733 | * @msg_type: message id |
| 6734 | * @msg_len: message length |
| 6735 | * @session_id: session id |
| 6736 | * @peer_mac_addr: peer mac address |
| 6737 | * @sta_id: station id |
| 6738 | * |
| 6739 | */ |
| 6740 | struct sme_ndp_peer_ind { |
| 6741 | uint16_t msg_type; |
| 6742 | uint16_t msg_len; |
| 6743 | uint8_t session_id; |
| 6744 | struct qdf_mac_addr peer_mac_addr; |
| 6745 | uint16_t sta_id; |
| 6746 | }; |
| 6747 | |
| 6748 | #endif /* WLAN_FEATURE_NAN_DATAPATH */ |
| 6749 | |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 6750 | /** |
Padma, Santhosh Kumar | a711967 | 2016-08-16 16:05:14 +0530 | [diff] [blame] | 6751 | * struct sir_set_tx_rx_aggregation_size - sets tx rx aggregation size |
| 6752 | * @vdev_id: vdev id of the session |
Arif Hussain | 0e24680 | 2018-05-01 18:13:44 -0700 | [diff] [blame] | 6753 | * @aggr_type: TX Aggregation Type (0=A-MPDU, 1=A-MSDU) |
Padma, Santhosh Kumar | a711967 | 2016-08-16 16:05:14 +0530 | [diff] [blame] | 6754 | * @tx_aggregation_size: Tx aggregation size |
Paul Zhang | ee09f8e | 2018-04-23 16:11:32 +0800 | [diff] [blame] | 6755 | * @tx_aggregation_size_be: Tx aggregation size for be queue |
| 6756 | * @tx_aggregation_size_bk: Tx aggregation size for bk queue |
| 6757 | * @tx_aggregation_size_vi: Tx aggregation size for vi queue |
| 6758 | * @tx_aggregation_size_vo: Tx aggregation size for vo queue |
Padma, Santhosh Kumar | a711967 | 2016-08-16 16:05:14 +0530 | [diff] [blame] | 6759 | * @rx_aggregation_size: Rx aggregation size |
| 6760 | */ |
| 6761 | struct sir_set_tx_rx_aggregation_size { |
| 6762 | uint8_t vdev_id; |
Arif Hussain | 0e24680 | 2018-05-01 18:13:44 -0700 | [diff] [blame] | 6763 | wmi_vdev_custom_aggr_type_t aggr_type; |
Padma, Santhosh Kumar | a711967 | 2016-08-16 16:05:14 +0530 | [diff] [blame] | 6764 | uint32_t tx_aggregation_size; |
Paul Zhang | ee09f8e | 2018-04-23 16:11:32 +0800 | [diff] [blame] | 6765 | uint32_t tx_aggregation_size_be; |
| 6766 | uint32_t tx_aggregation_size_bk; |
| 6767 | uint32_t tx_aggregation_size_vi; |
| 6768 | uint32_t tx_aggregation_size_vo; |
Padma, Santhosh Kumar | a711967 | 2016-08-16 16:05:14 +0530 | [diff] [blame] | 6769 | uint32_t rx_aggregation_size; |
| 6770 | }; |
| 6771 | |
| 6772 | /** |
Paul Zhang | 33fae27 | 2018-04-23 16:19:00 +0800 | [diff] [blame] | 6773 | * struct sir_set_tx_aggr_sw_retry_threshold - set sw retry threshold |
| 6774 | * @vdev_id: vdev id of the session |
| 6775 | * @tx_aggr_sw_retry_threshold_be: sw retry threshold for BE |
| 6776 | * @tx_aggr_sw_retry_threshold_bk: sw retry threshold for BK |
| 6777 | * @tx_aggr_sw_retry_threshold_vi: sw retry threshold for VI |
| 6778 | * @tx_aggr_sw_retry_threshold_vo: sw retry threshold for VO |
| 6779 | */ |
| 6780 | struct sir_set_tx_aggr_sw_retry_threshold { |
| 6781 | uint8_t vdev_id; |
| 6782 | uint32_t tx_aggr_sw_retry_threshold_be; |
| 6783 | uint32_t tx_aggr_sw_retry_threshold_bk; |
| 6784 | uint32_t tx_aggr_sw_retry_threshold_vi; |
| 6785 | uint32_t tx_aggr_sw_retry_threshold_vo; |
| 6786 | }; |
| 6787 | |
| 6788 | /** |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 6789 | * struct sir_p2p_lo_start - p2p listen offload start |
| 6790 | * @vdev_id: vdev identifier |
| 6791 | * @ctl_flags: control flag |
| 6792 | * @freq: p2p listen frequency |
| 6793 | * @period: listen offload period |
| 6794 | * @interval: listen offload interval |
| 6795 | * @count: number listen offload intervals |
| 6796 | * @device_types: device types |
| 6797 | * @dev_types_len: device types length |
| 6798 | * @probe_resp_tmplt: probe response template |
| 6799 | * @probe_resp_len: probe response template length |
| 6800 | */ |
| 6801 | struct sir_p2p_lo_start { |
| 6802 | uint32_t vdev_id; |
| 6803 | uint32_t ctl_flags; |
| 6804 | uint32_t freq; |
| 6805 | uint32_t period; |
| 6806 | uint32_t interval; |
| 6807 | uint32_t count; |
| 6808 | uint8_t *device_types; |
| 6809 | uint32_t dev_types_len; |
| 6810 | uint8_t *probe_resp_tmplt; |
| 6811 | uint32_t probe_resp_len; |
| 6812 | }; |
| 6813 | |
| 6814 | /** |
| 6815 | * struct sir_p2p_lo_event - P2P listen offload stop event |
| 6816 | * @vdev_id: vdev identifier |
| 6817 | * @reason_code: P2P listen offload stop reason |
| 6818 | */ |
| 6819 | struct sir_p2p_lo_event { |
| 6820 | uint32_t vdev_id; |
| 6821 | uint32_t reason_code; |
| 6822 | }; |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 6823 | |
| 6824 | /** |
| 6825 | * struct sir_hal_pwr_dbg_cmd - unit test command parameters |
| 6826 | * @pdev_id: pdev id |
| 6827 | * @module_id: module id |
| 6828 | * @num_args: number of arguments |
| 6829 | * @args: arguments |
| 6830 | */ |
| 6831 | struct sir_mac_pwr_dbg_cmd { |
| 6832 | uint32_t pdev_id; |
| 6833 | uint32_t module_id; |
| 6834 | uint32_t num_args; |
| 6835 | uint32_t args[MAX_POWER_DBG_ARGS_SUPPORTED]; |
| 6836 | }; |
| 6837 | |
Kondabattini, Ganesh | 3f2d02c | 2016-09-13 12:23:47 +0530 | [diff] [blame] | 6838 | /** |
| 6839 | * struct sme_send_disassoc_frm_req - send disassoc request frame |
| 6840 | * @msg_type: message type |
| 6841 | * @length: length of message |
| 6842 | * @session_id: session id |
| 6843 | * @trans_id: transaction id |
| 6844 | * @peer_mac: peer mac address |
| 6845 | * @reason: reason for disassoc |
| 6846 | * @wait_for_ack: wait for acknowledgment |
| 6847 | **/ |
| 6848 | struct sme_send_disassoc_frm_req { |
| 6849 | uint16_t msg_type; |
| 6850 | uint16_t length; |
| 6851 | uint8_t session_id; |
| 6852 | uint16_t trans_id; |
| 6853 | uint8_t peer_mac[6]; |
| 6854 | uint16_t reason; |
| 6855 | uint8_t wait_for_ack; |
| 6856 | }; |
| 6857 | |
Kondabattini, Ganesh | e4f18e0 | 2016-09-13 13:01:22 +0530 | [diff] [blame] | 6858 | /** |
| 6859 | * struct sme_update_access_policy_vendor_ie - update vendor ie and access |
| 6860 | * policy |
| 6861 | * @msg_type: message id |
| 6862 | * @msg_len: message length |
| 6863 | * @sme_session_id: sme session id |
| 6864 | * @ie: vendor ie |
| 6865 | * @access_policy: access policy for vendor ie |
| 6866 | */ |
| 6867 | struct sme_update_access_policy_vendor_ie { |
| 6868 | uint16_t msg_type; |
| 6869 | uint16_t length; |
| 6870 | uint32_t sme_session_id; |
| 6871 | uint8_t ie[SIR_MAC_MAX_IE_LENGTH]; |
| 6872 | uint8_t access_policy; |
| 6873 | }; |
| 6874 | |
Padma, Santhosh Kumar | d7cc079 | 2016-06-28 18:54:12 +0530 | [diff] [blame] | 6875 | /** |
| 6876 | * struct sir_encrypt_decrypt_rsp_params - encrypt/decrypt rsp params |
| 6877 | * @vdev_id: vdev id |
| 6878 | * @status: status |
| 6879 | * @data_length: data length |
| 6880 | * @data: data pointer |
| 6881 | */ |
| 6882 | struct sir_encrypt_decrypt_rsp_params { |
| 6883 | uint32_t vdev_id; |
| 6884 | int32_t status; |
| 6885 | uint32_t data_length; |
| 6886 | uint8_t *data; |
| 6887 | }; |
| 6888 | |
Agrawal, Ashish | 35b251d | 2016-09-08 19:21:03 +0530 | [diff] [blame] | 6889 | /** |
| 6890 | * struct sme_tx_fail_cnt_threshold - tx failure count for disconnect to fw |
| 6891 | * @session_id: Session id |
| 6892 | * @tx_fail_cnt_threshold: Tx failure count to do disconnect |
| 6893 | */ |
| 6894 | struct sme_tx_fail_cnt_threshold { |
| 6895 | uint8_t session_id; |
| 6896 | uint32_t tx_fail_cnt_threshold; |
| 6897 | }; |
Agrawal Ashish | da3e950 | 2016-09-21 17:43:51 +0530 | [diff] [blame] | 6898 | |
| 6899 | /** |
| 6900 | * struct sme_short_retry_limit - transmission retry limit for short frames. |
| 6901 | * @session_id: Session id |
| 6902 | * @short_retry_limit: tranmission retry limit for short frame. |
| 6903 | * |
| 6904 | */ |
| 6905 | struct sme_short_retry_limit { |
| 6906 | uint8_t session_id; |
| 6907 | uint32_t short_retry_limit; |
| 6908 | }; |
| 6909 | |
| 6910 | /** |
| 6911 | * struct sme_long_retry_limit - tranmission retry limit for long frames |
| 6912 | * @session_id: Session id |
| 6913 | * @short_retry_limit: tranmission retry limit for long frames. |
| 6914 | * |
| 6915 | */ |
| 6916 | struct sme_long_retry_limit { |
| 6917 | uint8_t session_id; |
| 6918 | uint32_t long_retry_limit; |
| 6919 | }; |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 6920 | |
| 6921 | /** |
Kiran Kumar Lokere | 08195ef | 2018-01-17 19:25:15 -0800 | [diff] [blame] | 6922 | * struct sme_addba_accept - Allow/reject the addba request frame |
| 6923 | * @session_id: Session id |
| 6924 | * @addba_accept: Allow/reject the addba request frame |
| 6925 | */ |
| 6926 | struct sme_addba_accept { |
| 6927 | uint8_t session_id; |
| 6928 | uint8_t addba_accept; |
| 6929 | }; |
| 6930 | |
| 6931 | /** |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 6932 | * struct sme_sta_inactivity_timeout - set sta_inactivity_timeout |
| 6933 | * @session_id: session Id. |
| 6934 | * @sta_inactivity_timeout: Timeout to disconnect STA after there |
| 6935 | * is no activity. |
| 6936 | */ |
| 6937 | struct sme_sta_inactivity_timeout { |
| 6938 | uint8_t session_id; |
| 6939 | uint32_t sta_inactivity_timeout; |
| 6940 | }; |
Yingying Tang | 9540997 | 2016-10-20 15:16:15 +0800 | [diff] [blame] | 6941 | |
| 6942 | /* |
| 6943 | * struct wow_pulse_mode - WoW Pulse set cmd struct |
| 6944 | * @wow_pulse_enable: enable or disable this feature |
| 6945 | * @wow_pulse_pin: GPIO PIN for Pulse |
| 6946 | * @wow_pulse_interval_low: Pulse interval low |
| 6947 | * @wow_pulse_interval_high: Pulse interval high |
| 6948 | * |
| 6949 | * SME uses this structure to configure wow pulse info |
| 6950 | * and send it to WMA |
| 6951 | */ |
| 6952 | struct wow_pulse_mode { |
| 6953 | bool wow_pulse_enable; |
| 6954 | uint8_t wow_pulse_pin; |
| 6955 | uint16_t wow_pulse_interval_high; |
| 6956 | uint16_t wow_pulse_interval_low; |
| 6957 | }; |
| 6958 | |
Rajeev Kumar | e406d65 | 2017-01-30 17:47:05 -0800 | [diff] [blame] | 6959 | |
| 6960 | /** |
Rajeev Kumar | d138ac5 | 2017-01-30 18:38:37 -0800 | [diff] [blame] | 6961 | * umac_send_mb_message_to_mac(): post message to umac |
Rajeev Kumar | e406d65 | 2017-01-30 17:47:05 -0800 | [diff] [blame] | 6962 | * @msg: opaque message pointer |
| 6963 | * |
| 6964 | * Return: QDF status |
| 6965 | */ |
Rajeev Kumar | d138ac5 | 2017-01-30 18:38:37 -0800 | [diff] [blame] | 6966 | QDF_STATUS umac_send_mb_message_to_mac(void *msg); |
Rajeev Kumar | e406d65 | 2017-01-30 17:47:05 -0800 | [diff] [blame] | 6967 | |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 6968 | /** |
| 6969 | * struct scan_chan_info - channel info |
| 6970 | * @freq: radio frequence |
| 6971 | * @cmd flag: cmd flag |
| 6972 | * @noise_floor: noise floor |
| 6973 | * @cycle_count: cycle count |
| 6974 | * @rx_clear_count: rx clear count |
| 6975 | * @tx_frame_count: TX frame count |
| 6976 | * @clock_freq: clock frequence MHZ |
| 6977 | */ |
| 6978 | struct scan_chan_info { |
| 6979 | uint32_t freq; |
| 6980 | uint32_t cmd_flag; |
| 6981 | uint32_t noise_floor; |
| 6982 | uint32_t cycle_count; |
| 6983 | uint32_t rx_clear_count; |
| 6984 | uint32_t tx_frame_count; |
| 6985 | uint32_t clock_freq; |
| 6986 | }; |
Dustin Brown | 5409643 | 2017-02-23 13:00:44 -0800 | [diff] [blame] | 6987 | |
| 6988 | /** |
| 6989 | * enum wow_resume_trigger - resume trigger override setting values |
| 6990 | * @WOW_RESUME_TRIGGER_DEFAULT: fw to use platform default resume trigger |
| 6991 | * @WOW_RESUME_TRIGGER_HTC_WAKEUP: force fw to use HTC Wakeup to resume |
| 6992 | * @WOW_RESUME_TRIGGER_GPIO: force fw to use GPIO to resume |
| 6993 | * @WOW_RESUME_TRIGGER_COUNT: number of resume trigger options |
| 6994 | */ |
| 6995 | enum wow_resume_trigger { |
| 6996 | /* always first */ |
| 6997 | WOW_RESUME_TRIGGER_DEFAULT = 0, |
| 6998 | WOW_RESUME_TRIGGER_HTC_WAKEUP, |
| 6999 | WOW_RESUME_TRIGGER_GPIO, |
| 7000 | /* always last */ |
| 7001 | WOW_RESUME_TRIGGER_COUNT |
| 7002 | }; |
| 7003 | |
| 7004 | /** |
| 7005 | * enum wow_interface_pause - interface pause override setting values |
| 7006 | * @WOW_INTERFACE_PAUSE_DEFAULT: use platform default interface pause setting |
| 7007 | * @WOW_INTERFACE_PAUSE_ENABLE: force interface pause setting to enabled |
| 7008 | * @WOW_INTERFACE_PAUSE_DISABLE: force interface pause setting to disabled |
| 7009 | * @WOW_INTERFACE_PAUSE_COUNT: number of interface pause options |
| 7010 | */ |
| 7011 | enum wow_interface_pause { |
| 7012 | /* always first */ |
| 7013 | WOW_INTERFACE_PAUSE_DEFAULT = 0, |
| 7014 | WOW_INTERFACE_PAUSE_ENABLE, |
| 7015 | WOW_INTERFACE_PAUSE_DISABLE, |
| 7016 | /* always last */ |
| 7017 | WOW_INTERFACE_PAUSE_COUNT |
| 7018 | }; |
| 7019 | |
| 7020 | /** |
| 7021 | * struct wow_enable_params - A collection of wow enable override parameters |
| 7022 | * @is_unit_test: true to notify fw this is a unit-test suspend |
| 7023 | * @interface_pause: used to override the interface pause indication sent to fw |
| 7024 | * @resume_trigger: used to force fw to use a particular resume method |
| 7025 | */ |
| 7026 | struct wow_enable_params { |
| 7027 | bool is_unit_test; |
| 7028 | enum wow_interface_pause interface_pause; |
| 7029 | enum wow_resume_trigger resume_trigger; |
| 7030 | }; |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 7031 | |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 7032 | #define HE_LTF_1X 0 |
| 7033 | #define HE_LTF_2X 1 |
| 7034 | #define HE_LTF_4X 2 |
| 7035 | |
| 7036 | #define HE_LTF_ALL 0x7 |
| 7037 | #define HE_SGI_MASK 0xFF00 |
| 7038 | |
| 7039 | #define AUTO_RATE_GI_400NS 8 |
| 7040 | #define AUTO_RATE_GI_800NS 9 |
| 7041 | #define AUTO_RATE_GI_1600NS 10 |
| 7042 | #define AUTO_RATE_GI_3200NS 11 |
| 7043 | |
| 7044 | #define SET_AUTO_RATE_SGI_VAL(set_val, bit_mask) \ |
| 7045 | (set_val = (set_val & HE_LTF_ALL) | bit_mask) |
| 7046 | |
| 7047 | #define SET_AUTO_RATE_HE_LTF_VAL(set_val, bit_mask) \ |
| 7048 | (set_val = (set_val & HE_SGI_MASK) | bit_mask) |
| 7049 | |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 7050 | #ifdef WLAN_FEATURE_11AX |
Naveen Rawat | d8feac1 | 2017-09-08 15:08:39 -0700 | [diff] [blame] | 7051 | #define HE_CAP_OUI_TYPE "\x23" |
| 7052 | #define HE_CAP_OUI_SIZE 1 |
| 7053 | #define HE_OP_OUI_TYPE "\x24" |
| 7054 | #define HE_OP_OUI_SIZE 1 |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 7055 | |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 7056 | #define HE_RU_ALLOC_INDX0_MASK (0x01 << 0) |
| 7057 | #define HE_RU_ALLOC_INDX1_MASK (0x01 << 1) |
| 7058 | #define HE_RU_ALLOC_INDX2_MASK (0x01 << 2) |
| 7059 | #define HE_RU_ALLOC_INDX3_MASK (0x01 << 3) |
| 7060 | |
| 7061 | /* 3 bits for NSS and 4 bits for RU Index */ |
| 7062 | #define HE_PPET_NSS_LEN 3 |
| 7063 | #define HE_PEPT_RU_IDX_LEN 4 |
| 7064 | #define HE_PPET_NSS_RU_LEN (HE_PPET_NSS_LEN + HE_PEPT_RU_IDX_LEN) |
| 7065 | #define HE_PPET_SIZE 3 |
| 7066 | #define HE_BYTE_SIZE 8 |
| 7067 | |
Naveen Rawat | 819158d | 2018-01-16 10:56:45 -0800 | [diff] [blame] | 7068 | struct ppet_hdr { |
| 7069 | uint8_t nss:3; |
| 7070 | uint8_t ru_idx_mask:4; |
| 7071 | uint8_t remaining:1; |
| 7072 | }; |
| 7073 | |
| 7074 | /* MAX PPET size = 7 bits + (max_nss X max_ru_number X 6) = 25 bytes */ |
| 7075 | #define HE_MAX_PPET_SIZE WNI_CFG_HE_PPET_LEN |
| 7076 | |
Krishna Kumaar Natarajan | f567650 | 2017-03-06 10:28:44 -0800 | [diff] [blame] | 7077 | #define HE_MAX_PHY_CAP_SIZE 3 |
| 7078 | |
Naveen Rawat | aeca1b9 | 2017-10-16 16:55:31 -0700 | [diff] [blame] | 7079 | #define HE_CH_WIDTH_GET_BIT(ch_wd, bit) (((ch_wd) >> (bit)) & 1) |
| 7080 | #define HE_CH_WIDTH_COMBINE(b0, b1, b2, b3, b4, b5, b6) \ |
| 7081 | ((uint8_t)(b0) | ((b1) << 1) | ((b2) << 2) | ((b3) << 3) | \ |
| 7082 | ((b4) << 4) | ((b5) << 5) | ((b6) << 6)) |
Krishna Kumaar Natarajan | d1cd56e | 2016-09-30 08:43:03 -0700 | [diff] [blame] | 7083 | |
Naveen Rawat | aeca1b9 | 2017-10-16 16:55:31 -0700 | [diff] [blame] | 7084 | /* |
| 7085 | * MCS values are interpreted as in IEEE 11ax-D1.4 spec onwards |
| 7086 | * +-----------------------------------------------------+ |
| 7087 | * | SS8 | SS7 | SS6 | SS5 | SS4 | SS3 | SS2 | SS1 | |
| 7088 | * +-----------------------------------------------------+ |
| 7089 | * | 15-14 | 13-12 | 11-10 | 9-8 | 7-6 | 5-4 | 3-2 | 1-0 | |
| 7090 | * +-----------------------------------------------------+ |
| 7091 | */ |
| 7092 | #define HE_MCS_NSS_SHIFT(nss) (((nss) - 1) << 1) |
| 7093 | #define HE_MCS_MSK_4_NSS(nss) (3 << HE_MCS_NSS_SHIFT(nss)) |
| 7094 | #define HE_MCS_INV_MSK_4_NSS(nss) (~HE_MCS_MSK_4_NSS(nss)) |
| 7095 | #define HE_GET_MCS_4_NSS(mcs_set, nss) \ |
| 7096 | (((mcs_set) >> HE_MCS_NSS_SHIFT(nss)) & 3) |
| 7097 | #define HE_SET_MCS_4_NSS(mcs_set, mcs, nss) \ |
| 7098 | (((mcs_set) & HE_MCS_INV_MSK_4_NSS(nss)) | \ |
| 7099 | ((mcs) << HE_MCS_NSS_SHIFT(nss))) |
| 7100 | #define HE_MCS_IS_NSS_ENABLED(mcs_set, nss) \ |
| 7101 | ((HE_MCS_MSK_4_NSS(nss) & (mcs_set)) != HE_MCS_MSK_4_NSS(nss)) |
| 7102 | |
| 7103 | #define HE_MCS_ALL_DISABLED 0xFFFF |
Kiran Kumar Lokere | 59a569e | 2018-01-24 15:00:50 -0800 | [diff] [blame] | 7104 | |
| 7105 | #define HE_MCS_0_7 0x0 |
| 7106 | #define HE_MCS_0_9 0x1 |
| 7107 | #define HE_MCS_0_11 0x2 |
| 7108 | #define HE_MCS_DISABLE 0x3 |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 7109 | |
Naveen Rawat | aeca1b9 | 2017-10-16 16:55:31 -0700 | [diff] [blame] | 7110 | /* |
| 7111 | * Following formuala has been arrived at using karnaugh map and unit tested |
| 7112 | * with sample code. Take MCS for each NSS as 2 bit value first and solve for |
| 7113 | * 2 bit intersection of NSS. Use following table/Matrix as guide for solving |
| 7114 | * K-Maps |
| 7115 | * MCS 1\MCS 2 00 01 10 11 |
| 7116 | * 00 00 00 00 11 |
| 7117 | * 01 00 01 01 11 |
| 7118 | * 10 00 01 10 11 |
| 7119 | * 11 11 11 11 11 |
| 7120 | * if output MCS is o1o0, then as per K-map reduction: |
| 7121 | * o0 = m1.m0 | n1.n0 | (~m1).m0.(n1^n0) | (~n1).n0.(m1^m0) |
| 7122 | * o1 = m1.m0 | n1.n0 | m1.(~m0).n1.(~n0) |
| 7123 | * |
| 7124 | * Please note: Calculating MCS intersection is 80211 protocol specific and |
| 7125 | * should be implemented in PE. WMA can use this macro rather than calling any |
| 7126 | * lim API to do the intersection. |
| 7127 | */ |
| 7128 | #define HE_INTERSECT_MCS_BITS_PER_NSS(m1, m0, n1, n0) \ |
| 7129 | (((m1 & m0) | (n1 & n0) | (((~m1) & m0) & (n1 ^ n0)) | \ |
| 7130 | (((~n1) & n0) & (m1 ^ m0))) | (((m1 & m0) | (n1 & n0) | \ |
| 7131 | (m1 & ~m0 & n1 & ~n0)) << 1)) |
| 7132 | |
| 7133 | /* following takes MCS as 2 bits */ |
| 7134 | #define HE_INTERSECT_MCS_PER_NSS(mcs_1, mcs_2) \ |
| 7135 | HE_INTERSECT_MCS_BITS_PER_NSS((mcs_1 >> 1), (mcs_1 & 1), \ |
| 7136 | (mcs_2 >> 1), (mcs_2 & 1)) |
| 7137 | |
| 7138 | /* following takes MCS as 16 bits */ |
| 7139 | #define HE_INTERSECT_MCS(mcs_1, mcs_2) ( \ |
| 7140 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 1), \ |
| 7141 | HE_GET_MCS_4_NSS(mcs_2, 1)) << HE_MCS_NSS_SHIFT(1) | \ |
| 7142 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 2), \ |
| 7143 | HE_GET_MCS_4_NSS(mcs_2, 2)) << HE_MCS_NSS_SHIFT(2) | \ |
| 7144 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 3), \ |
| 7145 | HE_GET_MCS_4_NSS(mcs_2, 3)) << HE_MCS_NSS_SHIFT(3) | \ |
| 7146 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 4), \ |
| 7147 | HE_GET_MCS_4_NSS(mcs_2, 4)) << HE_MCS_NSS_SHIFT(4) | \ |
| 7148 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 5), \ |
| 7149 | HE_GET_MCS_4_NSS(mcs_2, 5)) << HE_MCS_NSS_SHIFT(5) | \ |
| 7150 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 6), \ |
| 7151 | HE_GET_MCS_4_NSS(mcs_2, 6)) << HE_MCS_NSS_SHIFT(6) | \ |
| 7152 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 7), \ |
| 7153 | HE_GET_MCS_4_NSS(mcs_2, 7)) << HE_MCS_NSS_SHIFT(7) | \ |
| 7154 | HE_INTERSECT_MCS_PER_NSS(HE_GET_MCS_4_NSS(mcs_1, 8), \ |
| 7155 | HE_GET_MCS_4_NSS(mcs_2, 8)) << HE_MCS_NSS_SHIFT(8)) |
Krishna Kumaar Natarajan | d1cd56e | 2016-09-30 08:43:03 -0700 | [diff] [blame] | 7156 | |
Krishna Kumaar Natarajan | f567650 | 2017-03-06 10:28:44 -0800 | [diff] [blame] | 7157 | /** |
| 7158 | * struct he_capability - to store 11ax HE capabilities |
| 7159 | * @phy_cap: HE PHY capabilities |
| 7160 | * @mac_cap: HE MAC capabilities |
| 7161 | * @mcs: HE MCS |
| 7162 | * @ppet: HE PPE threshold |
| 7163 | */ |
| 7164 | struct he_capability { |
| 7165 | uint32_t phy_cap[HE_MAX_PHY_CAP_SIZE]; |
| 7166 | uint32_t mac_cap; |
| 7167 | uint32_t mcs; |
| 7168 | struct wlan_psoc_host_ppe_threshold ppet; |
| 7169 | }; |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 7170 | #endif |
| 7171 | |
Naveen Rawat | aeca1b9 | 2017-10-16 16:55:31 -0700 | [diff] [blame] | 7172 | #define HE_GET_NSS(mcs, nss) \ |
| 7173 | do { \ |
| 7174 | (nss) = 0; \ |
Naveen Rawat | cbcc654 | 2017-10-30 17:55:03 -0700 | [diff] [blame] | 7175 | while ((((mcs) >> ((nss)*2)) & 3) != 3 && nss < 8) \ |
Naveen Rawat | aeca1b9 | 2017-10-16 16:55:31 -0700 | [diff] [blame] | 7176 | (nss)++; \ |
| 7177 | } while (0) |
| 7178 | |
Nitesh Shah | 99dd955 | 2017-03-20 19:27:47 +0530 | [diff] [blame] | 7179 | /** |
| 7180 | * struct sir_del_all_tdls_peers - delete all tdls peers |
| 7181 | * @msg_type: type of message |
| 7182 | * @msg_len: length of message |
| 7183 | * @bssid: bssid of peer device |
| 7184 | */ |
| 7185 | struct sir_del_all_tdls_peers { |
| 7186 | uint16_t msg_type; |
| 7187 | uint16_t msg_len; |
| 7188 | struct qdf_mac_addr bssid; |
| 7189 | }; |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 7190 | |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 7191 | /** |
| 7192 | * struct rsp_stats - arp packet stats |
| 7193 | * @arp_req_enqueue: fw tx count |
| 7194 | * @arp_req_tx_success: tx ack count |
| 7195 | * @arp_req_tx_failure: tx ack fail count |
| 7196 | * @arp_rsp_recvd: rx fw count |
| 7197 | * @out_of_order_arp_rsp_drop_cnt: out of order count |
| 7198 | * @dad_detected: dad detected |
| 7199 | * @connect_status: connection status |
| 7200 | * @ba_session_establishment_status: BA session status |
Poddar, Siddarth | 465330e | 2018-01-08 18:23:54 +0530 | [diff] [blame] | 7201 | * @connect_stats_present: connectivity stats present or not |
| 7202 | * @tcp_ack_recvd: tcp syn ack's count |
| 7203 | * @icmpv4_rsp_recvd: icmpv4 responses count |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 7204 | */ |
| 7205 | struct rsp_stats { |
| 7206 | uint32_t vdev_id; |
| 7207 | uint32_t arp_req_enqueue; |
| 7208 | uint32_t arp_req_tx_success; |
| 7209 | uint32_t arp_req_tx_failure; |
| 7210 | uint32_t arp_rsp_recvd; |
| 7211 | uint32_t out_of_order_arp_rsp_drop_cnt; |
| 7212 | uint32_t dad_detected; |
| 7213 | uint32_t connect_status; |
| 7214 | uint32_t ba_session_establishment_status; |
Poddar, Siddarth | 465330e | 2018-01-08 18:23:54 +0530 | [diff] [blame] | 7215 | bool connect_stats_present; |
| 7216 | uint32_t tcp_ack_recvd; |
| 7217 | uint32_t icmpv4_rsp_recvd; |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 7218 | }; |
| 7219 | |
| 7220 | /** |
| 7221 | * struct set_arp_stats_params - set/reset arp stats |
| 7222 | * @vdev_id: session id |
| 7223 | * @flag: enable/disable stats |
| 7224 | * @pkt_type: type of packet(1 - arp) |
| 7225 | * @ip_addr: subnet ipv4 address in case of encrypted packets |
Poddar, Siddarth | 465330e | 2018-01-08 18:23:54 +0530 | [diff] [blame] | 7226 | * @pkt_type_bitmap: pkt bitmap |
| 7227 | * @tcp_src_port: tcp src port for pkt tracking |
| 7228 | * @tcp_dst_port: tcp dst port for pkt tracking |
| 7229 | * @icmp_ipv4: target ipv4 address to track ping packets |
| 7230 | * @reserved: reserved |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 7231 | */ |
| 7232 | struct set_arp_stats_params { |
| 7233 | uint32_t vdev_id; |
| 7234 | uint8_t flag; |
| 7235 | uint8_t pkt_type; |
| 7236 | uint32_t ip_addr; |
Poddar, Siddarth | 465330e | 2018-01-08 18:23:54 +0530 | [diff] [blame] | 7237 | uint32_t pkt_type_bitmap; |
| 7238 | uint32_t tcp_src_port; |
| 7239 | uint32_t tcp_dst_port; |
| 7240 | uint32_t icmp_ipv4; |
| 7241 | uint32_t reserved; |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 7242 | }; |
| 7243 | |
| 7244 | /** |
| 7245 | * struct get_arp_stats_params - get arp stats from firmware |
| 7246 | * @pkt_type: packet type(1 - ARP) |
| 7247 | * @vdev_id: session id |
| 7248 | */ |
| 7249 | struct get_arp_stats_params { |
| 7250 | uint8_t pkt_type; |
| 7251 | uint32_t vdev_id; |
| 7252 | }; |
| 7253 | |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 7254 | typedef void (*sme_rcpi_callback)(void *context, struct qdf_mac_addr mac_addr, |
| 7255 | int32_t rcpi, QDF_STATUS status); |
| 7256 | /** |
| 7257 | * struct sme_rcpi_req - structure for querying rcpi info |
| 7258 | * @session_id: session for which rcpi is required |
| 7259 | * @measurement_type: type of measurement from enum rcpi_measurement_type |
| 7260 | * @rcpi_callback: callback function to be invoked for rcpi response |
| 7261 | * @rcpi_context: context info for rcpi callback |
| 7262 | * @mac_addr: peer addr for which rcpi is required |
| 7263 | */ |
| 7264 | struct sme_rcpi_req { |
| 7265 | uint32_t session_id; |
| 7266 | enum rcpi_measurement_type measurement_type; |
| 7267 | sme_rcpi_callback rcpi_callback; |
| 7268 | void *rcpi_context; |
| 7269 | struct qdf_mac_addr mac_addr; |
| 7270 | }; |
| 7271 | |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 7272 | /* |
| 7273 | * @SCAN_REJECT_DEFAULT: default value |
| 7274 | * @CONNECTION_IN_PROGRESS: connection is in progress |
| 7275 | * @REASSOC_IN_PROGRESS: reassociation is in progress |
| 7276 | * @EAPOL_IN_PROGRESS: STA/P2P-CLI is in middle of EAPOL/WPS exchange |
| 7277 | * @SAP_EAPOL_IN_PROGRESS: SAP/P2P-GO is in middle of EAPOL/WPS exchange |
| 7278 | */ |
| 7279 | enum scan_reject_states { |
| 7280 | SCAN_REJECT_DEFAULT = 0, |
| 7281 | CONNECTION_IN_PROGRESS, |
| 7282 | REASSOC_IN_PROGRESS, |
| 7283 | EAPOL_IN_PROGRESS, |
| 7284 | SAP_EAPOL_IN_PROGRESS, |
| 7285 | }; |
Sandeep Puligilla | f587adf | 2017-04-27 19:53:21 -0700 | [diff] [blame] | 7286 | |
| 7287 | /** |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 7288 | * sir_sme_rx_aggr_hole_ind - sme rx aggr hole indication |
| 7289 | * @hole_cnt: num of holes detected |
| 7290 | * @hole_info_array: hole info |
| 7291 | */ |
| 7292 | struct sir_sme_rx_aggr_hole_ind { |
| 7293 | uint32_t hole_cnt; |
| 7294 | uint32_t hole_info_array[]; |
| 7295 | }; |
| 7296 | |
| 7297 | /** |
| 7298 | * struct sir_set_rx_reorder_timeout_val - rx reorder timeout |
| 7299 | * @rx_timeout_pri: reorder timeout for AC |
| 7300 | * rx_timeout_pri[0] : AC_VO |
| 7301 | * rx_timeout_pri[1] : AC_VI |
| 7302 | * rx_timeout_pri[2] : AC_BE |
| 7303 | * rx_timeout_pri[3] : AC_BK |
| 7304 | */ |
| 7305 | struct sir_set_rx_reorder_timeout_val { |
| 7306 | uint32_t rx_timeout_pri[4]; |
| 7307 | }; |
| 7308 | |
| 7309 | /** |
| 7310 | * struct sir_peer_set_rx_blocksize - set rx blocksize |
| 7311 | * @vdev_id: vdev id |
| 7312 | * @peer_macaddr: peer mac address |
| 7313 | * @rx_block_ack_win_limit: windows size limitation |
| 7314 | */ |
| 7315 | struct sir_peer_set_rx_blocksize { |
| 7316 | uint32_t vdev_id; |
| 7317 | struct qdf_mac_addr peer_macaddr; |
| 7318 | uint32_t rx_block_ack_win_limit; |
| 7319 | }; |
Abhishek Singh | f3756fc | 2017-06-28 16:04:06 +0530 | [diff] [blame] | 7320 | |
| 7321 | /** |
| 7322 | * struct sir_rssi_disallow_lst - Structure holding Rssi based avoid candidate |
| 7323 | * list |
| 7324 | * @node: Node pointer |
| 7325 | * @bssid: BSSID of the AP |
| 7326 | * @retry_delay: Retry delay received during last rejection in ms |
| 7327 | * @ expected_rssi: RSSI at which STA can initate |
| 7328 | * @time_during_rejection: Timestamp during last rejection in millisec |
| 7329 | */ |
| 7330 | struct sir_rssi_disallow_lst { |
| 7331 | qdf_list_node_t node; |
| 7332 | struct qdf_mac_addr bssid; |
| 7333 | uint32_t retry_delay; |
| 7334 | int8_t expected_rssi; |
| 7335 | qdf_time_t time_during_rejection; |
| 7336 | }; |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 7337 | |
| 7338 | /** |
| 7339 | * struct chain_rssi_result - chain rssi result |
Jeff Johnson | 00634ab | 2018-05-10 14:27:50 -0700 | [diff] [blame] | 7340 | * num_chains_valid: valid chain num |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 7341 | * @chain_rssi: chain rssi result as dBm unit |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 7342 | * @ant_id: antenna id |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 7343 | */ |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 7344 | #define CHAIN_MAX_NUM 8 |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 7345 | struct chain_rssi_result { |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 7346 | uint32_t num_chains_valid; |
| 7347 | uint32_t chain_rssi[CHAIN_MAX_NUM]; |
| 7348 | uint32_t ant_id[CHAIN_MAX_NUM]; |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 7349 | }; |
| 7350 | |
| 7351 | /** |
| 7352 | * struct get_chain_rssi_req_params - get chain rssi req params |
| 7353 | * @peer_macaddr: specific peer mac address |
| 7354 | * @session_id: session id |
| 7355 | */ |
| 7356 | struct get_chain_rssi_req_params { |
| 7357 | struct qdf_mac_addr peer_macaddr; |
| 7358 | uint8_t session_id; |
| 7359 | }; |
| 7360 | |
Ganesh Kondabattini | 3573957 | 2017-06-21 16:26:39 +0530 | [diff] [blame] | 7361 | /* |
| 7362 | * struct sir_limit_off_chan - limit off-channel command parameters |
| 7363 | * @vdev_id: vdev id |
| 7364 | * @is_tos_active: status of the traffic (active/inactive) |
| 7365 | * @max_off_chan_time: max allowed off channel time |
| 7366 | * @rest_time: home channel time |
| 7367 | * @skip_dfs_chans: skip dfs channels during scan |
| 7368 | */ |
| 7369 | struct sir_limit_off_chan { |
| 7370 | uint8_t vdev_id; |
| 7371 | bool is_tos_active; |
| 7372 | uint32_t max_off_chan_time; |
| 7373 | uint32_t rest_time; |
| 7374 | bool skip_dfs_chans; |
| 7375 | }; |
Padma, Santhosh Kumar | b38ab51 | 2018-01-16 16:16:46 +0530 | [diff] [blame] | 7376 | |
| 7377 | /** |
| 7378 | * struct sae_info - SAE info used for commit/confirm messages |
| 7379 | * @msg_type: Message type |
| 7380 | * @msg_len: length of message |
| 7381 | * @vdev_id: vdev id |
| 7382 | * @peer_mac_addr: peer MAC address |
| 7383 | * @ssid: SSID |
| 7384 | */ |
| 7385 | struct sir_sae_info { |
| 7386 | uint16_t msg_type; |
| 7387 | uint16_t msg_len; |
| 7388 | uint32_t vdev_id; |
| 7389 | struct qdf_mac_addr peer_mac_addr; |
| 7390 | tSirMacSSid ssid; |
| 7391 | }; |
Padma, Santhosh Kumar | dd3f485 | 2018-01-16 18:51:51 +0530 | [diff] [blame] | 7392 | |
| 7393 | /** |
| 7394 | * struct sir_sae_msg - SAE msg used for message posting |
| 7395 | * @message_type: message type |
| 7396 | * @length: message length |
| 7397 | * @session_id: SME session id |
| 7398 | * @sae_status: SAE status, 0: Success, Non-zero: Failure. |
| 7399 | */ |
| 7400 | struct sir_sae_msg { |
| 7401 | uint16_t message_type; |
| 7402 | uint16_t length; |
| 7403 | uint16_t session_id; |
| 7404 | uint8_t sae_status; |
| 7405 | }; |
| 7406 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7407 | #endif /* __SIR_API_H */ |