1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* 21 * This file contains the API definitions for the Unified Wireless Module 22 * Interface (WMI). 23 */ 24 25 #ifndef _WMI_UNIFIED_PARAM_H_ 26 #define _WMI_UNIFIED_PARAM_H_ 27 28 #include <wlan_scan_public_structs.h> 29 #ifdef FEATURE_WLAN_TDLS 30 #include <wlan_tdls_public_structs.h> 31 #endif 32 #ifdef WLAN_CONV_SPECTRAL_ENABLE 33 #include <wlan_spectral_public_structs.h> 34 #endif /* WLAN_CONV_SPECTRAL_ENABLE */ 35 36 #include "wifi_pos_public_struct.h" 37 #include <wlan_vdev_mgr_tgt_if_tx_defs.h> 38 #include <wlan_vdev_mgr_tgt_if_rx_defs.h> 39 #include <reg_services_public_struct.h> 40 41 #ifndef ENABLE_HOST_TO_TARGET_CONVERSION 42 #include <wmi_unified.h> 43 #endif 44 #include <wlan_objmgr_vdev_obj.h> 45 46 #define MAC_MAX_KEY_LENGTH 32 47 #define MAC_PN_LENGTH 8 48 #define MAX_MAC_HEADER_LEN 32 49 #define MIN_MAC_HEADER_LEN 24 50 #define QOS_CONTROL_LEN 2 51 52 #define WMI_MAC_MAX_SSID_LENGTH 32 53 #ifndef CONFIG_HL_SUPPORT 54 #define mgmt_tx_dl_frm_len 64 55 #else 56 #define mgmt_tx_dl_frm_len 1532 57 #endif 58 #define WMI_SMPS_MASK_LOWER_16BITS 0xFF 59 #define WMI_SMPS_MASK_UPPER_3BITS 0x7 60 #define WMI_SMPS_PARAM_VALUE_S 29 61 #define WMI_UNIT_TEST_MAX_NUM_ARGS 100 62 /* The size of the utc time in bytes. */ 63 #define WMI_SIZE_UTC_TIME (10) 64 /* The size of the utc time error in bytes. */ 65 #define WMI_SIZE_UTC_TIME_ERROR (5) 66 #ifdef WLAN_MCC_MIN_CHANNEL_QUOTA 67 #define WMI_MCC_MIN_CHANNEL_QUOTA WLAN_MCC_MIN_CHANNEL_QUOTA 68 #define WMI_MCC_MAX_CHANNEL_QUOTA (100 - WLAN_MCC_MIN_CHANNEL_QUOTA) 69 #else 70 #define WMI_MCC_MIN_CHANNEL_QUOTA 20 71 #define WMI_MCC_MAX_CHANNEL_QUOTA 80 72 #endif 73 #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30 74 75 #ifdef WMI_AP_SUPPORT 76 #define WMI_BEACON_TX_BUFFER_SIZE (2500) 77 #else 78 #define WMI_BEACON_TX_BUFFER_SIZE (512) 79 #endif 80 81 #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3 82 #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 83 #define WMI_RSSI_THOLD_DEFAULT -300 84 #define WMI_NLO_FREQ_THRESH 1000 85 #define WMI_SEC_TO_MSEC(sec) (sec * 1000) 86 #define WMI_MSEC_TO_USEC(msec) (msec * 1000) 87 #define WMI_ETH_LEN 64 88 #define WMI_QOS_NUM_TSPEC_MAX 2 89 #define WMI_IPV4_ADDR_LEN 4 90 #define WMI_KEEP_ALIVE_NULL_PKT 1 91 #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 92 #define WMI_KEEP_ALIVE_MGMT_FRAME 5 93 #define WMI_MAC_MAX_KEY_LENGTH 32 94 #define WMI_KRK_KEY_LEN 16 95 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 96 #define WMI_BTK_KEY_LEN 32 97 #define WMI_ROAM_R0KH_ID_MAX_LEN 48 98 #endif 99 #define WMI_NOISE_FLOOR_DBM_DEFAULT (-96) 100 #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8 101 #define WMI_ROAM_MAX_CHANNELS 80 102 #ifdef FEATURE_WLAN_EXTSCAN 103 #define WMI_MAX_EXTSCAN_MSG_SIZE 1536 104 #define WMI_EXTSCAN_REST_TIME 100 105 #define WMI_EXTSCAN_MAX_SCAN_TIME 50000 106 #define WMI_EXTSCAN_BURST_DURATION 150 107 #endif 108 #define WMI_SCAN_NPROBES_DEFAULT (2) 109 #define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */ 110 #define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */ 111 #define WMI_NLO_FREQ_THRESH 1000 /* in MHz */ 112 113 #define WMI_SVC_MSG_MAX_SIZE 1536 114 #define MAX_UTF_EVENT_LENGTH 2048 115 #define MAX_WMI_UTF_LEN 252 116 #define MAX_WMI_QVIT_LEN 252 117 #define THERMAL_LEVELS 4 118 #define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES 256 119 #define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \ 120 (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32) 121 #define LTEU_MAX_BINS 10 122 #define ATF_ACTIVED_MAX_CLIENTS 50 123 #define ATF_ACTIVED_MAX_ATFGROUPS 16 124 #define CTL_5G_SIZE 1536 125 #define CTL_2G_SIZE 684 126 #define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE) 127 #define MAX_PWTAB_SIZE 3392 128 #define IEEE80211_MICBUF_SIZE (8+8) 129 #define IEEE80211_TID_SIZE 17 130 #define WME_NUM_AC 4 131 #define SMART_ANT_MODE_SERIAL 0 132 #define SMART_ANT_MODE_PARALLEL 1 133 #define IEEE80211_WEP_NKID 4 /* number of key ids */ 134 #define WPI_IV_LEN 16 135 #define WMI_SCAN_MAX_NUM_BSSID 10 136 #define MAX_CHANS 1023 137 #define TARGET_OEM_CONFIGURE_LCI 0x0A 138 #define RTT_LCI_ALTITUDE_MASK 0x3FFFFFFF 139 #define TARGET_OEM_CONFIGURE_LCR 0x09 140 #define RTT_TIMEOUT_MS 180 141 #define MAX_SUPPORTED_RATES 128 142 #define WMI_HOST_MAX_BUFFER_SIZE 1712 143 #define WMI_HAL_MAX_SANTENNA 4 144 #define WMI_HOST_PDEV_VI_PRIORITY_BIT (1<<2) 145 #define WMI_HOST_PDEV_BEACON_PRIORITY_BIT (1<<4) 146 #define WMI_HOST_PDEV_MGMT_PRIORITY_BIT (1<<5) 147 #define WMI_MAX_CMDS 1024 148 149 #define FIPS_ALIGN 4 150 #define FIPS_ALIGNTO(__addr, __to) \ 151 ((((unsigned long int)(__addr)) + (__to) - 1) & ~((__to) - 1)) 152 #define FIPS_IS_ALIGNED(__addr, __to) \ 153 (!(((unsigned long int)(__addr)) & ((__to)-1))) 154 155 #define WMI_HOST_MAX_SERIAL_ANTENNA 2 156 #define WMI_SMART_ANT_MAX_RATE_SERIES 2 157 158 #define WMI_HOST_F_MS(_v, _f) \ 159 (((_v) & (_f)) >> (_f##_S)) 160 161 #define WMI_HOST_F_RMW(_var, _v, _f) \ 162 do { \ 163 (_var) &= ~(_f); \ 164 (_var) |= (((_v) << (_f##_S)) & (_f)); \ 165 } while (0) 166 167 /* vdev capabilities bit mask */ 168 #define WMI_HOST_VDEV_BEACON_SUPPORT 0x1 169 #define WMI_HOST_VDEV_WDS_LRN_ENABLED 0x2 170 #define WMI_HOST_VDEV_VOW_ENABLED 0x4 171 #define WMI_HOST_VDEV_IS_BEACON_SUPPORTED(param) \ 172 ((param) & WMI_HOST_VDEV_BEACON_SUPPORT) 173 #define WMI_HOST_VDEV_IS_WDS_LRN_ENABLED(param) \ 174 ((param) & WMI_HOST_VDEV_WDS_LRN_ENABLED) 175 #define WMI_HOST_VDEV_IS_VOW_ENABLED(param) \ 176 ((param) & WMI_HOST_VDEV_VOW_ENABLED) 177 178 /* TXBF capabilities masks */ 179 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0 180 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1 181 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE \ 182 (WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S) 183 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \ 184 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE) 185 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \ 186 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE) 187 188 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1 189 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1 190 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE \ 191 (WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S) 192 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \ 193 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE) 194 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \ 195 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE) 196 197 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2 198 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1 199 #define WMI_HOST_TXBF_CONF_SU_TX_BFER \ 200 (WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S) 201 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \ 202 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER) 203 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \ 204 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER) 205 206 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3 207 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1 208 #define WMI_HOST_TXBF_CONF_MU_TX_BFER \ 209 (WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S) 210 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \ 211 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER) 212 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \ 213 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER) 214 215 #define WMI_HOST_TXBF_CONF_STS_CAP_S 4 216 #define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7 217 #define WMI_HOST_TXBF_CONF_STS_CAP \ 218 (WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S) 219 #define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \ 220 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP); 221 #define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \ 222 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP) 223 224 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7 225 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1 226 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF \ 227 (WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S) 228 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \ 229 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF) 230 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \ 231 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF) 232 233 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8 234 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7 235 #define WMI_HOST_TXBF_CONF_BF_SND_DIM \ 236 (WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S) 237 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \ 238 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM) 239 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \ 240 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM) 241 242 /* The following WMI_HOST_HEOPS_BSSCOLOR_XXX macros correspond to the 243 * WMI_HEOPS_COLOR_XXX macros in the FW wmi_unified.h */ 244 #ifdef SUPPORT_11AX_D3 245 #define WMI_HOST_HEOPS_BSSCOLOR_S 24 246 #else 247 #define WMI_HOST_HEOPS_BSSCOLOR_S 0 248 #endif 249 250 #define WMI_HOST_HEOPS_BSSCOLOR_M 0x3f 251 #define WMI_HOST_HEOPS_BSSCOLOR \ 252 (WMI_HOST_HEOPS_BSSCOLOR_M << WMI_HOST_HEOPS_BSSCOLOR_S) 253 #define WMI_HOST_HEOPS_BSSCOLOR_GET(x) \ 254 WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR) 255 #define WMI_HOST_HEOPS_BSSCOLOR_SET(x, z) \ 256 WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR) 257 258 /* The following WMI_HOST_HEOPS_BSSCOLOR_DISABLE_XXX macros correspond to the 259 * WMI_HEOPS_BSSCOLORDISABLE_XXX macros in the FW wmi_unified.h */ 260 #ifdef SUPPORT_11AX_D3 261 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S 31 262 #else 263 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S 30 264 #endif 265 266 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M 0x1 267 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE \ 268 (WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M << WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S) 269 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_GET(x) \ 270 WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR_DISABLE) 271 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_SET(x, z) \ 272 WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR_DISABLE) 273 274 /* HE BF capabilities mask */ 275 #define WMI_HOST_HE_BF_CONF_SU_BFEE_S 0 276 #define WMI_HOST_HE_BF_CONF_SU_BFEE_M 0x1 277 #define WMI_HOST_HE_BF_CONF_SU_BFEE \ 278 (WMI_HOST_HE_BF_CONF_SU_BFEE_M << WMI_HOST_HE_BF_CONF_SU_BFEE_S) 279 #define WMI_HOST_HE_BF_CONF_SU_BFEE_GET(x) \ 280 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFEE) 281 #define WMI_HOST_HE_BF_CONF_SU_BFEE_SET(x, z) \ 282 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFEE) 283 284 #define WMI_HOST_HE_BF_CONF_SU_BFER_S 1 285 #define WMI_HOST_HE_BF_CONF_SU_BFER_M 0x1 286 #define WMI_HOST_HE_BF_CONF_SU_BFER \ 287 (WMI_HOST_HE_BF_CONF_SU_BFER_M << WMI_HOST_HE_BF_CONF_SU_BFER_S) 288 #define WMI_HOST_HE_BF_CONF_SU_BFER_GET(x) \ 289 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFER) 290 #define WMI_HOST_HE_BF_CONF_SU_BFER_SET(x, z) \ 291 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFER) 292 293 #define WMI_HOST_HE_BF_CONF_MU_BFEE_S 2 294 #define WMI_HOST_HE_BF_CONF_MU_BFEE_M 0x1 295 #define WMI_HOST_HE_BF_CONF_MU_BFEE \ 296 (WMI_HOST_HE_BF_CONF_MU_BFEE_M << WMI_HOST_HE_BF_CONF_MU_BFEE_S) 297 #define WMI_HOST_HE_BF_CONF_MU_BFEE_GET(x) \ 298 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFEE) 299 #define WMI_HOST_HE_BF_CONF_MU_BFEE_SET(x, z) \ 300 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFEE) 301 302 #define WMI_HOST_HE_BF_CONF_MU_BFER_S 3 303 #define WMI_HOST_HE_BF_CONF_MU_BFER_M 0x1 304 #define WMI_HOST_HE_BF_CONF_MU_BFER \ 305 (WMI_HOST_HE_BF_CONF_MU_BFER_M << WMI_HOST_HE_BF_CONF_MU_BFER_S) 306 #define WMI_HOST_HE_BF_CONF_MU_BFER_GET(x) \ 307 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFER) 308 #define WMI_HOST_HE_BF_CONF_MU_BFER_SET(x, z) \ 309 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFER) 310 311 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_S 4 312 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_M 0x1 313 #define WMI_HOST_HE_BF_CONF_DL_OFDMA \ 314 (WMI_HOST_HE_BF_CONF_DL_OFDMA_M << WMI_HOST_HE_BF_CONF_DL_OFDMA_S) 315 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_GET(x) \ 316 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_DL_OFDMA) 317 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_SET(x, z) \ 318 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_DL_OFDMA) 319 320 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_S 5 321 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_M 0x1 322 #define WMI_HOST_HE_BF_CONF_UL_OFDMA \ 323 (WMI_HOST_HE_BF_CONF_UL_OFDMA_M << WMI_HOST_HE_BF_CONF_UL_OFDMA_S) 324 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_GET(x) \ 325 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_OFDMA) 326 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_SET(x, z) \ 327 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_OFDMA) 328 329 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_S 6 330 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_M 0x1 331 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO \ 332 (WMI_HOST_HE_BF_CONF_UL_MUMIMO_M << WMI_HOST_HE_BF_CONF_UL_MUMIMO_S) 333 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_GET(x) \ 334 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_MUMIMO) 335 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_SET(x, z) \ 336 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_MUMIMO) 337 338 /* HE or VHT Sounding */ 339 #define WMI_HOST_HE_VHT_SOUNDING_MODE_S 0 340 #define WMI_HOST_HE_VHT_SOUNDING_MODE_M 0x1 341 #define WMI_HOST_HE_VHT_SOUNDING_MODE \ 342 (WMI_HOST_HE_VHT_SOUNDING_MODE_M << WMI_HOST_HE_VHT_SOUNDING_MODE_S) 343 #define WMI_HOST_HE_VHT_SOUNDING_MODE_GET(x) \ 344 WMI_HOST_F_MS(x, WMI_HOST_HE_VHT_SOUNDING_MODE) 345 #define WMI_HOST_HE_VHT_SOUNDING_MODE_SET(x, z) \ 346 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_VHT_SOUNDING_MODE) 347 348 /* SU or MU Sounding */ 349 #define WMI_HOST_SU_MU_SOUNDING_MODE_S 2 350 #define WMI_HOST_SU_MU_SOUNDING_MODE_M 0x1 351 #define WMI_HOST_SU_MU_SOUNDING_MODE \ 352 (WMI_HOST_SU_MU_SOUNDING_MODE_M << \ 353 WMI_HOST_SU_MU_SOUNDING_MODE_S) 354 #define WMI_HOST_SU_MU_SOUNDING_MODE_GET(x) \ 355 WMI_HOST_F_MS(x, WMI_HOST_SU_MU_SOUNDING_MODE) 356 #define WMI_HOST_SU_MU_SOUNDING_MODE_SET(x, z) \ 357 WMI_HOST_F_RMW(x, z, WMI_HOST_SU_MU_SOUNDING_MODE) 358 359 /* Trig or Non-Trig Sounding */ 360 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S 3 361 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M 0x1 362 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE \ 363 (WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M << \ 364 WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S) 365 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_GET(x) \ 366 WMI_HOST_F_MS(x, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE) 367 #define WMI_HOST_HE_VHT_SU_MU_SOUNDING_MODE_SET(x, z) \ 368 WMI_HOST_F_RMW(x, z, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE) 369 370 #ifdef WLAN_FEATURE_11BE 371 /* EHT BF capabilities mask */ 372 #define WMI_HOST_EHT_CONF_SU_BFEE_S 0 373 #define WMI_HOST_EHT_CONF_SU_BFEE_M 0x1 374 #define WMI_HOST_EHT_CONF_SU_BFEE \ 375 (WMI_HOST_EHT_CONF_SU_BFEE_M << WMI_HOST_EHT_CONF_SU_BFEE_S) 376 #define WMI_HOST_EHT_CONF_SU_BFEE_GET(x) \ 377 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_SU_BFEE) 378 #define WMI_HOST_EHT_CONF_SU_BFEE_SET(x, z) \ 379 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_SU_BFEE) 380 381 #define WMI_HOST_EHT_CONF_SU_BFER_S 1 382 #define WMI_HOST_EHT_CONF_SU_BFER_M 0x1 383 #define WMI_HOST_EHT_CONF_SU_BFER \ 384 (WMI_HOST_EHT_CONF_SU_BFER_M << WMI_HOST_EHT_CONF_SU_BFER_S) 385 #define WMI_HOST_EHT_CONF_SU_BFER_GET(x) \ 386 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_SU_BFER) 387 #define WMI_HOST_EHT_CONF_SU_BFER_SET(x, z) \ 388 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_SU_BFER) 389 390 #define WMI_HOST_EHT_CONF_MU_BFEE_S 2 391 #define WMI_HOST_EHT_CONF_MU_BFEE_M 0x1 392 #define WMI_HOST_EHT_CONF_MU_BFEE \ 393 (WMI_HOST_EHT_CONF_MU_BFEE_M << WMI_HOST_EHT_CONF_MU_BFEE_S) 394 #define WMI_HOST_EHT_CONF_MU_BFEE_GET(x) \ 395 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_MU_BFEE) 396 #define WMI_HOST_EHT_CONF_MU_BFEE_SET(x, z) \ 397 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_MU_BFEE) 398 399 #define WMI_HOST_EHT_CONF_MU_BFER_S 3 400 #define WMI_HOST_EHT_CONF_MU_BFER_M 0x1 401 #define WMI_HOST_EHT_CONF_MU_BFER \ 402 (WMI_HOST_EHT_CONF_MU_BFER_M << WMI_HOST_EHT_CONF_MU_BFER_S) 403 #define WMI_HOST_EHT_CONF_MU_BFER_GET(x) \ 404 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_MU_BFER) 405 #define WMI_HOST_EHT_CONF_MU_BFER_SET(x, z) \ 406 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_MU_BFER) 407 408 #define WMI_HOST_EHT_CONF_DL_OFDMA_S 4 409 #define WMI_HOST_EHT_CONF_DL_OFDMA_M 0x1 410 #define WMI_HOST_EHT_CONF_DL_OFDMA \ 411 (WMI_HOST_EHT_CONF_DL_OFDMA_M << WMI_HOST_EHT_CONF_DL_OFDMA_S) 412 #define WMI_HOST_EHT_CONF_DL_OFDMA_GET(x) \ 413 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_DL_OFDMA) 414 #define WMI_HOST_EHT_CONF_DL_OFDMA_SET(x, z) \ 415 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_DL_OFDMA) 416 417 #define WMI_HOST_EHT_CONF_UL_OFDMA_S 5 418 #define WMI_HOST_EHT_CONF_UL_OFDMA_M 0x1 419 #define WMI_HOST_EHT_CONF_UL_OFDMA \ 420 (WMI_HOST_EHT_CONF_UL_OFDMA_M << WMI_HOST_EHT_CONF_UL_OFDMA_S) 421 #define WMI_HOST_EHT_CONF_UL_OFDMA_GET(x) \ 422 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_UL_OFDMA) 423 #define WMI_HOST_EHT_CONF_UL_OFDMA_SET(x, z) \ 424 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_UL_OFDMA) 425 426 #define WMI_HOST_EHT_CONF_UL_MUMIMO_S 6 427 #define WMI_HOST_EHT_CONF_UL_MUMIMO_M 0x1 428 #define WMI_HOST_EHT_CONF_UL_MUMIMO \ 429 (WMI_HOST_EHT_CONF_UL_MUMIMO_M << WMI_HOST_EHT_CONF_UL_MUMIMO_S) 430 #define WMI_HOST_EHT_CONF_UL_MUMIMO_GET(x) \ 431 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_UL_MUMIMO) 432 #define WMI_HOST_EHT_CONF_UL_MUMIMO_SET(x, z) \ 433 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_UL_MUMIMO) 434 435 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_S 7 436 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_M 0x1 437 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF \ 438 (WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_M << \ 439 WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_S) 440 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_GET(x) \ 441 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_DL_OFDMA_TXBF) 442 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_SET(x, z) \ 443 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_DL_OFDMA_TXBF) 444 445 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_S 8 446 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_M 0x1 447 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO \ 448 (WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_M << \ 449 WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_S) 450 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_GET(x) \ 451 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO) 452 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_SET(x, z) \ 453 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO) 454 455 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_S 9 456 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_M 0x1 457 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO \ 458 (WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_M << \ 459 WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_S) 460 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_GET(x) \ 461 WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO) 462 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_SET(x, z) \ 463 WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO) 464 465 /* Firmware uses most significant 4 bits to differentiate */ 466 /* some of vdev params between HE and EHT */ 467 #define WMI_HOST_VDEV_PARAM_EHT_MODE 0x10000000 468 #endif 469 470 #define WMI_HOST_TPC_RATE_MAX 160 471 #define WMI_HOST_TPC_TX_NUM_CHAIN 4 472 #define WMI_HOST_RXG_CAL_CHAN_MAX 8 473 #define WMI_HOST_MAX_NUM_CHAINS 8 474 #define WMI_MAX_NUM_OF_RATE_THRESH 4 475 476 #define WMI_HOST_PDEV_MAX_VDEVS 17 477 478 /* for QC98XX only */ 479 /*6 modes (A, HT20, HT40, VHT20, VHT40, VHT80) * 3 reg dommains 480 */ 481 #define WMI_HOST_NUM_CTLS_5G 18 482 /*6 modes (B, G, HT20, HT40, VHT20, VHT40) * 3 reg domains */ 483 #define WMI_HOST_NUM_CTLS_2G 18 484 #define WMI_HOST_NUM_BAND_EDGES_5G 8 485 #define WMI_HOST_NUM_BAND_EDGES_2G 4 486 487 /*Beelinier 5G*/ 488 #define WMI_HOST_NUM_CTLS_5G_11A 9 489 #define WMI_HOST_NUM_BAND_EDGES_5G_11A 25 490 #define WMI_HOST_NUM_CTLS_5G_HT20 24 491 #define WMI_HOST_NUM_BAND_EDGES_5G_HT20 25 492 #define WMI_HOST_NUM_CTLS_5G_HT40 18 493 #define WMI_HOST_NUM_BAND_EDGES_5G_HT40 12 494 #define WMI_HOST_NUM_CTLS_5G_HT80 18 495 #define WMI_HOST_NUM_BAND_EDGES_5G_HT80 6 496 #define WMI_HOST_NUM_CTLS_5G_HT160 9 497 #define WMI_HOST_NUM_BAND_EDGES_5G_HT160 2 498 499 /* Beeliner 2G */ 500 #define WMI_HOST_NUM_CTLS_2G_11B 6 501 #define WMI_HOST_NUM_BAND_EDGES_2G_11B 9 502 #define WMI_HOST_NUM_CTLS_2G_20MHZ 30 503 #define WMI_HOST_NUM_BAND_EDGES_2G_20MHZ 11 504 #define WMI_HOST_NUM_CTLS_2G_40MHZ 18 505 #define WMI_HOST_NUM_BAND_EDGES_2G_40MHZ 6 506 507 /* for QC98XX only */ 508 #define WMI_HOST_TX_NUM_CHAIN 0x3 509 #define WMI_HOST_TPC_REGINDEX_MAX 4 510 #define WMI_HOST_ARRAY_GAIN_NUM_STREAMS 2 511 512 /* AST Index for flow override */ 513 #define WMI_CONFIG_MSDU_AST_INDEX_0 0x0 514 #define WMI_CONFIG_MSDU_AST_INDEX_1 0x1 515 #define WMI_CONFIG_MSDU_AST_INDEX_2 0x2 516 #define WMI_CONFIG_MSDU_AST_INDEX_3 0x3 517 518 #define WMI_MAX_AOA_PHASE_DELTA 31 519 #define WMI_MAX_CHAINS_PHASE 2 520 #define EGID_INFO_SIZE 4 521 522 #include "qdf_atomic.h" 523 524 #ifdef BIG_ENDIAN_HOST 525 /* This API is used in copying in elements to WMI message, 526 since WMI message uses multilpes of 4 bytes, This API 527 converts length into multiples of 4 bytes, and performs copy 528 */ 529 #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) do { \ 530 int j; \ 531 u_int32_t *src, *dest; \ 532 src = (u_int32_t *)srcp; \ 533 dest = (u_int32_t *)destp; \ 534 for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \ 535 *(dest+j) = qdf_le32_to_cpu(*(src+j)); \ 536 } \ 537 } while (0) 538 #else 539 540 #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\ 541 srcp, len) 542 543 #endif 544 545 /** macro to convert MAC address from WMI word format to char array */ 546 #define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \ 547 (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \ 548 (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \ 549 (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \ 550 (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \ 551 (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \ 552 (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \ 553 } while (0) 554 555 #define TARGET_INIT_STATUS_SUCCESS 0x0 556 #define TARGET_INIT_STATUS_GEN_FAILED 0x1 557 #define TARGET_GET_INIT_STATUS_REASON(status) ((status) & 0xffff) 558 #define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff) 559 560 #define MAX_ASSOC_IE_LENGTH 1024 561 562 /* 563 * The WLAN_MAX_AC macro cannot be changed without breaking 564 * WMI compatibility. 565 * The maximum value of access category 566 */ 567 #define WMI_HOST_WLAN_MAX_AC 4 568 typedef uint32_t TARGET_INIT_STATUS; 569 570 /* 571 * Opaque handle of wmi structure 572 */ 573 struct wmi_unified; 574 typedef struct wmi_unified *wmi_unified_t; 575 576 typedef void *ol_scn_t; 577 578 /** 579 * typedef wmi_unified_event_handler - WMI event handler 580 * @scn_handle: handle 581 * @event_buf: event buffer 582 * @len: length of the event buffer 583 * 584 * Return: 0 if the event was handled, negative errno otherwise 585 */ 586 typedef int (*wmi_unified_event_handler)(ol_scn_t scn_handle, 587 uint8_t *event_buf, uint32_t len); 588 589 /* 590 * @WMI_HOST_WLAN_PHY_MODE: Host based enum ID for corresponding in 591 * WLAN_PHY_MODE. This should be consistent with WLAN_PHY_MODE always to avoid 592 * breaking the WMI 593 */ 594 typedef enum { 595 WMI_HOST_MODE_11A = 0, /* 11a Mode */ 596 WMI_HOST_MODE_11G = 1, /* 11b/g Mode */ 597 WMI_HOST_MODE_11B = 2, /* 11b Mode */ 598 WMI_HOST_MODE_11GONLY = 3, /* 11g only Mode */ 599 WMI_HOST_MODE_11NA_HT20 = 4, /* 11a HT20 mode */ 600 WMI_HOST_MODE_11NG_HT20 = 5, /* 11g HT20 mode */ 601 WMI_HOST_MODE_11NA_HT40 = 6, /* 11a HT40 mode */ 602 WMI_HOST_MODE_11NG_HT40 = 7, /* 11g HT40 mode */ 603 WMI_HOST_MODE_11AC_VHT20 = 8, 604 WMI_HOST_MODE_11AC_VHT40 = 9, 605 WMI_HOST_MODE_11AC_VHT80 = 10, 606 WMI_HOST_MODE_11AC_VHT20_2G = 11, 607 WMI_HOST_MODE_11AC_VHT40_2G = 12, 608 WMI_HOST_MODE_11AC_VHT80_2G = 13, 609 WMI_HOST_MODE_11AC_VHT80_80 = 14, 610 WMI_HOST_MODE_11AC_VHT160 = 15, 611 WMI_HOST_MODE_11AX_HE20 = 16, 612 WMI_HOST_MODE_11AX_HE40 = 17, 613 WMI_HOST_MODE_11AX_HE80 = 18, 614 WMI_HOST_MODE_11AX_HE80_80 = 19, 615 WMI_HOST_MODE_11AX_HE160 = 20, 616 WMI_HOST_MODE_11AX_HE20_2G = 21, 617 WMI_HOST_MODE_11AX_HE40_2G = 22, 618 WMI_HOST_MODE_11AX_HE80_2G = 23, 619 #ifdef WLAN_FEATURE_11BE 620 WMI_HOST_MODE_11BE_EHT20 = 24, 621 WMI_HOST_MODE_11BE_EHT40 = 25, 622 WMI_HOST_MODE_11BE_EHT80 = 26, 623 WMI_HOST_MODE_11BE_EHT160 = 28, 624 WMI_HOST_MODE_11BE_EHT320 = 30, 625 WMI_HOST_MODE_11BE_EHT20_2G = 31, 626 WMI_HOST_MODE_11BE_EHT40_2G = 32, 627 #endif 628 WMI_HOST_MODE_UNKNOWN, 629 WMI_HOST_MODE_MAX = WMI_HOST_MODE_UNKNOWN, 630 } WMI_HOST_WLAN_PHY_MODE; 631 632 /* 633 * Needs to be removed and use channel_param based 634 * on how it is processed 635 */ 636 typedef struct { 637 /** primary 20 MHz channel frequency in mhz */ 638 uint32_t mhz; 639 /** Center frequency 1 in MHz*/ 640 uint32_t band_center_freq1; 641 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/ 642 uint32_t band_center_freq2; 643 /** channel info described below */ 644 uint32_t info; 645 /** contains min power, max power, reg power and reg class id. */ 646 uint32_t reg_info_1; 647 /** contains antennamax */ 648 uint32_t reg_info_2; 649 } wmi_host_channel; 650 651 /** 652 * enum WMI_HOST_WLAN_BAND_CAPABILITY: Band capability (2.4 GHz, 5 GHz). Maps to 653 * WLAN_BAND_CAPABILITY used in firmware header file(s). 654 * @WMI_HOST_WLAN_2G_CAPABILITY: 2.4 GHz capable 655 * @WMI_HOST_WLAN_5G_CAPABILITY: 5 GHz capable 656 */ 657 typedef enum { 658 WMI_HOST_WLAN_2G_CAPABILITY = 0x1, 659 WMI_HOST_WLAN_5G_CAPABILITY = 0x2, 660 } WMI_HOST_WLAN_BAND_CAPABILITY; 661 662 /** 663 * enum wmi_host_channel_width: Channel operating width. Maps to 664 * wmi_channel_width used in firmware header file(s). 665 * @WMI_HOST_CHAN_WIDTH_20: 20 MHz channel operating width 666 * @WMI_HOST_CHAN_WIDTH_40: 40 MHz channel operating width 667 * @WMI_HOST_CHAN_WIDTH_80: 80 MHz channel operating width 668 * @WMI_HOST_CHAN_WIDTH_160: 160 MHz channel operating width 669 * @WMI_HOST_CHAN_WIDTH_80P80: 80+80 MHz channel operating width 670 * @WMI_HOST_CHAN_WIDTH_5: 5 MHz channel operating width 671 * @WMI_HOST_CHAN_WIDTH_10: 10 MHz channel operating width 672 * @WMI_HOST_CHAN_WIDTH_165: 165 MHz channel operating width 673 * @WMI_HOST_CHAN_WIDTH_160P160: 160 MHz + 160 MHz channel operating width 674 * @WMI_HOST_CHAN_WIDTH_320: 320 MHz channel operating width 675 */ 676 typedef enum { 677 WMI_HOST_CHAN_WIDTH_20 = 0, 678 WMI_HOST_CHAN_WIDTH_40 = 1, 679 WMI_HOST_CHAN_WIDTH_80 = 2, 680 WMI_HOST_CHAN_WIDTH_160 = 3, 681 WMI_HOST_CHAN_WIDTH_80P80 = 4, 682 WMI_HOST_CHAN_WIDTH_5 = 5, 683 WMI_HOST_CHAN_WIDTH_10 = 6, 684 WMI_HOST_CHAN_WIDTH_165 = 7, 685 WMI_HOST_CHAN_WIDTH_160P160 = 8, 686 WMI_HOST_CHAN_WIDTH_320 = 9, 687 } wmi_host_channel_width; 688 689 #define ATH_EXPONENT_TO_VALUE(v) ((1<<v)-1) 690 #define ATH_TXOP_TO_US(v) (v<<5) 691 /* WME stream classes */ 692 #define WMI_HOST_AC_BE 0 /* best effort */ 693 #define WMI_HOST_AC_BK 1 /* background */ 694 #define WMI_HOST_AC_VI 2 /* video */ 695 #define WMI_HOST_AC_VO 3 /* voice */ 696 #define WMI_TID_TO_AC(_tid) (\ 697 (((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \ 698 (((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \ 699 (((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \ 700 WMI_HOST_AC_VO) 701 702 /** 703 * struct channel_param - Channel parameters with all 704 * info required by target. 705 * @chan_id: channel id 706 * @pwr: channel power 707 * @mhz: channel frequency 708 * @half_rate: is half rate 709 * @quarter_rate: is quarter rate 710 * @dfs_set: is dfs channel 711 * @dfs_set_cfreq2: is secondary freq dfs channel 712 * @is_chan_passive: is this passive channel 713 * @allow_ht: HT allowed in chan 714 * @allow_vht: VHT allowed on chan 715 * @set_agile: is agile mode 716 * @allow_he: HE allowed on chan 717 * @psc_channel: 6 ghz preferred scan chan 718 * @nan_disabled: is NAN disabled on @mhz 719 * @allow_eht: EHT allowed on chan 720 * @phy_mode: phymode (vht80 or ht40 or ...) 721 * @cfreq1: centre frequency on primary 722 * @cfreq2: centre frequency on secondary 723 * @maxpower: max power for channel 724 * @minpower: min power for channel 725 * @maxregpower: Max regulatory power 726 * @antennamax: Max antenna 727 * @reg_class_id: Regulatory class id. 728 * @max_bw_supported: max BW supported 729 */ 730 731 struct channel_param { 732 uint8_t chan_id; 733 uint8_t pwr; 734 uint32_t mhz; 735 uint32_t half_rate:1, 736 quarter_rate:1, 737 dfs_set:1, 738 dfs_set_cfreq2:1, 739 is_chan_passive:1, 740 allow_ht:1, 741 allow_vht:1, 742 set_agile:1, 743 allow_he:1, 744 psc_channel:1, 745 nan_disabled:1, 746 allow_eht:1; 747 uint32_t phy_mode; 748 uint32_t cfreq1; 749 uint32_t cfreq2; 750 int8_t maxpower; 751 int8_t minpower; 752 int8_t maxregpower; 753 uint8_t antennamax; 754 uint8_t reg_class_id; 755 wmi_host_channel_width max_bw_supported; 756 }; 757 758 #ifdef FEATURE_OEM_DATA 759 /** 760 * struct oem_data - oem data to be sent to firmware 761 * @vdev_id: Unique identifier assigned to the vdev 762 * @data_len: len of data 763 * @pdev_id: pdev id to identify the pdev 764 * @pdev_vdev_flag: 0 when vdev is valid, 1 when pdev is valid 765 * @is_host_pdev_id: 1 for host pdev id, 0 otherwise 766 * @data: the pointer to the buffer containing data 767 * @file_name_len: Length of file name 768 * @file_name: Pointer to the buffer containing file name 769 */ 770 struct oem_data { 771 uint8_t vdev_id; 772 size_t data_len; 773 uint8_t pdev_id; 774 bool pdev_vdev_flag; 775 bool is_host_pdev_id; 776 uint8_t *data; 777 uint32_t file_name_len; 778 uint8_t *file_name; 779 }; 780 #endif 781 782 #ifdef MULTI_CLIENT_LL_SUPPORT 783 /** 784 * struct latency_level_data - latency data received in the event from the FW 785 * @vdev_id: The latency level for specified vdev_id 786 * @latency_level: latency level honoured by FW 787 */ 788 struct latency_level_data { 789 uint8_t vdev_id; 790 uint32_t latency_level; 791 }; 792 #endif 793 794 /** 795 * enum nss_chains_band_info - Band info for dynamic nss, chains change feature 796 * @NSS_CHAINS_BAND_2GHZ: 2.4Ghz band 797 * @NSS_CHAINS_BAND_5GHZ: 5Ghz band 798 * @NSS_CHAINS_BAND_MAX: Max bands supported 799 */ 800 enum nss_chains_band_info { 801 NSS_CHAINS_BAND_2GHZ = 0, 802 NSS_CHAINS_BAND_5GHZ, 803 NSS_CHAINS_BAND_MAX, 804 }; 805 806 /** 807 * struct vdev_nss_chains - vdev config of nss, and chains 808 * @num_tx_chains: tx chains of vdev config 809 * @num_rx_chains: rx chains of vdev config 810 * @tx_nss: tx nss of vdev config 811 * @rx_nss: rx nss of vdev config 812 * @num_tx_chains_11b: number of tx chains in 11b mode 813 * @num_tx_chains_11g: number of tx chains in 11g mode 814 * @num_tx_chains_11a: number of tx chains in 11a mode 815 * @disable_rx_mrc: disable 2 rx chains, in rx nss 1 mode 816 * @disable_tx_mrc: disable 2 tx chains, in tx nss 1 mode 817 */ 818 struct vdev_nss_chains { 819 uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX]; 820 uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX]; 821 uint32_t tx_nss[NSS_CHAINS_BAND_MAX]; 822 uint32_t rx_nss[NSS_CHAINS_BAND_MAX]; 823 uint32_t num_tx_chains_11b; 824 uint32_t num_tx_chains_11g; 825 uint32_t num_tx_chains_11a; 826 bool disable_rx_mrc[NSS_CHAINS_BAND_MAX]; 827 bool disable_tx_mrc[NSS_CHAINS_BAND_MAX]; 828 }; 829 830 831 /** 832 * struct peer_delete_params - peer delete cmd parameter 833 * @vdev_id: vdev id 834 */ 835 struct peer_delete_params { 836 uint8_t vdev_id; 837 }; 838 839 /** 840 * struct peer_set_params - peer set cmd parameter 841 * @param_id: parameter id 842 * @param_value: parameter value 843 * @vdev_id: vdev id 844 */ 845 struct peer_set_params { 846 uint32_t param_id; 847 uint32_t param_value; 848 uint32_t vdev_id; 849 }; 850 851 /** 852 * struct peer_create_params - peer create cmd parameter 853 * @peer_addr: peer mac addr 854 * @peer_type: peer type 855 * @vdev_id: vdev id 856 * @mlo_enabled: Indicates MLO is enabled 857 * @mlo_bridge_peer: Indicates bridge peer 858 */ 859 struct peer_create_params { 860 const uint8_t *peer_addr; 861 uint32_t peer_type; 862 uint32_t vdev_id; 863 #ifdef WLAN_FEATURE_11BE_MLO 864 bool mlo_enabled; 865 bool mlo_bridge_peer; 866 #endif 867 }; 868 869 #ifdef WLAN_SUPPORT_PPEDS 870 /** 871 * struct peer_ppe_ds_param - Per peer PPE Direct Switch parameter 872 * @peer_macaddr: PPE mac address 873 * @ppe_routing_enabled: Master flag for PPE routing 874 * @use_ppe: Use PPE command for the peer entry 875 * @service_code: Service code 876 * @priority_valid: If PRI to TID conversion is enabled 877 * @src_info: Source info/PPE port of the interface 878 * @vdev_id: VAP ID 879 */ 880 struct peer_ppe_ds_param { 881 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 882 bool ppe_routing_enabled; 883 bool use_ppe; 884 uint16_t service_code; 885 uint16_t src_info; 886 uint8_t priority_valid; 887 uint8_t vdev_id; 888 }; 889 #endif 890 891 /** 892 * struct peer_remove_params - peer remove cmd parameter 893 * @bssid: bss id 894 * @vdev_id: vdev id 895 * @roam_synch_in_progress: flag to indicate if roaming is in progress 896 */ 897 struct peer_remove_params { 898 uint8_t *bssid; 899 uint8_t vdev_id; 900 bool roam_synch_in_progress; 901 }; 902 903 /* 904 * Stats ID enums defined in host 905 */ 906 typedef enum { 907 WMI_HOST_REQUEST_PEER_STAT = 0x01, 908 WMI_HOST_REQUEST_AP_STAT = 0x02, 909 WMI_HOST_REQUEST_PDEV_STAT = 0x04, 910 WMI_HOST_REQUEST_VDEV_STAT = 0x08, 911 WMI_HOST_REQUEST_BCNFLT_STAT = 0x10, 912 WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20, 913 WMI_HOST_REQUEST_INST_STAT = 0x40, 914 WMI_HOST_REQUEST_PEER_EXTD_STAT = 0x80, 915 WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100, 916 WMI_HOST_REQUEST_NAC_RSSI = 0x200, 917 WMI_HOST_REQUEST_BCN_STAT = 0x800, 918 WMI_HOST_REQUEST_BCN_STAT_RESET = 0x1000, 919 WMI_HOST_REQUEST_PEER_RETRY_STAT = 0x2000, 920 WMI_HOST_REQUEST_PEER_ADV_STATS = 0x4000, 921 WMI_HOST_REQUEST_PMF_BCN_PROTECT_STAT = 0x8000, 922 WMI_HOST_REQUEST_VDEV_PRB_FILS_STAT = 0x10000, 923 WMI_HOST_REQUEST_PDEV_EXTD_STAT = 0x20000, 924 WMI_HOST_REQUEST_PDEV_TELEMETRY_STAT = 0x40000, 925 } wmi_host_stats_id; 926 927 typedef struct { 928 uint16_t cfg_retry_count; 929 uint16_t retry_count; 930 } wmi_host_inst_rssi_args; 931 932 /** 933 * struct stats_request_params - stats_request cmd parameter 934 * @stats_id: Bit mask of all the STATS request are specified with values from wmi_host_stats_id 935 * @vdev_id: vdev id 936 * @pdev_id: pdev_id 937 * @rssi_args: Instantaneous rssi stats args 938 * @is_qmi_send_support: support to send by qmi or not 939 */ 940 struct stats_request_params { 941 uint32_t stats_id; 942 uint8_t vdev_id; 943 uint8_t pdev_id; 944 wmi_host_inst_rssi_args rssi_args; 945 bool is_qmi_send_support; 946 }; 947 948 /** 949 * struct bss_chan_info_request_params - BSS chan info params 950 * @param: parameter value 951 */ 952 struct bss_chan_info_request_params { 953 uint32_t param; 954 }; 955 956 /** 957 * struct wow_cmd_params - wow cmd parameter 958 * @enable: wow enable or disable flag 959 * @can_suspend_link: flag to indicate if link can be suspended 960 * @pause_iface_config: interface config 961 * @flags: 962 */ 963 struct wow_cmd_params { 964 bool enable; 965 bool can_suspend_link; 966 uint8_t pause_iface_config; 967 uint32_t flags; 968 }; 969 970 /** 971 * struct wow_add_wakeup_params - wow wakeup parameter 972 * @type: param type 973 */ 974 struct wow_add_wakeup_params { 975 uint32_t type; 976 }; 977 978 /** 979 * struct wow_add_wakeup_pattern_params - Add WoW pattern params 980 * @pattern_bytes: pointer to pattern bytes 981 * @mask_bytes: pointer to mask bytes 982 * @pattern_len: pattern length 983 * @pattern_id: pattern id 984 */ 985 struct wow_add_wakeup_pattern_params { 986 uint8_t *pattern_bytes; 987 uint8_t *mask_bytes; 988 uint32_t pattern_len; 989 uint32_t pattern_id; 990 }; 991 992 /** 993 * struct wow_remove_wakeup_pattern_params - WoW remove pattern param 994 * @pattern_bytes: pointer to pattern bytes 995 * @mask_bytes: Mask bytes 996 * @pattern_id: pattern identifier 997 */ 998 struct wow_remove_wakeup_pattern_params { 999 uint32_t *pattern_bytes; 1000 uint32_t *mask_bytes; 1001 uint32_t pattern_id; 1002 }; 1003 1004 1005 /** 1006 * struct packet_enable_params - packet enable cmd parameter 1007 * @vdev_id: vdev id 1008 * @enable: flag to indicate if parameter can be enabled or disabled 1009 */ 1010 struct packet_enable_params { 1011 uint8_t vdev_id; 1012 bool enable; 1013 }; 1014 1015 /** 1016 * struct suspend_params - suspend cmd parameter 1017 * @disable_target_intr: disable target interrupt 1018 */ 1019 struct suspend_params { 1020 uint8_t disable_target_intr; 1021 }; 1022 1023 /** 1024 * struct pdev_params - pdev set cmd parameter 1025 * @param_id: parameter id 1026 * @param_value: parameter value 1027 * @is_host_pdev_id: indicate whether pdev_id is host pdev_id or not 1028 */ 1029 struct pdev_params { 1030 uint32_t param_id; 1031 uint32_t param_value; 1032 bool is_host_pdev_id; 1033 }; 1034 1035 /** 1036 * struct bcn_prb_template_params - beacon probe template parameter 1037 * @vdev_id: vdev id 1038 * @buf_len: Template length 1039 * @caps: capabilities field 1040 * @erp: ERP field 1041 */ 1042 struct bcn_prb_template_params { 1043 uint8_t vdev_id; 1044 int buf_len; 1045 uint16_t caps; 1046 uint8_t erp; 1047 }; 1048 1049 #define WMI_MAX_SUPPORTED_RATES 128 1050 /** 1051 * struct target_rate_set - Rate set bitmap 1052 * @num_rates: number of rates in rates bitmap 1053 * @rates: rates (each 8bit value) packed into a 32 bit word. 1054 * the rates are filled from least significant byte to most 1055 * significant byte. 1056 */ 1057 typedef struct { 1058 uint32_t num_rates; 1059 uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1]; 1060 } target_rate_set; 1061 1062 1063 #define WMI_HOST_MAX_NUM_SS 8 1064 #define WMI_HOST_MAX_HECAP_PHY_SIZE 3 1065 #define WMI_HOST_MAX_HECAP_MAC_SIZE 2 1066 #define WMI_HOST_HECAP_MAC_WORD1 0 1067 #define WMI_HOST_HECAP_MAC_WORD2 1 1068 #define WMI_HOST_MAX_HE_RATE_SET 3 1069 1070 #define WMI_HOST_HE_INVALID_MCSNSSMAP (0xFFFF) 1071 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80 0 1072 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_160 1 1073 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80_80 2 1074 1075 #ifdef WLAN_FEATURE_11BE 1076 #define WMI_HOST_MAX_EHTCAP_PHY_SIZE 3 1077 #define WMI_HOST_MAX_EHTCAP_MAC_SIZE 1 1078 #define WMI_HOST_EHTCAP_MAC_WORD1 0 1079 #define WMI_HOST_EHTCAP_MAC_WORD2 1 1080 #define WMI_HOST_MAX_EHT_RATE_SET 4 1081 1082 #define WMI_HOST_EHT_INVALID_MCSNSSMAP (0xFFFF) 1083 #define WMI_HOST_EHT_TXRX_MCS_NSS_IDX_80 0 1084 #define WMI_HOST_EHT_TXRX_MCS_NSS_IDX_160 1 1085 #define WMI_HOST_EHT_TXRX_MCS_NSS_IDX_320 2 1086 #endif 1087 1088 /** 1089 * struct wmi_host_ppe_threshold -PPE threshold 1090 * @numss_m1: NSS - 1 1091 * @ru_bit_mask: RU bit mask indicating the supported RU's 1092 * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss 1093 */ 1094 struct wmi_host_ppe_threshold { 1095 uint32_t numss_m1; 1096 uint32_t ru_bit_mask; 1097 uint32_t ppet16_ppet8_ru3_ru0[WMI_HOST_MAX_NUM_SS]; 1098 }; 1099 1100 /** 1101 * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr 1102 * @mac_addr31to0: upper 4 bytes of MAC address 1103 * @mac_addr47to32: lower 2 bytes of MAC address 1104 */ 1105 typedef struct { 1106 uint32_t mac_addr31to0; 1107 uint32_t mac_addr47to32; 1108 } wmi_host_mac_addr; 1109 1110 #ifdef WLAN_FEATURE_11BE 1111 #ifdef WMI_AP_SUPPORT 1112 /** 1113 * struct wlan_host_preferred_links - Preferred link info. 1114 * @num_pref_links: non-zero values indicate that preferred link order 1115 * is present. 1116 * @preffered_link_order: Preferred links in order. 1117 * @timeout: timeout values for all the access categories. 1118 * @tlt_characterization_params: Bitmask to select Tx-Link Tuple from ordered 1119 * list. 1120 * Bit 0-15 : Each bit maps to the corresponding Link ID 1121 * Bit 16-31: Reserved 1122 * @link_control_flags: Link control flags. 1123 * Bit 0: TLT enable/disable 1124 * Bit 1: Preferred Link enable/disable 1125 * Bit 2-31: Reserved 1126 */ 1127 struct wlan_host_preferred_links { 1128 uint8_t num_pref_links; 1129 uint8_t preffered_link_order[MAX_PREFERRED_LINKS]; 1130 uint32_t timeout[WMI_HOST_WLAN_MAX_AC]; 1131 uint32_t tlt_characterization_params; 1132 uint32_t link_control_flags; 1133 }; 1134 #endif 1135 1136 /** 1137 * struct wlan_host_t2lm_of_tids - TID-to-link mapping info 1138 * @direction: 0 - Downlink, 1 - uplink 2 - Both uplink and downlink 1139 * @default_link_mapping: value 1 indicates the default T2LM, where all the TIDs 1140 * are mapped to all the links. 1141 * value 0 indicates the preferred T2LM mapping 1142 * @t2lm_provisioned_links: Indicates TID to link mapping of all the TIDS. 1143 */ 1144 struct wlan_host_t2lm_of_tids { 1145 enum wlan_t2lm_direction direction; 1146 bool default_link_mapping; 1147 uint16_t t2lm_provisioned_links[T2LM_MAX_NUM_TIDS]; 1148 }; 1149 1150 /** 1151 * struct wmi_host_tid_to_link_map_params - TID-to-link mapping params 1152 * @pdev_id: Pdev id 1153 * @peer_macaddr: link peer macaddr 1154 * @num_dir: number of directions for which T2LM info is available 1155 * @t2lm_info: TID-to-link mapping info for the given directions 1156 * @preferred_links: Preferred link info. 1157 */ 1158 struct wmi_host_tid_to_link_map_params { 1159 uint8_t pdev_id; 1160 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 1161 uint8_t num_dir; 1162 struct wlan_host_t2lm_of_tids t2lm_info[WLAN_T2LM_MAX_DIRECTION]; 1163 #ifdef WMI_AP_SUPPORT 1164 struct wlan_host_preferred_links preferred_links; 1165 #endif 1166 }; 1167 1168 /** 1169 * struct wmi_host_tid_to_link_map_ap_params - TID-to-link mapping params 1170 * @pdev_id: Pdev id 1171 * @vdev_id: Vdev id 1172 * @num_t2lm_info: Number of t2lm IEs 1173 * @hw_link_id: HW link id 1174 * @disabled_link_bitmap: Disabled link bitmap info 1175 * @info: TID-to-link mapping IE info 1176 */ 1177 struct wmi_host_tid_to_link_map_ap_params { 1178 uint8_t pdev_id; 1179 uint8_t vdev_id; 1180 uint8_t num_t2lm_info; 1181 uint16_t hw_link_id; 1182 uint16_t disabled_link_bitmap; 1183 struct wlan_t2lm_info info[WLAN_MAX_T2LM_IE]; 1184 }; 1185 1186 /** 1187 * struct wmi_host_tid_to_link_map_resp - TID-to-link mapping response 1188 * @vdev_id: Vdev id 1189 * @status: Target status for t2lm ie info 1190 * @mapping_switch_tsf: Mapping switch time in tsf for probe response frames 1191 */ 1192 struct wmi_host_tid_to_link_map_resp { 1193 uint8_t vdev_id; 1194 enum wlan_t2lm_status status; 1195 uint8_t mapping_switch_tsf; 1196 }; 1197 1198 /** 1199 * struct wmi_host_link_state_params - MLO link state params 1200 * @vdev_id: Vdev id 1201 * @mld_mac: mld mac address 1202 */ 1203 struct wmi_host_link_state_params { 1204 uint8_t vdev_id; 1205 uint8_t mld_mac[QDF_MAC_ADDR_SIZE]; 1206 }; 1207 1208 #endif /* WLAN_FEATURE_11BE */ 1209 1210 #ifdef WLAN_FEATURE_11BE_MLO 1211 /** 1212 * struct peer_assoc_mlo_params - MLO assoc params 1213 * @mlo_enabled: indicate is MLO enabled 1214 * @mlo_assoc_link: indicate is the link used to initialize the association 1215 * of mlo connection 1216 * @mlo_primary_umac: indicate is the link on primary UMAC, WIN only flag 1217 * @mlo_logical_link_index_valid: indicate if the logial link index in is valid 1218 * @mlo_peer_id_valid: indicate if the mlo peer id is valid 1219 * @mlo_force_link_inactive: force the peer inactive 1220 * @emlsr_support: indicate if eMLSR supported 1221 * @emlmr_support: indicate if eMLMR supported 1222 * @msd_cap_support: indicate if MSD supported 1223 * @nstr_bitmap_present: indicate if NSTR bitmap is present 1224 * @nstr_bitmap_size: Indicates size of NSTR bitmap, 1225 * as per the 802.11be specification 1226 * @mlo_bridge_peer: indicate if it is bridge peer 1227 * @unused: spare bits 1228 * @mld_mac: MLD mac address 1229 * @logical_link_index: Unique index for links of the mlo. Starts with Zero 1230 * @ml_peer_id: ML peer id if generated by host. Otherwise invalid peer id 1231 * @ieee_link_id: peer link ID 1232 * @emlsr_pad_delay_us: eMLSR Padding Delay from peer in us 1233 * @emlsr_trans_delay_us: eMLSR Transition Delay from peer in us 1234 * @emlmr_delay_us: eMLMR Delay from peer in us 1235 * @trans_timeout_us: EML Transition Timeout in us 1236 * @medium_sync_duration: medium sync duration in us 1237 * @medium_sync_ofdm_ed_thresh: medium sync ofdm threshold in us 1238 * @medium_sync_max_txop_num: Max number of TXOPs 1239 * @max_num_simultaneous_links: Max number of simultaneous links as per 1240 * MLD Capability for ML peer 1241 * @nstr_indication_bitmap: NSTR indication bitmap 1242 * @vdev_id: ID of the vdev object 1243 * @bssid: AP link address 1244 * @chan: Wlan channel information 1245 * @mac_addr: Self mac addresses 1246 */ 1247 struct peer_assoc_mlo_params { 1248 uint32_t mlo_enabled:1, 1249 mlo_assoc_link:1, 1250 mlo_primary_umac:1, 1251 mlo_logical_link_index_valid:1, 1252 mlo_peer_id_valid:1, 1253 mlo_force_link_inactive:1, 1254 emlsr_support:1, 1255 emlmr_support:1, 1256 msd_cap_support:1, 1257 nstr_bitmap_present:1, 1258 nstr_bitmap_size:1, 1259 mlo_bridge_peer:1, 1260 unused:20; 1261 uint8_t mld_mac[QDF_MAC_ADDR_SIZE]; 1262 uint32_t logical_link_index; 1263 uint32_t ml_peer_id; 1264 uint32_t ieee_link_id; 1265 uint16_t emlsr_pad_delay_us; 1266 uint16_t emlsr_trans_delay_us; 1267 uint16_t emlmr_delay_us; 1268 uint32_t trans_timeout_us; 1269 uint16_t medium_sync_duration; 1270 uint16_t medium_sync_ofdm_ed_thresh; 1271 uint16_t medium_sync_max_txop_num; 1272 uint16_t max_num_simultaneous_links; 1273 uint32_t nstr_indication_bitmap; 1274 uint32_t vdev_id; 1275 struct qdf_mac_addr bssid; 1276 struct wlan_channel chan; 1277 struct qdf_mac_addr mac_addr; 1278 }; 1279 1280 /** 1281 * struct ml_partner_info - partner link info 1282 * @vdev_id: vdev id 1283 * @hw_mld_link_id: unique hw link id across SoCs 1284 * @mlo_enabled: indicate is MLO enabled 1285 * @mlo_assoc_link: indicate is the link used to initialize the association 1286 * of mlo connection 1287 * @mlo_primary_umac: indicate is the link on primary UMAC, WIN only flag 1288 * @mlo_logical_link_index_valid: indicate if the logial link index in is valid 1289 * @mlo_peer_id_valid: indicate if the mlo peer id is valid 1290 * @mlo_force_link_inactive: force the peer inactive 1291 * @emlsr_support: indicate if eMLSR supported 1292 * @emlmr_support: indicate if eMLMR supported 1293 * @msd_cap_support: indicate if MSD supported 1294 * @mlo_bridge_peer: indicate if peer is bridge peer 1295 * @unused: spare bits 1296 * @logical_link_index: Unique index for links of the mlo. Starts with Zero 1297 * @link_id: AP Link Id 1298 * @bssid: AP link address 1299 * @chan: Wlan channel information 1300 * @mac_addr: Self mac addresses 1301 */ 1302 struct ml_partner_info { 1303 uint32_t vdev_id; 1304 uint32_t hw_mld_link_id; 1305 uint32_t mlo_enabled:1, 1306 mlo_assoc_link:1, 1307 mlo_primary_umac:1, 1308 mlo_logical_link_index_valid:1, 1309 mlo_peer_id_valid:1, 1310 mlo_force_link_inactive:1, 1311 emlsr_support:1, 1312 emlmr_support:1, 1313 msd_cap_support:1, 1314 mlo_bridge_peer:1, 1315 unused:22; 1316 uint32_t logical_link_index; 1317 uint32_t link_id; 1318 struct qdf_mac_addr bssid; 1319 struct wlan_channel chan; 1320 struct qdf_mac_addr mac_addr; 1321 }; 1322 1323 /** 1324 * struct peer_assoc_ml_partner_links - ML partner links 1325 * @num_links: Number of links 1326 * @partner_info: Partner link info 1327 */ 1328 struct peer_assoc_ml_partner_links { 1329 uint8_t num_links; 1330 struct ml_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS]; 1331 }; 1332 #endif 1333 /** 1334 * struct peer_assoc_params - peer assoc cmd parameter 1335 * @vdev_id: vdev id 1336 * @peer_new_assoc: peer association type 1337 * @peer_associd: peer association id 1338 * @peer_caps: peer capabalities 1339 * @peer_listen_intval: peer listen interval 1340 * @peer_ht_caps: HT capabalities 1341 * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k 1342 * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4) 1343 * @peer_rate_caps: peer rate capabalities 1344 * @peer_nss: peer nss 1345 * @peer_vht_caps: peer VHT capabilities 1346 * @peer_phymode: peer phymode 1347 * @peer_ht_info: peer HT info 1348 * @peer_legacy_rates: peer legacy rates 1349 * @peer_ht_rates: peer ht rates 1350 * @rx_max_rate: max rx rates 1351 * @rx_mcs_set: rx mcs 1352 * @tx_max_rate: max tx rates 1353 * @tx_mcs_set: tx mcs 1354 * @vht_capable: VHT capabalities 1355 * @min_data_rate: Peer minimum rate 1356 * @tx_max_mcs_nss: max tx MCS and NSS 1357 * @peer_bw_rxnss_override: Peer BW RX NSS overridden or not. 1358 * @is_pmf_enabled: PMF enabled 1359 * @is_wme_set: WME enabled 1360 * @qos_flag: QoS Flags 1361 * @apsd_flag: APSD flags 1362 * @ht_flag: HT flags 1363 * @bw_40: 40 capabale 1364 * @bw_80: 80 capabale 1365 * @bw_160: 160 capabale 1366 * @bw_320: 320 capabale 1367 * @stbc_flag: STBC flag 1368 * @ldpc_flag: LDPC flag 1369 * @static_mimops_flag: statis MIMO PS flags 1370 * @dynamic_mimops_flag: Dynamic MIMO PS flags 1371 * @spatial_mux_flag: spatial MUX flags 1372 * @vht_flag: VHT flags 1373 * @vht_ng_flag: VHT on 11N/G flags 1374 * @need_ptk_4_way: Needs 4 way handshake 1375 * @need_gtk_2_way: Needs 2 way GTK 1376 * @auth_flag: Is peer authenticated 1377 * @safe_mode_enabled: Safe enabled for this peer 1378 * @amsdu_disable: AMSDU disable 1379 * @peer_mac: Peer mac address 1380 * @he_flag: HE flags 1381 * @eht_flag: EHT flags 1382 * @twt_requester: TWT Requester Support bit in Extended Capabilities element 1383 * @twt_responder: TWT Responder Support bit in Extended Capabilities element 1384 * @peer_he_cap_macinfo: Peer HE Cap MAC info 1385 * @peer_he_ops: Peer HE operation info 1386 * @peer_he_cap_phyinfo: Peer HE Cap PHY info 1387 * @peer_he_cap_info_internal: Peer HE internal PHY capability info 1388 * @peer_he_caps_6ghz: Peer HE 6GHz Band Capabilities info 1389 * @peer_he_mcs_count: Peer HE MCS TX/RX MAP count 1390 * @peer_he_rx_mcs_set: Peer HE RX MCS MAP 1391 * @peer_he_tx_mcs_set: Peer HE TX MCS MAP 1392 * @peer_eht_cap_macinfo: Peer EHT Cap MAC info 1393 * @peer_eht_ops: Peer EHT operation info 1394 * @peer_eht_cap_phyinfo: Peer EHT Cap PHY info 1395 * @peer_eht_mcs_count: Peer EHT MCS TX/RX MAP count 1396 * @peer_eht_rx_mcs_set: Peer EHT RX MCS MAP 1397 * @peer_eht_tx_mcs_set: Peer EHT TX MCS MAP 1398 * @peer_eht_ppet: Peer EHT PPET info 1399 * @puncture_bitmap: 11be static puncture bitmap 1400 * @peer_ppet: Peer HE PPET info 1401 * @peer_bsscolor_rept_info: 1402 * @peer_bss_max_idle_option: Peer BSS Max Idle option update 1403 * @akm: AKM info 1404 * @mlo_params: MLO assoc params 1405 * @ml_links: MLO partner links 1406 * @qcn_node_flag: if node is QCN node 1407 * @mesh_node_flag: if node is 4 addr node 1408 * @is_assoc_vdev: true if assoc vdev 1409 * @peer_dms_capable: is peer DMS capable 1410 * @reserved: spare bits 1411 * @t2lm_params: TID-to-link mapping params 1412 */ 1413 struct peer_assoc_params { 1414 uint32_t vdev_id; 1415 uint32_t peer_new_assoc; 1416 uint32_t peer_associd; 1417 uint32_t peer_caps; 1418 uint32_t peer_listen_intval; 1419 uint32_t peer_ht_caps; 1420 uint32_t peer_max_mpdu; 1421 uint32_t peer_mpdu_density; 1422 uint32_t peer_rate_caps; 1423 uint32_t peer_nss; 1424 uint32_t peer_vht_caps; 1425 uint32_t peer_phymode; 1426 uint32_t peer_ht_info[2]; 1427 target_rate_set peer_legacy_rates; 1428 target_rate_set peer_ht_rates; 1429 uint32_t rx_max_rate; 1430 uint32_t rx_mcs_set; 1431 uint32_t tx_max_rate; 1432 uint32_t tx_mcs_set; 1433 uint8_t vht_capable; 1434 uint8_t min_data_rate; 1435 uint32_t peer_bw_rxnss_override; 1436 uint32_t tx_max_mcs_nss; 1437 uint32_t is_pmf_enabled:1, 1438 is_wme_set:1, 1439 qos_flag:1, 1440 apsd_flag:1, 1441 ht_flag:1, 1442 bw_40:1, 1443 bw_80:1, 1444 bw_160:1, 1445 #ifdef WLAN_FEATURE_11BE 1446 bw_320:1, 1447 #endif 1448 stbc_flag:1, 1449 ldpc_flag:1, 1450 static_mimops_flag:1, 1451 dynamic_mimops_flag:1, 1452 spatial_mux_flag:1, 1453 vht_flag:1, 1454 vht_ng_flag:1, 1455 need_ptk_4_way:1, 1456 need_gtk_2_way:1, 1457 auth_flag:1, 1458 safe_mode_enabled:1, 1459 amsdu_disable:1, 1460 p2p_capable_sta:1, 1461 inter_bss_peer:1; 1462 /* Use common structure */ 1463 uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; 1464 bool he_flag; 1465 #ifdef WLAN_FEATURE_11BE 1466 bool eht_flag; 1467 #endif 1468 bool twt_requester; 1469 bool twt_responder; 1470 uint32_t peer_he_cap_macinfo[WMI_HOST_MAX_HECAP_MAC_SIZE]; 1471 uint32_t peer_he_ops; 1472 uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE]; 1473 uint32_t peer_he_cap_info_internal; 1474 uint32_t peer_he_caps_6ghz; 1475 uint32_t peer_he_mcs_count; 1476 uint32_t peer_he_rx_mcs_set[WMI_HOST_MAX_HE_RATE_SET]; 1477 uint32_t peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET]; 1478 #ifdef WLAN_FEATURE_11BE 1479 uint32_t peer_eht_cap_macinfo[WMI_HOST_MAX_EHTCAP_MAC_SIZE]; 1480 uint32_t peer_eht_ops; 1481 uint32_t peer_eht_cap_phyinfo[WMI_HOST_MAX_EHTCAP_PHY_SIZE]; 1482 uint32_t peer_eht_mcs_count; 1483 uint32_t peer_eht_rx_mcs_set[WMI_HOST_MAX_EHT_RATE_SET]; 1484 uint32_t peer_eht_tx_mcs_set[WMI_HOST_MAX_EHT_RATE_SET]; 1485 struct wmi_host_ppe_threshold peer_eht_ppet; 1486 uint16_t puncture_bitmap; 1487 #endif 1488 struct wmi_host_ppe_threshold peer_ppet; 1489 u_int8_t peer_bsscolor_rept_info; 1490 uint32_t peer_bss_max_idle_option; 1491 uint16_t akm; 1492 #ifdef WLAN_FEATURE_11BE_MLO 1493 struct peer_assoc_mlo_params mlo_params; 1494 struct peer_assoc_ml_partner_links ml_links; 1495 bool qcn_node_flag; 1496 bool mesh_node_flag; 1497 bool is_assoc_vdev; 1498 #endif 1499 uint8_t peer_dms_capable:1, 1500 reserved:7; 1501 #ifdef WLAN_FEATURE_11BE 1502 struct wmi_host_tid_to_link_map_params t2lm_params; 1503 #endif 1504 }; 1505 1506 /** 1507 * struct ap_ps_params - ap ps cmd parameter 1508 * @vdev_id: vdev id 1509 * @param: ap ps parameter 1510 * @value: ap ps parameter value 1511 */ 1512 struct ap_ps_params { 1513 uint32_t vdev_id; 1514 uint32_t param; 1515 uint32_t value; 1516 }; 1517 1518 #define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0 1519 #define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff 1520 #define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16 1521 #define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff 1522 1523 #define WMI_HOST_MAX_CHANS_PER_WMI_CMD 58 1524 1525 /** 1526 * struct scan_chan_list_params - scan channel list cmd parameter 1527 * @pdev_id: pdev_id 1528 * @num_chan: no of scan channels 1529 * @nallchans: nall chans 1530 * @append: append to existing chan list 1531 * @max_bw_support_present: max BW support present 1532 * @ch_param: pointer to channel_paramw 1533 */ 1534 struct scan_chan_list_params { 1535 uint32_t pdev_id; 1536 uint16_t nallchans; 1537 bool append; 1538 bool max_bw_support_present; 1539 struct channel_param ch_param[1]; 1540 }; 1541 1542 #ifdef QCA_SUPPORT_AGILE_DFS 1543 /** 1544 * struct vdev_adfs_ch_cfg_params - Agile dfs channel set request params 1545 * @vdev_id: Vdev identifier 1546 * @ocac_mode: Off Channel CAC mode, see WMI_ADFS_OCAC_MODE 1547 * @min_duration_ms: Minimum Off channel CAC duration 1548 * @max_duration_ms: Maximum Off channel CAC duration 1549 * @chan_freq: channel number of precac channel 1550 * @chan_width: Precac Channel width 1551 * @center_freq1: Agile preCAC channel frequency in MHz for 20/40/80/160 1552 * and left center frequency(5690MHz) for restricted 80p80. 1553 * @center_freq2: Second segment Agile frequency in Mhz, if applicable. 0 for 1554 * 20/40/80/160 and right center frequency(5775MHz) for 1555 * restricted 80p80. 1556 */ 1557 struct vdev_adfs_ch_cfg_params { 1558 uint32_t vdev_id; 1559 uint32_t ocac_mode; 1560 uint32_t min_duration_ms; 1561 uint32_t max_duration_ms; 1562 uint32_t chan_freq; 1563 uint32_t chan_width; 1564 uint32_t center_freq1; 1565 uint32_t center_freq2; 1566 }; 1567 1568 /** 1569 * struct vdev_adfs_abort_params - Agile dfs ocac abort command to stop precac. 1570 * @vdev_id: Vdev identifier 1571 */ 1572 struct vdev_adfs_abort_params { 1573 uint32_t vdev_id; 1574 }; 1575 #endif 1576 /** 1577 * struct fw_hang_params - fw hang command parameters 1578 * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full 1579 * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) 1580 */ 1581 struct fw_hang_params { 1582 uint32_t type; 1583 uint32_t delay_time_ms; 1584 }; 1585 1586 /** 1587 * struct pdev_utf_params - pdev utf command parameters 1588 * @utf_payload: 1589 * @len: 1590 * @is_ar900b: is it 900b target 1591 */ 1592 struct pdev_utf_params { 1593 uint8_t *utf_payload; 1594 uint32_t len; 1595 bool is_ar900b; 1596 }; 1597 1598 /*Adding this due to dependency on wmi_unified.h 1599 */ 1600 typedef struct { 1601 uint32_t len; 1602 uint32_t msgref; 1603 uint32_t segmentInfo; 1604 } QVIT_SEG_HDR_INFO_STRUCT; 1605 1606 /** 1607 * struct crash_inject - crash inject command parameters 1608 * @type: crash inject type 1609 * @delay_time_ms: time in milliseconds for FW to delay the crash 1610 */ 1611 struct crash_inject { 1612 uint32_t type; 1613 uint32_t delay_time_ms; 1614 }; 1615 1616 /** 1617 * struct dbglog_params - fw deboglog command parameters 1618 * @param: command parameter 1619 * @val: parameter value 1620 * @module_id_bitmap: fixed length module id bitmap 1621 * @bitmap_len: module id bitmap length 1622 * @cfgvalid: cfgvalid 1623 */ 1624 struct dbglog_params { 1625 uint32_t param; 1626 uint32_t val; 1627 uint32_t *module_id_bitmap; 1628 uint32_t bitmap_len; 1629 uint32_t cfgvalid[3]; 1630 }; 1631 1632 /** 1633 * struct seg_hdr_info - header info 1634 * @len: length 1635 * @msgref: message reference 1636 * @segmentInfo: segment info 1637 * @pad: padding 1638 */ 1639 struct seg_hdr_info { 1640 uint32_t len; 1641 uint32_t msgref; 1642 uint32_t segmentInfo; 1643 uint32_t pad; 1644 }; 1645 1646 /** 1647 * struct tx_send_params - TX parameters 1648 * @pwr: Tx frame transmission power 1649 * @mcs_mask: Modulation and coding index mask for transmission 1650 * bit 0 -> CCK 1 Mbps rate is allowed 1651 * bit 1 -> CCK 2 Mbps rate is allowed 1652 * bit 2 -> CCK 5.5 Mbps rate is allowed 1653 * bit 3 -> CCK 11 Mbps rate is allowed 1654 * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed 1655 * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed 1656 * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed 1657 * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed 1658 * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed 1659 * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed 1660 * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed 1661 * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed 1662 * @nss_mask: Spatial streams permitted 1663 * bit 0: if set, Nss = 1 (non-MIMO) is permitted 1664 * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted 1665 * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted 1666 * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted 1667 * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted 1668 * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted 1669 * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted 1670 * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted 1671 * If no bits are set, target will choose what NSS type to use 1672 * @retry_limit: Maximum number of retries before ACK 1673 * @chain_mask: Chains to be used for transmission 1674 * @bw_mask: Bandwidth to be used for transmission 1675 * bit 0 -> 5MHz 1676 * bit 1 -> 10MHz 1677 * bit 2 -> 20MHz 1678 * bit 3 -> 40MHz 1679 * bit 4 -> 80MHz 1680 * bit 5 -> 160MHz 1681 * bit 6 -> 80_80MHz 1682 * @preamble_type: Preamble types for transmission 1683 * bit 0: if set, OFDM 1684 * bit 1: if set, CCK 1685 * bit 2: if set, HT 1686 * bit 3: if set, VHT 1687 * bit 4: if set, HE 1688 * @frame_type: Data or Management frame 1689 * Data:1 Mgmt:0 1690 * @cfr_enable: flag to enable CFR capture 1691 * 0:disable 1:enable 1692 * @en_beamforming: flag to enable tx beamforming 1693 * 0:disable 1:enable 1694 * @retry_limit_ext: 3 bits of extended retry limit. 1695 * Combined with 4 bits "retry_limit" 1696 * to create 7 bits hw retry count. 1697 * Maximum 127 retries for specific frames. 1698 * @reserved: Spare bits 1699 */ 1700 struct tx_send_params { 1701 uint32_t pwr:8, 1702 mcs_mask:12, 1703 nss_mask:8, 1704 retry_limit:4; 1705 uint32_t chain_mask:8, 1706 bw_mask:7, 1707 preamble_type:5, 1708 frame_type:1, 1709 cfr_enable:1, 1710 en_beamforming:1, 1711 retry_limit_ext:3, 1712 reserved:6; 1713 }; 1714 1715 /** 1716 * struct wmi_mgmt_params - wmi mgmt cmd parameters 1717 * @tx_frame: management tx frame 1718 * @frm_len: frame length 1719 * @vdev_id: vdev id 1720 * @tx_type: type of management frame (determines what callback to use) 1721 * @chanfreq: channel frequency 1722 * @desc_id: descriptor id relyaed back by target 1723 * @pdata: frame data 1724 * @macaddr: macaddr of peer 1725 * @qdf_ctx: qdf context for qdf_nbuf_map 1726 * @tx_param: TX send parameters 1727 * @tx_params_valid: Flag that indicates if TX params are valid 1728 * @use_6mbps: specify whether management frame to transmit should 1729 * @tx_flags: additional configuration flags for mgmt frames 1730 * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P) 1731 * @peer_rssi: peer RSSI value 1732 * @mlo_link_agnostic: if true, can send on any active link 1733 */ 1734 struct wmi_mgmt_params { 1735 void *tx_frame; 1736 uint16_t frm_len; 1737 uint8_t vdev_id; 1738 uint8_t tx_type; 1739 uint16_t chanfreq; 1740 uint16_t desc_id; 1741 void *pdata; 1742 uint8_t *macaddr; 1743 void *qdf_ctx; 1744 struct tx_send_params tx_param; 1745 bool tx_params_valid; 1746 uint8_t use_6mbps; 1747 uint32_t tx_flags; 1748 int8_t peer_rssi; 1749 uint8_t mlo_link_agnostic; 1750 }; 1751 1752 /** 1753 * struct wmi_offchan_data_tx_params - wmi offchan data tx cmd parameters 1754 * @tx_frame: management tx frame 1755 * @frm_len: frame length 1756 * @vdev_id: vdev id 1757 * @tx_params_valid: Flag that indicates if TX params are valid 1758 * @chanfreq: channel frequency 1759 * @desc_id: descriptor id relyaed back by target 1760 * @pdata: frame data 1761 * @macaddr: macaddr of peer 1762 * @qdf_ctx: qdf context for qdf_nbuf_map 1763 * @tx_param: TX send parameters 1764 */ 1765 struct wmi_offchan_data_tx_params { 1766 void *tx_frame; 1767 uint16_t frm_len; 1768 uint8_t vdev_id; 1769 bool tx_params_valid; 1770 uint16_t chanfreq; 1771 uint16_t desc_id; 1772 void *pdata; 1773 uint8_t *macaddr; 1774 void *qdf_ctx; 1775 struct tx_send_params tx_param; 1776 }; 1777 1778 /** 1779 * struct sta_uapsd_params - uapsd auto trig params 1780 * @wmm_ac: WMM access category from 0 to 3 1781 * @user_priority: User priority to use in trigger frames 1782 * @service_interval: service interval 1783 * @suspend_interval: suspend interval 1784 * @delay_interval: delay interval 1785 */ 1786 struct sta_uapsd_params { 1787 uint32_t wmm_ac; 1788 uint32_t user_priority; 1789 uint32_t service_interval; 1790 uint32_t suspend_interval; 1791 uint32_t delay_interval; 1792 }; 1793 1794 /** 1795 * struct sta_uapsd_trig_params - uapsd trigger parameter 1796 * @vdevid: vdev id 1797 * @peer_addr: peer address 1798 * @num_ac: no of access category 1799 * @auto_triggerparam: trigger parameters 1800 */ 1801 struct sta_uapsd_trig_params { 1802 uint32_t vdevid; 1803 uint8_t peer_addr[QDF_MAC_ADDR_SIZE]; 1804 uint32_t num_ac; 1805 struct sta_uapsd_params *auto_triggerparam; 1806 }; 1807 1808 #define WMI_NUM_AC (4) 1809 #define WMI_MAX_NUM_AC 4 1810 1811 1812 enum wmi_peer_rate_report_cond_phy_type { 1813 WMI_PEER_RATE_REPORT_COND_11B = 0, 1814 WMI_PEER_RATE_REPORT_COND_11A_G, 1815 WMI_PEER_RATE_REPORT_COND_11N, 1816 WMI_PEER_RATE_REPORT_COND_11AC, 1817 WMI_PEER_RATE_REPORT_COND_MAX_NUM 1818 }; 1819 1820 /** 1821 * struct report_rate_delta - peer specific parameters 1822 * @percent: percentage 1823 * @delta_min: rate min delta 1824 */ 1825 struct report_rate_delta { 1826 uint32_t percent; /* in unit of 12.5% */ 1827 uint32_t delta_min; /* in unit of Mbps */ 1828 }; 1829 1830 /** 1831 * struct report_rate_per_phy - per phy report parameters 1832 * @cond_flags: condition flag val 1833 * @delta: rate delta 1834 * @report_rate_threshold: rate threshold 1835 */ 1836 struct report_rate_per_phy { 1837 /* 1838 * PEER_RATE_REPORT_COND_FLAG_DELTA, 1839 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD 1840 * Any of these two conditions or both of 1841 * them can be set. 1842 */ 1843 uint32_t cond_flags; 1844 struct report_rate_delta delta; 1845 /* 1846 * In unit of Mbps. There are at most 4 thresholds 1847 * If the threshold count is less than 4, set zero to 1848 * the one following the last threshold 1849 */ 1850 uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH]; 1851 }; 1852 1853 /** 1854 * struct wmi_peer_rate_report_params - peer rate report parameters 1855 * @rate_report_enable: enable rate report param 1856 * @backoff_time: backoff time in unit of msecond 1857 * @timer_period: timer in unit of msecond 1858 * @report_per_phy: report per wmi_peer_rate_report_cond_phy_type 1859 */ 1860 struct wmi_peer_rate_report_params { 1861 uint32_t rate_report_enable; 1862 uint32_t backoff_time; 1863 uint32_t timer_period; 1864 struct report_rate_per_phy report_per_phy[ 1865 WMI_PEER_RATE_REPORT_COND_MAX_NUM]; 1866 1867 }; 1868 1869 /** 1870 * enum thermal_mgmt_action_code - thermal mgmt action code 1871 * @THERMAL_MGMT_ACTION_DEFAULT: target chooses what action to take, based 1872 * on its default thermal management policy. 1873 * @THERMAL_MGMT_ACTION_HALT_TRAFFIC: If the temperature rises above 1874 * configured upper thresh degreeC, the target will halt tx. 1875 * @THERMAL_MGMT_ACTION_NOTIFY_HOST: the target will notify the host 1876 * if the temperature either rises above configured upper thresh degreeC or 1877 * falls below lower thresh degreeC. 1878 * @THERMAL_MGMT_ACTION_CHAINSCALING: The target will switch tx chain 1879 * mask from multi chains to single chain if the temperature rises 1880 * above upper thresh degreeC. 1881 * The target will switch tx chainmask back to multi chains if the 1882 * temperature drops below upper_thresh_degreeC. 1883 */ 1884 enum thermal_mgmt_action_code { 1885 THERMAL_MGMT_ACTION_DEFAULT, 1886 THERMAL_MGMT_ACTION_HALT_TRAFFIC, 1887 THERMAL_MGMT_ACTION_NOTIFY_HOST, 1888 THERMAL_MGMT_ACTION_CHAINSCALING, 1889 }; 1890 1891 /** 1892 * struct thermal_cmd_params - thermal command parameters 1893 * @min_temp: minimum temperature 1894 * @max_temp: maximum temperature 1895 * @thermal_enable: thermal enable 1896 * @thermal_action: thermal action code 1897 */ 1898 struct thermal_cmd_params { 1899 uint16_t min_temp; 1900 uint16_t max_temp; 1901 uint8_t thermal_enable; 1902 enum thermal_mgmt_action_code thermal_action; 1903 }; 1904 1905 #define WMI_LRO_IPV4_SEED_ARR_SZ 5 1906 #define WMI_LRO_IPV6_SEED_ARR_SZ 11 1907 1908 /** 1909 * struct wmi_lro_config_cmd_t - set LRO init parameters 1910 * @lro_enable: indicates whether lro is enabled 1911 * @tcp_flag: If the TCP flags from the packet do not match 1912 * the values in this field after masking with TCP flags mask 1913 * below, packet is not LRO eligible 1914 * @tcp_flag_mask: field for comparing the TCP values provided 1915 * above with the TCP flags field in the received packet 1916 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id 1917 * 5-tuple toeplitz hash for ipv4 packets 1918 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id 1919 * 5-tuple toeplitz hash for ipv6 packets 1920 * @pdev_id: radio on which lro hash is configured 1921 */ 1922 struct wmi_lro_config_cmd_t { 1923 uint32_t lro_enable; 1924 uint32_t tcp_flag:9, 1925 tcp_flag_mask:9; 1926 uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ]; 1927 uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ]; 1928 uint32_t pdev_id; 1929 }; 1930 1931 #ifdef WLAN_FEATURE_11BE_MLO 1932 /** 1933 * struct mlo_prb_resp_tmpl_ml_info - Impacted link critical update information 1934 * @hw_link_id: Unique hw link id across SoCs 1935 * CU vdev map for the Critical update category-1 (Inclusion of CU IES) 1936 * @cu_vdev_map_cat1_lo: bits 31:0 to represent vdev ids 0 to 31 1937 * @cu_vdev_map_cat1_hi: bits 63:32 to represent vdev ids 32 to 63 1938 * CU vdev map for the Critical update category-2 (modification of CU IES) 1939 * @cu_vdev_map_cat2_lo: bits 31:0 to represent vdev ids 0 to 31 1940 * @cu_vdev_map_cat2_hi: bits 63:32 to represent vdev ids 32 to 63 1941 */ 1942 struct mlo_prb_resp_tmpl_ml_info { 1943 uint32_t hw_link_id; 1944 uint32_t cu_vdev_map_cat1_lo; 1945 uint32_t cu_vdev_map_cat1_hi; 1946 uint32_t cu_vdev_map_cat2_lo; 1947 uint32_t cu_vdev_map_cat2_hi; 1948 }; 1949 #endif 1950 1951 /** 1952 * struct wmi_probe_resp_params - send probe response parameters 1953 * @prb_rsp_template_frm: pointer to template probe response template 1954 * @prb_rsp_template_len: length of probe response template 1955 * @cu_ml_info: Impacted link critical update information 1956 */ 1957 struct wmi_probe_resp_params { 1958 uint8_t *prb_rsp_template_frm; 1959 uint32_t prb_rsp_template_len; 1960 #ifdef WLAN_FEATURE_11BE_MLO 1961 struct mlo_prb_resp_tmpl_ml_info cu_ml_info; 1962 #endif 1963 }; 1964 1965 /* struct set_key_params: structure containing 1966 * installation key parameters 1967 * @vdev_id: vdev id 1968 * @key_len: key length 1969 * @key_idx: key index 1970 * @group_key_idx: group key index for VLAN 1971 * @peer_mac: peer mac address 1972 * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key 1973 * @key_cipher: key cipher based on security mode 1974 * @key_txmic_len: tx mic length 1975 * @key_rxmic_len: rx mic length 1976 * @key_tsc_counter: key tx sc counter 1977 * @key_rsc_counter: key rx sc counter 1978 * @rx_iv: receive IV, applicable only in case of WAPI 1979 * @tx_iv: transmit IV, applicable only in case of WAPI 1980 * @key_data: key data 1981 */ 1982 struct set_key_params { 1983 uint8_t vdev_id; 1984 uint16_t key_len; 1985 uint32_t key_idx; 1986 uint32_t group_key_idx; 1987 uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; 1988 uint32_t key_flags; 1989 uint32_t key_cipher; 1990 uint32_t key_txmic_len; 1991 uint32_t key_rxmic_len; 1992 uint64_t key_tsc_counter; 1993 uint64_t key_rsc_counter; 1994 #if defined(ATH_SUPPORT_WAPI) || defined(FEATURE_WLAN_WAPI) 1995 uint8_t rx_iv[16]; 1996 uint8_t tx_iv[16]; 1997 #endif 1998 uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH]; 1999 }; 2000 2001 /** 2002 * struct scan_mac_oui - oui parameters 2003 * @oui: oui parameters 2004 * @vdev_id: interface id 2005 * @enb_probe_req_sno_randomization: control probe req sequence no randomization 2006 * @ie_allowlist: probe req IE allowlist attrs 2007 */ 2008 struct scan_mac_oui { 2009 uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH]; 2010 uint32_t vdev_id; 2011 bool enb_probe_req_sno_randomization; 2012 struct probe_req_allowlist_attr ie_allowlist; 2013 }; 2014 2015 #define WMI_PASSPOINT_REALM_LEN 256 2016 #define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16 2017 #define WMI_PASSPOINT_PLMN_LEN 3 2018 /** 2019 * struct wifi_passpoint_network_param - passpoint network block 2020 * @id: identifier of this network block 2021 * @realm: null terminated UTF8 encoded realm, 0 if unspecified 2022 * @plmn: mcc/mnc combination as per rules, 0s if unspecified 2023 * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified 2024 */ 2025 struct wifi_passpoint_network_param { 2026 uint32_t id; 2027 uint8_t realm[WMI_PASSPOINT_REALM_LEN]; 2028 uint8_t plmn[WMI_PASSPOINT_PLMN_LEN]; 2029 int64_t roaming_consortium_ids[ 2030 WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM]; 2031 }; 2032 2033 /** 2034 * struct wifi_passpoint_req_param - passpoint request 2035 * @request_id: request identifier 2036 * @vdev_id: vdev that is the target of the request 2037 * @num_networks: number of valid entries in @networks 2038 * @networks: passpoint networks 2039 */ 2040 struct wifi_passpoint_req_param { 2041 uint32_t request_id; 2042 uint32_t vdev_id; 2043 uint32_t num_networks; 2044 struct wifi_passpoint_network_param networks[]; 2045 }; 2046 2047 /* struct mobility_domain_info - structure containing 2048 * mobility domain info 2049 * @mdie_present: mobility domain present or not 2050 * @mobility_domain: mobility domain 2051 */ 2052 struct mobility_domain_info { 2053 uint8_t mdie_present; 2054 uint16_t mobility_domain; 2055 }; 2056 2057 /** 2058 * struct wifi_epno_network_params - enhanced pno network block 2059 * @ssid: ssid 2060 * @rssi_threshold: threshold for considering this SSID as found, required 2061 * granularity for this threshold is 4dBm to 8dBm 2062 * @flags: WIFI_PNO_FLAG_XXX 2063 * @auth_bit_field: auth bit field for matching WPA IE 2064 */ 2065 struct wifi_epno_network_params { 2066 struct wlan_ssid ssid; 2067 int8_t rssi_threshold; 2068 uint8_t flags; 2069 uint8_t auth_bit_field; 2070 }; 2071 2072 /** 2073 * struct wifi_enhanced_pno_params - enhanced pno network params 2074 * @request_id: request id number 2075 * @vdev_id: vdev id 2076 * @min_5ghz_rssi: minimum 5GHz RSSI for a BSSID to be considered 2077 * @min_24ghz_rssi: minimum 2.4GHz RSSI for a BSSID to be considered 2078 * @initial_score_max: maximum score that a network can have before bonuses 2079 * @current_connection_bonus: only report when there is a network's score this 2080 * much higher than the current connection 2081 * @same_network_bonus: score bonus for all n/w with the same network flag 2082 * @secure_bonus: score bonus for networks that are not open 2083 * @band_5ghz_bonus: 5GHz RSSI score bonus (applied to all 5GHz networks) 2084 * @num_networks: number of ssids 2085 * @networks: EPNO networks 2086 */ 2087 struct wifi_enhanced_pno_params { 2088 uint32_t request_id; 2089 uint32_t vdev_id; 2090 uint32_t min_5ghz_rssi; 2091 uint32_t min_24ghz_rssi; 2092 uint32_t initial_score_max; 2093 uint32_t current_connection_bonus; 2094 uint32_t same_network_bonus; 2095 uint32_t secure_bonus; 2096 uint32_t band_5ghz_bonus; 2097 uint32_t num_networks; 2098 struct wifi_epno_network_params networks[]; 2099 }; 2100 2101 enum { 2102 WMI_AP_RX_DATA_OFFLOAD = 0x00, 2103 WMI_STA_RX_DATA_OFFLOAD = 0x01, 2104 }; 2105 2106 /** 2107 * enum wmi_extscan_configuration_flags - extscan config flags 2108 * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching 2109 */ 2110 enum wmi_extscan_configuration_flags { 2111 WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001, 2112 }; 2113 2114 /** 2115 * enum wmi_extscan_report_events_type - extscan report events type 2116 * @WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is full 2117 * @WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after 2118 * each scan 2119 * @WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results 2120 * (beacons/probe responses + IEs) 2121 * in real time to HAL, in addition to completion events. 2122 * Note: To keep backward compatibility, 2123 * fire completion events regardless of REPORT_EVENTS_EACH_SCAN. 2124 * @WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching, 2125 * 0 => batching, 1 => no batching 2126 */ 2127 enum wmi_extscan_report_events_type { 2128 WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00, 2129 WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01, 2130 WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02, 2131 WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04, 2132 }; 2133 2134 /** 2135 * struct extscan_capabilities_params - ext scan capabilities 2136 * @request_id: request_id 2137 * @vdev_id: vdev id 2138 */ 2139 struct extscan_capabilities_params { 2140 uint32_t request_id; 2141 uint8_t vdev_id; 2142 }; 2143 2144 /** 2145 * struct extscan_capabilities_reset_params - ext scan capabilities reset 2146 * parameter 2147 * @request_id: request_id 2148 * @vdev_id: vdev id 2149 */ 2150 struct extscan_capabilities_reset_params { 2151 uint32_t request_id; 2152 uint8_t vdev_id; 2153 }; 2154 2155 /** 2156 * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter 2157 * @request_id: request_id 2158 * @vdev_id: vdev id 2159 */ 2160 struct extscan_bssid_hotlist_reset_params { 2161 uint32_t request_id; 2162 uint8_t vdev_id; 2163 }; 2164 2165 /** 2166 * struct extscan_stop_req_params - ext scan stop parameter 2167 * @request_id: request_id 2168 * @vdev_id: vdev id 2169 */ 2170 struct extscan_stop_req_params { 2171 uint32_t request_id; 2172 uint8_t vdev_id; 2173 }; 2174 2175 /** 2176 * struct ap_threshold_params - ap threshold parameter 2177 * @bssid: mac address 2178 * @low: low threshold 2179 * @high: high threshold 2180 */ 2181 struct ap_threshold_params { 2182 struct qdf_mac_addr bssid; 2183 int32_t low; 2184 int32_t high; 2185 }; 2186 2187 /** 2188 * struct extscan_set_sig_changereq_params - ext scan channel parameter 2189 * @request_id: request_id 2190 * @vdev_id: vdev id 2191 * @rssi_sample_size: Number of samples for averaging RSSI 2192 * @lostap_sample_size: Number of missed samples to confirm AP loss 2193 * @min_breaching: Number of APs breaching threshold required for firmware 2194 * @num_ap: no of scanned ap 2195 * @ap: ap threshold parameter 2196 */ 2197 struct extscan_set_sig_changereq_params { 2198 uint32_t request_id; 2199 uint8_t vdev_id; 2200 uint32_t rssi_sample_size; 2201 uint32_t lostap_sample_size; 2202 uint32_t min_breaching; 2203 uint32_t num_ap; 2204 struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS]; 2205 }; 2206 2207 /** 2208 * struct extscan_cached_result_params - ext scan cached parameter 2209 * @request_id: request_id 2210 * @vdev_id: vdev id 2211 * @flush: cached results flush 2212 */ 2213 struct extscan_cached_result_params { 2214 uint32_t request_id; 2215 uint8_t vdev_id; 2216 bool flush; 2217 }; 2218 2219 #define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36 2220 #define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16 2221 #define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128 2222 #define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 2223 #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8 2224 2225 /** 2226 * struct wifi_scan_channelspec_params - wifi scan channel parameter 2227 * @channel: Frequency in MHz 2228 * @dwell_time_ms: dwell time in milliseconds 2229 * @passive: passive scan 2230 * @channel_class: channel class 2231 */ 2232 struct wifi_scan_channelspec_params { 2233 uint32_t channel; 2234 uint32_t dwell_time_ms; 2235 bool passive; 2236 uint8_t channel_class; 2237 }; 2238 2239 /** 2240 * enum wmi_wifi_band - wifi band 2241 * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band 2242 * @WMI_WIFI_BAND_BG: 2.4 GHz 2243 * @WMI_WIFI_BAND_A: 5 GHz without DFS 2244 * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS 2245 * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only 2246 * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS 2247 * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS 2248 * @WMI_WIFI_BAND_MAX: max range 2249 */ 2250 enum wmi_wifi_band { 2251 WMI_WIFI_BAND_UNSPECIFIED, 2252 WMI_WIFI_BAND_BG = 1, 2253 WMI_WIFI_BAND_A = 2, 2254 WMI_WIFI_BAND_ABG = 3, 2255 WMI_WIFI_BAND_A_DFS_ONLY = 4, 2256 /* 5 is reserved */ 2257 WMI_WIFI_BAND_A_WITH_DFS = 6, 2258 WMI_WIFI_BAND_ABG_WITH_DFS = 7, 2259 /* Keep it last */ 2260 WMI_WIFI_BAND_MAX 2261 }; 2262 2263 /** 2264 * struct wifi_scan_bucket_params - wifi scan bucket spec 2265 * @bucket: bucket identifier 2266 * @band: wifi band 2267 * @period: Desired period, in millisecond; if this is too 2268 * low, the firmware should choose to generate results as fast as 2269 * it can instead of failing the command byte 2270 * for exponential backoff bucket this is the min_period 2271 * @report_events: 0 => normal reporting (reporting rssi history 2272 * only, when rssi history buffer is % full) 2273 * 1 => same as 0 + report a scan completion event after scanning 2274 * this bucket 2275 * 2 => same as 1 + forward scan results 2276 * (beacons/probe responses + IEs) in real time to HAL 2277 * @max_period: if max_period is non zero or different than period, 2278 * then this bucket is an exponential backoff bucket and 2279 * the scan period will grow exponentially as per formula: 2280 * actual_period(N) = period ^ (N/(step_count+1)) to a 2281 * maximum period of max_period 2282 * @exponent: for exponential back off bucket: multiplier: 2283 * new_period = old_period * exponent 2284 * @step_count: for exponential back off bucket, number of scans performed 2285 * at a given period and until the exponent is applied 2286 * @num_channels: channels to scan; these may include DFS channels 2287 * Note that a given channel may appear in multiple buckets 2288 * @min_dwell_time_active: per bucket minimum active dwell time 2289 * @max_dwell_time_active: per bucket maximum active dwell time 2290 * @min_dwell_time_passive: per bucket minimum passive dwell time 2291 * @max_dwell_time_passive: per bucket maximum passive dwell time 2292 * @channels: Channel list 2293 */ 2294 struct wifi_scan_bucket_params { 2295 uint8_t bucket; 2296 enum wmi_wifi_band band; 2297 uint32_t period; 2298 uint32_t report_events; 2299 uint32_t max_period; 2300 uint32_t exponent; 2301 uint32_t step_count; 2302 uint32_t num_channels; 2303 uint32_t min_dwell_time_active; 2304 uint32_t max_dwell_time_active; 2305 uint32_t min_dwell_time_passive; 2306 uint32_t max_dwell_time_passive; 2307 struct wifi_scan_channelspec_params 2308 channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS]; 2309 }; 2310 2311 /** 2312 * struct wifi_scan_cmd_req_params - wifi scan command request params 2313 * @base_period: base timer period 2314 * @max_ap_per_scan: max ap per scan 2315 * @report_threshold_percent: report threshold 2316 * in %, when buffer is this much full, wake up host 2317 * @report_threshold_num_scans: report threshold number of scans 2318 * in number of scans, wake up host after these many scans 2319 * @request_id: request id 2320 * @vdev_id: vdev that is the target of the request 2321 * @num_buckets: number of buckets 2322 * @min_dwell_time_active: per bucket minimum active dwell time 2323 * @max_dwell_time_active: per bucket maximum active dwell time 2324 * @min_dwell_time_passive: per bucket minimum passive dwell time 2325 * @max_dwell_time_passive: per bucket maximum passive dwell time 2326 * @configuration_flags: configuration flags 2327 * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan 2328 * @buckets: buckets array 2329 */ 2330 struct wifi_scan_cmd_req_params { 2331 uint32_t base_period; 2332 uint32_t max_ap_per_scan; 2333 uint32_t report_threshold_percent; 2334 uint32_t report_threshold_num_scans; 2335 uint32_t request_id; 2336 uint8_t vdev_id; 2337 uint32_t num_buckets; 2338 uint32_t min_dwell_time_active; 2339 uint32_t max_dwell_time_active; 2340 uint32_t min_dwell_time_passive; 2341 uint32_t max_dwell_time_passive; 2342 uint32_t configuration_flags; 2343 enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode; 2344 struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS]; 2345 }; 2346 2347 /** 2348 * struct mac_ts_info_tfc - mac ts info parameters 2349 * @burstSizeDefn: burst size 2350 * @reserved: reserved 2351 * @ackPolicy: ack policy 2352 * @userPrio: user priority 2353 * @psb: psb 2354 * @aggregation: aggregation 2355 * @accessPolicy: access policy 2356 * @direction: direction 2357 * @tsid: direction 2358 * @trafficType: traffic type 2359 */ 2360 struct mac_ts_info_tfc { 2361 #ifndef ANI_LITTLE_BIT_ENDIAN 2362 uint8_t burstSizeDefn:1; 2363 uint8_t reserved:7; 2364 #else 2365 uint8_t reserved:7; 2366 uint8_t burstSizeDefn:1; 2367 #endif 2368 2369 #ifndef ANI_LITTLE_BIT_ENDIAN 2370 uint16_t ackPolicy:2; 2371 uint16_t userPrio:3; 2372 uint16_t psb:1; 2373 uint16_t aggregation:1; 2374 uint16_t accessPolicy:2; 2375 uint16_t direction:2; 2376 uint16_t tsid:4; 2377 uint16_t trafficType:1; 2378 #else 2379 uint16_t trafficType:1; 2380 uint16_t tsid:4; 2381 uint16_t direction:2; 2382 uint16_t accessPolicy:2; 2383 uint16_t aggregation:1; 2384 uint16_t psb:1; 2385 uint16_t userPrio:3; 2386 uint16_t ackPolicy:2; 2387 #endif 2388 } qdf_packed; 2389 2390 /** 2391 * struct mac_ts_info_sch - mac ts info schedule parameters 2392 * @rsvd: reserved 2393 * @schedule: schedule bit 2394 */ 2395 struct mac_ts_info_sch { 2396 #ifndef ANI_LITTLE_BIT_ENDIAN 2397 uint8_t rsvd:7; 2398 uint8_t schedule:1; 2399 #else 2400 uint8_t schedule:1; 2401 uint8_t rsvd:7; 2402 #endif 2403 } qdf_packed; 2404 2405 /** 2406 * struct mac_ts_info - mac ts info schedule parameters 2407 * @traffic: mac tfc parameter 2408 * @schedule: mac schedule parameters 2409 */ 2410 struct mac_ts_info { 2411 struct mac_ts_info_tfc traffic; 2412 struct mac_ts_info_sch schedule; 2413 } qdf_packed; 2414 2415 /** 2416 * struct mac_tspec_ie - mac ts spec 2417 * @type: type 2418 * @length: length 2419 * @tsinfo: tsinfo 2420 * @nomMsduSz: nomMsduSz 2421 * @maxMsduSz: maxMsduSz 2422 * @minSvcInterval: minSvcInterval 2423 * @maxSvcInterval: maxSvcInterval 2424 * @inactInterval: inactInterval 2425 * @suspendInterval: suspendInterval 2426 * @svcStartTime: svcStartTime 2427 * @minDataRate: minDataRate 2428 * @meanDataRate: meanDataRate 2429 * @peakDataRate: peakDataRate 2430 * @maxBurstSz: maxBurstSz 2431 * @delayBound: delayBound 2432 * @minPhyRate: minPhyRate 2433 * @surplusBw: surplusBw 2434 * @mediumTime: mediumTime 2435 */ 2436 struct mac_tspec_ie { 2437 uint8_t type; 2438 uint8_t length; 2439 struct mac_ts_info tsinfo; 2440 uint16_t nomMsduSz; 2441 uint16_t maxMsduSz; 2442 uint32_t minSvcInterval; 2443 uint32_t maxSvcInterval; 2444 uint32_t inactInterval; 2445 uint32_t suspendInterval; 2446 uint32_t svcStartTime; 2447 uint32_t minDataRate; 2448 uint32_t meanDataRate; 2449 uint32_t peakDataRate; 2450 uint32_t maxBurstSz; 2451 uint32_t delayBound; 2452 uint32_t minPhyRate; 2453 uint16_t surplusBw; 2454 uint16_t mediumTime; 2455 } qdf_packed; 2456 2457 /** 2458 * struct add_ts_param - ADDTS related parameters 2459 * @vdev_id: vdev id 2460 * @tspec_idx: TSPEC handle uniquely identifying a TSPEC for a STA in a BSS 2461 * @tspec: tspec value 2462 * @status: QDF status 2463 * @pe_session_id: protocol engine session id 2464 * @tsm_interval: TSM interval period passed from UMAC to WMI 2465 * @set_ric_params: Should RIC parameters be set? 2466 */ 2467 struct add_ts_param { 2468 uint8_t vdev_id; 2469 uint16_t tspec_idx; 2470 struct mac_tspec_ie tspec; 2471 QDF_STATUS status; 2472 uint8_t pe_session_id; 2473 #ifdef FEATURE_WLAN_ESE 2474 uint16_t tsm_interval; 2475 #endif /* FEATURE_WLAN_ESE */ 2476 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 2477 bool set_ric_params; 2478 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ 2479 }; 2480 2481 /** 2482 * struct delts_req_info - DELTS request parameter 2483 * @tsinfo: ts info 2484 * @tspec: ts spec 2485 * @wmeTspecPresent: wme ts spec flag 2486 * @wsmTspecPresent: wsm ts spec flag 2487 * @lleTspecPresent: lle ts spec flag 2488 */ 2489 struct delts_req_info { 2490 struct mac_ts_info tsinfo; 2491 struct mac_tspec_ie tspec; 2492 uint8_t wmeTspecPresent:1; 2493 uint8_t wsmTspecPresent:1; 2494 uint8_t lleTspecPresent:1; 2495 }; 2496 2497 /** 2498 * struct del_ts_params - DELTS related parameters 2499 * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS 2500 * @bssId: BSSID 2501 * @sessionId: session id 2502 * @userPrio: user priority 2503 * @delTsInfo: DELTS info 2504 * @setRICparams: RIC parameters 2505 */ 2506 struct del_ts_params { 2507 uint16_t tspecIdx; 2508 uint8_t bssId[QDF_MAC_ADDR_SIZE]; 2509 uint8_t sessionId; 2510 uint8_t userPrio; 2511 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 2512 struct delts_req_info delTsInfo; 2513 uint8_t setRICparams; 2514 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ 2515 }; 2516 2517 /** 2518 * struct ll_stats_clear_params - ll stats clear parameter 2519 * @req_id: request id 2520 * @vdev_id: vdev id 2521 * @stats_clear_mask: stats clear mask 2522 * @stop_req: stop request 2523 * @peer_macaddr: MAC address of the peer for which stats are to be cleared 2524 */ 2525 struct ll_stats_clear_params { 2526 uint32_t req_id; 2527 uint8_t vdev_id; 2528 uint32_t stats_clear_mask; 2529 uint8_t stop_req; 2530 struct qdf_mac_addr peer_macaddr; 2531 }; 2532 2533 /** 2534 * struct ll_stats_set_params - ll stats get parameter 2535 * @req_id: request id 2536 * @mpdu_size_threshold: mpdu size threshold 2537 * @aggressive_statistics_gathering: aggressive_statistics_gathering 2538 */ 2539 struct ll_stats_set_params { 2540 uint32_t req_id; 2541 uint32_t mpdu_size_threshold; 2542 uint32_t aggressive_statistics_gathering; 2543 }; 2544 2545 /** 2546 * struct ll_stats_get_params - ll stats parameter 2547 * @req_id: request id 2548 * @vdev_id: vdev id 2549 * @param_id_mask: param is mask 2550 * @peer_macaddr: MAC address of the peer for which stats are desired 2551 * @is_mlo_req: is the request for mlo vdev 2552 * @vdev_id_bitmap: vdev_id_bitmap of all the connected mlo vdevs 2553 * @mld_macaddr: MLD MAC address 2554 */ 2555 struct ll_stats_get_params { 2556 uint32_t req_id; 2557 uint8_t vdev_id; 2558 uint32_t param_id_mask; 2559 struct qdf_mac_addr peer_macaddr; 2560 #ifdef WLAN_FEATURE_11BE_MLO 2561 bool is_mlo_req; 2562 uint32_t vdev_id_bitmap; 2563 struct qdf_mac_addr mld_macaddr; 2564 #endif 2565 }; 2566 2567 2568 /** 2569 * struct link_status_params - link stats parameter 2570 * @vdev_id: ID of the vdev for which link status is desired 2571 */ 2572 struct link_status_params { 2573 uint8_t vdev_id; 2574 }; 2575 2576 /** 2577 * struct dhcp_stop_ind_params - DHCP Stop indication message 2578 * @msgtype: message type is same as the request type 2579 * @msglen: length of the entire request 2580 * @device_mode: Mode of the device(ex:STA, AP) 2581 * @adapter_macaddr: MAC address of the adapter 2582 * @peer_macaddr: MAC address of the connected peer 2583 */ 2584 struct dhcp_stop_ind_params { 2585 uint16_t msgtype; 2586 uint16_t msglen; 2587 uint8_t device_mode; 2588 struct qdf_mac_addr adapter_macaddr; 2589 struct qdf_mac_addr peer_macaddr; 2590 }; 2591 2592 #define WMI_MAX_FILTER_TEST_DATA_LEN 8 2593 #define WMI_MAX_NUM_MULTICAST_ADDRESS 240 2594 #define WMI_MAX_NUM_FILTERS 20 2595 #define WMI_MAX_NUM_TESTS_PER_FILTER 10 2596 2597 /** 2598 * enum packet_filter_type - packet filter type 2599 * @WMI_RCV_FILTER_TYPE_INVALID: invalid type 2600 * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type 2601 * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type 2602 * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size 2603 */ 2604 enum packet_filter_type { 2605 WMI_RCV_FILTER_TYPE_INVALID, 2606 WMI_RCV_FILTER_TYPE_FILTER_PKT, 2607 WMI_RCV_FILTER_TYPE_BUFFER_PKT, 2608 WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE 2609 }; 2610 2611 /** 2612 * enum packet_protocol_type - packet protocol type 2613 * @WMI_FILTER_HDR_TYPE_INVALID: invalid type 2614 * @WMI_FILTER_HDR_TYPE_MAC: mac type 2615 * @WMI_FILTER_HDR_TYPE_ARP: trp type 2616 * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type 2617 * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type 2618 * @WMI_FILTER_HDR_TYPE_UDP: udp type 2619 * @WMI_FILTER_HDR_TYPE_MAX: max type 2620 */ 2621 enum packet_protocol_type { 2622 WMI_FILTER_HDR_TYPE_INVALID, 2623 WMI_FILTER_HDR_TYPE_MAC, 2624 WMI_FILTER_HDR_TYPE_ARP, 2625 WMI_FILTER_HDR_TYPE_IPV4, 2626 WMI_FILTER_HDR_TYPE_IPV6, 2627 WMI_FILTER_HDR_TYPE_UDP, 2628 WMI_FILTER_HDR_TYPE_MAX 2629 }; 2630 2631 /** 2632 * enum packet_filter_comp_type - packet filter comparison type 2633 * @WMI_FILTER_CMP_TYPE_INVALID: invalid type 2634 * @WMI_FILTER_CMP_TYPE_EQUAL: type equal 2635 * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal 2636 * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal 2637 * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal 2638 * @WMI_FILTER_CMP_TYPE_MAX: max type 2639 */ 2640 enum packet_filter_comp_type { 2641 WMI_FILTER_CMP_TYPE_INVALID, 2642 WMI_FILTER_CMP_TYPE_EQUAL, 2643 WMI_FILTER_CMP_TYPE_MASK_EQUAL, 2644 WMI_FILTER_CMP_TYPE_NOT_EQUAL, 2645 WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL, 2646 WMI_FILTER_CMP_TYPE_MAX 2647 }; 2648 2649 /** 2650 * struct rcv_pkt_filter_params - receive packet filter parameters 2651 * @protocolLayer: protocol layer 2652 * @cmpFlag: comparison flag 2653 * @dataLength: data length 2654 * @dataOffset: data offset 2655 * @reserved: resserved 2656 * @compareData: compare data 2657 * @dataMask: data mask 2658 */ 2659 struct rcv_pkt_filter_params { 2660 enum packet_protocol_type protocolLayer; 2661 enum packet_filter_comp_type cmpFlag; 2662 uint16_t dataLength; 2663 uint8_t dataOffset; 2664 uint8_t reserved; 2665 uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN]; 2666 uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN]; 2667 }; 2668 2669 /** 2670 * struct rcv_pkt_filter_config - receive packet filter info 2671 * @filterId: filter id 2672 * @filterType: filter type 2673 * @numFieldParams: no of fields 2674 * @coalesceTime: reserved parameter 2675 * @self_macaddr: self mac address 2676 * @bssid: Bssid of the connected AP 2677 * @paramsData: data parameter 2678 */ 2679 struct rcv_pkt_filter_config { 2680 uint8_t filterId; 2681 enum packet_filter_type filterType; 2682 uint32_t numFieldParams; 2683 uint32_t coalesceTime; 2684 struct qdf_mac_addr self_macaddr; 2685 struct qdf_mac_addr bssid; 2686 struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER]; 2687 }; 2688 2689 /** 2690 * struct cfg_action_frm_tb_ppdu_param - action frm in TB PPDU cfg 2691 * @cfg: enable/disable 2692 * @frm_len: length of the frame 2693 * @data: data pointer 2694 */ 2695 struct cfg_action_frm_tb_ppdu_param { 2696 uint32_t cfg; 2697 uint32_t frm_len; 2698 uint8_t *data; 2699 }; 2700 2701 #define WMI_MAX_NUM_FW_SEGMENTS 4 2702 2703 /** 2704 * struct fw_dump_seg_req_param - individual segment details 2705 * @seg_id: segment id. 2706 * @seg_start_addr_lo: lower address of the segment. 2707 * @seg_start_addr_hi: higher address of the segment. 2708 * @seg_length: length of the segment. 2709 * @dst_addr_lo: lower address of the destination buffer. 2710 * @dst_addr_hi: higher address of the destination buffer. 2711 * 2712 * This structure carries the information to firmware about the 2713 * individual segments. This structure is part of firmware memory 2714 * dump request. 2715 */ 2716 struct fw_dump_seg_req_param { 2717 uint8_t seg_id; 2718 uint32_t seg_start_addr_lo; 2719 uint32_t seg_start_addr_hi; 2720 uint32_t seg_length; 2721 uint32_t dst_addr_lo; 2722 uint32_t dst_addr_hi; 2723 }; 2724 2725 /** 2726 * struct fw_dump_req_param - firmware memory dump request details. 2727 * @request_id: request id. 2728 * @num_seg: requested number of segments. 2729 * @segment: individual segment information. 2730 * 2731 * This structure carries information about the firmware 2732 * memory dump request. 2733 */ 2734 struct fw_dump_req_param { 2735 uint32_t request_id; 2736 uint32_t num_seg; 2737 struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS]; 2738 }; 2739 2740 /** 2741 * struct dhcp_offload_info_params - dhcp offload parameters 2742 * @vdev_id: request data length 2743 * @dhcp_offload_enabled: dhcp offload enabled 2744 * @dhcp_client_num: dhcp client no 2745 * @dhcp_srv_addr: dhcp server ip 2746 */ 2747 struct dhcp_offload_info_params { 2748 uint32_t vdev_id; 2749 bool dhcp_offload_enabled; 2750 uint32_t dhcp_client_num; 2751 uint32_t dhcp_srv_addr; 2752 }; 2753 2754 /** 2755 * struct app_type2_params - app type2parameter 2756 * @vdev_id: vdev id 2757 * @rc4_key: rc4 key 2758 * @rc4_key_len: rc4 key length 2759 * @ip_id: NC id 2760 * @ip_device_ip: NC IP address 2761 * @ip_server_ip: Push server IP address 2762 * @tcp_src_port: NC TCP port 2763 * @tcp_dst_port: Push server TCP port 2764 * @tcp_seq: tcp sequence 2765 * @tcp_ack_seq: tcp ack sequence 2766 * @keepalive_init: Initial ping interval 2767 * @keepalive_min: Minimum ping interval 2768 * @keepalive_max: Maximum ping interval 2769 * @keepalive_inc: Increment of ping interval 2770 * @gateway_mac: gateway mac address 2771 * @tcp_tx_timeout_val: tcp tx timeout value 2772 * @tcp_rx_timeout_val: tcp rx timeout value 2773 */ 2774 struct app_type2_params { 2775 uint8_t vdev_id; 2776 uint8_t rc4_key[16]; 2777 uint32_t rc4_key_len; 2778 /** ip header parameter */ 2779 uint32_t ip_id; 2780 uint32_t ip_device_ip; 2781 uint32_t ip_server_ip; 2782 /** tcp header parameter */ 2783 uint16_t tcp_src_port; 2784 uint16_t tcp_dst_port; 2785 uint32_t tcp_seq; 2786 uint32_t tcp_ack_seq; 2787 uint32_t keepalive_init; 2788 uint32_t keepalive_min; 2789 uint32_t keepalive_max; 2790 uint32_t keepalive_inc; 2791 struct qdf_mac_addr gateway_mac; 2792 uint32_t tcp_tx_timeout_val; 2793 uint32_t tcp_rx_timeout_val; 2794 }; 2795 2796 /** 2797 * struct app_type1_params - app type1 parameter 2798 * @vdev_id: vdev id 2799 * @wakee_mac_addr: mac address 2800 * @identification_id: identification id 2801 * @password: password 2802 * @id_length: id length 2803 * @pass_length: password length 2804 */ 2805 struct app_type1_params { 2806 uint8_t vdev_id; 2807 struct qdf_mac_addr wakee_mac_addr; 2808 uint8_t identification_id[8]; 2809 uint8_t password[16]; 2810 uint32_t id_length; 2811 uint32_t pass_length; 2812 }; 2813 2814 /** 2815 * enum wmi_ext_wow_type - wow type 2816 * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1 2817 * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2 2818 * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2 2819 */ 2820 enum wmi_ext_wow_type { 2821 WMI_EXT_WOW_TYPE_APP_TYPE1, 2822 WMI_EXT_WOW_TYPE_APP_TYPE2, 2823 WMI_EXT_WOW_TYPE_APP_TYPE1_2, 2824 }; 2825 2826 /** 2827 * struct ext_wow_params - ext wow parameters 2828 * @vdev_id: vdev id 2829 * @type: wow type 2830 * @wakeup_pin_num: wake up gpio no 2831 */ 2832 struct ext_wow_params { 2833 uint8_t vdev_id; 2834 enum wmi_ext_wow_type type; 2835 uint32_t wakeup_pin_num; 2836 }; 2837 2838 /** 2839 * struct stats_ext_params - ext stats request 2840 * @vdev_id: vdev id 2841 * @request_data_len: request data length 2842 * @vdev_id_bitmap: mlo connected vdev id bitmap 2843 * @request_data: request data 2844 */ 2845 struct stats_ext_params { 2846 uint32_t vdev_id; 2847 uint32_t request_data_len; 2848 uint32_t vdev_id_bitmap; 2849 uint8_t request_data[]; 2850 }; 2851 2852 #define WMI_GTK_OFFLOAD_KEK_BYTES 64 2853 #define WMI_GTK_OFFLOAD_KCK_BYTES 16 2854 #define WMI_GTK_OFFLOAD_ENABLE 0 2855 #define WMI_GTK_OFFLOAD_DISABLE 1 2856 2857 #define MAX_MEM_CHUNKS 32 2858 /* 2859 * struct wmi_host_mem_chunk - host memory chunk structure 2860 * @vaddr: Pointer to virtual address 2861 * @paddr: Physical address 2862 * @memctx: qdf memory context for mapped address. 2863 * @len: length of chunk 2864 * @req_id: request id from target 2865 * 2866 * Note: kernel-doc doesn't parse the memctx definition so this definition 2867 * currently doesn't use a kernel-doc comment marker 2868 */ 2869 struct wmi_host_mem_chunk { 2870 uint32_t *vaddr; 2871 qdf_dma_addr_t paddr; 2872 qdf_dma_mem_context(memctx); 2873 uint32_t len; 2874 uint32_t req_id; 2875 }; 2876 2877 /** 2878 * struct wmi_wifi_start_log - Structure to store the params sent to start/ 2879 * stop logging 2880 * @ring_id: Attribute which indicates the type of logging like per packet 2881 * statistics, connectivity etc. 2882 * @verbose_level: Verbose level which can be 0,1,2,3 2883 * @flag: Flag field for future use 2884 */ 2885 struct wmi_wifi_start_log { 2886 uint32_t ring_id; 2887 uint32_t verbose_level; 2888 uint32_t flag; 2889 }; 2890 2891 /** 2892 * struct wmi_pcl_list - Format of PCL 2893 * @pcl_list: List of preferred channels 2894 * @weight_list: Weights of the PCL 2895 * @pcl_len: Number of channels in the PCL 2896 */ 2897 struct wmi_pcl_list { 2898 uint8_t pcl_list[NUM_CHANNELS]; 2899 uint8_t weight_list[NUM_CHANNELS]; 2900 uint32_t pcl_len; 2901 }; 2902 2903 /** 2904 * struct wmi_hw_mode_params - HW mode params 2905 * @mac0_tx_ss: MAC0 Tx spatial stream 2906 * @mac0_rx_ss: MAC0 Rx spatial stream 2907 * @mac1_tx_ss: MAC1 Tx spatial stream 2908 * @mac1_rx_ss: MAC1 Rx spatial stream 2909 * @mac0_bw: MAC0 bandwidth 2910 * @mac1_bw: MAC1 bandwidth 2911 * @dbs_cap: DBS capabality 2912 * @agile_dfs_cap: Agile DFS capabality 2913 */ 2914 struct wmi_hw_mode_params { 2915 uint8_t mac0_tx_ss; 2916 uint8_t mac0_rx_ss; 2917 uint8_t mac1_tx_ss; 2918 uint8_t mac1_rx_ss; 2919 uint8_t mac0_bw; 2920 uint8_t mac1_bw; 2921 uint8_t dbs_cap; 2922 uint8_t agile_dfs_cap; 2923 }; 2924 2925 /** 2926 * struct wmi_unit_test_cmd - unit test command parameters 2927 * @vdev_id: vdev id 2928 * @module_id: module id 2929 * @num_args: number of arguments 2930 * @diag_token: dialog token, which identifies the transaction. 2931 * this number is generated by wifitool and may be used to 2932 * identify the transaction in the event path 2933 * @args: arguments 2934 */ 2935 struct wmi_unit_test_cmd { 2936 uint32_t vdev_id; 2937 uint32_t module_id; 2938 uint32_t num_args; 2939 uint32_t diag_token; 2940 uint32_t args[WMI_UNIT_TEST_MAX_NUM_ARGS]; 2941 }; 2942 2943 /** 2944 * struct extscan_bssid_hotlist_set_params - set hotlist request 2945 * @request_id: request_id 2946 * @vdev_id: vdev id 2947 * @lost_ap_sample_size: number of samples to confirm AP loss 2948 * @num_ap: Number of hotlist APs 2949 * @ap: hotlist APs 2950 */ 2951 struct extscan_bssid_hotlist_set_params { 2952 uint32_t request_id; 2953 uint8_t vdev_id; 2954 uint32_t lost_ap_sample_size; 2955 uint32_t num_ap; 2956 struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS]; 2957 }; 2958 2959 /** 2960 * struct host_mem_req - Host memory request paramseters request by target 2961 * @req_id: Request id to identify the request. 2962 * @unit_size: Size of single unit requested. 2963 * @num_unit_info: Memory chunk info 2964 * @num_units: number of units requested. 2965 * @tgt_num_units: number of units request by target. 2966 */ 2967 typedef struct { 2968 uint32_t req_id; 2969 uint32_t unit_size; 2970 uint32_t num_unit_info; 2971 uint32_t num_units; 2972 uint32_t tgt_num_units; 2973 } host_mem_req; 2974 2975 #define WMI_HOST_DSCP_MAP_MAX (64) 2976 2977 /** 2978 * struct wmi_host_ext_resource_config - Extended resource config 2979 * @host_platform_config: Host platform configuration. 2980 * @fw_feature_bitmap: FW feature requested bitmap. Uses the 2981 * WMI_HOST_FW_FEATURES_* macros. The features in 2982 * question are enabled by setting the feature's 2983 * bit to 1, or disabled by setting the feature's 2984 * bit to 0. 2985 * @wlan_priority_gpio: WLAN priority GPIO number. The target uses a 2986 * GPIO pin to indicate when it is transmitting 2987 * high-priority traffic (e.g. beacon, 2988 * management, or AC_VI) or low-priority traffic 2989 * (e.g. AC_BE, AC_BK). The HW uses this WLAN 2990 * GPIO pin to determine whether to abort WLAN 2991 * tx in favor of BT activity. Which GPIO is 2992 * used for this WLAN tx traffic priority 2993 * specification varies between platforms, so 2994 * the host needs to indicate to the target 2995 * which GPIO to use. 2996 * @coex_version: COEX version. Host will notify target which coex 2997 * algorithm has to be enabled based on HW, FW 2998 * capability and device tree config. Till now the 2999 * coex algorithms were target specific. Now the same 3000 * target can choose between multiple coex algorithms 3001 * depending on device tree config on host. For 3002 * backward compatibility, version support will have 3003 * option 0 and will rely on FW compile time flags to 3004 * decide the coex version between VERSION_1, VERSION_2 3005 * and VERSION_3. Version info is mandatory from 3006 * VERSION_4 onwards for any new coex algorithms. 3007 * 0 = no version support 3008 * 1 = COEX_VERSION1 (3 wire coex) 3009 * 2 = COEX_VERSION_2 (2.5 wire coex) 3010 * 3 = COEX_VERSION_3 (2.5 wire coex+duty cycle) 3011 * 4 = COEX_VERSION_4 (4 wire coex) 3012 * @coex_gpio_pin_1: 3013 * @coex_gpio_pin_2: 3014 * @coex_gpio_pin_3: 3015 * There are multiple coex implementations on FW to support different 3016 * hardwares. Since the coex algos are mutually exclusive, host will 3017 * use below fields to send GPIO info to FW and these GPIO pins will 3018 * have different usages depending on the feature enabled. This is to 3019 * avoid adding multiple GPIO fields here for different features. 3020 * 3021 * COEX VERSION_4 (4 wire coex) : 3022 * 4 wire coex feature uses 1 common input request line from BT/ZB/ 3023 * Thread which interrupts the WLAN target processor directly, 1 input 3024 * priority line from BT and ZB each, 1 output line to grant access to 3025 * requesting IOT subsystem. WLAN uses the input priority line to 3026 * identify the requesting IOT subsystem. Request is granted based on 3027 * IOT interface priority and WLAN traffic. GPIO pin usage is as below: 3028 * coex_gpio_pin_1 = BT PRIORITY INPUT GPIO 3029 * coex_gpio_pin_2 = ZIGBEE PRIORITY INPUT GPIO 3030 * coex_gpio_pin_3 = GRANT OUTPUT GPIO 3031 * when a BT active interrupt is raised, WLAN reads 3032 * BT and ZB priority input GPIO pins to compare against the coex 3033 * priority table and accordingly sets the grant output GPIO to give 3034 * access to requesting IOT subsystem. 3035 */ 3036 typedef struct { 3037 uint32_t host_platform_config; 3038 3039 #define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001 3040 #define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002 3041 #define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004 3042 #define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008 3043 #define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010 3044 #define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020 3045 #define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040 3046 #define WMI_HOST_FW_FEATURE_VOW_FEATURES 0x00004000 3047 #define WMI_HOST_FW_FEATURE_VOW_STATS 0x00008000 3048 uint32_t fw_feature_bitmap; 3049 uint32_t wlan_priority_gpio; 3050 uint32_t coex_version; 3051 uint32_t coex_gpio_pin_1; 3052 uint32_t coex_gpio_pin_2; 3053 uint32_t coex_gpio_pin_3; 3054 3055 /* add new members here */ 3056 } wmi_host_ext_resource_config; 3057 3058 /** 3059 * struct set_fwtest_params - FW test params 3060 * @arg: FW param id 3061 * @value: value 3062 */ 3063 struct set_fwtest_params { 3064 uint32_t arg; 3065 uint32_t value; 3066 }; 3067 3068 /** 3069 * enum wfa_test_cmds - WFA test config command 3070 * @WFA_CONFIG_RXNE: configure an override for the RSNXE Used 3071 * @WFA_CONFIG_CSA: configure the driver to ignore CSA 3072 * @WFA_CONFIG_OCV: configure OCI 3073 * @WFA_CONFIG_SA_QUERY: configure driver/firmware to ignore SAquery timeout 3074 * @WFA_FILS_DISCV_FRAMES: FD frames TX enable disable config 3075 * @WFA_IGNORE_H2E_RSNXE: configure driver/firmware to ignore H2E_RSNXE in case 3076 * of 6g connection 3077 */ 3078 enum wfa_test_cmds { 3079 WFA_CONFIG_RXNE, 3080 WFA_CONFIG_CSA, 3081 WFA_CONFIG_OCV, 3082 WFA_CONFIG_SA_QUERY, 3083 WFA_FILS_DISCV_FRAMES, 3084 WFA_IGNORE_H2E_RSNXE, 3085 }; 3086 3087 /** 3088 * enum wmi_host_wfa_config_ocv_frmtype - OCI override frame type 3089 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ: SA Query Request frame 3090 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP: SA Query Response frame 3091 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ: FT Reassociation Req frm 3092 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ: FILS Reassoc Req frm 3093 */ 3094 enum wmi_host_wfa_config_ocv_frmtype { 3095 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ = 0x00000001, 3096 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP = 0x00000002, 3097 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ = 0x00000004, 3098 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ = 0x00000008, 3099 }; 3100 3101 /** 3102 * struct ocv_wfatest_params - ocv WFA test params 3103 * @frame_type: frame type req for OCV config 3104 * @freq: frequency to set 3105 */ 3106 struct ocv_wfatest_params { 3107 uint8_t frame_type; 3108 uint32_t freq; 3109 }; 3110 3111 /** 3112 * struct set_wfatest_params - WFA test params 3113 * @vdev_id: vdev id 3114 * @value: wfa test config value 3115 * @cmd: WFA test command 3116 * @ocv_param: pointer to ocv params 3117 */ 3118 struct set_wfatest_params { 3119 uint8_t vdev_id; 3120 uint32_t value; 3121 enum wfa_test_cmds cmd; 3122 struct ocv_wfatest_params *ocv_param; 3123 }; 3124 3125 /* 3126 * msduq_update_params - MSDUQ update param structure 3127 * @tid_num: TID number 3128 * @msduq_update_mask: update bit mask 3129 * @qdepth_thresh_value: threshold value for the queue depth 3130 */ 3131 3132 #define QDEPTH_THRESH_MAX_UPDATES 1 3133 3134 typedef struct { 3135 uint32_t tid_num; 3136 uint32_t msduq_update_mask; 3137 uint32_t qdepth_thresh_value; 3138 } msduq_update_params; 3139 3140 /** 3141 * struct set_qdepth_thresh_params - MSDU Queue Depth Threshold Params 3142 * @vdev_id: vdev id 3143 * @pdev_id: pdev id 3144 * @mac_addr: MAC address 3145 * @num_of_msduq_updates: holds the number of tid updates 3146 * @update_params:tid updates 3147 */ 3148 struct set_qdepth_thresh_params { 3149 uint32_t pdev_id; 3150 uint32_t vdev_id; 3151 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 3152 uint32_t num_of_msduq_updates; 3153 msduq_update_params update_params[QDEPTH_THRESH_MAX_UPDATES]; 3154 }; 3155 3156 /** 3157 * struct peer_chan_width_switch_info - Peer channel width capability params 3158 * @mac_addr: MAC address of peer 3159 * @chan_width: Max supported channel width of peer 3160 * (enum ieee80211_cwm_width) 3161 * @puncture_bitmap: Puncture bitmap of peer 3162 */ 3163 struct peer_chan_width_switch_info { 3164 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 3165 uint32_t chan_width; 3166 uint16_t puncture_bitmap; 3167 }; 3168 3169 /** 3170 * struct set_bridge_mac_addr_params - set bridge MAC addr params 3171 * @bridge_addr: Pointer to bridge macaddr 3172 */ 3173 struct set_bridge_mac_addr_params { 3174 uint8_t *bridge_addr; 3175 }; 3176 3177 /** 3178 * struct peer_del_all_wds_entries_params - WDS peer entries del params 3179 * @wds_macaddr: Pointer to destination macaddr 3180 * @peer_macaddr: Pointer to peer mac addr 3181 * @flags: flags 3182 */ 3183 struct peer_del_all_wds_entries_params { 3184 uint8_t *wds_macaddr; 3185 uint8_t *peer_macaddr; 3186 uint32_t flags; 3187 }; 3188 3189 /** 3190 * struct set_ps_mode_params - PS mode params 3191 * @vdev_id: vdev id 3192 * @psmode: PS mode 3193 */ 3194 struct set_ps_mode_params { 3195 uint8_t vdev_id; 3196 uint8_t psmode; 3197 }; 3198 3199 /** 3200 * struct tt_level_config - Set Thermal throttlling config 3201 * @tmplwm: Temperature low water mark 3202 * @tmphwm: Temperature high water mark 3203 * @dcoffpercent: dc off percentage 3204 * @priority: priority 3205 */ 3206 typedef struct { 3207 uint32_t tmplwm; 3208 uint32_t tmphwm; 3209 uint32_t dcoffpercent; 3210 uint32_t priority; 3211 } tt_level_config; 3212 3213 /** 3214 * struct thermal_mitigation_params - Thermal mitigation params 3215 * @pdev_id: pdev identifier 3216 * @enable: Enable/Disable Thermal mitigation 3217 * @dc: DC 3218 * @dc_per_event: DC per event 3219 * @num_thermal_conf: Number of thermal configurations to be sent 3220 * @client_id: Thermal client id either apps or wpps 3221 * @priority: Priority of apps/wpps 3222 * @levelconf: TT level config params 3223 */ 3224 struct thermal_mitigation_params { 3225 uint32_t pdev_id; 3226 uint32_t enable; 3227 uint32_t dc; 3228 uint32_t dc_per_event; 3229 uint8_t num_thermal_conf; 3230 uint8_t client_id; 3231 uint8_t priority; 3232 tt_level_config levelconf[THERMAL_LEVELS]; 3233 }; 3234 3235 /** 3236 * struct smart_ant_enable_tx_feedback_params - SA tx feedback params 3237 * @enable: Enable TX feedback for SA 3238 */ 3239 struct smart_ant_enable_tx_feedback_params { 3240 int enable; 3241 }; 3242 3243 /** 3244 * struct vdev_spectral_configure_params - SPectral config params 3245 * @vdev_id: VDEV id 3246 * @count: count 3247 * @period: period 3248 * @fft_recap: FFT recapture enable/disable 3249 * @spectral_pri: Spectral priority 3250 * @fft_size: FFT size 3251 * @gc_enable: GC enable 3252 * @restart_enable: restart enabled 3253 * @noise_floor_ref: Noise floor reference 3254 * @init_delay: Init delays 3255 * @nb_tone_thr: NB tone threshold 3256 * @str_bin_thr: STR BIN threshold 3257 * @wb_rpt_mode: WB BIN threshold 3258 * @rssi_rpt_mode: RSSI report mode 3259 * @rssi_thr: RSSI threshold 3260 * @pwr_format: Power format 3261 * @rpt_mode: Report mode 3262 * @bin_scale: BIN scale 3263 * @dbm_adj: DBM adjust 3264 * @chn_mask: chain mask 3265 * @mode: Mode 3266 * @center_freq1: Center frequency 1 3267 * @center_freq2: Center frequency 2 3268 * @chan_freq: Primary channel frequency 3269 * @chan_width: Channel width 3270 */ 3271 struct vdev_spectral_configure_params { 3272 uint8_t vdev_id; 3273 uint16_t count; 3274 uint16_t period; 3275 uint16_t fft_recap; 3276 uint16_t spectral_pri; 3277 uint16_t fft_size; 3278 uint16_t gc_enable; 3279 uint16_t restart_enable; 3280 uint16_t noise_floor_ref; 3281 uint16_t init_delay; 3282 uint16_t nb_tone_thr; 3283 uint16_t str_bin_thr; 3284 uint16_t wb_rpt_mode; 3285 uint16_t rssi_rpt_mode; 3286 uint16_t rssi_thr; 3287 uint16_t pwr_format; 3288 uint16_t rpt_mode; 3289 uint16_t bin_scale; 3290 uint16_t dbm_adj; 3291 uint16_t chn_mask; 3292 uint16_t mode; 3293 uint16_t center_freq1; 3294 uint16_t center_freq2; 3295 uint16_t chan_freq; 3296 uint16_t chan_width; 3297 }; 3298 3299 /** 3300 * struct vdev_spectral_enable_params - Spectral enabled params 3301 * @vdev_id: VDEV id 3302 * @active_valid: Active valid 3303 * @active: active 3304 * @enabled_valid: Enabled valid 3305 * @enabled: enabled 3306 * @mode: Mode 3307 */ 3308 struct vdev_spectral_enable_params { 3309 uint8_t vdev_id; 3310 uint8_t active_valid; 3311 uint8_t active; 3312 uint8_t enabled_valid; 3313 uint8_t enabled; 3314 uint8_t mode; 3315 }; 3316 3317 #ifdef WLAN_CONV_SPECTRAL_ENABLE 3318 /** 3319 * struct spectral_fft_bin_markers_160_165mhz - Stores the start index 3320 * and length of FFT bins in 165 MHz/Restricted 80p80 or 160 MHz 3321 * mode in targets with a single Spectral detector 3322 * @is_valid: Indicates whether this structure holds valid data 3323 * @start_pri80: Starting index of FFT bins corresponding to primary 80 MHz 3324 * in 165 MHz/Restricted 80p80 or 160 MHz mode 3325 * @num_pri80: Number of FFT bins corresponding to primary 80 MHz 3326 * in 165 MHz/Restricted 80p80 or 160 MHz mode 3327 * @start_5mhz: Starting index of FFT bins corresponding to extra 5 MHz 3328 * in 165 MHz/Restricted 80p80 mode 3329 * @num_5mhz: Number of FFT bins corresponding to extra 5 MHz 3330 * in 165 MHz/Restricted 80p80 mode 3331 * @start_sec80: Starting index of FFT bins corresponding to secondary 80 MHz 3332 * in 165 MHz/Restricted 80p80 or 160 MHz mode 3333 * @num_sec80: Number of FFT bins corresponding to secondary 80 MHz 3334 * in 165 MHz/Restricted 80p80 or 160 MHz mode 3335 */ 3336 struct spectral_fft_bin_markers_160_165mhz { 3337 bool is_valid; 3338 uint16_t start_pri80; 3339 uint16_t num_pri80; 3340 uint16_t start_5mhz; 3341 uint16_t num_5mhz; 3342 uint16_t start_sec80; 3343 uint16_t num_sec80; 3344 }; 3345 3346 /** 3347 * struct spectral_startscan_resp_params - Params from the event send by 3348 * FW as a response to the scan start command 3349 * @pdev_id: Pdev id 3350 * @smode: Spectral scan mode 3351 * @num_fft_bin_index: Number of TLVs with FFT bin start and end indices 3352 * @num_det_info: Number of detector info TLVs 3353 */ 3354 struct spectral_startscan_resp_params { 3355 uint32_t pdev_id; 3356 enum spectral_scan_mode smode; 3357 uint8_t num_fft_bin_index; 3358 uint8_t num_det_info; 3359 }; 3360 3361 /** 3362 * struct spectral_session_chan_info - Spectral scan session channel information 3363 * @operating_pri20_freq: frequency of primary 20MHz channel (in MHz) 3364 * @operating_cfreq1: center frequency 1 of operating channel (in MHz) 3365 * @operating_cfreq2: center frequency 2 of operating channel (in MHz). 3366 * For contiguous channels, @operating_cfreq1 should be represent the center of 3367 * the entire span and @operating_cfreq2 should be 0, whereas for non-contiguous 3368 * channels, @operating_cfreq1 should represent the center of primary segment 3369 * and @@operating_cfreq2 should represent the center of secondary segment. 3370 * @operating_bw: operating bandwidth enumeration 3371 * @operating_puncture_20mhz_bitmap: Puncture bitmap of operating channel. 3372 * Each bit indicates one 20 MHz punctured channel 3373 * @sscan_cfreq1: center frequency 1 (in MHz) of the channel in which spectral 3374 * scan is done 3375 * @sscan_cfreq2: center frequency 2 (in MHz) of the channel in which spectral 3376 * scan is done. For contiguous channels, @sscan_cfreq1 should be represent the 3377 * center of the entire span and @sscan_cfreq2 should be 0, whereas for 3378 * non-contiguous channels, @sscan_cfreq1 should represent the center of primary 3379 * segment and @sscan_cfreq2 should represent the center of secondary segment. 3380 * @sscan_bw: bandwidth of the channel in which spectral scan is done 3381 * @sscan_puncture_20mhz_bitmap: Puncture bitmap of channel in which spectral 3382 * scan is done. Each bit indicates one 20 MHz punctured channel. 3383 */ 3384 struct spectral_session_chan_info { 3385 qdf_freq_t operating_pri20_freq; 3386 qdf_freq_t operating_cfreq1; 3387 qdf_freq_t operating_cfreq2; 3388 enum phy_ch_width operating_bw; 3389 uint16_t operating_puncture_20mhz_bitmap; 3390 3391 qdf_freq_t sscan_cfreq1; 3392 qdf_freq_t sscan_cfreq2; 3393 enum phy_ch_width sscan_bw; 3394 uint16_t sscan_puncture_20mhz_bitmap; 3395 }; 3396 3397 /** 3398 * struct spectral_session_det_info - Detector info for a spectral scan session 3399 * @det_id: detector ID 3400 * @start_freq: start frequency (in MHz) of this detector 3401 * @end_freq: end frequency (in MHz) of this detector 3402 */ 3403 struct spectral_session_det_info { 3404 uint8_t det_id; 3405 qdf_freq_t start_freq; 3406 qdf_freq_t end_freq; 3407 }; 3408 3409 /** 3410 * struct spectral_capabilities_event_params - parameters related to Spectral 3411 * capabilities event 3412 * @num_sscan_bw_caps: Number of spectral_scan_bw_capabilities TLVs 3413 * @num_fft_size_caps: Number of spectral_fft_size_capabilities TLVs 3414 */ 3415 struct spectral_capabilities_event_params { 3416 uint8_t num_sscan_bw_caps; 3417 uint8_t num_fft_size_caps; 3418 }; 3419 3420 /** 3421 * struct spectral_scan_bw_capabilities - Spectral scan bandwidth caps 3422 * that are extracted from Spectral capabilities WMI event 3423 * @pdev_id: pdev ID 3424 * @smode: Spectral scan mode 3425 * @operating_bw: Operating bandwidth 3426 * @supported_bws: Supported sscan bandwidths bitmap for given @pdev_id, 3427 * @operating_bw, and @smode 3428 */ 3429 struct spectral_scan_bw_capabilities { 3430 uint8_t pdev_id; 3431 enum spectral_scan_mode smode; 3432 enum phy_ch_width operating_bw; 3433 uint32_t supported_bws; 3434 }; 3435 3436 /** 3437 * struct spectral_fft_size_capabilities - Spectral scan FFT size caps 3438 * that are extracted from Spectral capabilities WMI event 3439 * @pdev_id: pdev ID 3440 * @sscan_bw: Spectral scan bandwidth 3441 * @supports_fft_sizes: Supported FFT sizes bitmap for given @pdev_id and 3442 * @sscan_bw 3443 */ 3444 struct spectral_fft_size_capabilities { 3445 uint8_t pdev_id; 3446 enum phy_ch_width sscan_bw; 3447 uint32_t supports_fft_sizes; 3448 }; 3449 #endif 3450 3451 /** 3452 * struct pdev_set_regdomain_params - PDEV set reg domain params 3453 * @currentRDinuse: Current Reg domain 3454 * @currentRD2G: Current Reg domain 2G 3455 * @currentRD5G: Current Reg domain 5G 3456 * @ctl_2G: CTL 2G 3457 * @ctl_5G: CTL 5G 3458 * @dfsDomain: DFS domain 3459 * @pdev_id: pdev_id 3460 */ 3461 struct pdev_set_regdomain_params { 3462 uint16_t currentRDinuse; 3463 uint16_t currentRD2G; 3464 uint16_t currentRD5G; 3465 uint32_t ctl_2G; 3466 uint32_t ctl_5G; 3467 uint8_t dfsDomain; 3468 uint32_t pdev_id; 3469 }; 3470 3471 /** 3472 * struct set_beacon_filter_params - Set beacon filter params 3473 * @vdev_id: VDEV id 3474 * @ie: Pointer to IE fields 3475 */ 3476 struct set_beacon_filter_params { 3477 uint8_t vdev_id; 3478 uint32_t *ie; 3479 }; 3480 3481 /** 3482 * struct remove_beacon_filter_params - Remove beacon filter params 3483 * @vdev_id: VDEV id 3484 */ 3485 struct remove_beacon_filter_params { 3486 uint8_t vdev_id; 3487 }; 3488 3489 /** 3490 * struct mgmt_params - Mgmt params 3491 * @vdev_id: vdev id 3492 * @buf_len: length of frame buffer 3493 * @wbuf: frame buffer 3494 */ 3495 struct mgmt_params { 3496 int vdev_id; 3497 uint32_t buf_len; 3498 qdf_nbuf_t wbuf; 3499 }; 3500 3501 /** 3502 * struct addba_clearresponse_params - Addba clear response params 3503 * @vdev_id: VDEV id 3504 */ 3505 struct addba_clearresponse_params { 3506 uint8_t vdev_id; 3507 }; 3508 3509 /** 3510 * struct addba_send_params - ADDBA send params 3511 * @vdev_id: vdev id 3512 * @tidno: TID 3513 * @buffersize: buffer size 3514 */ 3515 struct addba_send_params { 3516 uint8_t vdev_id; 3517 uint8_t tidno; 3518 uint16_t buffersize; 3519 }; 3520 3521 /** 3522 * struct delba_send_params - DELBA send params 3523 * @vdev_id: vdev id 3524 * @tidno: TID 3525 * @initiator: initiator 3526 * @reasoncode: reason code 3527 */ 3528 struct delba_send_params { 3529 uint8_t vdev_id; 3530 uint8_t tidno; 3531 uint8_t initiator; 3532 uint16_t reasoncode; 3533 }; 3534 /** 3535 * struct addba_setresponse_params - Set ADDBA response params 3536 * @vdev_id: vdev id 3537 * @tidno: TID 3538 * @statuscode: status code in response 3539 */ 3540 struct addba_setresponse_params { 3541 uint8_t vdev_id; 3542 uint8_t tidno; 3543 uint16_t statuscode; 3544 }; 3545 3546 /** 3547 * struct singleamsdu_params - Single AMSDU params 3548 * @vdev_id: vdev is 3549 * @tidno: TID 3550 */ 3551 struct singleamsdu_params { 3552 uint8_t vdev_id; 3553 uint8_t tidno; 3554 }; 3555 3556 /** 3557 * struct mu_scan_params - MU scan params 3558 * @id: id 3559 * @type: type 3560 * @duration: Duration 3561 * @lteu_tx_power: LTEU tx power 3562 * @rssi_thr_bssid: 3563 * @rssi_thr_sta: 3564 * @rssi_thr_sc: 3565 * @plmn_id: 3566 * @alpha_num_bssid: alpha for num active bssid calculation 3567 */ 3568 struct mu_scan_params { 3569 uint8_t id; 3570 uint8_t type; 3571 uint32_t duration; 3572 uint32_t lteu_tx_power; 3573 uint32_t rssi_thr_bssid; 3574 uint32_t rssi_thr_sta; 3575 uint32_t rssi_thr_sc; 3576 uint32_t plmn_id; 3577 uint32_t alpha_num_bssid; 3578 }; 3579 3580 /** 3581 * struct lteu_config_params - LTEU config params 3582 * @lteu_gpio_start: start MU/AP scan after GPIO toggle 3583 * @lteu_num_bins: no. of elements in the following arrays 3584 * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one 3585 * @lteu_weight: weights for MU algo 3586 * @lteu_thresh: thresholds for MU algo 3587 * @lteu_gamma: gamma's for MU algo 3588 * @lteu_scan_timeout: timeout in ms to gpio toggle 3589 * @alpha_num_bssid: alpha for num active bssid calculation 3590 * @wifi_tx_power: Wifi Tx power 3591 * @allow_err_packets: allow error packets 3592 */ 3593 struct lteu_config_params { 3594 uint8_t lteu_gpio_start; 3595 uint8_t lteu_num_bins; 3596 uint8_t use_actual_nf; 3597 uint32_t lteu_weight[LTEU_MAX_BINS]; 3598 uint32_t lteu_thresh[LTEU_MAX_BINS]; 3599 uint32_t lteu_gamma[LTEU_MAX_BINS]; 3600 uint32_t lteu_scan_timeout; 3601 uint32_t alpha_num_bssid; 3602 uint32_t wifi_tx_power; 3603 uint32_t allow_err_packets; 3604 }; 3605 3606 struct wmi_macaddr_t { 3607 /** upper 4 bytes of MAC address */ 3608 uint32_t mac_addr31to0; 3609 /** lower 2 bytes of MAC address */ 3610 uint32_t mac_addr47to32; 3611 }; 3612 3613 /** 3614 * struct wlan_profile_params - WLAN profile params 3615 * @param_id: param id 3616 * @profile_id: profile id 3617 * @enable: enable 3618 */ 3619 struct wlan_profile_params { 3620 uint32_t param_id; 3621 uint32_t profile_id; 3622 uint32_t enable; 3623 }; 3624 3625 /** 3626 * struct wmi_host_wme_vparams - WME params 3627 * @acm: ACM paramete 3628 * @aifs: AIFSN parameters 3629 * @cwmin: cwmin in exponential form 3630 * @cwmax: cwmax in exponential form 3631 * @txoplimit: txopLimit 3632 * @mu_edca_timer: MU EDCA timer 3633 * @noackpolicy: No-Ack Policy: 0=ack, 1=no-ack 3634 */ 3635 struct wmi_host_wme_vparams { 3636 u_int32_t acm; 3637 u_int32_t aifs; 3638 u_int32_t cwmin; 3639 u_int32_t cwmax; 3640 union { 3641 u_int32_t txoplimit; 3642 u_int32_t mu_edca_timer; 3643 }; 3644 u_int32_t noackpolicy; 3645 }; 3646 3647 /** 3648 * struct ratepwr_table_params - Rate power table params 3649 * @ratepwr_tbl: pointer to rate power table 3650 * @ratepwr_len: rate power table len 3651 */ 3652 struct ratepwr_table_params { 3653 uint8_t *ratepwr_tbl; 3654 uint16_t ratepwr_len; 3655 }; 3656 3657 /** 3658 * struct ratepwr_chainmsk_params - Rate power chainmask params 3659 * @ratepwr_chain_tbl: pointer to ratepwr chain table 3660 * @num_rate: number of rate in table 3661 * @pream_type: preamble type 3662 * @ops: ops 3663 */ 3664 struct ratepwr_chainmsk_params { 3665 uint32_t *ratepwr_chain_tbl; 3666 uint16_t num_rate; 3667 uint8_t pream_type; 3668 uint8_t ops; 3669 }; 3670 3671 struct macaddr_params { 3672 uint8_t *macaddr; 3673 }; 3674 3675 /** 3676 * struct acparams_params - acparams config structure 3677 * @ac: AC to configure 3678 * @use_rts: Use rts for this AC 3679 * @aggrsize_scaling: Aggregate size scaling for the AC 3680 * @min_kbps: min kbps req 3681 */ 3682 struct acparams_params { 3683 uint8_t ac; 3684 uint8_t use_rts; 3685 uint8_t aggrsize_scaling; 3686 uint32_t min_kbps; 3687 }; 3688 3689 /** 3690 * struct vap_dscp_tid_map_params - DSCP tid map params 3691 * @vdev_id: vdev id 3692 * @dscp_to_tid_map: pointer to array of tid to dscp map table 3693 */ 3694 struct vap_dscp_tid_map_params { 3695 uint8_t vdev_id; 3696 uint32_t *dscp_to_tid_map; 3697 }; 3698 3699 /** 3700 * struct proxy_ast_reserve_params - Proxy AST reserve params 3701 * @macaddr: macaddr for proxy ast entry 3702 */ 3703 struct proxy_ast_reserve_params { 3704 uint8_t *macaddr; 3705 }; 3706 3707 /** 3708 * struct fips_params - FIPS params config 3709 * @key: pointer to key 3710 * @key_len: length of key 3711 * @data: pointer data buf 3712 * @data_len: length of data buf 3713 * @mode: mode 3714 * @op: operation 3715 * @pdev_id: pdev_id for identifying the MAC 3716 */ 3717 struct fips_params { 3718 uint8_t *key; 3719 uint32_t key_len; 3720 uint8_t *data; 3721 uint32_t data_len; 3722 uint32_t mode; 3723 uint32_t op; 3724 uint32_t pdev_id; 3725 }; 3726 3727 #ifdef WLAN_FEATURE_FIPS_BER_CCMGCM 3728 #define MAX_KEY_LEN_FIPS_EXTEND 64 3729 #define MAX_NONCEIV_LEN_FIPS_EXTEND 16 3730 /** 3731 * struct fips_extend_cmd_params - FIPS extend params config for first frag 3732 * @fips_cmd: 1 - Encrypt, 2 - Decrypt 3733 * @key_cipher: 0 - CCM, 1 - GCM 3734 * @key_len: length of key 3735 * @key: key_data 3736 * @nonce_iv_len: length of nonce or iv 3737 * @nonce_iv: nonce_iv 3738 * @tag_len: length of tag/mic 3739 * @aad_len: length of aad 3740 * @payload_len: length of payload 3741 */ 3742 struct fips_extend_cmd_params { 3743 u_int32_t fips_cmd; 3744 u_int32_t key_cipher; 3745 u_int32_t key_len; 3746 u_int8_t key[MAX_KEY_LEN_FIPS_EXTEND]; 3747 u_int32_t nonce_iv_len; 3748 u_int8_t nonce_iv[MAX_NONCEIV_LEN_FIPS_EXTEND]; 3749 u_int32_t tag_len; 3750 u_int32_t aad_len; 3751 u_int32_t payload_len; 3752 }; 3753 3754 /** 3755 * struct fips_extend_params - FIPS extend params config 3756 * @pdev_id: pdev_id for identifying the MAC 3757 * @cookie: cookie value 3758 * @frag_idx: fragment index 3759 * @more_bit: more bit 3760 * @data_len: length of data buf 3761 * @cmd_params: cmd_params set for first fragment 3762 * @data: pointer data buf 3763 */ 3764 struct fips_extend_params { 3765 uint32_t pdev_id; 3766 u_int32_t cookie; 3767 u_int32_t frag_idx; 3768 u_int32_t more_bit; 3769 u_int32_t data_len; 3770 struct fips_extend_cmd_params cmd_params; 3771 u_int32_t *data; 3772 }; 3773 3774 /** 3775 * struct fips_mode_set_params - FIPS mode enable param 3776 * @pdev_id: pdev_id for identifying the MAC 3777 * @mode: value to disable or enable fips extend mode 3778 */ 3779 struct fips_mode_set_params { 3780 uint32_t pdev_id; 3781 uint32_t mode; 3782 }; 3783 #endif 3784 3785 #ifdef WLAN_FEATURE_DISA_FIPS 3786 /** 3787 * struct disa_encrypt_decrypt_req_params - disa encrypt request 3788 * @vdev_id: virtual device id 3789 * @key_flag: This indicates firmware to encrypt/decrypt payload 3790 * see ENCRYPT_DECRYPT_FLAG 3791 * @key_idx: Index used in storing key 3792 * @key_cipher: cipher used for encryption/decryption 3793 * Eg: see WMI_CIPHER_AES_CCM for CCMP 3794 * @key_len: length of key data 3795 * @key_txmic_len: length of Tx MIC 3796 * @key_rxmic_len: length of Rx MIC 3797 * @key_data: Key 3798 * @pn: packet number 3799 * @mac_header: MAC header 3800 * @data_len: length of data 3801 * @data: pointer to payload 3802 */ 3803 struct disa_encrypt_decrypt_req_params { 3804 uint32_t vdev_id; 3805 uint8_t key_flag; 3806 uint32_t key_idx; 3807 uint32_t key_cipher; 3808 uint32_t key_len; 3809 uint32_t key_txmic_len; 3810 uint32_t key_rxmic_len; 3811 uint8_t key_data[MAC_MAX_KEY_LENGTH]; 3812 uint8_t pn[MAC_PN_LENGTH]; 3813 uint8_t mac_header[MAX_MAC_HEADER_LEN]; 3814 uint32_t data_len; 3815 uint8_t *data; 3816 }; 3817 #endif 3818 3819 /** 3820 * struct periodic_chan_stats_params - periodic channel stats req param 3821 * @stats_period: stats period update 3822 * @enable: enable/disable 3823 * @pdev_id: pdev id 3824 */ 3825 struct periodic_chan_stats_params { 3826 uint32_t stats_period; 3827 bool enable; 3828 uint32_t pdev_id; 3829 }; 3830 3831 /** 3832 * enum wmi_host_packet_power_rate_flags: packer power rate flags 3833 * @WMI_HOST_FLAG_RTSENA: RTS enabled 3834 * @WMI_HOST_FLAG_CTSENA: CTS enabled 3835 * @WMI_HOST_FLAG_STBC: STBC is set 3836 * @WMI_HOST_FLAG_LDPC: LDPC is set 3837 * @WMI_HOST_FLAG_TXBF: Tx Bf enabled 3838 * @WMI_HOST_FLAG_MU2: MU2 data 3839 * @WMI_HOST_FLAG_MU3: MU3 data 3840 * @WMI_HOST_FLAG_SERIES1: Rate series 1 3841 * @WMI_HOST_FLAG_SGI: Short guard interval 3842 */ 3843 enum wmi_host_packet_power_rate_flags { 3844 WMI_HOST_FLAG_RTSENA = 0x0001, 3845 WMI_HOST_FLAG_CTSENA = 0x0002, 3846 WMI_HOST_FLAG_STBC = 0x0004, 3847 WMI_HOST_FLAG_LDPC = 0x0008, 3848 WMI_HOST_FLAG_TXBF = 0x0010, 3849 WMI_HOST_FLAG_MU2 = 0x0020, 3850 WMI_HOST_FLAG_MU3 = 0x0040, 3851 WMI_HOST_FLAG_SERIES1 = 0x0080, 3852 WMI_HOST_FLAG_SGI = 0x0100, 3853 }; 3854 3855 /** 3856 * enum wmi_host_su_mu_ofdma_flags: packer power su mu ofdma flags 3857 * @WMI_HOST_FLAG_SU: SU Data 3858 * @WMI_HOST_FLAG_DL_MU_MIMO_AC: DL AC MU data 3859 * @WMI_HOST_FLAG_DL_MU_MIMO_AX: DL AX MU data 3860 * @WMI_HOST_FLAG_DL_OFDMA: DL OFDMA data 3861 * @WMI_HOST_FLAG_UL_OFDMA: UL OFDMA data 3862 * @WMI_HOST_FLAG_UL_MU_MIMO: UL MU data 3863 */ 3864 enum wmi_host_su_mu_ofdma_flags { 3865 WMI_HOST_FLAG_SU = 0x0001, 3866 WMI_HOST_FLAG_DL_MU_MIMO_AC = 0x0002, 3867 WMI_HOST_FLAG_DL_MU_MIMO_AX = 0x0003, 3868 WMI_HOST_FLAG_DL_OFDMA = 0x0004, 3869 WMI_HOST_FLAG_UL_OFDMA = 0x0005, 3870 WMI_HOST_FLAG_UL_MU_MIMO = 0x0006, 3871 }; 3872 3873 /** 3874 * enum wmi_host_preamble_type: preamble type 3875 * @WMI_HOST_PREAMBLE_OFDM: ofdm rate 3876 * @WMI_HOST_PREAMBLE_CCK: cck rate 3877 * @WMI_HOST_PREAMBLE_HT: ht rate 3878 * @WMI_HOST_PREAMBLE_VHT: vht rate 3879 * @WMI_HOST_PREAMBLE_HE: 11ax he rate 3880 */ 3881 enum wmi_host_preamble_type { 3882 WMI_HOST_PREAMBLE_OFDM = 0, 3883 WMI_HOST_PREAMBLE_CCK = 1, 3884 WMI_HOST_PREAMBLE_HT = 2, 3885 WMI_HOST_PREAMBLE_VHT = 3, 3886 WMI_HOST_PREAMBLE_HE = 4, 3887 }; 3888 3889 /** 3890 * enum wmi_ratemask_type: ratemask type 3891 * @WMI_RATEMASK_TYPE_CCK: CCK rate mask type 3892 * @WMI_RATEMASK_TYPE_HT: HT rate mask type 3893 * @WMI_RATEMASK_TYPE_VHT: VHT rate mask type 3894 * @WMI_RATEMASK_TYPE_HE: HE rate mask type 3895 * 3896 * This is used for 'type' in WMI_VDEV_RATEMASK_CMDID 3897 */ 3898 enum wmi_ratemask_type { 3899 WMI_RATEMASK_TYPE_CCK = 0, 3900 WMI_RATEMASK_TYPE_HT = 1, 3901 WMI_RATEMASK_TYPE_VHT = 2, 3902 WMI_RATEMASK_TYPE_HE = 3, 3903 }; 3904 3905 /** 3906 * enum peer_txq_flush_policy - Peer flush policy values 3907 * @PEER_TXQ_FLUSH_POLICY_NONE: No policy configured for peer TID queues 3908 * @PEER_TXQ_FLUSH_POLICY_TWT_SP_END: flush peer TID queues after SP end 3909 * @PEER_TXQ_FLUSH_POLICY_INVALID: invalid policy 3910 * 3911 * This is mapped to 'flush_policy' in WMI_PEER_FLUSH_POLICY_CMDID 3912 */ 3913 enum peer_txq_flush_policy { 3914 PEER_TXQ_FLUSH_POLICY_NONE = 0, 3915 PEER_TXQ_FLUSH_POLICY_TWT_SP_END = 1, 3916 /*keep last */ 3917 PEER_TXQ_FLUSH_POLICY_INVALID, 3918 }; 3919 3920 /** 3921 * struct peer_txq_flush_config_params: Peer TXQ flush configuration parameters 3922 * @vdev_id: vdev id 3923 * @peer: Peer mac address 3924 * @tid_mask: TID queues of the peer being configured 3925 * @policy: Policy to be applied 3926 */ 3927 struct peer_txq_flush_config_params { 3928 uint8_t vdev_id; 3929 uint8_t peer[QDF_MAC_ADDR_SIZE]; 3930 uint32_t tid_mask; 3931 enum peer_txq_flush_policy policy; 3932 }; 3933 3934 /** 3935 * enum gpio_pull_type - GPIO PULL TYPE 3936 * @WMI_HOST_GPIO_PULL_NONE: set gpio pull type to none 3937 * @WMI_HOST_GPIO_PULL_UP: set gpio to pull up 3938 * @WMI_HOST_GPIO_PULL_DOWN: set gpio to pull down 3939 * @WMI_HOST_GPIO_PULL_MAX: invalid pull type 3940 */ 3941 enum gpio_pull_type { 3942 WMI_HOST_GPIO_PULL_NONE = 0, 3943 WMI_HOST_GPIO_PULL_UP = 1, 3944 WMI_HOST_GPIO_PULL_DOWN = 2, 3945 WMI_HOST_GPIO_PULL_MAX, 3946 }; 3947 3948 /** 3949 * enum gpio_interrupt_mode - GPIO INTERRUPT MODE 3950 * @WMI_HOST_GPIO_INTMODE_DISABLE: disable interrupt mode 3951 * @WMI_HOST_GPIO_INTMODE_RISING_EDGE: interrupt with rising edge trigger 3952 * @WMI_HOST_GPIO_INTMODE_FALLING_EDGE: interrupt with falling edge trigger 3953 * @WMI_HOST_GPIO_INTMODE_BOTH_EDGE: interrupt with both edge trigger 3954 * @WMI_HOST_GPIO_INTMODE_LEVEL_LOW: interrupt with gpio level low trigger 3955 * @WMI_HOST_GPIO_INTMODE_LEVEL_HIGH: interrupt with gpio level high trigger 3956 * @WMI_HOST_GPIO_INTMODE_MAX: invalid interrupt mode 3957 */ 3958 enum gpio_interrupt_mode { 3959 WMI_HOST_GPIO_INTMODE_DISABLE = 0, 3960 WMI_HOST_GPIO_INTMODE_RISING_EDGE = 1, 3961 WMI_HOST_GPIO_INTMODE_FALLING_EDGE = 2, 3962 WMI_HOST_GPIO_INTMODE_BOTH_EDGE = 3, 3963 WMI_HOST_GPIO_INTMODE_LEVEL_LOW = 4, 3964 WMI_HOST_GPIO_INTMODE_LEVEL_HIGH = 5, 3965 WMI_HOST_GPIO_INTMODE_MAX, 3966 }; 3967 3968 /** 3969 * enum gpio_direction - GPIO Direction 3970 * @WMI_HOST_GPIO_INPUT: set gpio as input mode 3971 * @WMI_HOST_GPIO_OUTPUT: set gpio as output mode 3972 * @WMI_HOST_GPIO_DIR_MAX: invalid gpio direction 3973 */ 3974 enum gpio_direction { 3975 WMI_HOST_GPIO_INPUT = 0, 3976 WMI_HOST_GPIO_OUTPUT = 1, 3977 WMI_HOST_GPIO_DIR_MAX, 3978 }; 3979 3980 /** 3981 * enum fw_gpio_direction - GPIO Direction 3982 * @WMI_FW_GPIO_OUTPUT: set gpio as output mode 3983 * @WMI_FW_GPIO_INPUT: set gpio as input mode 3984 */ 3985 enum fw_gpio_direction { 3986 WMI_FW_GPIO_OUTPUT = 0, 3987 WMI_FW_GPIO_INPUT = 1, 3988 }; 3989 3990 /** 3991 * enum gpio_value - GPIO Value 3992 * @WMI_HOST_GPIO_LEVEL_LOW: set gpio output level low 3993 * @WMI_HOST_GPIO_LEVEL_HIGH: set gpio output level high 3994 * @WMI_HOST_GPIO_LEVEL_MAX: invalid gpio value 3995 */ 3996 enum gpio_value { 3997 WMI_HOST_GPIO_LEVEL_LOW = 0, 3998 WMI_HOST_GPIO_LEVEL_HIGH = 1, 3999 WMI_HOST_GPIO_LEVEL_MAX, 4000 }; 4001 4002 /** 4003 * enum gpio_init_enable - GPIO init enable 4004 * @WMI_HOST_GPIO_INIT_DISABLE: Disable INIT 4005 * @WMI_HOST_GPIO_INIT_ENABLE: Enable INIT 4006 * @WMI_HOST_GPIO_INIT_MAX: invalid gpio init_enable 4007 */ 4008 enum gpio_init_enable { 4009 WMI_HOST_GPIO_INIT_DISABLE = 0, 4010 WMI_HOST_GPIO_INIT_ENABLE = 1, 4011 WMI_HOST_GPIO_INIT_MAX, 4012 }; 4013 4014 /** 4015 * enum gpio_drive - GPIO drive 4016 * @WMI_HOST_GPIO_DRIVE_2MA: drive 2MA 4017 * @WMI_HOST_GPIO_DRIVE_4MA: drive 4MA 4018 * @WMI_HOST_GPIO_DRIVE_6MA: drive 6MA 4019 * @WMI_HOST_GPIO_DRIVE_8MA: drive 8MA 4020 * @WMI_HOST_GPIO_DRIVE_10MA: drive 10MA 4021 * @WMI_HOST_GPIO_DRIVE_12MA: drive 12MA 4022 * @WMI_HOST_GPIO_DRIVE_14MA: drive 14MA 4023 * @WMI_HOST_GPIO_DRIVE_16MA: drive 16MA 4024 * @WMI_HOST_GPIO_DRIVE_MAX: invalid gpio drive 4025 */ 4026 enum gpio_drive { 4027 WMI_HOST_GPIO_DRIVE_2MA = 0, 4028 WMI_HOST_GPIO_DRIVE_4MA = 1, 4029 WMI_HOST_GPIO_DRIVE_6MA = 2, 4030 WMI_HOST_GPIO_DRIVE_8MA = 3, 4031 WMI_HOST_GPIO_DRIVE_10MA = 4, 4032 WMI_HOST_GPIO_DRIVE_12MA = 5, 4033 WMI_HOST_GPIO_DRIVE_14MA = 6, 4034 WMI_HOST_GPIO_DRIVE_16MA = 7, 4035 WMI_HOST_GPIO_DRIVE_MAX, 4036 }; 4037 4038 /** 4039 * enum gpio_mux_config - GPIO mux_config 4040 * @WMI_HOST_GPIO_MUX_DEFAULT: Default mux value 4041 * @WMI_HOST_GPIO_MUX_MAX: maximum allowed gpio mux_config 4042 */ 4043 enum gpio_mux_config { 4044 WMI_HOST_GPIO_MUX_DEFAULT = 0, 4045 WMI_HOST_GPIO_MUX_MAX = 15, 4046 }; 4047 4048 /** 4049 * struct wmi_host_gpio_input_event - GPIO input event structure 4050 * @gpio_num: GPIO number which changed state 4051 */ 4052 typedef struct { 4053 uint32_t gpio_num; /* GPIO number which changed state */ 4054 } wmi_host_gpio_input_event; 4055 4056 /** 4057 * struct gpio_config_params - GPIO config params 4058 * @pin_num: GPIO number to config 4059 * @pin_dir: gpio direction, 1-input/0-output 4060 * @pin_pull_type: pull type define in gpio_pull_type 4061 * @pin_intr_mode: interrupt mode define in gpio_interrupt_mode 4062 * @mux_config_val: 4063 * @drive: 4064 * @init_enable: 4065 */ 4066 struct gpio_config_params { 4067 uint32_t pin_num; 4068 enum gpio_direction pin_dir; 4069 enum gpio_pull_type pin_pull_type; 4070 enum gpio_interrupt_mode pin_intr_mode; 4071 enum gpio_mux_config mux_config_val; 4072 enum gpio_drive drive; 4073 enum gpio_init_enable init_enable; 4074 }; 4075 4076 /** 4077 * struct gpio_output_params - GPIO output params 4078 * @pin_num: GPIO number to configure 4079 * @pin_set: 1 mean gpio output high level, 0 mean gpio output low level 4080 */ 4081 struct gpio_output_params { 4082 uint32_t pin_num; 4083 enum gpio_value pin_set; 4084 }; 4085 4086 /* flags bit 0: to configure wlan priority bitmap */ 4087 #define WMI_HOST_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT (1<<0) 4088 /* flags bit 1: to configure both period and wlan duration */ 4089 #define WMI_HOST_BTCOEX_PARAM_FLAGS_DUTY_CYCLE_BIT (1<<1) 4090 struct btcoex_cfg_params { 4091 /* WLAN priority bitmask for different frame types */ 4092 uint32_t btcoex_wlan_priority_bitmap; 4093 /* This command is used to configure different btcoex params 4094 * in different situations.The host sets the appropriate bit(s) 4095 * in btcoex_param_flags to indicate which configuration parameters 4096 * are valid within a particular BT coex config message, so that one 4097 * BT configuration parameter can be configured without affecting 4098 * other BT configuration parameters.E.g. if the host wants to 4099 * configure only btcoex_wlan_priority_bitmap it sets only 4100 * WMI_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT in 4101 * btcoex_param_flags so that firmware will not overwrite 4102 * other params with default value passed in the command. 4103 * Host can also set multiple bits in btcoex_param_flags 4104 * to configure more than one param in single message. 4105 */ 4106 uint32_t btcoex_param_flags; 4107 /* period denotes the total time in milliseconds which WLAN and BT share 4108 * configured percentage for transmission and reception. 4109 */ 4110 uint32_t period; 4111 /* wlan duration is the time in milliseconds given for wlan 4112 * in above period. 4113 */ 4114 uint32_t wlan_duration; 4115 }; 4116 4117 /** 4118 * struct esl_egid_params - Contains the EGID information 4119 * @egid_info: egid_info contains the 128-bit ESL EGID information 4120 */ 4121 struct esl_egid_params { 4122 uint32_t egid_info[EGID_INFO_SIZE]; 4123 }; 4124 4125 #define WMI_HOST_COEX_CONFIG_BUF_MAX_LEN 32 /* 128 bytes */ 4126 /** 4127 * struct coex_ver_cfg_t 4128 * @coex_version: Version for 4 wire coex 4129 * @length: Length of payload buffer based on version 4130 * @config_buf: Payload Buffer 4131 */ 4132 typedef struct { 4133 /* VERSION_4 (4 wire coex) */ 4134 uint32_t coex_version; 4135 4136 /* No. of uint32_t elements in payload buffer. Will depend on the coex 4137 * version 4138 */ 4139 uint32_t length; 4140 4141 /* Payload buffer */ 4142 uint32_t config_buf[WMI_HOST_COEX_CONFIG_BUF_MAX_LEN]; 4143 } coex_ver_cfg_t; 4144 4145 #define WMI_HOST_RTT_REPORT_CFR 0 4146 #define WMI_HOST_RTT_NO_REPORT_CFR 1 4147 #define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2 4148 /** 4149 * struct rtt_meas_req_test_params 4150 * @peer: peer mac address 4151 * @req_frame_type: RTT request frame type 4152 * @req_bw: requested bandwidth 4153 * @req_preamble: Preamble 4154 * @req_num_req: num of requests 4155 * @req_report_type: report type 4156 * @num_measurements: number of measurements 4157 * @asap_mode: priority 4158 * @lci_requested: LCI requested 4159 * @loc_civ_requested: 4160 * @channel: channel param 4161 * @req_id: requested id 4162 */ 4163 struct rtt_meas_req_test_params { 4164 uint8_t peer[QDF_MAC_ADDR_SIZE]; 4165 int req_frame_type; 4166 int req_bw; 4167 int req_preamble; 4168 int req_num_req; 4169 int req_report_type; 4170 uint32_t num_measurements; 4171 uint32_t asap_mode; 4172 uint32_t lci_requested; 4173 uint32_t loc_civ_requested; 4174 struct channel_param channel; 4175 uint8_t req_id; 4176 }; 4177 4178 /** 4179 * struct peer_request_pn_param - PN request params 4180 * @vdev_id: vdev id 4181 * @keyix: key index 4182 * @peer_macaddr: Peer mac address 4183 * @key_type: key type 4184 */ 4185 struct peer_request_pn_param { 4186 uint32_t vdev_id; 4187 uint8_t keyix; 4188 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 4189 uint32_t key_type; 4190 }; 4191 4192 /** 4193 * struct peer_request_rxpn_param - Rx PN request params 4194 * @vdev_id: vdev id 4195 * @peer_macaddr: Peer mac address 4196 * @keyix: key index 4197 */ 4198 struct peer_request_rxpn_param { 4199 uint32_t vdev_id; 4200 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 4201 uint16_t keyix; 4202 }; 4203 4204 /** 4205 * struct rtt_meas_req_params - RTT measurement request params 4206 * @req_id: Request id 4207 * @vdev_id: vdev id 4208 * @is_mode_na: 11NA 4209 * @is_mode_ac: AC 4210 * @is_bw_20: 20 4211 * @is_bw_40: 40 4212 * @is_bw_80: 80 4213 * @sta_mac_addr: pointer to station mac address 4214 * @spoof_mac_addr: pointer to spoof mac address 4215 * @num_probe_rqst: number of probe request 4216 * @channel: channel param 4217 */ 4218 struct rtt_meas_req_params { 4219 uint8_t req_id; 4220 uint8_t vdev_id; 4221 bool is_mode_na; 4222 bool is_mode_ac; 4223 bool is_bw_20; 4224 bool is_bw_40; 4225 bool is_bw_80; 4226 uint8_t *sta_mac_addr; 4227 uint8_t *spoof_mac_addr; 4228 uint32_t num_probe_rqst; 4229 struct channel_param channel; 4230 }; 4231 4232 /** 4233 * struct lci_set_params - LCI params 4234 * @lci_data: pointer to LCI data 4235 * @latitude_unc: latitude 4236 * @latitude_0_1: bits 0 to 1 of latitude 4237 * @latitude_2_33: bits 2 to 33 of latitude 4238 * @longitude_unc: longitude 4239 * @longitude_0_1: bits 0 to 1 of longitude 4240 * @longitude_2_33: bits 2 to 33 of longitude 4241 * @altitude_type: altitude type 4242 * @altitude_unc_0_3: altitude bits 0 - 3 4243 * @altitude_unc_4_5: altitude bits 4 - 5 4244 * @altitude: altitude 4245 * @datum: dataum 4246 * @reg_loc_agmt: 4247 * @reg_loc_dse: 4248 * @dep_sta: 4249 * @version: version 4250 * @colocated_bss: 4251 * @msg_len: message length 4252 */ 4253 struct lci_set_params { 4254 void *lci_data; 4255 uint8_t latitude_unc:6, 4256 latitude_0_1:2; 4257 uint32_t latitude_2_33; 4258 uint8_t longitude_unc:6, 4259 longitude_0_1:2; 4260 uint32_t longitude_2_33; 4261 uint8_t altitude_type:4, 4262 altitude_unc_0_3:4; 4263 uint32_t altitude_unc_4_5:2, 4264 altitude:30; 4265 uint8_t datum:3, 4266 reg_loc_agmt:1, 4267 reg_loc_dse:1, 4268 dep_sta:1, 4269 version:2; 4270 uint8_t *colocated_bss; 4271 int msg_len; 4272 }; 4273 4274 /** 4275 * struct lcr_set_params - LCR params 4276 * @lcr_data: pointer to lcr data 4277 * @msg_len: message length 4278 */ 4279 struct lcr_set_params { 4280 void *lcr_data; 4281 int msg_len; 4282 }; 4283 4284 /** 4285 * struct rtt_keepalive_req_params - RTT keepalive params 4286 * @macaddr: pointer to macaddress 4287 * @req_id: Request id 4288 * @vdev_id: vdev id 4289 * @stop: start/stop 4290 */ 4291 struct rtt_keepalive_req_params { 4292 uint8_t *macaddr; 4293 uint8_t req_id; 4294 uint8_t vdev_id; 4295 bool stop; 4296 }; 4297 4298 /** 4299 * struct rx_reorder_queue_setup_params - Reorder queue setup params 4300 * @peer_macaddr: Peer mac address 4301 * @tid: TID 4302 * @vdev_id: vdev id 4303 * @hw_qdesc_paddr_lo: lower 32 bits of queue desc address 4304 * @hw_qdesc_paddr_hi: upper 32 bits of queue desc address 4305 * @queue_no: 16-bit number assigned by host for queue 4306 * @ba_window_size_valid: BA window size validity flag 4307 * @ba_window_size: BA window size 4308 */ 4309 struct rx_reorder_queue_setup_params { 4310 uint8_t *peer_macaddr; 4311 uint16_t tid; 4312 uint16_t vdev_id; 4313 uint32_t hw_qdesc_paddr_lo; 4314 uint32_t hw_qdesc_paddr_hi; 4315 uint16_t queue_no; 4316 uint8_t ba_window_size_valid; 4317 uint16_t ba_window_size; 4318 4319 }; 4320 4321 /** 4322 * struct rx_reorder_queue_remove_params - Reorder queue setup params 4323 * @peer_macaddr: Peer mac address 4324 * @vdev_id: vdev id 4325 * @peer_tid_bitmap: peer tid bitmap 4326 */ 4327 struct rx_reorder_queue_remove_params { 4328 uint8_t *peer_macaddr; 4329 uint16_t vdev_id; 4330 uint32_t peer_tid_bitmap; 4331 }; 4332 4333 /** 4334 * struct wmi_host_stats_event - Stats event params 4335 * @stats_id: stats id of type wmi_host_stats_event 4336 * @num_pdev_stats: number of pdev stats event structures 0 or 1 4337 * @num_pdev_ext_stats: number of pdev ext stats event structures 4338 * @num_vdev_stats: number of vdev stats 4339 * @num_peer_stats: number of peer stats event structures 0 or max peers 4340 * @num_peer_extd_stats: number of peer extended stats event structures 0 4341 * or max peers 4342 * @num_bcnflt_stats: number of beacon filter stats 4343 * @num_chan_stats: number of channel stats 4344 * @pdev_id: device id for the radio 4345 * @num_bcn_stats: number of beacon stats 4346 * @num_rssi_stats: number of rssi stats 4347 * @num_peer_adv_stats: number of peer adv stats 4348 * @num_mib_stats: number of mib stats 4349 * @num_mib_extd_stats: number of extended mib stats 4350 * @num_peer_stats_info_ext: number of peer extended stats info 4351 * @num_vdev_extd_stats: number of vdev extended stats info 4352 * @last_event: specify if the current event is the last event 4353 */ 4354 typedef struct { 4355 wmi_host_stats_id stats_id; 4356 uint32_t num_pdev_stats; 4357 uint32_t num_pdev_ext_stats; 4358 uint32_t num_vdev_stats; 4359 uint32_t num_peer_stats; 4360 uint32_t num_peer_extd_stats; 4361 uint32_t num_bcnflt_stats; 4362 uint32_t num_chan_stats; 4363 uint32_t pdev_id; 4364 uint32_t num_bcn_stats; 4365 uint32_t num_rssi_stats; 4366 uint32_t num_peer_adv_stats; 4367 uint32_t num_mib_stats; 4368 uint32_t num_mib_extd_stats; 4369 uint32_t num_peer_stats_info_ext; 4370 uint32_t num_vdev_extd_stats; 4371 uint32_t last_event; 4372 } wmi_host_stats_event; 4373 4374 /** 4375 * struct wmi_host_peer_extd_stats - peer extd stats event structure 4376 * @peer_macaddr: Peer mac address 4377 * @inactive_time: inactive time in secs 4378 * @peer_chain_rssi: peer rssi 4379 * @rx_duration: RX duration 4380 * @peer_tx_bytes: TX bytes 4381 * @last_tx_rate_code: Tx rate code of last frame 4382 * @last_tx_power: Tx power latest 4383 * @atf_tokens_allocated: atf tokens allocated 4384 * @atf_tokens_utilized: atf tokens utilized 4385 * @num_mu_tx_denylisted: Denylisted MU Tx count 4386 * @sgi_count: sgi count of the peer 4387 * @rx_mc_bc_cnt: Total number of received multicast & broadcast data frames 4388 * corresponding to this peer, 1 in the MSB of rx_mc_bc_cnt represents a 4389 * valid data 4390 * @rx_retry_cnt: Number of rx retries received from current station 4391 */ 4392 typedef struct { 4393 wmi_host_mac_addr peer_macaddr; 4394 uint32_t inactive_time; 4395 uint32_t peer_chain_rssi; 4396 uint32_t rx_duration; 4397 uint32_t peer_tx_bytes; 4398 uint32_t last_tx_rate_code; 4399 uint32_t last_tx_power; 4400 uint32_t atf_tokens_allocated; 4401 uint32_t atf_tokens_utilized; 4402 uint32_t num_mu_tx_denylisted; 4403 uint32_t sgi_count; 4404 uint32_t rx_mc_bc_cnt; 4405 uint32_t rx_retry_cnt; 4406 } wmi_host_peer_extd_stats; 4407 4408 /** 4409 * struct wmi_host_peer_adv_stats - peer adv stats event structure 4410 * @peer_macaddr: mac address 4411 * @fcs_count: fcs count 4412 * @rx_count: rx count 4413 * @rx_bytes: rx bytes 4414 */ 4415 struct wmi_host_peer_adv_stats { 4416 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 4417 uint32_t fcs_count; 4418 uint32_t rx_count; 4419 uint64_t rx_bytes; 4420 }; 4421 4422 /** 4423 * struct wmi_host_pdev_ext_stats - peer ext stats structure 4424 * @rx_rssi_comb: RX rssi 4425 * @rx_rssi_chain0: RX rssi chain 0 4426 * @rx_rssi_chain1: RX rssi chain 1 4427 * @rx_rssi_chain2: RX rssi chain 2 4428 * @rx_rssi_chain3: RX rssi chain 3 4429 * @rx_mcs: RX MCS array 4430 * @tx_mcs: TX MCS array 4431 * @ack_rssi: Ack rssi 4432 * @my_rx_count: What portion of time, as measured by the MAC HW clock was 4433 * occupied by receiving PPDUs addressed to one of the vdevs 4434 * within this pdev. 4435 * @rx_matched_11ax_msdu_cnt: number of Rx 11ax MSDUs with matching BSS color 4436 * counter updated at EOP (end of packet) 4437 * @rx_other_11ax_msdu_cnt: number of Rx 11ax MSDUs with other BSS color counter 4438 * updated at EOP (end of packet) 4439 * @pdev_id: pdev id 4440 */ 4441 typedef struct { 4442 uint32_t rx_rssi_comb; 4443 uint32_t rx_rssi_chain0; 4444 uint32_t rx_rssi_chain1; 4445 uint32_t rx_rssi_chain2; 4446 uint32_t rx_rssi_chain3; 4447 uint32_t rx_mcs[10]; 4448 uint32_t tx_mcs[10]; 4449 uint32_t ack_rssi; 4450 uint32_t my_rx_count; 4451 uint32_t rx_matched_11ax_msdu_cnt; 4452 uint32_t rx_other_11ax_msdu_cnt; 4453 uint32_t pdev_id; 4454 } wmi_host_pdev_ext_stats; 4455 4456 /** 4457 * struct wmi_host_dbg_tx_stats - Debug stats 4458 * @comp_queued: Num HTT cookies queued to dispatch list 4459 * @comp_delivered: Num HTT cookies dispatched 4460 * @msdu_enqued: Num MSDU queued to WAL 4461 * @mpdu_enqued: Num MPDU queue to WAL 4462 * @wmm_drop: Num MSDUs dropped by WMM limit 4463 * @local_enqued: Num Local frames queued 4464 * @local_freed: Num Local frames done 4465 * @hw_queued: Num queued to HW 4466 * @hw_reaped: Num PPDU reaped from HW 4467 * @underrun: Num underruns 4468 * @hw_paused: HW Paused. 4469 * @tx_abort: Num PPDUs cleaned up in TX abort 4470 * @mpdus_requed: Num MPDUs requed by SW 4471 * @tx_ko: excessive retries 4472 * @tx_xretry: 4473 * @data_rc: data hw rate code 4474 * @self_triggers: Scheduler self triggers 4475 * @sw_retry_failure: frames dropped due to excessive sw retries 4476 * @illgl_rate_phy_err: illegal rate phy errors 4477 * @pdev_cont_xretry: wal pdev continuous xretry 4478 * @pdev_tx_timeout: wal pdev continuous xretry 4479 * @pdev_resets: wal pdev resets 4480 * @stateless_tid_alloc_failure: frames dropped due to non-availability of 4481 * stateless TIDs 4482 * @phy_underrun: PhY/BB underrun 4483 * @txop_ovf: MPDU is more than txop limit 4484 * @seq_posted: Number of Sequences posted 4485 * @seq_failed_queueing: Number of Sequences failed queueing 4486 * @seq_completed: Number of Sequences completed 4487 * @seq_restarted: Number of Sequences restarted 4488 * @mu_seq_posted: Number of MU Sequences posted 4489 * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT 4490 * (Reset,channel change) 4491 * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition 4492 * (TTL expired) 4493 * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT, 4494 * PPDU_duration based on rate, dyn_bw) 4495 * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA 4496 * @mpdus_expired: Num MPDUs that was dropped du to expiry. 4497 * @mc_drop: Num mc drops 4498 */ 4499 typedef struct { 4500 int32_t comp_queued; 4501 int32_t comp_delivered; 4502 int32_t msdu_enqued; 4503 int32_t mpdu_enqued; 4504 int32_t wmm_drop; 4505 int32_t local_enqued; 4506 int32_t local_freed; 4507 int32_t hw_queued; 4508 int32_t hw_reaped; 4509 int32_t underrun; 4510 uint32_t hw_paused; 4511 int32_t tx_abort; 4512 int32_t mpdus_requed; 4513 uint32_t tx_ko; 4514 uint32_t tx_xretry; 4515 uint32_t data_rc; 4516 uint32_t self_triggers; 4517 uint32_t sw_retry_failure; 4518 uint32_t illgl_rate_phy_err; 4519 uint32_t pdev_cont_xretry; 4520 uint32_t pdev_tx_timeout; 4521 uint32_t pdev_resets; 4522 uint32_t stateless_tid_alloc_failure; 4523 uint32_t phy_underrun; 4524 uint32_t txop_ovf; 4525 uint32_t seq_posted; 4526 uint32_t seq_failed_queueing; 4527 uint32_t seq_completed; 4528 uint32_t seq_restarted; 4529 uint32_t mu_seq_posted; 4530 int32_t mpdus_sw_flush; 4531 int32_t mpdus_hw_filter; 4532 int32_t mpdus_truncated; 4533 int32_t mpdus_ack_failed; 4534 int32_t mpdus_expired; 4535 uint32_t mc_drop; 4536 } wmi_host_dbg_tx_stats; 4537 4538 /** 4539 * struct wmi_host_dbg_rx_stats - RX Debug stats 4540 * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu 4541 * @status_rcvd: Total number of statuses processed 4542 * @r0_frags: Extra frags on rings 0 4543 * @r1_frags: Extra frags on rings 1 4544 * @r2_frags: Extra frags on rings 2 4545 * @r3_frags: Extra frags on rings 3 4546 * @htt_msdus: MSDUs delivered to HTT 4547 * @htt_mpdus: MPDUs delivered to HTT 4548 * @loc_msdus: MSDUs delivered to local stack 4549 * @loc_mpdus: MPDUS delivered to local stack 4550 * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size 4551 * @phy_errs: Number of PHY errors 4552 * @phy_err_drop: Number of PHY errors drops 4553 * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc. 4554 * @pdev_rx_timeout: Number of rx inactivity timeouts 4555 * @rx_ovfl_errs: Number of rx overflow errors. 4556 */ 4557 typedef struct { 4558 int32_t mid_ppdu_route_change; 4559 int32_t status_rcvd; 4560 int32_t r0_frags; 4561 int32_t r1_frags; 4562 int32_t r2_frags; 4563 int32_t r3_frags; 4564 int32_t htt_msdus; 4565 int32_t htt_mpdus; 4566 int32_t loc_msdus; 4567 int32_t loc_mpdus; 4568 int32_t oversize_amsdu; 4569 int32_t phy_errs; 4570 int32_t phy_err_drop; 4571 int32_t mpdu_errs; 4572 uint32_t pdev_rx_timeout; 4573 int32_t rx_ovfl_errs; 4574 } wmi_host_dbg_rx_stats; 4575 4576 /** struct wmi_host_dbg_mem_stats - memory stats 4577 * @iram_free_size: IRAM free size on target 4578 * @dram_free_size: DRAM free size on target 4579 * @sram_free_size: SRAM free size on target 4580 */ 4581 typedef struct { 4582 uint32_t iram_free_size; 4583 uint32_t dram_free_size; 4584 /* Only Non-TLV */ 4585 uint32_t sram_free_size; 4586 } wmi_host_dbg_mem_stats; 4587 4588 typedef struct { 4589 /* Only TLV */ 4590 int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ 4591 } wmi_host_dbg_peer_stats; 4592 4593 /** 4594 * struct wmi_host_dbg_stats - host debug stats 4595 * @tx: TX stats of type wmi_host_dbg_tx_stats 4596 * @rx: RX stats of type wmi_host_dbg_rx_stats 4597 * @mem: Memory stats of type wmi_host_dbg_mem_stats 4598 * @peer: peer stats of type wmi_host_dbg_peer_stats 4599 */ 4600 typedef struct { 4601 wmi_host_dbg_tx_stats tx; 4602 wmi_host_dbg_rx_stats rx; 4603 wmi_host_dbg_mem_stats mem; 4604 wmi_host_dbg_peer_stats peer; 4605 } wmi_host_dbg_stats; 4606 4607 /** 4608 * struct wmi_host_pdev_stats - PDEV stats 4609 * @chan_nf: Channel noise floor 4610 * @tx_frame_count: TX frame count 4611 * @rx_frame_count: RX frame count 4612 * @rx_clear_count: rx clear count 4613 * @cycle_count: cycle count 4614 * @phy_err_count: Phy error count 4615 * @chan_tx_pwr: Channel Tx Power 4616 * @pdev_stats: WAL dbg stats 4617 * @ackRcvBad: 4618 * @rtsBad: 4619 * @rtsGood: 4620 * @fcsBad: 4621 * @noBeacons: 4622 * @mib_int_count: 4623 * @pdev_id: pdev id 4624 */ 4625 typedef struct { 4626 int32_t chan_nf; 4627 uint32_t tx_frame_count; 4628 uint32_t rx_frame_count; 4629 uint32_t rx_clear_count; 4630 uint32_t cycle_count; 4631 uint32_t phy_err_count; 4632 uint32_t chan_tx_pwr; 4633 wmi_host_dbg_stats pdev_stats; 4634 uint32_t ackRcvBad; 4635 uint32_t rtsBad; 4636 uint32_t rtsGood; 4637 uint32_t fcsBad; 4638 uint32_t noBeacons; 4639 uint32_t mib_int_count; 4640 uint32_t pdev_id; 4641 } wmi_host_pdev_stats; 4642 4643 /** 4644 * struct wmi_host_pmf_bcn_protect_stats - PMF bcn protect stats 4645 * @igtk_mic_fail_cnt: MIC failure count of management packets using IGTK 4646 * @igtk_replay_cnt: Replay detection count of management packets using IGTK 4647 * @bcn_mic_fail_cnt: MIC failure count of beacon packets using BIGTK 4648 * @bcn_replay_cnt: Replay detection count of beacon packets using BIGTK 4649 */ 4650 typedef struct { 4651 uint32_t igtk_mic_fail_cnt; 4652 uint32_t igtk_replay_cnt; 4653 uint32_t bcn_mic_fail_cnt; 4654 uint32_t bcn_replay_cnt; 4655 } wmi_host_pmf_bcn_protect_stats; 4656 4657 /** 4658 * struct wmi_unit_test_event - Structure corresponding to WMI Unit test event 4659 * @vdev_id: VDEV ID 4660 * @module_id: MODULE ID 4661 * @diag_token: Diag Token (the number that was generated in the unit-test cmd) 4662 * @flag: flag has 2 bits 0x1 indicates status, and 0x2 indicates done-bit 4663 * @payload_len: payload_len (blindly copied from payload_len field in WMI) 4664 * @buffer_len: actual number of data bytes in the variable data size TLV 4665 * buffer_len is likely to be the nearest multiple of 4 (from 4666 * payload_len). both buffer_len and payload_len need to be 4667 * passed to wifitool so that the driver can be agnostic 4668 * regarding these differences. 4669 * @buffer: data buffer 4670 */ 4671 typedef struct { 4672 uint32_t vdev_id; 4673 uint32_t module_id; 4674 uint32_t diag_token; 4675 uint32_t flag; 4676 uint32_t payload_len; 4677 uint32_t buffer_len; 4678 uint8_t buffer[1]; 4679 } wmi_unit_test_event; 4680 4681 4682 /** 4683 * struct wmi_host_snr_info - WMI host Signal to noise ration info 4684 * @bcn_snr: beacon SNR 4685 * @dat_snr: Data frames SNR 4686 */ 4687 typedef struct { 4688 int32_t bcn_snr; 4689 int32_t dat_snr; 4690 } wmi_host_snr_info; 4691 4692 #define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */ 4693 #define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */ 4694 4695 /* The WMI_HOST_MAX_CHAINS macro cannot be changed without breaking WMI 4696 * compatibility. 4697 * The maximum value of number of chains 4698 */ 4699 #define WMI_HOST_MAX_CHAINS 8 4700 4701 /** 4702 * struct wmi_host_vdev_stats - vdev stats structure 4703 * @vdev_id: unique id identifying the VDEV, generated by the caller 4704 * Rest all Only TLV 4705 * @vdev_snr: wmi_host_snr_info 4706 * @tx_frm_cnt: Total number of packets(per AC) that were successfully 4707 * transmitted (with and without retries, 4708 * including multi-cast, broadcast) 4709 * @rx_frm_cnt: Total number of packets that were successfully received 4710 * (after appropriate filter rules including multi-cast, broadcast) 4711 * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC 4712 * that the 802.11 station successfully transmitted after 4713 * more than one retransmission attempt 4714 * @fail_cnt: Total number packets(per AC) failed to transmit 4715 * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission 4716 * of a packet 4717 * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission 4718 * of a packet 4719 * @rx_err_cnt: The receive error count. HAL will provide the 4720 * RxP FCS error global 4721 * @rx_discard_cnt: The sum of the receive error count and 4722 * dropped-receive-buffer error count (FCS error) 4723 * @ack_fail_cnt: Total number packets failed transmit because of no 4724 * ACK from the remote entity 4725 * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec 4726 * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss 4727 */ 4728 typedef struct { 4729 uint32_t vdev_id; 4730 /* Rest all Only TLV */ 4731 wmi_host_snr_info vdev_snr; 4732 uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC]; 4733 uint32_t rx_frm_cnt; 4734 uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC]; 4735 uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC]; 4736 uint32_t rts_fail_cnt; 4737 uint32_t rts_succ_cnt; 4738 uint32_t rx_err_cnt; 4739 uint32_t rx_discard_cnt; 4740 uint32_t ack_fail_cnt; 4741 uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES]; 4742 uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES]; 4743 } wmi_host_vdev_stats; 4744 4745 /** 4746 * struct wmi_host_bcn_stats - beacon stats structure 4747 * @vdev_id: unique id identifying the VDEV, generated by the caller 4748 * @tx_bcn_succ_cnt: Total number of beacon frame transmitted successfully 4749 * @tx_bcn_outage_cnt: Total number of failed beacons 4750 */ 4751 typedef struct { 4752 uint32_t vdev_id; 4753 uint32_t tx_bcn_succ_cnt; 4754 uint32_t tx_bcn_outage_cnt; 4755 } wmi_host_bcn_stats; 4756 4757 /** 4758 * struct wmi_host_vdev_extd_stats - VDEV extended stats 4759 * @vdev_id: unique id identifying the VDEV, generated by the caller 4760 * @ppdu_aggr_cnt: No of Aggrs Queued to HW 4761 * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's 4762 * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates 4763 * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW 4764 * in Legacy NonAggregates 4765 * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes 4766 * both Aggr and NonAggr 4767 * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully 4768 * after Single/mul HW retry 4769 * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success 4770 * after Multiple HW retry 4771 * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission 4772 * after Multiple HW retry 4773 * @reserved: for future extensions set to 0x0 4774 */ 4775 typedef struct { 4776 uint32_t vdev_id; 4777 uint32_t ppdu_aggr_cnt; 4778 uint32_t ppdu_noack; 4779 uint32_t mpdu_queued; 4780 uint32_t ppdu_nonaggr_cnt; 4781 uint32_t mpdu_sw_requed; 4782 uint32_t mpdu_suc_retry; 4783 uint32_t mpdu_suc_multitry; 4784 uint32_t mpdu_fail_retry; 4785 uint32_t reserved[13]; 4786 } wmi_host_vdev_extd_stats; 4787 4788 /** 4789 * struct wmi_host_vdev_prb_fils_stats - VDEV probe response fils stats 4790 * @vdev_id: unique id identifying the VDEV, generated by the caller 4791 * @fd_succ_cnt: Total number of successfully transmitted Fils Discovery frames 4792 * @fd_fail_cnt: Toatl number of Fils discovery failed count 4793 * @unsolicited_prb_succ_cnt: Successful unsolicited probe response frames cnt 4794 * @unsolicited_prb_fail_cnt: Failed unsolictied probe response frames cnt 4795 * @is_mlo_vdev_active: is the mlo vdev currently active 4796 * @vdev_tx_power: Tx power for vdev 4797 */ 4798 struct wmi_host_vdev_prb_fils_stats { 4799 uint32_t vdev_id; 4800 uint32_t fd_succ_cnt; 4801 uint32_t fd_fail_cnt; 4802 uint32_t unsolicited_prb_succ_cnt; 4803 uint32_t unsolicited_prb_fail_cnt; 4804 bool is_mlo_vdev_active; 4805 uint32_t vdev_tx_power; 4806 }; 4807 4808 /** 4809 * struct wmi_host_vdev_nac_rssi_event - VDEV nac rssi stats 4810 * @vdev_id: unique id identifying the VDEV, generated by the caller 4811 * @last_rssi: rssi 4812 * @avg_rssi: averge rssi 4813 * @rssi_seq_num: rssi sequence number 4814 */ 4815 struct wmi_host_vdev_nac_rssi_event { 4816 uint32_t vdev_id; 4817 uint32_t last_rssi; 4818 uint32_t avg_rssi; 4819 uint32_t rssi_seq_num; 4820 }; 4821 4822 /** 4823 * struct wmi_host_peer_retry_stats - peer retry stats 4824 * @peer_macaddr: peer macaddr 4825 * @retry_counter_wraparnd_ind: wraparound counter indication 4826 * @msdus_success: successfully transmitted msdus 4827 * @msdus_retried: Retried msdus 4828 * @msdus_mul_retried: msdus retried for more than once 4829 * @msdus_failed: msdus failed 4830 * @reserved: for future extensions 4831 */ 4832 struct wmi_host_peer_retry_stats { 4833 wmi_host_mac_addr peer_macaddr; 4834 uint32_t retry_counter_wraparnd_ind; 4835 uint32_t msdus_success; 4836 uint32_t msdus_retried; 4837 uint32_t msdus_mul_retried; 4838 uint32_t msdus_failed; 4839 uint32_t reserved[4]; 4840 }; 4841 4842 /** 4843 * struct wmi_host_per_chain_rssi_stats - VDEV nac rssi stats 4844 * @vdev_id: unique id identifying the VDEV, generated by the caller 4845 * @rssi_avg_beacon: per chain avg rssi for beacon 4846 * @rssi_avg_data: per chain avg rssi for data 4847 * @peer_macaddr: peer macaddr 4848 */ 4849 struct wmi_host_per_chain_rssi_stats { 4850 uint32_t vdev_id; 4851 int32_t rssi_avg_beacon[WMI_HOST_MAX_CHAINS]; 4852 int32_t rssi_avg_data[WMI_HOST_MAX_CHAINS]; 4853 wmi_host_mac_addr peer_macaddr; 4854 }; 4855 4856 /** 4857 * struct wmi_host_peer_stats - peer stats 4858 * @peer_macaddr: peer MAC address 4859 * @peer_rssi: rssi 4860 * @peer_rssi_seq_num: rssi sequence number 4861 * @peer_tx_rate: last tx data rate used for peer 4862 * @peer_rx_rate: last rx data rate used for peer 4863 * @currentper: Current PER 4864 * @retries: Retries happened during transmission 4865 * @txratecount: Maximum Aggregation Size 4866 * @max4msframelen: Max4msframelen of tx rates used 4867 * @totalsubframes: Total no of subframes 4868 * @txbytes: No of bytes transmitted to the client 4869 * @nobuffs: Packet Loss due to buffer overflows 4870 * @excretries: Packet Loss due to excessive retries 4871 * @peer_rssi_changed: how many times peer's RSSI changed by a 4872 * non-negligible amount 4873 */ 4874 typedef struct { 4875 wmi_host_mac_addr peer_macaddr; 4876 int8_t peer_rssi; 4877 uint32_t peer_rssi_seq_num; 4878 uint32_t peer_tx_rate; 4879 uint32_t peer_rx_rate; 4880 uint32_t currentper; 4881 uint32_t retries; 4882 uint32_t txratecount; 4883 uint32_t max4msframelen; 4884 uint32_t totalsubframes; 4885 uint32_t txbytes; 4886 uint32_t nobuffs[4]; 4887 uint32_t excretries[4]; 4888 uint32_t peer_rssi_changed; 4889 } wmi_host_peer_stats; 4890 4891 typedef struct { 4892 uint32_t dummy; 4893 } wmi_host_bcnflt_stats; 4894 4895 /** 4896 * struct wmi_host_chan_stats - WMI chan stats 4897 * @chan_mhz: Primary channel freq of the channel for which stats are sent 4898 * @sampling_period_us: Time spent on the channel 4899 * @rx_clear_count: Aggregate duration over a sampling period for 4900 * which channel activity was observed 4901 * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period 4902 * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period 4903 */ 4904 typedef struct { 4905 uint32_t chan_mhz; 4906 uint32_t sampling_period_us; 4907 uint32_t rx_clear_count; 4908 uint32_t tx_duration_us; 4909 uint32_t rx_duration_us; 4910 } wmi_host_chan_stats; 4911 4912 #ifdef FEATURE_WLAN_TIME_SYNC_FTM 4913 4914 #define FTM_TIME_SYNC_QTIME_PAIR_MAX 32 4915 4916 /** 4917 * struct ftm_time_sync_start_stop_params - Get wlan time sync ftm info 4918 * @vdev_id: vdev id 4919 * @timer_interval: periodicity to trigger wlan time sync strobe 4920 * @num_reads: Number of times to trigger wlabn time sync strobe 4921 * @qtime: ref Qtimer value 4922 * @mac_time: ref Mac timer value 4923 */ 4924 struct ftm_time_sync_start_stop_params { 4925 uint32_t vdev_id; 4926 uint32_t timer_interval; 4927 uint32_t num_reads; 4928 uint64_t qtime; 4929 uint64_t mac_time; 4930 }; 4931 4932 /** 4933 * struct wlan_time_sync_qtime_pair- Get wlan time sync qtime pair value 4934 * @vdev_id: vdev id 4935 * @qtime_initiator: qtimer value of initiator 4936 * @qtime_target: qtimer value of target 4937 */ 4938 struct wlan_time_sync_qtime_pair { 4939 uint64_t qtime_initiator; 4940 uint64_t qtime_target; 4941 }; 4942 4943 /** 4944 * struct ftm_time_sync_offset- Get ftm time sync offset 4945 * @vdev_id: vdev id 4946 * @num_qtime: number of qtime values received 4947 * @pairs: array of qtime pairs 4948 */ 4949 struct ftm_time_sync_offset { 4950 uint32_t vdev_id; 4951 uint32_t num_qtime; 4952 struct wlan_time_sync_qtime_pair pairs[FTM_TIME_SYNC_QTIME_PAIR_MAX]; 4953 }; 4954 #endif 4955 4956 /** 4957 * struct wmi_host_tsf_event - Get tsf event info 4958 * @vdev_id: vdev id 4959 * @tsf: tsf 4960 * @tsf_low: low 32bit of tsf 4961 * @tsf_high: high 32 bit of tsf 4962 * @qtimer_low: low 32 bits of qtimer 4963 * @qtimer_high: high 32 bits of qtimer 4964 * @tsf_id: TSF ID for the current vdev 4965 * @tsf_id_valid: is TSF valid 4966 * @mac_id: MAC identifier 4967 * @mac_id_valid: is MAC id valid 4968 * @wlan_global_tsf_low: low 32 bits of wlan global tsf 4969 * @wlan_global_tsf_high: high 32 bits of wlan global tsf 4970 * @tqm_timer_low: 4971 * @tqm_timer_high: 4972 * @use_tqm_timer: 4973 */ 4974 struct wmi_host_tsf_event { 4975 uint32_t vdev_id; 4976 uint64_t tsf; 4977 uint32_t tsf_low; 4978 uint32_t tsf_high; 4979 uint32_t qtimer_low; 4980 uint32_t qtimer_high; 4981 uint32_t tsf_id; 4982 uint32_t tsf_id_valid; 4983 uint32_t mac_id; 4984 uint32_t mac_id_valid; 4985 uint32_t wlan_global_tsf_low; 4986 uint32_t wlan_global_tsf_high; 4987 uint32_t tqm_timer_low; 4988 uint32_t tqm_timer_high; 4989 uint32_t use_tqm_timer; 4990 }; 4991 4992 /** 4993 * struct wmi_host_pdev_telemetry_stats - pdev telemetry stats 4994 * @avg_chan_lat_per_ac: average channel latency 4995 * @estimated_air_time_per_ac: Percentage of air time available for each AC 4996 * BIT[0-7] : AC_BE 4997 * BIT[8-15] : AC_BK 4998 * BIT[16-23] : AC_VI 4999 * BIT[24-31] : AC_VO 5000 */ 5001 struct wmi_host_pdev_telemetry_stats { 5002 uint32_t avg_chan_lat_per_ac[WIFI_AC_MAX]; 5003 uint32_t estimated_air_time_per_ac; 5004 }; 5005 5006 #define WMI_EVENT_ID_INVALID 0 5007 /* 5008 * Host based ENUM IDs for events to abstract target enums for event_id 5009 */ 5010 typedef enum { 5011 wmi_service_ready_event_id = 0, 5012 wmi_ready_event_id, 5013 wmi_dbg_msg_event_id, 5014 wmi_scan_event_id, 5015 wmi_echo_event_id, 5016 wmi_update_stats_event_id, 5017 wmi_inst_rssi_stats_event_id, 5018 wmi_vdev_start_resp_event_id, 5019 wmi_vdev_standby_req_event_id, 5020 wmi_vdev_resume_req_event_id, 5021 wmi_vdev_stopped_event_id, 5022 wmi_peer_sta_kickout_event_id, 5023 wmi_host_swba_event_id, 5024 wmi_tbttoffset_update_event_id, 5025 wmi_mgmt_rx_event_id, 5026 wmi_chan_info_event_id, 5027 wmi_phyerr_event_id, 5028 wmi_roam_event_id, 5029 wmi_profile_match, 5030 wmi_debug_print_event_id, 5031 wmi_pdev_qvit_event_id, 5032 wmi_wlan_profile_data_event_id, 5033 wmi_rtt_meas_report_event_id, 5034 wmi_tsf_meas_report_event_id, 5035 wmi_rtt_error_report_event_id, 5036 wmi_rtt_keepalive_event_id, 5037 wmi_oem_cap_event_id, 5038 wmi_oem_meas_report_event_id, 5039 wmi_oem_report_event_id, 5040 wmi_nan_event_id, 5041 wmi_wow_wakeup_host_event_id, 5042 wmi_gtk_offload_status_event_id, 5043 wmi_gtk_rekey_fail_event_id, 5044 wmi_dcs_interference_event_id, 5045 wmi_pdev_tpc_config_event_id, 5046 wmi_csa_handling_event_id, 5047 wmi_gpio_input_event_id, 5048 wmi_peer_ratecode_list_event_id, 5049 wmi_generic_buffer_event_id, 5050 wmi_mcast_buf_release_event_id, 5051 wmi_mcast_list_ageout_event_id, 5052 wmi_vdev_get_keepalive_event_id, 5053 wmi_wds_peer_event_id, 5054 wmi_peer_sta_ps_statechg_event_id, 5055 wmi_pdev_fips_event_id, 5056 wmi_tt_stats_event_id, 5057 wmi_pdev_channel_hopping_event_id, 5058 wmi_pdev_ani_cck_level_event_id, 5059 wmi_pdev_ani_ofdm_level_event_id, 5060 wmi_pdev_reserve_ast_entry_event_id, 5061 wmi_pdev_nfcal_power_event_id, 5062 wmi_pdev_tpc_event_id, 5063 wmi_pdev_get_ast_info_event_id, 5064 wmi_pdev_temperature_event_id, 5065 wmi_pdev_nfcal_power_all_channels_event_id, 5066 wmi_pdev_bss_chan_info_event_id, 5067 wmi_mu_report_event_id, 5068 wmi_pdev_utf_event_id, 5069 wmi_pdev_dump_event_id, 5070 wmi_tx_pause_event_id, 5071 wmi_dfs_radar_event_id, 5072 wmi_pdev_l1ss_track_event_id, 5073 wmi_service_ready_ext_event_id, 5074 wmi_vdev_install_key_complete_event_id, 5075 wmi_vdev_mcc_bcn_intvl_change_req_event_id, 5076 wmi_vdev_tsf_report_event_id, 5077 wmi_peer_info_event_id, 5078 wmi_peer_tx_fail_cnt_thr_event_id, 5079 wmi_peer_estimated_linkspeed_event_id, 5080 wmi_peer_state_event_id, 5081 wmi_offload_bcn_tx_status_event_id, 5082 wmi_offload_prob_resp_tx_status_event_id, 5083 wmi_mgmt_tx_completion_event_id, 5084 wmi_tx_delba_complete_event_id, 5085 wmi_tx_addba_complete_event_id, 5086 wmi_ba_rsp_ssn_event_id, 5087 wmi_aggr_state_trig_event_id, 5088 wmi_roam_synch_event_id, 5089 wmi_roam_synch_frame_event_id, 5090 wmi_p2p_disc_event_id, 5091 wmi_p2p_noa_event_id, 5092 wmi_p2p_lo_stop_event_id, 5093 wmi_vdev_add_macaddr_rx_filter_event_id, 5094 wmi_pdev_resume_event_id, 5095 wmi_d0_wow_disable_ack_event_id, 5096 wmi_wow_initial_wakeup_event_id, 5097 wmi_stats_ext_event_id, 5098 wmi_iface_link_stats_event_id, 5099 wmi_peer_link_stats_event_id, 5100 wmi_radio_link_stats_link, 5101 wmi_update_fw_mem_dump_event_id, 5102 wmi_diag_event_id_log_supported_event_id, 5103 wmi_nlo_match_event_id, 5104 wmi_nlo_scan_complete_event_id, 5105 wmi_apfind_event_id, 5106 wmi_passpoint_match_event_id, 5107 wmi_chatter_pc_query_event_id, 5108 wmi_pdev_ftm_intg_event_id, 5109 wmi_wlan_freq_avoid_event_id, 5110 wmi_thermal_mgmt_event_id, 5111 wmi_diag_container_event_id, 5112 wmi_host_auto_shutdown_event_id, 5113 wmi_update_whal_mib_stats_event_id, 5114 wmi_update_vdev_rate_stats_event_id, 5115 wmi_diag_event_id, 5116 wmi_unit_test_event_id, 5117 wmi_ocb_set_sched_event_id, 5118 wmi_dbg_mesg_flush_complete_event_id, 5119 wmi_rssi_breach_event_id, 5120 wmi_uploadh_event_id, 5121 wmi_captureh_event_id, 5122 wmi_rfkill_state_change_event_id, 5123 wmi_tdls_peer_event_id, 5124 wmi_batch_scan_enabled_event_id, 5125 wmi_batch_scan_result_event_id, 5126 wmi_lpi_result_event_id, 5127 wmi_lpi_status_event_id, 5128 wmi_lpi_handoff_event_id, 5129 wmi_extscan_start_stop_event_id, 5130 wmi_extscan_operation_event_id, 5131 wmi_extscan_table_usage_event_id, 5132 wmi_extscan_cached_results_event_id, 5133 wmi_extscan_wlan_change_results_event_id, 5134 wmi_extscan_hotlist_match_event_id, 5135 wmi_extscan_capabilities_event_id, 5136 wmi_extscan_hotlist_ssid_match_event_id, 5137 wmi_mdns_stats_event_id, 5138 wmi_sap_ofl_add_sta_event_id, 5139 wmi_sap_ofl_del_sta_event_id, 5140 wmi_ocb_set_config_resp_event_id, 5141 wmi_ocb_get_tsf_timer_resp_event_id, 5142 wmi_dcc_get_stats_resp_event_id, 5143 wmi_dcc_update_ndl_resp_event_id, 5144 wmi_dcc_stats_event_id, 5145 wmi_soc_set_hw_mode_resp_event_id, 5146 wmi_soc_hw_mode_transition_event_id, 5147 wmi_soc_set_dual_mac_config_resp_event_id, 5148 wmi_tx_data_traffic_ctrl_event_id, 5149 wmi_peer_tx_mu_txmit_count_event_id, 5150 wmi_peer_gid_userpos_list_event_id, 5151 wmi_pdev_check_cal_version_event_id, 5152 wmi_atf_peer_stats_event_id, 5153 wmi_peer_delete_response_event_id, 5154 wmi_peer_delete_all_response_event_id, 5155 wmi_pdev_csa_switch_count_status_event_id, 5156 wmi_reg_chan_list_cc_event_id, 5157 wmi_reg_chan_list_cc_ext_event_id, 5158 #ifdef CONFIG_AFC_SUPPORT 5159 wmi_afc_event_id, 5160 #endif 5161 wmi_offchan_data_tx_completion_event, 5162 wmi_dfs_cac_complete_id, 5163 wmi_dfs_radar_detection_event_id, 5164 wmi_ext_tbttoffset_update_event_id, 5165 wmi_11d_new_country_event_id, 5166 wmi_get_arp_stats_req_id, 5167 wmi_service_available_event_id, 5168 wmi_update_rcpi_event_id, 5169 wmi_pdev_wds_entry_list_event_id, 5170 wmi_ndp_initiator_rsp_event_id, 5171 wmi_ndp_indication_event_id, 5172 wmi_ndp_confirm_event_id, 5173 wmi_ndp_responder_rsp_event_id, 5174 wmi_ndp_end_indication_event_id, 5175 wmi_ndp_end_rsp_event_id, 5176 wmi_nan_dmesg_event_id, 5177 wmi_ndl_schedule_update_event_id, 5178 wmi_ndp_event_id, 5179 wmi_oem_response_event_id, 5180 wmi_peer_stats_info_event_id, 5181 wmi_pdev_chip_power_stats_event_id, 5182 wmi_ap_ps_egap_info_event_id, 5183 wmi_peer_assoc_conf_event_id, 5184 wmi_vdev_delete_resp_event_id, 5185 wmi_apf_capability_info_event_id, 5186 wmi_vdev_encrypt_decrypt_data_rsp_event_id, 5187 wmi_report_rx_aggr_failure_event_id, 5188 wmi_pdev_chip_pwr_save_failure_detect_event_id, 5189 wmi_peer_antdiv_info_event_id, 5190 wmi_pdev_set_hw_mode_rsp_event_id, 5191 wmi_pdev_hw_mode_transition_event_id, 5192 wmi_pdev_set_mac_config_resp_event_id, 5193 wmi_coex_bt_activity_event_id, 5194 wmi_mgmt_tx_bundle_completion_event_id, 5195 wmi_radio_tx_power_level_stats_event_id, 5196 wmi_report_stats_event_id, 5197 wmi_dma_buf_release_event_id, 5198 wmi_sap_obss_detection_report_event_id, 5199 wmi_obss_color_collision_report_event_id, 5200 wmi_host_swfda_event_id, 5201 wmi_sar_get_limits_event_id, 5202 wmi_pdev_div_rssi_antid_event_id, 5203 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 5204 wmi_host_dfs_status_check_event_id, 5205 #endif 5206 #ifdef WLAN_SUPPORT_TWT 5207 wmi_twt_enable_complete_event_id, 5208 wmi_twt_disable_complete_event_id, 5209 wmi_twt_add_dialog_complete_event_id, 5210 wmi_twt_del_dialog_complete_event_id, 5211 wmi_twt_pause_dialog_complete_event_id, 5212 wmi_twt_resume_dialog_complete_event_id, 5213 wmi_twt_nudge_dialog_complete_event_id, 5214 wmi_twt_session_stats_event_id, 5215 wmi_twt_notify_event_id, 5216 wmi_twt_ack_complete_event_id, 5217 #endif 5218 wmi_apf_get_vdev_work_memory_resp_event_id, 5219 wmi_roam_scan_stats_event_id, 5220 wmi_vdev_ocac_complete_event_id, 5221 5222 #ifdef OL_ATH_SMART_LOGGING 5223 wmi_debug_fatal_condition_eventid, 5224 #endif /* OL_ATH_SMART_LOGGING */ 5225 wmi_wlan_sar2_result_event_id, 5226 wmi_esp_estimate_event_id, 5227 wmi_pdev_ctl_failsafe_check_event_id, 5228 wmi_vdev_bcn_reception_stats_event_id, 5229 wmi_roam_denylist_event_id, 5230 wmi_wlm_stats_event_id, 5231 wmi_peer_cfr_capture_event_id, 5232 wmi_pdev_cold_boot_cal_event_id, 5233 wmi_vdev_get_mws_coex_state_eventid, 5234 wmi_vdev_get_mws_coex_dpwb_state_eventid, 5235 wmi_vdev_get_mws_coex_tdm_state_eventid, 5236 wmi_vdev_get_mws_coex_idrx_state_eventid, 5237 wmi_vdev_get_mws_coex_antenna_sharing_state_eventid, 5238 #ifdef WLAN_FEATURE_INTEROP_ISSUES_AP 5239 wmi_pdev_interop_issues_ap_event_id, 5240 #endif 5241 wmi_coex_report_antenna_isolation_event_id, 5242 wmi_chan_rf_characterization_info_event_id, 5243 wmi_roam_auth_offload_event_id, 5244 wmi_service_ready_ext2_event_id, 5245 wmi_get_elna_bypass_event_id, 5246 wmi_motion_det_host_eventid, 5247 wmi_motion_det_base_line_host_eventid, 5248 wmi_get_ani_level_event_id, 5249 wmi_peer_tx_pn_response_event_id, 5250 wmi_roam_stats_event_id, 5251 wmi_oem_data_event_id, 5252 wmi_mgmt_offload_data_event_id, 5253 wmi_pdev_multi_vdev_restart_response_event_id, 5254 wmi_roam_pmkid_request_event_id, 5255 #ifdef FEATURE_WLAN_TIME_SYNC_FTM 5256 wmi_wlan_time_sync_ftm_start_stop_event_id, 5257 wmi_wlan_time_sync_q_initiator_target_offset_eventid, 5258 #endif 5259 wmi_roam_scan_chan_list_id, 5260 wmi_muedca_params_config_eventid, 5261 wmi_pdev_sscan_fw_param_eventid, 5262 wmi_roam_cap_report_event_id, 5263 wmi_vdev_bcn_latency_event_id, 5264 wmi_vdev_disconnect_event_id, 5265 wmi_peer_create_conf_event_id, 5266 wmi_pdev_cp_fwstats_eventid, 5267 wmi_pdev_halphy_fwstats_eventid, 5268 wmi_vdev_send_big_data_p2_eventid, 5269 wmi_pdev_get_dpd_status_event_id, 5270 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 5271 wmi_vdev_smart_monitor_event_id, 5272 #endif 5273 wmi_pdev_get_halphy_cal_status_event_id, 5274 wmi_pdev_set_halphy_cal_event_id, 5275 wmi_pdev_aoa_phasedelta_event_id, 5276 #ifdef WLAN_MGMT_RX_REO_SUPPORT 5277 wmi_mgmt_rx_fw_consumed_eventid, 5278 #endif 5279 #ifdef WLAN_FEATURE_11BE_MLO 5280 wmi_mlo_setup_complete_event_id, 5281 wmi_mlo_teardown_complete_event_id, 5282 wmi_mlo_link_set_active_resp_eventid, 5283 wmi_mlo_link_removal_eventid, 5284 wmi_mlo_link_disable_request_eventid, 5285 #endif 5286 wmi_pdev_fips_extend_event_id, 5287 wmi_roam_frame_event_id, 5288 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE 5289 wmi_vdev_update_mac_addr_conf_eventid, 5290 #endif 5291 #ifdef WLAN_FEATURE_11BE_MLO 5292 wmi_vdev_quiet_offload_eventid, 5293 #endif 5294 #ifdef WLAN_FEATURE_MCC_QUOTA 5295 wmi_resmgr_chan_time_quota_changed_eventid, 5296 #endif 5297 wmi_peer_rx_pn_response_event_id, 5298 wmi_extract_pktlog_decode_info_eventid, 5299 #ifdef QCA_RSSI_DB2DBM 5300 wmi_pdev_rssi_dbm_conversion_params_info_eventid, 5301 #endif 5302 #ifdef MULTI_CLIENT_LL_SUPPORT 5303 wmi_vdev_latency_event_id, 5304 #endif 5305 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT) 5306 wmi_rtt_pasn_peer_create_req_eventid, 5307 wmi_rtt_pasn_peer_delete_eventid, 5308 #endif 5309 #ifdef WLAN_VENDOR_HANDOFF_CONTROL 5310 wmi_get_roam_vendor_control_param_event_id, 5311 #endif 5312 #ifdef WLAN_FEATURE_DBAM_CONFIG 5313 wmi_coex_dbam_complete_event_id, 5314 #endif 5315 wmi_spectral_capabilities_eventid, 5316 #ifdef WLAN_FEATURE_COAP 5317 wmi_wow_coap_buf_info_eventid, 5318 #endif 5319 #ifdef HEALTH_MON_SUPPORT 5320 wmi_extract_health_mon_init_done_info_eventid, 5321 #endif /* HEALTH_MON_SUPPORT */ 5322 #ifdef WLAN_FEATURE_11BE_MLO 5323 wmi_mlo_ap_vdev_tid_to_link_map_eventid, 5324 #endif 5325 #ifdef WLAN_SUPPORT_GAP_LL_PS_MODE 5326 wmi_xgap_enable_complete_eventid, 5327 #endif 5328 wmi_pdev_set_tgtr2p_table_eventid, 5329 #ifdef QCA_MANUAL_TRIGGERED_ULOFDMA 5330 wmi_manual_ul_ofdma_trig_feedback_eventid, 5331 wmi_manual_ul_ofdma_trig_rx_peer_userinfo_eventid, 5332 #endif 5333 #ifdef QCA_STANDALONE_SOUNDING_TRIGGER 5334 wmi_vdev_standalone_sound_complete_eventid, 5335 #endif 5336 wmi_csa_ie_received_event_id, 5337 #ifdef WLAN_FEATURE_11BE_MLO 5338 wmi_mlo_link_state_info_eventid, 5339 #endif 5340 #ifdef QCA_SUPPORT_PRIMARY_LINK_MIGRATE 5341 wmi_peer_ptqm_migration_response_eventid, 5342 #endif 5343 wmi_events_max, 5344 } wmi_conv_event_id; 5345 5346 #define WMI_UNAVAILABLE_PARAM 0 5347 5348 #ifdef ENABLE_HOST_TO_TARGET_CONVERSION 5349 #define PDEV_PARAM(host_param, target_param) wmi_ ## host_param 5350 #else 5351 #define PDEV_PARAM(host_param, target_param) wmi_ ## host_param = WMI_ ## target_param 5352 #endif 5353 5354 /* Host based ENUM IDs for PDEV params to abstract target enums */ 5355 typedef enum { 5356 PDEV_PARAM(pdev_param_rx_chain_mask, PDEV_PARAM_RX_CHAIN_MASK), 5357 PDEV_PARAM(pdev_param_txpower_limit2g, PDEV_PARAM_TXPOWER_LIMIT2G), 5358 PDEV_PARAM(pdev_param_txpower_limit5g, PDEV_PARAM_TXPOWER_LIMIT5G), 5359 PDEV_PARAM(pdev_param_txpower_scale, PDEV_PARAM_TXPOWER_SCALE), 5360 PDEV_PARAM(pdev_param_beacon_gen_mode, PDEV_PARAM_BEACON_GEN_MODE), 5361 PDEV_PARAM(pdev_param_beacon_tx_mode, PDEV_PARAM_BEACON_TX_MODE), 5362 PDEV_PARAM(pdev_param_resmgr_offchan_mode, 5363 PDEV_PARAM_RESMGR_OFFCHAN_MODE), 5364 PDEV_PARAM(pdev_param_protection_mode, PDEV_PARAM_PROTECTION_MODE), 5365 PDEV_PARAM(pdev_param_dynamic_bw, PDEV_PARAM_DYNAMIC_BW), 5366 PDEV_PARAM(pdev_param_non_agg_sw_retry_th, 5367 PDEV_PARAM_NON_AGG_SW_RETRY_TH), 5368 PDEV_PARAM(pdev_param_agg_sw_retry_th, PDEV_PARAM_AGG_SW_RETRY_TH), 5369 PDEV_PARAM(pdev_param_sta_kickout_th, PDEV_PARAM_STA_KICKOUT_TH), 5370 PDEV_PARAM(pdev_param_ac_aggrsize_scaling, 5371 PDEV_PARAM_AC_AGGRSIZE_SCALING), 5372 PDEV_PARAM(pdev_param_ltr_enable, PDEV_PARAM_LTR_ENABLE), 5373 PDEV_PARAM(pdev_param_ltr_ac_latency_be, PDEV_PARAM_LTR_AC_LATENCY_BE), 5374 PDEV_PARAM(pdev_param_ltr_ac_latency_bk, PDEV_PARAM_LTR_AC_LATENCY_BK), 5375 PDEV_PARAM(pdev_param_tx_chain_mask, PDEV_PARAM_TX_CHAIN_MASK), 5376 PDEV_PARAM(pdev_param_ltr_ac_latency_vi, PDEV_PARAM_LTR_AC_LATENCY_VI), 5377 PDEV_PARAM(pdev_param_ltr_ac_latency_vo, PDEV_PARAM_LTR_AC_LATENCY_VO), 5378 PDEV_PARAM(pdev_param_ltr_ac_latency_timeout, 5379 PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT), 5380 PDEV_PARAM(pdev_param_ltr_sleep_override, 5381 PDEV_PARAM_LTR_SLEEP_OVERRIDE), 5382 PDEV_PARAM(pdev_param_ltr_rx_override, PDEV_PARAM_LTR_RX_OVERRIDE), 5383 PDEV_PARAM(pdev_param_ltr_tx_activity_timeout, 5384 PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT), 5385 PDEV_PARAM(pdev_param_l1ss_enable, PDEV_PARAM_L1SS_ENABLE), 5386 PDEV_PARAM(pdev_param_dsleep_enable, PDEV_PARAM_DSLEEP_ENABLE), 5387 PDEV_PARAM(pdev_param_pcielp_txbuf_flush, 5388 PDEV_PARAM_PCIELP_TXBUF_FLUSH), 5389 PDEV_PARAM(pdev_param_pcielp_txbuf_watermark, 5390 PDEV_PARAM_PCIELP_TXBUF_WATERMARK), 5391 PDEV_PARAM(pdev_param_pcielp_txbuf_tmo_en, 5392 PDEV_PARAM_PCIELP_TXBUF_TMO_EN), 5393 PDEV_PARAM(pdev_param_pcielp_txbuf_tmo_value, 5394 PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE), 5395 PDEV_PARAM(pdev_param_pdev_stats_update_period, 5396 PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD), 5397 PDEV_PARAM(pdev_param_vdev_stats_update_period, 5398 PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD), 5399 PDEV_PARAM(pdev_param_peer_stats_update_period, 5400 PDEV_PARAM_PEER_STATS_UPDATE_PERIOD), 5401 PDEV_PARAM(pdev_param_bcnflt_stats_update_period, 5402 PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD), 5403 PDEV_PARAM(pdev_param_pmf_qos, PDEV_PARAM_PMF_QOS), 5404 PDEV_PARAM(pdev_param_arp_ac_override, PDEV_PARAM_ARP_AC_OVERRIDE), 5405 PDEV_PARAM(pdev_param_dcs, PDEV_PARAM_DCS), 5406 PDEV_PARAM(pdev_param_ani_enable, PDEV_PARAM_ANI_ENABLE), 5407 PDEV_PARAM(pdev_param_ani_poll_period, PDEV_PARAM_ANI_POLL_PERIOD), 5408 PDEV_PARAM(pdev_param_ani_listen_period, PDEV_PARAM_ANI_LISTEN_PERIOD), 5409 PDEV_PARAM(pdev_param_ani_ofdm_level, PDEV_PARAM_ANI_OFDM_LEVEL), 5410 PDEV_PARAM(pdev_param_ani_cck_level, PDEV_PARAM_ANI_CCK_LEVEL), 5411 PDEV_PARAM(pdev_param_dyntxchain, PDEV_PARAM_DYNTXCHAIN), 5412 PDEV_PARAM(pdev_param_proxy_sta, PDEV_PARAM_PROXY_STA), 5413 PDEV_PARAM(pdev_param_idle_ps_config, PDEV_PARAM_IDLE_PS_CONFIG), 5414 PDEV_PARAM(pdev_param_power_gating_sleep, 5415 PDEV_PARAM_POWER_GATING_SLEEP), 5416 PDEV_PARAM(pdev_param_rfkill_enable, PDEV_PARAM_RFKILL_ENABLE), 5417 PDEV_PARAM(pdev_param_burst_dur, PDEV_PARAM_BURST_DUR), 5418 PDEV_PARAM(pdev_param_burst_enable, PDEV_PARAM_BURST_ENABLE), 5419 PDEV_PARAM(pdev_param_hw_rfkill_config, PDEV_PARAM_HW_RFKILL_CONFIG), 5420 PDEV_PARAM(pdev_param_low_power_rf_enable, 5421 PDEV_PARAM_LOW_POWER_RF_ENABLE), 5422 PDEV_PARAM(pdev_param_l1ss_track, PDEV_PARAM_L1SS_TRACK), 5423 PDEV_PARAM(pdev_param_hyst_en, PDEV_PARAM_HYST_EN), 5424 PDEV_PARAM(pdev_param_power_collapse_enable, 5425 PDEV_PARAM_POWER_COLLAPSE_ENABLE), 5426 PDEV_PARAM(pdev_param_led_sys_state, PDEV_PARAM_LED_SYS_STATE), 5427 PDEV_PARAM(pdev_param_led_enable, PDEV_PARAM_LED_ENABLE), 5428 PDEV_PARAM(pdev_param_audio_over_wlan_latency, 5429 PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY), 5430 PDEV_PARAM(pdev_param_audio_over_wlan_enable, 5431 PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE), 5432 PDEV_PARAM(pdev_param_whal_mib_stats_update_enable, 5433 PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE), 5434 PDEV_PARAM(pdev_param_vdev_rate_stats_update_period, 5435 PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD), 5436 PDEV_PARAM(pdev_param_cts_cbw, PDEV_PARAM_CTS_CBW), 5437 PDEV_PARAM(pdev_param_wnts_config, PDEV_PARAM_WNTS_CONFIG), 5438 PDEV_PARAM(pdev_param_adaptive_early_rx_enable, 5439 PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE), 5440 PDEV_PARAM(pdev_param_adaptive_early_rx_min_sleep_slop, 5441 PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP), 5442 PDEV_PARAM(pdev_param_adaptive_early_rx_inc_dec_step, 5443 PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP), 5444 PDEV_PARAM(pdev_param_early_rx_fix_sleep_slop, 5445 PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP), 5446 PDEV_PARAM(pdev_param_bmiss_based_adaptive_bto_enable, 5447 PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE), 5448 PDEV_PARAM(pdev_param_bmiss_bto_min_bcn_timeout, 5449 PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT), 5450 PDEV_PARAM(pdev_param_bmiss_bto_inc_dec_step, 5451 PDEV_PARAM_BMISS_BTO_INC_DEC_STEP), 5452 PDEV_PARAM(pdev_param_bto_fix_bcn_timeout, 5453 PDEV_PARAM_BTO_FIX_BCN_TIMEOUT), 5454 PDEV_PARAM(pdev_param_ce_based_adaptive_bto_enable, 5455 PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE), 5456 PDEV_PARAM(pdev_param_ce_bto_combo_ce_value, 5457 PDEV_PARAM_CE_BTO_COMBO_CE_VALUE), 5458 PDEV_PARAM(pdev_param_tx_chain_mask_2g, PDEV_PARAM_TX_CHAIN_MASK_2G), 5459 PDEV_PARAM(pdev_param_rx_chain_mask_2g, PDEV_PARAM_RX_CHAIN_MASK_2G), 5460 PDEV_PARAM(pdev_param_tx_chain_mask_5g, PDEV_PARAM_TX_CHAIN_MASK_5G), 5461 PDEV_PARAM(pdev_param_rx_chain_mask_5g, PDEV_PARAM_RX_CHAIN_MASK_5G), 5462 PDEV_PARAM(pdev_param_tx_chain_mask_cck, PDEV_PARAM_TX_CHAIN_MASK_CCK), 5463 PDEV_PARAM(pdev_param_tx_chain_mask_1ss, PDEV_PARAM_TX_CHAIN_MASK_1SS), 5464 PDEV_PARAM(pdev_param_cts2self_for_p2p_go_config, 5465 PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG), 5466 PDEV_PARAM(pdev_param_txpower_decr_db, PDEV_PARAM_TXPOWER_DECR_DB), 5467 PDEV_PARAM(pdev_param_aggr_burst, PDEV_PARAM_AGGR_BURST), 5468 PDEV_PARAM(pdev_param_rx_decap_mode, PDEV_PARAM_RX_DECAP_MODE), 5469 PDEV_PARAM(pdev_param_fast_channel_reset, 5470 PDEV_PARAM_FAST_CHANNEL_RESET), 5471 PDEV_PARAM(pdev_param_smart_antenna_default_antenna, 5472 PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA), 5473 PDEV_PARAM(pdev_param_antenna_gain, PDEV_PARAM_ANTENNA_GAIN), 5474 PDEV_PARAM(pdev_param_rx_filter, PDEV_PARAM_RX_FILTER), 5475 PDEV_PARAM(pdev_set_mcast_to_ucast_tid, PDEV_SET_MCAST_TO_UCAST_TID), 5476 PDEV_PARAM(pdev_param_proxy_sta_mode, PDEV_PARAM_PROXY_STA_MODE), 5477 PDEV_PARAM(pdev_param_set_mcast2ucast_mode, 5478 PDEV_PARAM_SET_MCAST2UCAST_MODE), 5479 PDEV_PARAM(pdev_param_set_mcast2ucast_buffer, 5480 PDEV_PARAM_SET_MCAST2UCAST_BUFFER), 5481 PDEV_PARAM(pdev_param_remove_mcast2ucast_buffer, 5482 PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER), 5483 PDEV_PARAM(pdev_peer_sta_ps_statechg_enable, 5484 PDEV_PEER_STA_PS_STATECHG_ENABLE), 5485 PDEV_PARAM(pdev_param_igmpmld_override, PDEV_PARAM_IGMPMLD_AC_OVERRIDE), 5486 PDEV_PARAM(pdev_param_block_interbss, PDEV_PARAM_BLOCK_INTERBSS), 5487 PDEV_PARAM(pdev_param_set_disable_reset_cmdid, 5488 PDEV_PARAM_SET_DISABLE_RESET_CMDID), 5489 PDEV_PARAM(pdev_param_set_msdu_ttl_cmdid, 5490 PDEV_PARAM_SET_MSDU_TTL_CMDID), 5491 PDEV_PARAM(pdev_param_set_ppdu_duration_cmdid, 5492 PDEV_PARAM_SET_PPDU_DURATION_CMDID), 5493 PDEV_PARAM(pdev_param_txbf_sound_period_cmdid, 5494 PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID), 5495 PDEV_PARAM(pdev_param_set_promisc_mode_cmdid, 5496 PDEV_PARAM_SET_PROMISC_MODE_CMDID), 5497 PDEV_PARAM(pdev_param_set_burst_mode_cmdid, 5498 PDEV_PARAM_SET_BURST_MODE_CMDID), 5499 PDEV_PARAM(pdev_param_en_stats, PDEV_PARAM_EN_STATS), 5500 PDEV_PARAM(pdev_param_mu_group_policy, PDEV_PARAM_MU_GROUP_POLICY), 5501 PDEV_PARAM(pdev_param_noise_detection, PDEV_PARAM_NOISE_DETECTION), 5502 PDEV_PARAM(pdev_param_noise_threshold, PDEV_PARAM_NOISE_THRESHOLD), 5503 PDEV_PARAM(pdev_param_dpd_enable, PDEV_PARAM_DPD_ENABLE), 5504 PDEV_PARAM(pdev_param_set_mcast_bcast_echo, 5505 PDEV_PARAM_SET_MCAST_BCAST_ECHO), 5506 PDEV_PARAM(pdev_param_atf_strict_sch, PDEV_PARAM_ATF_STRICT_SCH), 5507 PDEV_PARAM(pdev_param_atf_sched_duration, 5508 PDEV_PARAM_ATF_SCHED_DURATION), 5509 PDEV_PARAM(pdev_param_ant_plzn, PDEV_PARAM_ANT_PLZN), 5510 PDEV_PARAM(pdev_param_mgmt_retry_limit, PDEV_PARAM_MGMT_RETRY_LIMIT), 5511 PDEV_PARAM(pdev_param_sensitivity_level, PDEV_PARAM_SENSITIVITY_LEVEL), 5512 PDEV_PARAM(pdev_param_signed_txpower_2g, PDEV_PARAM_SIGNED_TXPOWER_2G), 5513 PDEV_PARAM(pdev_param_signed_txpower_5g, PDEV_PARAM_SIGNED_TXPOWER_5G), 5514 PDEV_PARAM(pdev_param_enable_per_tid_amsdu, 5515 PDEV_PARAM_ENABLE_PER_TID_AMSDU), 5516 PDEV_PARAM(pdev_param_enable_per_tid_ampdu, 5517 PDEV_PARAM_ENABLE_PER_TID_AMPDU), 5518 PDEV_PARAM(pdev_param_cca_threshold, PDEV_PARAM_CCA_THRESHOLD), 5519 PDEV_PARAM(pdev_param_rts_fixed_rate, PDEV_PARAM_RTS_FIXED_RATE), 5520 PDEV_PARAM(pdev_param_pdev_reset, PDEV_PARAM_PDEV_RESET), 5521 PDEV_PARAM(pdev_param_wapi_mbssid_offset, 5522 PDEV_PARAM_WAPI_MBSSID_OFFSET), 5523 PDEV_PARAM(pdev_param_arp_srcaddr, PDEV_PARAM_ARP_DBG_SRCADDR), 5524 PDEV_PARAM(pdev_param_arp_dstaddr, PDEV_PARAM_ARP_DBG_DSTADDR), 5525 PDEV_PARAM(pdev_param_atf_obss_noise_sch, 5526 PDEV_PARAM_ATF_OBSS_NOISE_SCH), 5527 PDEV_PARAM(pdev_param_atf_obss_noise_scaling_factor, 5528 PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR), 5529 PDEV_PARAM(pdev_param_cust_txpower_scale, 5530 PDEV_PARAM_CUST_TXPOWER_SCALE), 5531 PDEV_PARAM(pdev_param_atf_dynamic_enable, 5532 PDEV_PARAM_ATF_DYNAMIC_ENABLE), 5533 PDEV_PARAM(pdev_param_ctrl_retry_limit, PDEV_PARAM_CTRL_RETRY_LIMIT), 5534 PDEV_PARAM(pdev_param_propagation_delay, PDEV_PARAM_PROPAGATION_DELAY), 5535 PDEV_PARAM(pdev_param_ena_ant_div, PDEV_PARAM_ENA_ANT_DIV), 5536 PDEV_PARAM(pdev_param_force_chain_ant, PDEV_PARAM_FORCE_CHAIN_ANT), 5537 PDEV_PARAM(pdev_param_ant_div_selftest, PDEV_PARAM_ANT_DIV_SELFTEST), 5538 PDEV_PARAM(pdev_param_ant_div_selftest_intvl, 5539 PDEV_PARAM_ANT_DIV_SELFTEST_INTVL), 5540 PDEV_PARAM(pdev_param_stats_observation_period, 5541 PDEV_PARAM_STATS_OBSERVATION_PERIOD), 5542 PDEV_PARAM(pdev_param_tx_ppdu_delay_bin_size_ms, 5543 PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS), 5544 PDEV_PARAM(pdev_param_tx_ppdu_delay_array_len, 5545 PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN), 5546 PDEV_PARAM(pdev_param_tx_mpdu_aggr_array_len, 5547 PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN), 5548 PDEV_PARAM(pdev_param_rx_mpdu_aggr_array_len, 5549 PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN), 5550 PDEV_PARAM(pdev_param_tx_sch_delay, PDEV_PARAM_TX_SCH_DELAY), 5551 PDEV_PARAM(pdev_param_enable_rts_sifs_bursting, 5552 PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING), 5553 PDEV_PARAM(pdev_param_max_mpdus_in_ampdu, 5554 PDEV_PARAM_MAX_MPDUS_IN_AMPDU), 5555 PDEV_PARAM(pdev_param_peer_stats_info_enable, 5556 PDEV_PARAM_PEER_STATS_INFO_ENABLE), 5557 PDEV_PARAM(pdev_param_fast_pwr_transition, 5558 PDEV_PARAM_FAST_PWR_TRANSITION), 5559 PDEV_PARAM(pdev_param_radio_chan_stats_enable, 5560 PDEV_PARAM_RADIO_CHAN_STATS_ENABLE), 5561 PDEV_PARAM(pdev_param_radio_diagnosis_enable, 5562 PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE), 5563 PDEV_PARAM(pdev_param_mesh_mcast_enable, PDEV_PARAM_MESH_MCAST_ENABLE), 5564 PDEV_PARAM(pdev_param_smart_chainmask_scheme, 5565 PDEV_PARAM_SMART_CHAINMASK_SCHEME), 5566 PDEV_PARAM(pdev_param_alternative_chainmask_scheme, 5567 PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME), 5568 PDEV_PARAM(pdev_param_ant_div_usrcfg, PDEV_PARAM_ANT_DIV_USRCFG), 5569 PDEV_PARAM(pdev_param_packet_power_save_level, 5570 PDEV_PARAM_PACKET_POWER_SAVE_LEVEL), 5571 PDEV_PARAM(pdev_param_set_iot_pattern, PDEV_PARAM_SET_IOT_PATTERN), 5572 PDEV_PARAM(pdev_param_tx_ack_timeout, PDEV_PARAM_ACK_TIMEOUT), 5573 PDEV_PARAM(pdev_param_abg_mode_tx_chain_num, 5574 PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM), 5575 PDEV_PARAM(pdev_param_enable_cck_txfir_override, 5576 PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE), 5577 PDEV_PARAM(pdev_param_dtim_synth, PDEV_PARAM_DTIM_SYNTH), 5578 PDEV_PARAM(pdev_auto_detect_power_failure, 5579 PDEV_AUTO_DETECT_POWER_FAILURE), 5580 PDEV_PARAM(pdev_update_wdcvs_algo, PDEV_UPDATE_WDCVS_ALGO), 5581 PDEV_PARAM(pdev_param_data_stall_detect_enable, 5582 PDEV_PARAM_DATA_STALL_DETECT_ENABLE), 5583 PDEV_PARAM(pdev_param_gcmp_support_enable, 5584 PDEV_PARAM_GCMP_SUPPORT_ENABLE), 5585 PDEV_PARAM(pdev_param_1ch_dtim_optimized_chain_selection, 5586 PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION), 5587 PDEV_PARAM(pdev_param_cck_tx_enable, PDEV_PARAM_CCK_TX_ENABLE), 5588 PDEV_PARAM(pdev_param_antenna_gain_half_db, 5589 PDEV_PARAM_ANTENNA_GAIN_HALF_DB), 5590 PDEV_PARAM(pdev_param_secondary_retry_enable, 5591 PDEV_PARAM_SECONDARY_RETRY_ENABLE), 5592 PDEV_PARAM(pdev_param_ul_ppdu_duration, 5593 PDEV_PARAM_SET_UL_PPDU_DURATION), 5594 PDEV_PARAM(pdev_param_ul_trig_int, PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL), 5595 PDEV_PARAM(pdev_param_equal_ru_allocation_enable, 5596 PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE), 5597 PDEV_PARAM(pdev_param_mwscoex_4g_allow_quick_ftdm, 5598 PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM), 5599 PDEV_PARAM(pdev_param_mwscoex_set_5gnr_pwr_limit, 5600 PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT), 5601 PDEV_PARAM(pdev_param_set_cong_ctrl_max_msdus, 5602 PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS), 5603 PDEV_PARAM(pdev_param_esp_indication_period, 5604 PDEV_PARAM_ESP_INDICATION_PERIOD), 5605 PDEV_PARAM(pdev_param_per_peer_prd_cfr_enable, 5606 PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE), 5607 PDEV_PARAM(pdev_param_periodic_cfr_base_timer, 5608 PDEV_PARAM_PERIODIC_CFR_BASE_TIMER), 5609 PDEV_PARAM(pdev_param_enable_optimized_periodic_cfr_timer, 5610 PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER), 5611 PDEV_PARAM(pdev_param_esp_ba_window, PDEV_PARAM_ESP_BA_WINDOW), 5612 PDEV_PARAM(pdev_param_esp_airtime_fraction, 5613 PDEV_PARAM_ESP_AIRTIME_FRACTION), 5614 PDEV_PARAM(pdev_param_esp_ppdu_duration, PDEV_PARAM_ESP_PPDU_DURATION), 5615 PDEV_PARAM(pdev_param_use_nol, PDEV_PARAM_USE_NOL), 5616 PDEV_PARAM(pdev_param_ru26_allowed, PDEV_PARAM_UL_RU26_ALLOWED), 5617 PDEV_PARAM(pdev_param_sub_channel_marking, 5618 PDEV_PARAM_SUB_CHANNEL_MARKING), 5619 PDEV_PARAM(pdev_param_set_mgmt_ttl, PDEV_PARAM_SET_MGMT_TTL), 5620 PDEV_PARAM(pdev_param_set_prb_rsp_ttl, PDEV_PARAM_SET_PROBE_RESP_TTL), 5621 PDEV_PARAM(pdev_param_set_tbtt_ctrl, PDEV_PARAM_SET_TBTT_CTRL), 5622 PDEV_PARAM(pdev_param_nav_override_config, 5623 PDEV_PARAM_NAV_OVERRIDE_CONFIG), 5624 PDEV_PARAM(pdev_param_set_mu_ppdu_duration, 5625 PDEV_PARAM_SET_MU_PPDU_DURATION), 5626 PDEV_PARAM(pdev_param_set_test_cmd_ul_trigger_type_enable, 5627 PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE), 5628 PDEV_PARAM(pdev_param_set_test_cmd_ul_trigger_lsig_len, 5629 PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN), 5630 PDEV_PARAM(pdev_param_set_test_cmd_ul_trigger_fixed_rate, 5631 PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE), 5632 PDEV_PARAM(pdev_param_set_test_cmd_ul_mac_padding, 5633 PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING), 5634 PDEV_PARAM(pdev_param_set_test_cmd_ul_bsr_fc_duration, 5635 PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION), 5636 PDEV_PARAM(pdev_param_set_test_cmd_twt_sched_config, 5637 PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG), 5638 PDEV_PARAM(pdev_param_set_cmd_obss_pd_threshold, 5639 PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD), 5640 PDEV_PARAM(pdev_param_enable_non_wlan_coex_from_boot, 5641 PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT), 5642 PDEV_PARAM(pdev_param_set_cmd_obss_pd_per_ac, 5643 PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC), 5644 PDEV_PARAM(pdev_param_enable_fw_dynamic_he_edca, 5645 PDEV_PARAM_ENABLE_FW_DYNAMIC_HE_EDCA), 5646 PDEV_PARAM(pdev_param_default_6ghz_rate, PDEV_PARAM_DEFAULT_6GHZ_RATE), 5647 PDEV_PARAM(pdev_param_mwscoex_pcc_chavd_delay, 5648 PDEV_PARAM_MWSCOEX_PCC_CHAVD_DELAY), 5649 PDEV_PARAM(pdev_param_mwscoex_scc_chavd_delay, 5650 PDEV_PARAM_MWSCOEX_SCC_CHAVD_DELAY), 5651 PDEV_PARAM(pdev_param_set_dfs_chan_ageout_time, 5652 PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME), 5653 PDEV_PARAM(pdev_param_set_sap_xlna_bypass, 5654 PDEV_PARAM_SET_SAP_XLNA_BYPASS), 5655 PDEV_PARAM(pdev_param_enable_srp, PDEV_PARAM_ENABLE_SRP), 5656 PDEV_PARAM(pdev_param_enable_sr_prohibit, 5657 PDEV_PARAM_ENABLE_SR_PROHIBIT), 5658 PDEV_PARAM(pdev_param_enable_mbssid_ctrl_frame, 5659 PDEV_PARAM_ENABLE_MBSSID_CTRL_FRAME), 5660 PDEV_PARAM(pdev_param_pream_punct_bw, PDEV_PARAM_SET_PREAM_PUNCT_BW), 5661 PDEV_PARAM(pdev_param_sr_trigger_margin, PDEV_PARAM_SR_TRIGGER_MARGIN), 5662 PDEV_PARAM(pdev_param_pcie_hw_ilp, PDEV_PARAM_PCIE_HW_ILP), 5663 PDEV_PARAM(pdev_param_set_txtd_start_timestamp, 5664 PDEV_PARAM_SET_TXTD_START_TIMESTAMP), 5665 PDEV_PARAM(pdev_param_set_mesh_params, PDEV_PARAM_SET_MESH_PARAMS), 5666 PDEV_PARAM(pdev_param_low_latency_mode, 5667 PDEV_PARAM_LOW_LATENCY_SCHED_MODE), 5668 PDEV_PARAM(pdev_param_mpd_userpd_ssr, PDEV_PARAM_MPD_USERPD_SSR), 5669 PDEV_PARAM(pdev_param_disable_hw_assist, PDEV_PARAM_DISABLE_HW_ASSIST), 5670 PDEV_PARAM(pdev_param_scan_radio_tx_on_dfs, 5671 PDEV_PARAM_SCAN_RADIO_TX_ON_DFS), 5672 PDEV_PARAM(pdev_param_obss_min_duration_check_for_sr, 5673 PDEV_PARAM_OBSS_MIN_DURATION_CHECK_FOR_SR), 5674 PDEV_PARAM(pdev_param_truncate_sr, PDEV_PARAM_TRUNCATE_SR), 5675 PDEV_PARAM(pdev_param_ctrl_frame_obss_pd_threshold, 5676 PDEV_PARAM_CTRL_FRAME_OBSS_PD_THRESHOLD), 5677 PDEV_PARAM(pdev_param_twt_ac_config, PDEV_PARAM_TWT_AC_CONFIG), 5678 PDEV_PARAM(pdev_param_pdev_stats_tx_xretry_ext, 5679 PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT), 5680 PDEV_PARAM(pdev_param_rate_upper_cap, PDEV_PARAM_RATE_UPPER_CAP), 5681 PDEV_PARAM(pdev_param_rate_retry_mcs_drop, 5682 PDEV_PARAM_SET_RATE_DROP_DOWN_RETRY_THRESH), 5683 PDEV_PARAM(pdev_param_mcs_probe_intvl, 5684 PDEV_PARAM_MIN_MAX_MCS_PROBE_INTERVAL), 5685 PDEV_PARAM(pdev_param_nss_probe_intvl, 5686 PDEV_PARAM_MIN_MAX_NSS_PROBE_INTERVAL), 5687 PDEV_PARAM(pdev_param_en_probe_all_bw, PDEV_PARAM_EN_PROBE_ALL_BW), 5688 PDEV_PARAM(pdev_param_en_update_scram_seed, 5689 PDEV_PARAM_EN_UPDATE_SCRAM_SEED), 5690 PDEV_PARAM(pdev_param_sa_parallel_mode_gpio_drive_cfg, 5691 PDEV_PARAM_SA_PARALLEL_MODE_GPIO_DRIVE_CFG), 5692 PDEV_PARAM(pdev_param_disable_lpi_ant_optimization, 5693 PDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION), 5694 PDEV_PARAM(pdev_param_txpower_reason_sar, 5695 PDEV_PARAM_TXPOWER_REASON_SAR), 5696 PDEV_PARAM(pdev_param_igmpmld_tid, PDEV_PARAM_IGMPMLD_AC_OVERRIDE), 5697 PDEV_PARAM(pdev_param_cal_period, UNAVAILABLE_PARAM), 5698 PDEV_PARAM(pdev_param_rx_batchmode, UNAVAILABLE_PARAM), 5699 PDEV_PARAM(pdev_param_packet_aggr_delay, UNAVAILABLE_PARAM), 5700 PDEV_PARAM(pdev_param_atf_ssid_group_policy, UNAVAILABLE_PARAM), 5701 PDEV_PARAM(pdev_param_enable_btcoex, UNAVAILABLE_PARAM), 5702 PDEV_PARAM(pdev_param_atf_peer_stats, UNAVAILABLE_PARAM), 5703 PDEV_PARAM(pdev_param_btcoex_cfg, UNAVAILABLE_PARAM), 5704 PDEV_PARAM(pdev_param_soft_tx_chain_mask, PDEV_PARAM_TX_CHAIN_MASK), 5705 PDEV_PARAM(pdev_param_enable_peer_retry_stats, UNAVAILABLE_PARAM), 5706 PDEV_PARAM(pdev_param_scan_blanking_mode, 5707 PDEV_PARAM_SET_SCAN_BLANKING_MODE), 5708 PDEV_PARAM(pdev_param_set_disabled_sched_modes, 5709 PDEV_PARAM_SET_DISABLED_SCHED_MODES), 5710 PDEV_PARAM(pdev_param_set_conc_low_latency_mode, 5711 PDEV_PARAM_SET_CONC_LOW_LATENCY_MODE), 5712 PDEV_PARAM(pdev_param_rtt_11az_rsid_range, 5713 PDEV_PARAM_RTT_11AZ_RSID_RANGE), 5714 PDEV_PARAM(pdev_param_pcie_config, PDEV_PARAM_PCIE_CONFIG), 5715 PDEV_PARAM(pdev_param_probe_resp_retry_limit, 5716 PDEV_PARAM_PROBE_RESP_RETRY_LIMIT), 5717 PDEV_PARAM(pdev_param_cts_timeout, PDEV_PARAM_CTS_TIMEOUT), 5718 PDEV_PARAM(pdev_param_slot_time, PDEV_PARAM_SLOT_TIME), 5719 pdev_param_max, 5720 } wmi_conv_pdev_params_id; 5721 5722 #ifdef ENABLE_HOST_TO_TARGET_CONVERSION 5723 #define VDEV_PARAM(host_param, target_param) wmi_ ## host_param 5724 #else 5725 #define VDEV_PARAM(host_param, target_param) wmi_ ## host_param = WMI_ ## target_param 5726 #endif 5727 5728 /* Host based ENUM IDs for VDEV params to abstract target enums */ 5729 typedef enum { 5730 VDEV_PARAM(vdev_param_rts_threshold, VDEV_PARAM_RTS_THRESHOLD), 5731 VDEV_PARAM(vdev_param_fragmentation_threshold, 5732 VDEV_PARAM_FRAGMENTATION_THRESHOLD), 5733 VDEV_PARAM(vdev_param_beacon_interval, VDEV_PARAM_BEACON_INTERVAL), 5734 VDEV_PARAM(vdev_param_listen_interval, VDEV_PARAM_LISTEN_INTERVAL), 5735 VDEV_PARAM(vdev_param_multicast_rate, VDEV_PARAM_MULTICAST_RATE), 5736 VDEV_PARAM(vdev_param_mgmt_tx_rate, VDEV_PARAM_MGMT_TX_RATE), 5737 VDEV_PARAM(vdev_param_slot_time, VDEV_PARAM_SLOT_TIME), 5738 VDEV_PARAM(vdev_param_preamble, VDEV_PARAM_PREAMBLE), 5739 VDEV_PARAM(vdev_param_swba_time, VDEV_PARAM_SWBA_TIME), 5740 VDEV_PARAM(vdev_stats_update_period, VDEV_STATS_UPDATE_PERIOD), 5741 VDEV_PARAM(vdev_pwrsave_ageout_time, VDEV_PWRSAVE_AGEOUT_TIME), 5742 VDEV_PARAM(vdev_param_dtim_period, VDEV_PARAM_DTIM_PERIOD), 5743 VDEV_PARAM(vdev_oc_scheduler_air_time_limit, 5744 VDEV_OC_SCHEDULER_AIR_TIME_LIMIT), 5745 VDEV_PARAM(vdev_param_wds, VDEV_PARAM_WDS), 5746 VDEV_PARAM(vdev_param_atim_window, VDEV_PARAM_ATIM_WINDOW), 5747 VDEV_PARAM(vdev_param_bmiss_count_max, VDEV_PARAM_BMISS_COUNT_MAX), 5748 VDEV_PARAM(vdev_param_bmiss_first_bcnt, VDEV_PARAM_BMISS_FIRST_BCNT), 5749 VDEV_PARAM(vdev_param_bmiss_final_bcnt, VDEV_PARAM_BMISS_FINAL_BCNT), 5750 VDEV_PARAM(vdev_param_feature_wmm, VDEV_PARAM_FEATURE_WMM), 5751 VDEV_PARAM(vdev_param_chwidth, VDEV_PARAM_CHWIDTH), 5752 VDEV_PARAM(vdev_param_chextoffset, VDEV_PARAM_CHEXTOFFSET), 5753 VDEV_PARAM(vdev_param_disable_htprotection, 5754 VDEV_PARAM_DISABLE_HTPROTECTION), 5755 VDEV_PARAM(vdev_param_sta_quickkickout, VDEV_PARAM_STA_QUICKKICKOUT), 5756 VDEV_PARAM(vdev_param_mgmt_rate, VDEV_PARAM_MGMT_RATE), 5757 VDEV_PARAM(vdev_param_protection_mode, VDEV_PARAM_PROTECTION_MODE), 5758 VDEV_PARAM(vdev_param_fixed_rate, VDEV_PARAM_FIXED_RATE), 5759 VDEV_PARAM(vdev_param_sgi, VDEV_PARAM_SGI), 5760 VDEV_PARAM(vdev_param_ldpc, VDEV_PARAM_LDPC), 5761 VDEV_PARAM(vdev_param_tx_stbc, VDEV_PARAM_TX_STBC), 5762 VDEV_PARAM(vdev_param_rx_stbc, VDEV_PARAM_RX_STBC), 5763 VDEV_PARAM(vdev_param_intra_bss_fwd, VDEV_PARAM_INTRA_BSS_FWD), 5764 VDEV_PARAM(vdev_param_def_keyid, VDEV_PARAM_DEF_KEYID), 5765 VDEV_PARAM(vdev_param_nss, VDEV_PARAM_NSS), 5766 VDEV_PARAM(vdev_param_bcast_data_rate, VDEV_PARAM_BCAST_DATA_RATE), 5767 VDEV_PARAM(vdev_param_mcast_data_rate, VDEV_PARAM_MCAST_DATA_RATE), 5768 VDEV_PARAM(vdev_param_mcast_indicate, VDEV_PARAM_MCAST_INDICATE), 5769 VDEV_PARAM(vdev_param_dhcp_indicate, VDEV_PARAM_DHCP_INDICATE), 5770 VDEV_PARAM(vdev_param_unknown_dest_indicate, 5771 VDEV_PARAM_UNKNOWN_DEST_INDICATE), 5772 VDEV_PARAM(vdev_param_ap_keepalive_min_idle_inactive_time_secs, 5773 VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS), 5774 VDEV_PARAM(vdev_param_ap_keepalive_max_idle_inactive_time_secs, 5775 VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS), 5776 VDEV_PARAM(vdev_param_ap_keepalive_max_unresponsive_time_secs, 5777 VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS), 5778 VDEV_PARAM(vdev_param_ap_enable_nawds, VDEV_PARAM_AP_ENABLE_NAWDS), 5779 VDEV_PARAM(vdev_param_enable_rtscts, VDEV_PARAM_ENABLE_RTSCTS), 5780 VDEV_PARAM(vdev_param_txbf, VDEV_PARAM_TXBF), 5781 VDEV_PARAM(vdev_param_packet_powersave, VDEV_PARAM_PACKET_POWERSAVE), 5782 VDEV_PARAM(vdev_param_drop_unencry, VDEV_PARAM_DROP_UNENCRY), 5783 VDEV_PARAM(vdev_param_tx_encap_type, VDEV_PARAM_TX_ENCAP_TYPE), 5784 VDEV_PARAM(vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs, 5785 VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS), 5786 VDEV_PARAM(vdev_param_early_rx_adjust_enable, 5787 VDEV_PARAM_EARLY_RX_ADJUST_ENABLE), 5788 VDEV_PARAM(vdev_param_early_rx_tgt_bmiss_num, 5789 VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM), 5790 VDEV_PARAM(vdev_param_early_rx_bmiss_sample_cycle, 5791 VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE), 5792 VDEV_PARAM(vdev_param_early_rx_slop_step, 5793 VDEV_PARAM_EARLY_RX_SLOP_STEP), 5794 VDEV_PARAM(vdev_param_early_rx_init_slop, 5795 VDEV_PARAM_EARLY_RX_INIT_SLOP), 5796 VDEV_PARAM(vdev_param_early_rx_adjust_pause, 5797 VDEV_PARAM_EARLY_RX_ADJUST_PAUSE), 5798 VDEV_PARAM(vdev_param_tx_pwrlimit, VDEV_PARAM_TX_PWRLIMIT), 5799 VDEV_PARAM(vdev_param_snr_num_for_cal, VDEV_PARAM_SNR_NUM_FOR_CAL), 5800 VDEV_PARAM(vdev_param_roam_fw_offload, VDEV_PARAM_ROAM_FW_OFFLOAD), 5801 VDEV_PARAM(vdev_param_enable_rmc, VDEV_PARAM_ENABLE_RMC), 5802 VDEV_PARAM(vdev_param_ibss_max_bcn_lost_ms, 5803 VDEV_PARAM_IBSS_MAX_BCN_LOST_MS), 5804 VDEV_PARAM(vdev_param_max_rate, VDEV_PARAM_MAX_RATE), 5805 VDEV_PARAM(vdev_param_early_rx_drift_sample, 5806 VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE), 5807 VDEV_PARAM(vdev_param_set_ibss_tx_fail_cnt_thr, 5808 VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR), 5809 VDEV_PARAM(vdev_param_ebt_resync_timeout, 5810 VDEV_PARAM_EBT_RESYNC_TIMEOUT), 5811 VDEV_PARAM(vdev_param_aggr_trig_event_enable, 5812 VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE), 5813 VDEV_PARAM(vdev_param_is_ibss_power_save_allowed, 5814 VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED), 5815 VDEV_PARAM(vdev_param_is_power_collapse_allowed, 5816 VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED), 5817 VDEV_PARAM(vdev_param_is_awake_on_txrx_enabled, 5818 VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED), 5819 VDEV_PARAM(vdev_param_inactivity_cnt, VDEV_PARAM_INACTIVITY_CNT), 5820 VDEV_PARAM(vdev_param_txsp_end_inactivity_time_ms, 5821 VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS), 5822 VDEV_PARAM(vdev_param_dtim_policy, VDEV_PARAM_DTIM_POLICY), 5823 VDEV_PARAM(vdev_param_ibss_ps_warmup_time_secs, 5824 VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS), 5825 VDEV_PARAM(vdev_param_ibss_ps_1rx_chain_in_atim_window_enable, 5826 VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE), 5827 VDEV_PARAM(vdev_param_rx_leak_window, VDEV_PARAM_RX_LEAK_WINDOW), 5828 VDEV_PARAM(vdev_param_stats_avg_factor, VDEV_PARAM_STATS_AVG_FACTOR), 5829 VDEV_PARAM(vdev_param_disconnect_th, VDEV_PARAM_DISCONNECT_TH), 5830 VDEV_PARAM(vdev_param_rtscts_rate, VDEV_PARAM_RTSCTS_RATE), 5831 VDEV_PARAM(vdev_param_mcc_rtscts_protection_enable, 5832 VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE), 5833 VDEV_PARAM(vdev_param_mcc_broadcast_probe_enable, 5834 VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE), 5835 VDEV_PARAM(vdev_param_txpower_scale, VDEV_PARAM_TXPOWER_SCALE), 5836 VDEV_PARAM(vdev_param_txpower_scale_decr_db, 5837 VDEV_PARAM_TXPOWER_SCALE_DECR_DB), 5838 VDEV_PARAM(vdev_param_mcast2ucast_set, VDEV_PARAM_MCAST2UCAST_SET), 5839 VDEV_PARAM(vdev_param_rc_num_retries, VDEV_PARAM_RC_NUM_RETRIES), 5840 VDEV_PARAM(vdev_param_cabq_maxdur, VDEV_PARAM_CABQ_MAXDUR), 5841 VDEV_PARAM(vdev_param_mfptest_set, VDEV_PARAM_MFPTEST_SET), 5842 VDEV_PARAM(vdev_param_rts_fixed_rate, VDEV_PARAM_RTS_FIXED_RATE), 5843 VDEV_PARAM(vdev_param_vht_sgimask, VDEV_PARAM_VHT_SGIMASK), 5844 VDEV_PARAM(vdev_param_vht80_ratemask, VDEV_PARAM_VHT80_RATEMASK), 5845 VDEV_PARAM(vdev_param_proxy_sta, VDEV_PARAM_PROXY_STA), 5846 VDEV_PARAM(vdev_param_virtual_cell_mode, VDEV_PARAM_VIRTUAL_CELL_MODE), 5847 VDEV_PARAM(vdev_param_rx_decap_type, VDEV_PARAM_RX_DECAP_TYPE), 5848 VDEV_PARAM(vdev_param_bw_nss_ratemask, VDEV_PARAM_BW_NSS_RATEMASK), 5849 VDEV_PARAM(vdev_param_sensor_ap, VDEV_PARAM_SENSOR_AP), 5850 VDEV_PARAM(vdev_param_beacon_rate, VDEV_PARAM_BEACON_RATE), 5851 VDEV_PARAM(vdev_param_dtim_enable_cts, VDEV_PARAM_DTIM_ENABLE_CTS), 5852 VDEV_PARAM(vdev_param_sta_kickout, VDEV_PARAM_STA_KICKOUT), 5853 VDEV_PARAM(vdev_param_capabilities, VDEV_PARAM_CAPABILITIES), 5854 VDEV_PARAM(vdev_param_tsf_increment, VDEV_PARAM_TSF_INCREMENT), 5855 VDEV_PARAM(vdev_param_ampdu_subframe_size_per_ac, 5856 UNAVAILABLE_PARAM), 5857 VDEV_PARAM(vdev_param_rx_filter, VDEV_PARAM_RX_FILTER), 5858 VDEV_PARAM(vdev_param_mgmt_tx_power, VDEV_PARAM_MGMT_TX_POWER), 5859 VDEV_PARAM(vdev_param_non_agg_sw_retry_th, 5860 VDEV_PARAM_NON_AGG_SW_RETRY_TH), 5861 VDEV_PARAM(vdev_param_agg_sw_retry_th, VDEV_PARAM_AGG_SW_RETRY_TH), 5862 VDEV_PARAM(vdev_param_disable_dyn_bw_rts, 5863 VDEV_PARAM_DISABLE_DYN_BW_RTS), 5864 VDEV_PARAM(vdev_param_set_traffic_config, 5865 VDEV_PARAM_VDEV_TRAFFIC_CONFIG), 5866 VDEV_PARAM(vdev_param_atf_ssid_sched_policy, 5867 VDEV_PARAM_ATF_SSID_SCHED_POLICY), 5868 VDEV_PARAM(vdev_param_he_dcm_enable, VDEV_PARAM_HE_DCM), 5869 VDEV_PARAM(vdev_param_he_range_ext_enable, VDEV_PARAM_HE_RANGE_EXT), 5870 VDEV_PARAM(vdev_param_he_range_ext, VDEV_PARAM_HE_RANGE_EXT), 5871 VDEV_PARAM(vdev_param_enable_bcast_probe_response, 5872 VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE), 5873 VDEV_PARAM(vdev_param_fils_max_channel_guard_time, 5874 VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME), 5875 VDEV_PARAM(vdev_param_disable_noa_p2p_go, 5876 VDEV_PARAM_DISABLE_NOA_P2P_GO), 5877 VDEV_PARAM(vdev_param_per_band_mgmt_tx_rate, 5878 VDEV_PARAM_PER_BAND_MGMT_TX_RATE), 5879 VDEV_PARAM(vdev_param_11ax_txbf, VDEV_PARAM_11AX_TXBF), 5880 VDEV_PARAM(vdev_param_smps_intolerant, VDEV_PARAM_SMPS_INTOLERANT), 5881 VDEV_PARAM(vdev_param_probe_delay, VDEV_PARAM_PROBE_DELAY), 5882 VDEV_PARAM(vdev_param_repeat_probe_time, VDEV_PARAM_REPEAT_PROBE_TIME), 5883 VDEV_PARAM(vdev_param_set_he_ltf, VDEV_PARAM_HE_LTF), 5884 VDEV_PARAM(vdev_param_abg_mode_tx_chain_num, 5885 VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM), 5886 VDEV_PARAM(vdev_param_enable_multi_group_key, 5887 VDEV_PARAM_ENABLE_MULTI_GROUP_KEY), 5888 VDEV_PARAM(vdev_param_max_group_keys, VDEV_PARAM_NUM_GROUP_KEYS), 5889 VDEV_PARAM(vdev_param_enable_disable_oce_features, 5890 VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES), 5891 VDEV_PARAM(vdev_param_enable_disable_nan_config_features, 5892 VDEV_PARAM_ENABLE_DISABLE_NAN_CONFIG_FEATURES), 5893 VDEV_PARAM(vdev_param_rate_dropdown_bmap, 5894 VDEV_PARAM_RATE_DROPDOWN_BMAP), 5895 VDEV_PARAM(vdev_param_moddtim_cnt, VDEV_PARAM_MODDTIM_CNT), 5896 VDEV_PARAM(vdev_param_max_li_of_moddtim, VDEV_PARAM_MAX_LI_OF_MODDTIM), 5897 VDEV_PARAM(vdev_param_dyndtim_cnt, VDEV_PARAM_DYNDTIM_CNT), 5898 VDEV_PARAM(vdev_param_enable_disable_rtt_responder_role, 5899 VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE), 5900 VDEV_PARAM(vdev_param_set_ba_mode, VDEV_PARAM_BA_MODE), 5901 VDEV_PARAM(vdev_param_forced_moddtim_enable, 5902 VDEV_PARAM_FORCED_MODDTIM_ENABLE), 5903 VDEV_PARAM(vdev_param_autorate_misc_cfg, VDEV_PARAM_AUTORATE_MISC_CFG), 5904 VDEV_PARAM(vdev_param_enable_disable_rtt_initiator_random_mac, 5905 VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC), 5906 VDEV_PARAM(vdev_param_tx_retries_before_rts_per_ac, 5907 VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC), 5908 VDEV_PARAM(vdev_param_amsdu_aggregation_size_optimization, 5909 VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION), 5910 VDEV_PARAM(vdev_param_rawmode_open_war, VDEV_PARAM_RAW_IS_ENCRYPTED), 5911 VDEV_PARAM(vdev_param_gtx_enable, VDEV_PARAM_GTX_ENABLE), 5912 VDEV_PARAM(vdev_param_disable_cabq, VDEV_PARAM_DISABLE_CABQ), 5913 VDEV_PARAM(vdev_param_set_he_sounding_mode, 5914 VDEV_PARAM_SET_HE_SOUNDING_MODE), 5915 VDEV_PARAM(vdev_param_ul_fixed_rate, VDEV_PARAM_UL_FIXED_RATE), 5916 VDEV_PARAM(vdev_param_ul_shortgi, VDEV_PARAM_UL_GI), 5917 VDEV_PARAM(vdev_param_ul_ldpc, VDEV_PARAM_UL_LDPC), 5918 VDEV_PARAM(vdev_param_ul_nss, VDEV_PARAM_UL_NSS), 5919 VDEV_PARAM(vdev_param_ul_stbc, VDEV_PARAM_UL_STBC), 5920 VDEV_PARAM(vdev_param_ul_he_ltf, VDEV_PARAM_UL_HE_LTF), 5921 VDEV_PARAM(vdev_param_ul_ppdu_bw, VDEV_PARAM_UL_PPDU_BW), 5922 VDEV_PARAM(vdev_param_mu_edca_fw_update_en, 5923 VDEV_PARAM_MU_EDCA_FW_UPDATE_EN), 5924 VDEV_PARAM(vdev_param_update_obss_ru_tolerance_time, 5925 VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME), 5926 VDEV_PARAM(vdev_param_max_mtu_size, VDEV_PARAM_MAX_MTU_SIZE), 5927 VDEV_PARAM(vdev_param_nth_beacon_to_host, 5928 VDEV_PARAM_NTH_BEACON_TO_HOST), 5929 VDEV_PARAM(vdev_param_packet_capture_mode, 5930 VDEV_PARAM_PACKET_CAPTURE_MODE), 5931 VDEV_PARAM(vdev_param_mcast_rc_stale_period, 5932 VDEV_PARAM_MCAST_RC_STALE_PERIOD), 5933 VDEV_PARAM(vdev_param_msdu_flow_override_config, 5934 VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG), 5935 VDEV_PARAM(vdev_param_enable_null_for_leaky_ap, 5936 VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP), 5937 VDEV_PARAM(vdev_param_ndp_inactivity_timeout, 5938 VDEV_PARAM_NDP_INACTIVITY_TIMEOUT), 5939 VDEV_PARAM(vdev_param_enable_mcast_rc, VDEV_PARAM_ENABLE_MCAST_RC), 5940 VDEV_PARAM(vdev_param_enable_disable_rtt_initiator_role, 5941 VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_ROLE), 5942 VDEV_PARAM(vdev_param_ndp_keepalive_timeout, 5943 VDEV_PARAM_NDP_KEEPALIVE_TIMEOUT), 5944 VDEV_PARAM(vdev_param_allow_nan_initial_discovery_of_mp0_cluster, 5945 VDEV_PARAM_ALLOW_NAN_INITIAL_DISCOVERY_OF_MP0_CLUSTER), 5946 VDEV_PARAM(vdev_param_enable_disable_roam_reason_vsie, 5947 VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE), 5948 VDEV_PARAM(vdev_param_set_cmd_obss_pd_threshold, 5949 VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD), 5950 VDEV_PARAM(vdev_param_set_cmd_obss_pd_per_ac, 5951 VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC), 5952 VDEV_PARAM(vdev_param_rsn_capability, VDEV_PARAM_RSN_CAPABILITY), 5953 VDEV_PARAM(vdev_param_enable_srp, VDEV_PARAM_ENABLE_SRP), 5954 VDEV_PARAM(vdev_param_roam_11kv_ctrl, VDEV_PARAM_ROAM_11KV_CTRL), 5955 VDEV_PARAM(vdev_param_nan_config_features, 5956 UNAVAILABLE_PARAM), 5957 VDEV_PARAM(vdev_param_sho_config, VDEV_PARAM_SHO_CONFIG), 5958 VDEV_PARAM(vdev_param_non_data_he_range_ext, 5959 VDEV_PARAM_NON_DATA_HE_RANGE_EXT), 5960 VDEV_PARAM(vdev_param_prohibit_data_mgmt, 5961 VDEV_PARAM_PROHIBIT_DATA_MGMT), 5962 VDEV_PARAM(vdev_param_wmm_txop_enable, VDEV_PARAM_WMM_TXOP_ENABLE), 5963 VDEV_PARAM(vdev_param_force_dtim_cnt, VDEV_PARAM_FORCE_DTIM_CNT), 5964 VDEV_PARAM(vdev_param_smart_monitor_config, 5965 VDEV_PARAM_SMART_MONITOR_CONFIG), 5966 VDEV_PARAM(vdev_param_max_li_of_moddtim_ms, 5967 VDEV_PARAM_MAX_LI_OF_MODDTIM_MS), 5968 VDEV_PARAM(vdev_param_11az_security_config, 5969 VDEV_PARAM_11AZ_SECURITY_CONFIG), 5970 VDEV_PARAM(vdev_param_set_normal_latency_flags_config, 5971 VDEV_PARAM_NORMAL_LATENCY_FLAGS_CONFIGURATION), 5972 VDEV_PARAM(vdev_param_set_xr_latency_flags_config, 5973 VDEV_PARAM_XR_LATENCY_FLAGS_CONFIGURATION), 5974 VDEV_PARAM(vdev_param_set_low_latency_flags_config, 5975 VDEV_PARAM_LOW_LATENCY_FLAGS_CONFIGURATION), 5976 VDEV_PARAM(vdev_param_set_ultra_low_latency_flags_config, 5977 VDEV_PARAM_ULTRA_LOW_LATENCY_FLAGS_CONFIGURATION), 5978 VDEV_PARAM(vdev_param_set_normal_latency_ul_dl_config, 5979 VDEV_PARAM_NORMAL_LATENCY_UL_DL_CONFIGURATION), 5980 VDEV_PARAM(vdev_param_set_xr_latency_ul_dl_config, 5981 VDEV_PARAM_XR_LATENCY_UL_DL_CONFIGURATION), 5982 VDEV_PARAM(vdev_param_set_low_latency_ul_dl_config, 5983 VDEV_PARAM_LOW_LATENCY_UL_DL_CONFIGURATION), 5984 VDEV_PARAM(vdev_param_set_ultra_low_latency_ul_dl_config, 5985 VDEV_PARAM_ULTRA_LOW_LATENCY_UL_DL_CONFIGURATION), 5986 VDEV_PARAM(vdev_param_set_default_ll_config, 5987 VDEV_PARAM_DEFAULT_LATENCY_LEVEL_CONFIGURATION), 5988 VDEV_PARAM(vdev_param_set_multi_client_ll_feature_config, 5989 VDEV_PARAM_MULTI_CLIENT_LL_FEATURE_CONFIGURATION), 5990 VDEV_PARAM(vdev_param_vdev_traffic_config, 5991 VDEV_PARAM_VDEV_TRAFFIC_CONFIG), 5992 VDEV_PARAM(vdev_param_final_bmiss_time_sec, 5993 VDEV_PARAM_FINAL_BMISS_TIME_SEC), 5994 VDEV_PARAM(vdev_param_final_bmiss_time_wow_sec, 5995 VDEV_PARAM_FINAL_BMISS_TIME_WOW_SEC), 5996 VDEV_PARAM(vdev_param_disable_lpi_ant_optimization, 5997 VDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION), 5998 VDEV_PARAM(vdev_param_prototype, VDEV_PARAM_PROTOTYPE), 5999 VDEV_PARAM(vdev_param_he_bss_color, VDEV_PARAM_BSS_COLOR), 6000 VDEV_PARAM(vdev_param_set_hemu_mode, VDEV_PARAM_SET_HEMU_MODE), 6001 VDEV_PARAM(vdev_param_set_heop, VDEV_PARAM_HEOPS_0_31), 6002 VDEV_PARAM(vdev_param_obsspd, VDEV_PARAM_OBSSPD), 6003 VDEV_PARAM(vdev_param_set_eht_mu_mode, VDEV_PARAM_SET_EHT_MU_MODE), 6004 VDEV_PARAM(vdev_param_set_eht_ltf, VDEV_PARAM_EHT_LTF), 6005 VDEV_PARAM(vdev_param_set_ul_eht_ltf, VDEV_PARAM_UL_EHT_LTF), 6006 VDEV_PARAM(vdev_param_set_eht_dcm, VDEV_PARAM_EHT_DCM), 6007 VDEV_PARAM(vdev_param_set_eht_range_ext, VDEV_PARAM_EHT_RANGE_EXT), 6008 VDEV_PARAM(vdev_param_set_non_data_eht_range_ext, 6009 VDEV_PARAM_NON_DATA_EHT_RANGE_EXT), 6010 VDEV_PARAM(vdev_param_fixed_puncture_pattern, 6011 VDEV_PARAM_FIXED_PUNCTURE_PATTERN), 6012 VDEV_PARAM(vdev_param_set_ehtop, VDEV_PARAM_EHTOPS_0_31), 6013 VDEV_PARAM(vdev_param_set_eht_puncturing_mode, 6014 VDEV_PARAM_SET_EHT_PUNCTURING_MODE), 6015 VDEV_PARAM(vdev_param_mcast_steer, VDEV_PARAM_MCAST_STEERING), 6016 VDEV_PARAM(vdev_param_set_profile, VDEV_PARAM_SET_PROFILE), 6017 VDEV_PARAM(vdev_param_vdev_stats_id_update, 6018 VDEV_PARAM_VDEV_STATS_ID_UPDATE), 6019 VDEV_PARAM(vdev_param_skip_roam_eapol_4way_handshake, 6020 VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE), 6021 VDEV_PARAM(vdev_param_skip_sae_roam_4way_handshake, 6022 VDEV_PARAM_SKIP_SAE_ROAM_4WAY_HANDSHAKE), 6023 VDEV_PARAM(vdev_param_tx_power, UNAVAILABLE_PARAM), 6024 VDEV_PARAM(vdev_param_amsdu_subframe_size_per_ac, 6025 UNAVAILABLE_PARAM), 6026 VDEV_PARAM(vdev_param_6ghz_params, VDEV_PARAM_6GHZ_PARAMS), 6027 VDEV_PARAM(vdev_host_swba_interval, VDEV_HOST_SWBA_INTERVAL), 6028 VDEV_PARAM(vdev_param_meru_vc, UNAVAILABLE_PARAM), 6029 VDEV_PARAM(vdev_param_sifs_trigger_rate, UNAVAILABLE_PARAM), 6030 VDEV_PARAM(vdev_param_ap_keepalive_max_idle_inactive_secs, 6031 VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS), 6032 VDEV_PARAM(vdev_param_set_extra_eht_ltf, VDEV_PARAM_EXTRA_EHT_LTF), 6033 VDEV_PARAM(vdev_param_set_disabled_modes, 6034 VDEV_PARAM_SET_DISABLED_SCHED_MODES), 6035 VDEV_PARAM(vdev_param_set_sap_ps_with_twt, 6036 VDEV_PARAM_SET_SAP_PS_WITH_TWT), 6037 VDEV_PARAM(vdev_param_chwidth_with_notify, 6038 VDEV_PARAM_CHWIDTH_WITH_NOTIFY), 6039 VDEV_PARAM(vdev_param_rtt_11az_tb_max_session_expiry, 6040 VDEV_PARAM_RTT_11AZ_TB_MAX_SESSION_EXPIRY), 6041 VDEV_PARAM(vdev_param_wifi_standard_version, 6042 VDEV_PARAM_WIFI_STANDARD_VERSION), 6043 VDEV_PARAM(vdev_param_rtt_11az_ntb_max_time_bw_meas, 6044 VDEV_PARAM_RTT_11AZ_NTB_MAX_TIME_BW_MEAS), 6045 VDEV_PARAM(vdev_param_rtt_11az_ntb_min_time_bw_meas, 6046 VDEV_PARAM_RTT_11AZ_NTB_MIN_TIME_BW_MEAS), 6047 VDEV_PARAM(vdev_param_disable_2g_twt, 6048 VDEV_PARAM_DISABLE_2G_TWT), 6049 vdev_param_max, 6050 } wmi_conv_vdev_param_id; 6051 6052 /* Host based ENUM IDs for service bits to abstract target enums */ 6053 typedef enum { 6054 wmi_service_beacon_offload = 0, 6055 wmi_service_scan_offload, 6056 wmi_service_roam_offload, 6057 wmi_service_bcn_miss_offload, 6058 wmi_service_sta_pwrsave, 6059 wmi_service_sta_advanced_pwrsave, 6060 wmi_service_ap_uapsd, 6061 wmi_service_ap_dfs, 6062 wmi_service_11ac, 6063 wmi_service_blockack, 6064 wmi_service_phyerr, 6065 wmi_service_bcn_filter, 6066 wmi_service_rtt, 6067 wmi_service_ratectrl, 6068 wmi_service_wow, 6069 wmi_service_ratectrl_cache, 6070 wmi_service_iram_tids, 6071 wmi_service_burst, 6072 wmi_service_smart_antenna_sw_support, 6073 wmi_service_gtk_offload, 6074 wmi_service_scan_sch, 6075 wmi_service_csa_offload, 6076 wmi_service_chatter, 6077 wmi_service_coex_freqavoid, 6078 wmi_service_packet_power_save, 6079 wmi_service_force_fw_hang, 6080 wmi_service_smart_antenna_hw_support, 6081 wmi_service_gpio, 6082 wmi_sta_uapsd_basic_auto_trig, 6083 wmi_sta_uapsd_var_auto_trig, 6084 wmi_service_sta_keep_alive, 6085 wmi_service_tx_encap, 6086 wmi_service_ap_ps_detect_out_of_sync, 6087 wmi_service_early_rx, 6088 wmi_service_enhanced_proxy_sta, 6089 wmi_service_tt, 6090 wmi_service_atf, 6091 wmi_service_peer_caching, 6092 wmi_service_coex_gpio, 6093 wmi_service_aux_spectral_intf, 6094 wmi_service_aux_chan_load_intf, 6095 wmi_service_bss_channel_info_64, 6096 wmi_service_ext_res_cfg_support, 6097 wmi_service_mesh, 6098 wmi_service_restrt_chnl_support, 6099 wmi_service_roam_scan_offload, 6100 wmi_service_arpns_offload, 6101 wmi_service_nlo, 6102 wmi_service_sta_dtim_ps_modulated_dtim, 6103 wmi_service_sta_smps, 6104 wmi_service_fwtest, 6105 wmi_service_sta_wmmac, 6106 wmi_service_tdls, 6107 wmi_service_mcc_bcn_interval_change, 6108 wmi_service_adaptive_ocs, 6109 wmi_service_ba_ssn_support, 6110 wmi_service_filter_ipsec_natkeepalive, 6111 wmi_service_wlan_hb, 6112 wmi_service_lte_ant_share_support, 6113 wmi_service_batch_scan, 6114 wmi_service_qpower, 6115 wmi_service_plmreq, 6116 wmi_service_thermal_mgmt, 6117 wmi_service_rmc, 6118 wmi_service_mhf_offload, 6119 wmi_service_coex_sar, 6120 wmi_service_bcn_txrate_override, 6121 wmi_service_nan, 6122 wmi_service_l1ss_stat, 6123 wmi_service_estimate_linkspeed, 6124 wmi_service_obss_scan, 6125 wmi_service_tdls_offchan, 6126 wmi_service_tdls_uapsd_buffer_sta, 6127 wmi_service_tdls_uapsd_sleep_sta, 6128 wmi_service_ibss_pwrsave, 6129 wmi_service_lpass, 6130 wmi_service_extscan, 6131 wmi_service_d0wow, 6132 wmi_service_hsoffload, 6133 wmi_service_roam_ho_offload, 6134 wmi_service_rx_full_reorder, 6135 wmi_service_dhcp_offload, 6136 wmi_service_sta_rx_ipa_offload_support, 6137 wmi_service_mdns_offload, 6138 wmi_service_sap_auth_offload, 6139 wmi_service_dual_band_simultaneous_support, 6140 wmi_service_ocb, 6141 wmi_service_ap_arpns_offload, 6142 wmi_service_per_band_chainmask_support, 6143 wmi_service_packet_filter_offload, 6144 wmi_service_mgmt_tx_htt, 6145 wmi_service_mgmt_tx_wmi, 6146 wmi_service_ext_msg, 6147 wmi_service_mawc, 6148 6149 wmi_service_peer_stats, 6150 wmi_service_mesh_11s, 6151 wmi_service_periodic_chan_stat_support, 6152 wmi_service_tx_mode_push_only, 6153 wmi_service_tx_mode_push_pull, 6154 wmi_service_tx_mode_dynamic, 6155 wmi_service_check_cal_version, 6156 wmi_service_btcoex_duty_cycle, 6157 wmi_service_4_wire_coex_support, 6158 wmi_service_multiple_vdev_restart, 6159 wmi_service_peer_assoc_conf, 6160 wmi_service_egap, 6161 wmi_service_sta_pmf_offload, 6162 wmi_service_unified_wow_capability, 6163 wmi_service_enterprise_mesh, 6164 wmi_service_apf_offload, 6165 wmi_service_sync_delete_cmds, 6166 wmi_service_ratectrl_limit_max_min_rates, 6167 wmi_service_nan_data, 6168 wmi_service_nan_rtt, 6169 wmi_service_11ax, 6170 wmi_service_deprecated_replace, 6171 wmi_service_tdls_conn_tracker_in_host_mode, 6172 wmi_service_enhanced_mcast_filter, 6173 wmi_service_half_rate_quarter_rate_support, 6174 wmi_service_vdev_rx_filter, 6175 wmi_service_p2p_listen_offload_support, 6176 wmi_service_mark_first_wakeup_packet, 6177 wmi_service_multiple_mcast_filter_set, 6178 wmi_service_host_managed_rx_reorder, 6179 wmi_service_flash_rdwr_support, 6180 wmi_service_wlan_stats_report, 6181 wmi_service_tx_msdu_id_new_partition_support, 6182 wmi_service_dfs_phyerr_offload, 6183 wmi_service_rcpi_support, 6184 wmi_service_fw_mem_dump_support, 6185 wmi_service_peer_stats_info, 6186 wmi_service_regulatory_db, 6187 wmi_service_11d_offload, 6188 wmi_service_hw_data_filtering, 6189 wmi_service_pkt_routing, 6190 wmi_service_offchan_tx_wmi, 6191 wmi_service_chan_load_info, 6192 wmi_service_extended_nss_support, 6193 wmi_service_ack_timeout, 6194 wmi_service_widebw_scan, 6195 wmi_service_bcn_offload_start_stop_support, 6196 wmi_service_offchan_data_tid_support, 6197 wmi_service_support_dma, 6198 wmi_service_8ss_tx_bfee, 6199 wmi_service_fils_support, 6200 wmi_service_mawc_support, 6201 wmi_service_wow_wakeup_by_timer_pattern, 6202 wmi_service_11k_neighbour_report_support, 6203 wmi_service_ap_obss_detection_offload, 6204 wmi_service_bss_color_offload, 6205 wmi_service_gmac_offload_support, 6206 wmi_service_host_dfs_check_support, 6207 wmi_service_dual_beacon_on_single_mac_scc_support, 6208 wmi_service_dual_beacon_on_single_mac_mcc_support, 6209 wmi_service_twt_requestor, 6210 wmi_service_twt_responder, 6211 wmi_service_listen_interval_offload_support, 6212 6213 #ifdef OL_ATH_SMART_LOGGING 6214 wmi_service_smart_logging_support, 6215 #endif 6216 wmi_service_infra_mbssid, 6217 wmi_service_esp_support, 6218 wmi_service_obss_spatial_reuse, 6219 wmi_service_per_vdev_chain_support, 6220 wmi_service_new_htt_msg_format, 6221 wmi_service_peer_unmap_cnf_support, 6222 wmi_service_beacon_reception_stats, 6223 wmi_service_vdev_latency_config, 6224 wmi_service_nan_dbs_support, 6225 wmi_service_ndi_dbs_support, 6226 wmi_service_nan_sap_support, 6227 wmi_service_ndi_sap_support, 6228 wmi_service_nan_disable_support, 6229 wmi_service_sta_plus_sta_support, 6230 wmi_service_hw_db2dbm_support, 6231 wmi_service_wlm_stats_support, 6232 wmi_service_ul_ru26_allowed, 6233 wmi_service_cfr_capture_support, 6234 wmi_service_bcast_twt_support, 6235 wmi_service_wpa3_ft_sae_support, 6236 wmi_service_wpa3_ft_suite_b_support, 6237 wmi_service_ft_fils, 6238 wmi_service_adaptive_11r_support, 6239 wmi_service_data_stall_recovery_support, 6240 wmi_service_tx_compl_tsf64, 6241 wmi_service_vdev_delete_all_peer, 6242 wmi_service_three_way_coex_config_legacy, 6243 wmi_service_rx_fse_support, 6244 wmi_service_dynamic_hw_mode, 6245 wmi_service_sae_roam_support, 6246 wmi_service_owe_roam_support, 6247 wmi_service_ext2_msg, 6248 wmi_service_6ghz_support, 6249 wmi_service_bw_165mhz_support, 6250 wmi_service_bw_restricted_80p80_support, 6251 wmi_service_packet_capture_support, 6252 wmi_service_nan_vdev, 6253 wmi_service_multiple_vdev_restart_ext, 6254 wmi_service_peer_delete_no_peer_flush_tids_cmd, 6255 wmi_service_time_sync_ftm, 6256 wmi_service_nss_ratio_to_host_support, 6257 wmi_roam_scan_chan_list_to_host_support, 6258 wmi_beacon_protection_support, 6259 wmi_service_sta_nan_ndi_four_port, 6260 wmi_service_host_scan_stop_vdev_all, 6261 wmi_service_ema_ap_support, 6262 wmi_support_extend_address, 6263 wmi_service_srg_srp_spatial_reuse_support, 6264 wmi_service_suiteb_roam_support, 6265 wmi_service_no_interband_mcc_support, 6266 wmi_service_dual_sta_roam_support, 6267 wmi_service_peer_create_conf, 6268 wmi_service_configure_roam_trigger_param_support, 6269 wmi_service_5dot9_ghz_support, 6270 wmi_service_cfr_ta_ra_as_fp_support, 6271 wmi_service_cfr_capture_count_support, 6272 wmi_service_ocv_support, 6273 wmi_service_ll_stats_per_chan_rx_tx_time, 6274 wmi_service_thermal_multi_client_support, 6275 wmi_service_mbss_param_in_vdev_start_support, 6276 wmi_service_fse_cmem_alloc_support, 6277 #ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION 6278 wmi_service_get_station_in_ll_stats_req, 6279 #endif 6280 wmi_service_scan_conf_per_ch_support, 6281 wmi_service_csa_beacon_template, 6282 wmi_service_twt_bcast_req_support, 6283 wmi_service_twt_bcast_resp_support, 6284 wmi_service_spectral_scan_disabled, 6285 #ifdef WLAN_SUPPORT_TWT 6286 wmi_service_twt_nudge, 6287 wmi_service_all_twt, 6288 wmi_service_twt_statistics, 6289 wmi_service_restricted_twt, 6290 #endif 6291 wmi_service_wapi_concurrency_supported, 6292 wmi_service_sap_connected_d3_wow, 6293 wmi_service_go_connected_d3_wow, 6294 wmi_service_ext_tpc_reg_support, 6295 wmi_service_ndi_txbf_support, 6296 wmi_service_reg_cc_ext_event_support, 6297 wmi_service_bang_radar_320_support, 6298 wmi_service_eirp_preferred_support, 6299 #if defined(CONFIG_BAND_6GHZ) 6300 wmi_service_lower_6g_edge_ch_supp, 6301 wmi_service_disable_upper_6g_edge_ch_supp, 6302 #ifdef CONFIG_AFC_SUPPORT 6303 wmi_service_afc_support, 6304 #endif 6305 #endif 6306 wmi_service_dcs_awgn_int_support, 6307 #ifdef WLAN_FEATURE_IGMP_OFFLOAD 6308 wmi_service_igmp_offload_support, 6309 #endif 6310 #ifdef WLAN_FEATURE_11BE 6311 wmi_service_11be, 6312 #endif 6313 #ifdef WLAN_FEATURE_11AX 6314 #ifdef FEATURE_WLAN_TDLS 6315 wmi_service_tdls_ax_support, 6316 #endif 6317 #endif 6318 #ifdef WLAN_FEATURE_11BE_MLO 6319 #ifdef FEATURE_WLAN_TDLS 6320 wmi_service_tdls_mlo_support, 6321 #endif 6322 #endif 6323 #ifdef WLAN_FEATURE_BIG_DATA_STATS 6324 wmi_service_big_data_support, 6325 #endif 6326 wmi_service_sae_eapol_offload_support, 6327 wmi_service_ampdu_tx_buf_size_256_support, 6328 wmi_service_halphy_cal_enable_disable_support, 6329 wmi_service_halphy_cal_status, 6330 wmi_service_rtt_ap_initiator_staggered_mode_supported, 6331 wmi_service_rtt_ap_initiator_bursted_mode_supported, 6332 wmi_service_ema_multiple_group_supported, 6333 wmi_service_large_beacon_supported, 6334 wmi_service_aoa_for_rcc_supported, 6335 #ifdef WLAN_FEATURE_P2P_P2P_STA 6336 wmi_service_p2p_p2p_cc_support, 6337 #endif 6338 #ifdef THERMAL_STATS_SUPPORT 6339 wmi_service_thermal_stats_temp_range_supported, 6340 #endif 6341 wmi_service_hw_mode_policy_offload_support, 6342 wmi_service_mgmt_rx_reo_supported, 6343 wmi_service_phy_dma_byte_swap_support, 6344 wmi_service_spectral_session_info_support, 6345 wmi_service_umac_hang_recovery_support, 6346 wmi_service_mu_snif, 6347 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE 6348 wmi_service_dynamic_update_vdev_macaddr_support, 6349 #endif 6350 wmi_service_probe_all_bw_support, 6351 wmi_service_pno_scan_conf_per_ch_support, 6352 #ifdef QCA_UNDECODED_METADATA_SUPPORT 6353 wmi_service_fp_phy_err_filter_support, 6354 #endif 6355 #ifdef WLAN_FEATURE_11BE_MLO 6356 wmi_service_mlo_sta_nan_ndi_support, 6357 #endif 6358 wmi_service_pdev_rate_config_support, 6359 wmi_service_multi_peer_group_cmd_support, 6360 #ifdef WLAN_FEATURE_11BE 6361 wmi_service_radar_found_chan_freq_eq_center_freq, 6362 #endif 6363 wmi_service_pn_replay_check_support, 6364 #ifdef QCA_RSSI_DB2DBM 6365 wmi_service_pdev_rssi_dbm_conv_event_support, 6366 #endif 6367 #ifdef WIFI_POS_CONVERGED 6368 wmi_service_rtt_11az_mac_phy_sec_support, 6369 wmi_service_rtt_11az_mac_sec_support, 6370 wmi_service_rtt_11az_ntb_support, 6371 wmi_service_rtt_11az_tb_support, 6372 wmi_service_rtt_11az_tb_rsta_support, 6373 #endif 6374 wmi_service_pktlog_decode_info_support, 6375 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 6376 wmi_service_roam_stats_per_candidate_frame_info, 6377 #endif 6378 #ifdef MULTI_CLIENT_LL_SUPPORT 6379 wmi_service_configure_multi_client_ll_support, 6380 #endif 6381 #ifdef WLAN_VENDOR_HANDOFF_CONTROL 6382 wmi_service_configure_vendor_handoff_control_support, 6383 #endif 6384 #ifdef FEATURE_WLAN_TDLS 6385 #ifdef WLAN_FEATURE_11AX 6386 wmi_service_tdls_6g_support, 6387 #endif 6388 wmi_service_tdls_wideband_support, 6389 wmi_service_tdls_concurrency_support, 6390 #endif 6391 wmi_service_is_my_mgmt_frame, 6392 wmi_service_linkspeed_roam_trigger_support, 6393 #ifdef FEATURE_SET 6394 wmi_service_feature_set_event_support, 6395 #endif 6396 #ifdef WLAN_PDEV_VDEV_SEND_MULTI_PARAM 6397 wmi_service_combined_set_param_support, 6398 #endif 6399 #ifdef WLAN_FEATURE_SR 6400 wmi_service_obss_per_packet_sr_support, 6401 #endif 6402 wmi_service_wpa3_sha384_roam_support, 6403 wmi_service_multiple_vdev_restart_bmap, 6404 wmi_service_v1a_v1b_supported, 6405 wmi_service_self_mld_roam_between_dbs_and_hbs, 6406 wmi_service_cfr_capture_pdev_id_soc, 6407 #ifdef QCA_MANUAL_TRIGGERED_ULOFDMA 6408 wmi_service_manual_ulofdma_trigger_support, 6409 #endif 6410 wmi_service_pre_rx_timeout, 6411 #ifdef QCA_STANDALONE_SOUNDING_TRIGGER 6412 wmi_service_standalone_sound, 6413 #endif 6414 wmi_service_cca_busy_info_for_each_20mhz, 6415 wmi_service_vdev_param_chwidth_with_notify_support, 6416 6417 #ifdef WLAN_FEATURE_11BE_MLO 6418 wmi_service_mlo_tsf_sync, 6419 wmi_service_n_link_mlo_support, 6420 wmi_service_per_link_stats_support, 6421 #endif 6422 wmi_service_aux_mac_support, 6423 #ifdef WLAN_ATF_INCREASED_STA 6424 wmi_service_atf_max_client_512_support, 6425 #endif 6426 wmi_service_fisa_dynamic_msdu_aggr_size_support, 6427 wmi_services_max, 6428 } wmi_conv_service_ids; 6429 #define WMI_SERVICE_UNAVAILABLE 0xFFFF 6430 6431 /** 6432 * enum WMI_DBG_PARAM - Debug params 6433 * @WMI_DBGLOG_LOG_LEVEL: Set the loglevel 6434 * @WMI_DBGLOG_VAP_ENABLE: Enable VAP level debug 6435 * @WMI_DBGLOG_VAP_DISABLE: Disable VAP level debug 6436 * @WMI_DBGLOG_MODULE_ENABLE: Enable MODULE level debug 6437 * @WMI_DBGLOG_MODULE_DISABLE: Disable MODULE level debug 6438 * @WMI_DBGLOG_MOD_LOG_LEVEL: Enable MODULE level debug 6439 * @WMI_DBGLOG_TYPE: set type of the debug output 6440 * @WMI_DBGLOG_REPORT_ENABLE: Enable Disable debug 6441 * @WMI_DBGLOG_MOD_WOW_LOG_LEVEL: set the WOW MODULE debug loglevel 6442 */ 6443 typedef enum { 6444 WMI_DBGLOG_LOG_LEVEL = 0x1, 6445 WMI_DBGLOG_VAP_ENABLE, 6446 WMI_DBGLOG_VAP_DISABLE, 6447 WMI_DBGLOG_MODULE_ENABLE, 6448 WMI_DBGLOG_MODULE_DISABLE, 6449 WMI_DBGLOG_MOD_LOG_LEVEL, 6450 WMI_DBGLOG_TYPE, 6451 WMI_DBGLOG_REPORT_ENABLE, 6452 WMI_DBGLOG_MOD_WOW_LOG_LEVEL 6453 } WMI_DBG_PARAM; 6454 6455 /** 6456 * struct wmi_host_fw_ver - FW version in non-tlv target 6457 * @sw_version: Version info 6458 * @sw_version_1: Second dword of version 6459 */ 6460 struct wmi_host_fw_ver { 6461 uint32_t sw_version; 6462 uint32_t sw_version_1; 6463 }; 6464 6465 /** 6466 * struct wmi_host_fw_abi_ver - FW version in non-tlv target 6467 * @sw_version: Version info 6468 * @abi_version: ABI version 6469 */ 6470 struct wmi_host_fw_abi_ver { 6471 uint32_t sw_version; 6472 uint32_t abi_version; 6473 }; 6474 6475 /** 6476 * enum WMI_HOST_WIFI_STANDARD - Supported wifi standard 6477 * @WMI_HOST_WIFI_STANDARD_4: Wifi standard 4 6478 * @WMI_HOST_WIFI_STANDARD_5:Wifi standard 5 6479 * @WMI_HOST_WIFI_STANDARD_6: Wifi standard 6 6480 * @WMI_HOST_WIFI_STANDARD_6E: Wifi standard 6E 6481 * @WMI_HOST_WIFI_STANDARD_7: Wifi standard 7 6482 */ 6483 typedef enum { 6484 WMI_HOST_WIFI_STANDARD_4 = 0, 6485 WMI_HOST_WIFI_STANDARD_5 = 1, 6486 WMI_HOST_WIFI_STANDARD_6 = 2, 6487 WMI_HOST_WIFI_STANDARD_6E = 3, 6488 WMI_HOST_WIFI_STANDARD_7 = 4, 6489 } WMI_HOST_WIFI_STANDARD; 6490 6491 #ifdef FEATURE_SET 6492 /** 6493 * enum WMI_HOST_BAND_CONCURRENCY - Enum to represent supported concurrency 6494 * @WMI_HOST_BAND_CONCURRENCY_NONE: No concurrency is supported 6495 * @WMI_HOST_BAND_CONCURRENCY_DBS: DBS is supported 6496 * @WMI_HOST_BAND_CONCURRENCY_DBS_SBS: DBS and SBS are supported 6497 */ 6498 typedef enum { 6499 WMI_HOST_BAND_CONCURRENCY_NONE = 0, 6500 WMI_HOST_BAND_CONCURRENCY_DBS = 1, 6501 WMI_HOST_BAND_CONCURRENCY_DBS_SBS = 2, 6502 } WMI_HOST_BAND_CONCURRENCY; 6503 6504 /** 6505 * enum WMI_HOST_VENDOR1_REQ1_VERSION - Vendor 1 requirement 1 version 6506 * @WMI_HOST_VENDOR1_REQ1_VERSION_3_00: Major version 3, minor version 00 6507 * @WMI_HOST_VENDOR1_REQ1_VERSION_3_01: Major version 3, minor version 01 6508 * @WMI_HOST_VENDOR1_REQ1_VERSION_3_20: Major version 3, minor version 20 6509 * @WMI_HOST_VENDOR1_REQ1_VERSION_3_30: Major version 3, minor version 30 6510 * @WMI_HOST_VENDOR1_REQ1_VERSION_3_40: Major version 3, minor version 40 6511 */ 6512 typedef enum { 6513 WMI_HOST_VENDOR1_REQ1_VERSION_3_00 = 0, 6514 WMI_HOST_VENDOR1_REQ1_VERSION_3_01 = 1, 6515 WMI_HOST_VENDOR1_REQ1_VERSION_3_20 = 2, 6516 WMI_HOST_VENDOR1_REQ1_VERSION_3_30 = 3, 6517 WMI_HOST_VENDOR1_REQ1_VERSION_3_40 = 4, 6518 } WMI_HOST_VENDOR1_REQ1_VERSION; 6519 6520 /** 6521 * enum WMI_HOST_VENDOR1_REQ2_VERSION - Vendor 1 requirement 2 version 6522 * @WMI_HOST_VENDOR1_REQ2_VERSION_3_00: Major version 3, minor version 00 6523 * @WMI_HOST_VENDOR1_REQ2_VERSION_3_01: Major version 3, minor version 01 6524 * @WMI_HOST_VENDOR1_REQ2_VERSION_3_20: Major version 3, minor version 20 6525 */ 6526 typedef enum { 6527 WMI_HOST_VENDOR1_REQ2_VERSION_3_00 = 0, 6528 WMI_HOST_VENDOR1_REQ2_VERSION_3_01 = 1, 6529 WMI_HOST_VENDOR1_REQ2_VERSION_3_20 = 2, 6530 } WMI_HOST_VENDOR1_REQ2_VERSION; 6531 6532 /** 6533 * enum WMI_HOST_NUM_ANTENNAS - Number of antennas 6534 * @WMI_HOST_SISO: When 1x1 is supported 6535 * @WMI_HOST_MIMO_2X2: When 2x2 MIMO is supported 6536 */ 6537 6538 typedef enum { 6539 WMI_HOST_SISO = 1, 6540 WMI_HOST_MIMO_2X2 = 2, 6541 } WMI_HOST_NUM_ANTENNAS; 6542 6543 /** 6544 * struct target_feature_set - Feature set structure 6545 * @wifi_standard: Wifi standard 6546 * @concurrency_support: Indicates supported concurrencies 6547 * @pno_in_unassoc_state: Indicates PNO support in un assoc state 6548 * @pno_in_assoc_state: Indicates PNO support in assoc state 6549 * @enable_twt: Enable TWT 6550 * @enable_twt_requester: Enable TWT requester 6551 * @enable_twt_broadcast: Enable TWT broadcast 6552 * @enable_twt_flexible: Enable flexible TWT 6553 * @enable_wifi_optimizer: indicates wifi optimizer is enabled or disabled 6554 * @enable_rfc835: indicates rfc835 is enabled or disabled 6555 * @sap_5g_supported: Indicates SAP 5g is supported or not 6556 * @sap_6g_supported: Indicates SAP 6g is supported or not 6557 * @band_capability: Band capability bit map 6558 * @sap_max_num_clients: Max clients supported by SAP 6559 * @set_country_code_hal_supported: Indicates country code hal supported or not 6560 * @get_valid_channel_supported: Indicates get valid channel supported or not 6561 * @supported_dot11mode: Indicates supported dot11 mode 6562 * @sap_wpa3_support: Indicates wpa3 support for SAP 6563 * @vendor_req_1_version: Indicates vendor1 req1 version 6564 * @roaming_high_cu_roam_trigger: Roaming high CPU trigger enabled or disabled 6565 * @roaming_emergency_trigger: Roaming emergency trigger enabled or disabled 6566 * @roaming_btm_trihgger: Roaming btm trigger enabled or disabled 6567 * @roaming_idle_trigger: Roaming idle trigger enabled or disabled 6568 * @roaming_wtc_trigger: Roaming wtc trigger enabled or disabled 6569 * @roaming_btcoex_trigger: Roaming btcoex trigger enabled or disabled 6570 * @roaming_btw_wpa_wpa2: Roaming btw wpa wpa2 enabled or disabled 6571 * @roaming_manage_chan_list_api: Roaming manage chan list api enabled or 6572 * disabled 6573 * @roaming_adaptive_11r: Roaming adaptive 11r enabled or disabled 6574 * @roaming_ctrl_api_get_set: Roaming ctrl api get set enabled or disabled 6575 * @roaming_ctrl_api_reassoc: Roaming ctrl api reassoc enabled or disabled 6576 * @roaming_ctrl_get_cu: Roaming ctrl get cu enabled or disabled 6577 * @vendor_req_2_version: Vendor requirement version 2 6578 * @assurance_disconnect_reason_api: Assurance disconnect API supported or not 6579 * @frame_pcap_log_mgmt: Frame pcap logging mgmt supported or not 6580 * @frame_pcap_log_ctrl: Frame pcap logging ctrl supported or not 6581 * @frame_pcap_log_data: Frame pcap logging data supported or not 6582 * @security_wpa3_sae_h2e: Security wpa3 sae h2e supported or not 6583 * @security_wpa3_sae_ft: Security wpa3 sae ft supported or not 6584 * @security_wpa3_enterp_suitb: Security wpa3 enterprise suitb supported or not 6585 * @security_wpa3_enterp_suitb_192bit: Security wpa3 enterprise suitb 192bit 6586 * supported or not 6587 * @security_fills_sha_256: Security fills sha 256 supported or not 6588 * @security_fills_sha_384: Security fills sha 384 supported or not 6589 * @security_fills_sha_256_FT: Security fills sha 256 FT supported or not 6590 * @security_fills_sha_384_FT: Security fills sha 384 FT supported or not 6591 * @security_enhanced_open: Security enhanced open supported or not 6592 * @enable_nan: enable NAN 6593 * @enable_tdls: Enable tdls 6594 * @enable_p2p_6e: Enable p2p 6e 6595 * @enable_tdls_offchannel: Enable tdls offchannel 6596 * @enable_tdls_capability_enhance: Enable tdls capability enhance 6597 * @max_tdls_peers: Max tdls peers 6598 * @sta_dual_p2p_support: Indicates sta+p2p+p2p support 6599 * @peer_bigdata_getbssinfo_support: Indicates bigdata getbssinfo support 6600 * @peer_bigdata_assocreject_info_support: Indicates bigdata assoc reject 6601 * info support 6602 * @peer_getstainfo_support: Indicates getstainfo support 6603 * @feature_set_version: Indicates feature set version info 6604 * @num_antennas: Indicates number of antennas supported 6605 * @sta_dump_support: Indicates sta dump info support 6606 */ 6607 struct target_feature_set { 6608 WMI_HOST_WIFI_STANDARD wifi_standard; 6609 WMI_HOST_BAND_CONCURRENCY concurrency_support; 6610 bool pno_in_unassoc_state; 6611 bool pno_in_assoc_state; 6612 bool enable_twt; 6613 bool enable_twt_requester; 6614 bool enable_twt_broadcast; 6615 bool enable_twt_flexible; 6616 bool enable_wifi_optimizer; 6617 bool enable_rfc835; 6618 bool sap_5g_supported; 6619 bool sap_6g_supported; 6620 uint32_t band_capability; 6621 uint8_t sap_max_num_clients; 6622 bool set_country_code_hal_supported; 6623 bool get_valid_channel_supported; 6624 uint8_t supported_dot11mode; 6625 bool sap_wpa3_support; 6626 WMI_HOST_VENDOR1_REQ1_VERSION vendor_req_1_version; 6627 bool roaming_high_cu_roam_trigger; 6628 bool roaming_emergency_trigger; 6629 bool roaming_btm_trihgger; 6630 bool roaming_idle_trigger; 6631 bool roaming_wtc_trigger; 6632 bool roaming_btcoex_trigger; 6633 bool roaming_btw_wpa_wpa2; 6634 bool roaming_manage_chan_list_api; 6635 bool roaming_adaptive_11r; 6636 bool roaming_ctrl_api_get_set; 6637 bool roaming_ctrl_api_reassoc; 6638 bool roaming_ctrl_get_cu; 6639 WMI_HOST_VENDOR1_REQ2_VERSION vendor_req_2_version; 6640 bool assurance_disconnect_reason_api; 6641 bool frame_pcap_log_mgmt; 6642 bool frame_pcap_log_ctrl; 6643 bool frame_pcap_log_data; 6644 bool security_wpa3_sae_h2e; 6645 bool security_wpa3_sae_ft; 6646 bool security_wpa3_enterp_suitb; 6647 bool security_wpa3_enterp_suitb_192bit; 6648 bool security_fills_sha_256; 6649 bool security_fills_sha_384; 6650 bool security_fills_sha_256_FT; 6651 bool security_fills_sha_384_FT; 6652 bool security_enhanced_open; 6653 bool enable_nan; 6654 bool enable_tdls; 6655 bool enable_p2p_6e; 6656 bool enable_tdls_offchannel; 6657 bool enable_tdls_capability_enhance; 6658 uint8_t max_tdls_peers; 6659 bool sta_dual_p2p_support; 6660 bool peer_bigdata_getbssinfo_support; 6661 bool peer_bigdata_assocreject_info_support; 6662 bool peer_getstainfo_support; 6663 uint16_t feature_set_version; 6664 WMI_HOST_NUM_ANTENNAS num_antennas; 6665 bool sta_dump_support; 6666 }; 6667 #endif 6668 6669 /** 6670 * struct target_resource_config - Resource config sent from host to target 6671 * abstracted out to include union of both configs 6672 * @num_vdevs: Number vdevs configured 6673 * @num_peers: Number of peers 6674 * @num_active_peers: Number of active peers for peer cache 6675 * @num_offload_peers: Number of offload peers 6676 * @num_offload_reorder_buffs: number of offload reorder buffs 6677 * @num_peer_keys: number of peer keys 6678 * @num_tids: number of tids 6679 * @ast_skid_limit: AST skid limit 6680 * @tx_chain_mask: TX chain mask 6681 * @rx_chain_mask: RX chain mask 6682 * @rx_timeout_pri: RX reorder timeout per AC 6683 * @rx_decap_mode: RX decap mode 6684 * @scan_max_pending_req: Scan mac pending req 6685 * @bmiss_offload_max_vdev: Beacom miss offload max vdevs 6686 * @roam_offload_max_vdev: Roam offload max vdevs 6687 * @roam_offload_max_ap_profiles: roam offload max ap profiles 6688 * @num_mcast_groups: num mcast groups 6689 * @num_mcast_table_elems: number of macst table elems 6690 * @mcast2ucast_mode: mcast enhance mode 6691 * @tx_dbg_log_size: DBG log buf size 6692 * @num_wds_entries: number of WDS entries 6693 * @dma_burst_size: DMA burst size. 6694 * @mac_aggr_delim: Mac aggr delim 6695 * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host? 6696 * @vow_config: vow configuration 6697 * @gtk_offload_max_vdev: Max vdevs for GTK offload 6698 * @num_msdu_desc: Number of msdu desc 6699 * @max_frag_entries: Max frag entries 6700 * @scheduler_params: 6701 * @agile_capability: Target Agile Capability 6702 * End common 6703 * @enable_pci_gen: To enable pci gen switch 6704 * @max_peer_ext_stats: Max peer EXT stats 6705 * @smart_ant_cap: Smart antenna capabilities 6706 * @BK_Minfree: BIN configuration for BK traffic 6707 * @BE_Minfree: BIN configuration for BE traffic 6708 * @VI_Minfree: BIN configuration for VI traffic 6709 * @VO_Minfree: BIN configuration for VO traffic 6710 * @rx_batchmode: RX batch mode 6711 * @tt_support: Thermal throttling support 6712 * @atf_config: ATF config 6713 * @mgmt_comp_evt_bundle_support: bundle support required for mgmt complete evt 6714 * @tx_msdu_new_partition_id_support: new partiition id support for tx msdu 6715 * @new_htt_msg_format: 6716 * @peer_unmap_conf_support: peer unmap conf support in fw 6717 * @pktcapture_support: 6718 * @iphdr_pad_config: ipheader pad config 6719 * @qwrap_config: Qwrap configuration 6720 * @alloc_frag_desc_for_data_pkt: Frag desc for data 6721 * Added in MCL 6722 * @num_tdls_vdevs: 6723 * @num_tdls_conn_table_entries: 6724 * @beacon_tx_offload_max_vdev: 6725 * @num_multicast_filter_entries: 6726 * @num_wow_filters: 6727 * @num_keep_alive_pattern: 6728 * @keep_alive_pattern_size: 6729 * @max_tdls_concurrent_sleep_sta: 6730 * @max_tdls_concurrent_buffer_sta: 6731 * @wmi_send_separate: 6732 * @num_ocb_vdevs: 6733 * @num_ocb_channels: 6734 * @num_ocb_schedules: 6735 * @num_packet_filters: maximum number of packet filter rules to support 6736 * @num_max_sta_vdevs: maximum number of concurrent station vdevs to support 6737 * @num_ns_ext_tuples_cfg: 6738 * @apf_instruction_size: 6739 * @max_bssid_rx_filters: 6740 * @use_pdev_id: 6741 * @max_num_dbs_scan_duty_cycle: max dbs can duty cycle value 6742 * @cce_disable: disable cce component 6743 * @peer_map_unmap_v2: peer_map_unmap_version: configure peer map/unmap version 6744 * @peer_map_unmap_version: 6745 * @twt_ap_pdev_count: Number of MAC on which AP TWT feature is supported 6746 * @twt_ap_sta_count: Max no of STA with which TWT sessions can be formed 6747 * by the AP 6748 * @max_bssid_indicator: max number of MBSS VAPs 6749 * @eapol_minrate_set: 6750 * @eapol_minrate_ac_set: 6751 * @tstamp64_en: 6752 * @three_way_coex_config_legacy_en: enable three way coex legacy feature 6753 * @max_num_group_keys: max number of group keys supported for VLAN 6754 * @re_ul_resp: enable 11ax UL response feature (UL-OFDMA) for repeater 6755 * @ipa_disable: disable IPA feature 6756 * @ast_1_valid_mask_enable: mask to enable ast index 1 6757 * @ast_2_valid_mask_enable: mask to enable ast index 2 6758 * @ast_3_valid_mask_enable: mask to enable ast index 3 6759 * @ast_0_flow_mask_enable: mask to enable flow support for ast index 0 6760 * @ast_1_flow_mask_enable: mask to enable flow support for ast index 1 6761 * @ast_2_flow_mask_enable: mask to enable flow support for ast index 2 6762 * @ast_3_flow_mask_enable: mask to enable flow support for ast index 3 6763 * @ast_tid_high_mask_enable: enable tid valid mask for high priority flow 6764 * @ast_tid_low_mask_enable: enable tid valid mask for low priority flow 6765 * @nan_separate_iface_support: Separate iface creation for NAN 6766 * @time_sync_ftm: enable ftm based time sync 6767 * @is_reg_cc_ext_event_supported: Flag to indicate if reg_cc_ext is supported 6768 * @is_host_dfs_320mhz_bangradar_supported: Flag to indicate dfs 320 supported 6769 * @max_rnr_neighbours: Max supported RNR neighbors in multisoc APs 6770 * @ema_max_vap_cnt: Number of maximum EMA tx-vaps at any instance of time 6771 * @ema_max_profile_period: Maximum EMA profile periodicity on any pdev 6772 * @max_ndp_sessions: Max ndp sessions support 6773 * @max_ndi: max number of ndi host supports 6774 * @carrier_vow_optimization: configure vow-optimization for carrier-usecase 6775 * @is_sap_connected_d3wow_enabled: is sap d3wow with connected client supported 6776 * @is_go_connected_d3wow_enabled: is go d3wow with connected client supported 6777 * @sae_eapol_offload: 6778 * @dynamic_pcie_gen_speed_change: is dynamic pcie gen speed change enabled 6779 * @twt_ack_support_cap: 6780 * @ema_init_config: 6781 * @target_cap_flags: 6782 * @is_6ghz_sp_pwrmode_supp_enabled: Indicates whether AP is capable of 6783 * operating in SP Power mode in 6GHz. 6784 * 0 - AP can operate in non-SP power mode. 6785 * Eg: LPI mode 6786 * 1 - AP can operate in all power modes, 6787 * inclusive of SP power mode. 6788 * @afc_timer_check_disable: Disables AFC Timer related checks in FW 6789 * @afc_req_id_check_disable: Disables AFC Request ID check in FW 6790 * @afc_indoor_support: AFC support indoor deployment 6791 * @afc_outdoor_support: AFC support outdoor deployment 6792 * @carrier_profile_config: Configuration for per-carrier profile 6793 * @sawf: 6794 * @reo_qdesc_shared_addr_table_enabled: Reo shared qref enhancement enabled 6795 * @num_max_active_vdevs: max number of active virtual devices (VAPs) to 6796 * support 6797 * @num_max_mlo_link_per_ml_bss: number of max partner links of a ML BSS 6798 * @notify_frame_support: capability to mark notify frames from host 6799 * @dp_peer_meta_data_ver: datapath peer meta data version flag 6800 * @tx_ilp_enable: capability to support TX ILP from host 6801 * @rf_path: Indicates RF path 0 primary, 1 secondary 6802 * @fw_ast_indication_disable: Disable AST indication 6803 */ 6804 typedef struct { 6805 uint32_t num_vdevs; 6806 uint32_t num_peers; 6807 uint32_t num_active_peers; 6808 uint32_t num_offload_peers; 6809 uint32_t num_offload_reorder_buffs; 6810 uint32_t num_peer_keys; 6811 uint32_t num_tids; 6812 uint32_t ast_skid_limit; 6813 uint32_t tx_chain_mask; 6814 uint32_t rx_chain_mask; 6815 uint32_t rx_timeout_pri[4]; 6816 uint32_t rx_decap_mode; 6817 uint32_t scan_max_pending_req; 6818 uint32_t bmiss_offload_max_vdev; 6819 uint32_t roam_offload_max_vdev; 6820 uint32_t roam_offload_max_ap_profiles; 6821 uint32_t num_mcast_groups; 6822 uint32_t num_mcast_table_elems; 6823 uint32_t mcast2ucast_mode; 6824 uint32_t tx_dbg_log_size; 6825 uint32_t num_wds_entries; 6826 uint32_t dma_burst_size; 6827 uint32_t mac_aggr_delim; 6828 uint32_t rx_skip_defrag_timeout_dup_detection_check; 6829 uint32_t vow_config; 6830 uint32_t gtk_offload_max_vdev; 6831 uint32_t num_msdu_desc; /* Number of msdu desc */ 6832 uint32_t max_frag_entries; 6833 uint32_t scheduler_params; 6834 uint32_t agile_capability; 6835 uint32_t enable_pci_gen; 6836 /* End common */ 6837 6838 /* Added for Beeliner */ 6839 uint32_t max_peer_ext_stats; 6840 uint32_t smart_ant_cap; 6841 uint32_t BK_Minfree; 6842 uint32_t BE_Minfree; 6843 uint32_t VI_Minfree; 6844 uint32_t VO_Minfree; 6845 uint32_t rx_batchmode; 6846 uint32_t tt_support; 6847 uint32_t atf_config:1, 6848 mgmt_comp_evt_bundle_support:1, 6849 tx_msdu_new_partition_id_support:1, 6850 new_htt_msg_format:1, 6851 peer_unmap_conf_support:1, 6852 pktcapture_support:1; 6853 uint32_t iphdr_pad_config; 6854 uint32_t 6855 qwrap_config:16, 6856 alloc_frag_desc_for_data_pkt:16; 6857 6858 /* Added in MCL */ 6859 uint32_t num_tdls_vdevs; 6860 uint32_t num_tdls_conn_table_entries; 6861 uint32_t beacon_tx_offload_max_vdev; 6862 uint32_t num_multicast_filter_entries; 6863 uint32_t num_wow_filters; 6864 uint32_t num_keep_alive_pattern; 6865 uint32_t keep_alive_pattern_size; 6866 uint32_t max_tdls_concurrent_sleep_sta; 6867 uint32_t max_tdls_concurrent_buffer_sta; 6868 uint32_t wmi_send_separate; 6869 uint32_t num_ocb_vdevs; 6870 uint32_t num_ocb_channels; 6871 uint32_t num_ocb_schedules; 6872 uint32_t num_packet_filters; 6873 uint32_t num_max_sta_vdevs; 6874 uint32_t num_ns_ext_tuples_cfg; 6875 uint32_t apf_instruction_size; 6876 uint32_t max_bssid_rx_filters; 6877 uint32_t use_pdev_id; 6878 uint32_t max_num_dbs_scan_duty_cycle; 6879 bool cce_disable; 6880 union { 6881 bool peer_map_unmap_v2; 6882 uint8_t peer_map_unmap_version; 6883 }; 6884 uint32_t twt_ap_pdev_count; 6885 uint32_t twt_ap_sta_count; 6886 uint32_t max_bssid_indicator; 6887 uint32_t eapol_minrate_set:1, 6888 eapol_minrate_ac_set:2; 6889 bool tstamp64_en; 6890 bool three_way_coex_config_legacy_en; 6891 uint32_t max_num_group_keys; 6892 uint32_t re_ul_resp; 6893 bool ipa_disable; 6894 uint32_t ast_1_valid_mask_enable:1, 6895 ast_2_valid_mask_enable:1, 6896 ast_3_valid_mask_enable:1; 6897 uint32_t ast_0_flow_mask_enable:4, 6898 ast_1_flow_mask_enable:4, 6899 ast_2_flow_mask_enable:4, 6900 ast_3_flow_mask_enable:4, 6901 ast_tid_high_mask_enable:8, 6902 ast_tid_low_mask_enable:8; 6903 bool nan_separate_iface_support; 6904 bool time_sync_ftm; 6905 bool is_reg_cc_ext_event_supported; 6906 bool is_host_dfs_320mhz_bangradar_supported; 6907 uint32_t max_rnr_neighbours; 6908 uint32_t ema_max_vap_cnt; 6909 uint32_t ema_max_profile_period; 6910 uint32_t max_ndp_sessions; 6911 uint32_t max_ndi; 6912 bool carrier_vow_optimization; 6913 uint32_t is_sap_connected_d3wow_enabled; 6914 uint32_t is_go_connected_d3wow_enabled; 6915 bool sae_eapol_offload; 6916 bool dynamic_pcie_gen_speed_change; 6917 bool twt_ack_support_cap; 6918 uint32_t ema_init_config; 6919 uint32_t target_cap_flags; 6920 bool is_6ghz_sp_pwrmode_supp_enabled; 6921 bool afc_timer_check_disable; 6922 bool afc_req_id_check_disable; 6923 bool afc_indoor_support; 6924 bool afc_outdoor_support; 6925 uint32_t carrier_profile_config; 6926 bool sawf; 6927 bool reo_qdesc_shared_addr_table_enabled; 6928 uint32_t num_max_active_vdevs; 6929 uint32_t num_max_mlo_link_per_ml_bss; 6930 uint8_t notify_frame_support; 6931 uint8_t dp_peer_meta_data_ver; 6932 #ifdef DP_TX_PACKET_INSPECT_FOR_ILP 6933 uint8_t tx_ilp_enable; 6934 #endif 6935 bool rf_path; 6936 bool fw_ast_indication_disable; 6937 } target_resource_config; 6938 6939 /** 6940 * enum WMI_HOST_START_EVENT_PARAM - Enum replicated for host abstraction 6941 * with FW 6942 * @WMI_HOST_VDEV_START_RESP_EVENT: Event response of START CMD 6943 * @WMI_HOST_VDEV_RESTART_RESP_EVENT: Event response of RESTART CMD 6944 */ 6945 typedef enum { 6946 /* Event response of START CMD */ 6947 WMI_HOST_VDEV_START_RESP_EVENT = 0, 6948 /* Event response of RESTART CMD */ 6949 WMI_HOST_VDEV_RESTART_RESP_EVENT, 6950 } WMI_HOST_START_EVENT_PARAM; 6951 6952 /** 6953 * struct wmi_host_roam_event - host roam event param 6954 * @vdev_id: vdev id 6955 * @reason: roam reason 6956 * @rssi: RSSI 6957 */ 6958 typedef struct { 6959 uint32_t vdev_id; 6960 uint32_t reason; 6961 uint32_t rssi; 6962 } wmi_host_roam_event; 6963 6964 /** 6965 * enum wmi_host_scan_event_type - Scan event type 6966 * @WMI_HOST_SCAN_EVENT_STARTED: 6967 * @WMI_HOST_SCAN_EVENT_COMPLETED: 6968 * @WMI_HOST_SCAN_EVENT_BSS_CHANNEL: 6969 * @WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL: 6970 * @WMI_HOST_SCAN_EVENT_DEQUEUED: 6971 * @WMI_HOST_SCAN_EVENT_PREEMPTED: 6972 * @WMI_HOST_SCAN_EVENT_START_FAILED: 6973 * @WMI_HOST_SCAN_EVENT_RESTARTED: 6974 * @WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT: 6975 * @WMI_HOST_SCAN_EVENT_INVALID: 6976 * @WMI_HOST_SCAN_EVENT_GPIO_TIMEOUT: 6977 * @WMI_HOST_SCAN_EVENT_MAX: 6978 */ 6979 enum wmi_host_scan_event_type { 6980 WMI_HOST_SCAN_EVENT_STARTED = 0x1, 6981 WMI_HOST_SCAN_EVENT_COMPLETED = 0x2, 6982 WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4, 6983 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, 6984 WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10, 6985 WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20, 6986 WMI_HOST_SCAN_EVENT_START_FAILED = 0x40, 6987 WMI_HOST_SCAN_EVENT_RESTARTED = 0x80, 6988 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100, 6989 WMI_HOST_SCAN_EVENT_INVALID = 0x200, 6990 WMI_HOST_SCAN_EVENT_GPIO_TIMEOUT = 0x400, 6991 WMI_HOST_SCAN_EVENT_MAX = 0x8000 6992 }; 6993 6994 /** 6995 * enum wmi_host_scan_completion_reason - Scan completion event type 6996 * @WMI_HOST_SCAN_REASON_NONE: 6997 * @WMI_HOST_SCAN_REASON_COMPLETED: 6998 * @WMI_HOST_SCAN_REASON_CANCELLED: 6999 * @WMI_HOST_SCAN_REASON_PREEMPTED: 7000 * @WMI_HOST_SCAN_REASON_TIMEDOUT: 7001 * @WMI_HOST_SCAN_REASON_INTERNAL_FAILURE: 7002 * @WMI_HOST_SCAN_REASON_MAX: 7003 */ 7004 enum wmi_host_scan_completion_reason { 7005 WMI_HOST_SCAN_REASON_NONE = 0xFF, 7006 WMI_HOST_SCAN_REASON_COMPLETED = 0, 7007 WMI_HOST_SCAN_REASON_CANCELLED = 1, 7008 WMI_HOST_SCAN_REASON_PREEMPTED = 2, 7009 WMI_HOST_SCAN_REASON_TIMEDOUT = 3, 7010 WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4, 7011 WMI_HOST_SCAN_REASON_MAX, 7012 }; 7013 7014 /** 7015 * struct wmi_host_scan_event - Scan event response from target 7016 * @event: event type 7017 * @reason: Reason for event 7018 * @channel_freq: channel frequency 7019 * @requestor: requestor id 7020 * @scan_id: scan id 7021 * @vdev_id: vdev id 7022 */ 7023 typedef struct { 7024 uint32_t event; 7025 uint32_t reason; 7026 uint32_t channel_freq; 7027 uint32_t requestor; 7028 uint32_t scan_id; 7029 uint32_t vdev_id; 7030 } wmi_host_scan_event; 7031 7032 /** 7033 * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry 7034 * @result: result 7035 */ 7036 typedef struct { 7037 uint32_t result; 7038 } wmi_host_pdev_reserve_ast_entry_event; 7039 7040 /** 7041 * struct wmi_host_mcast_ageout_entry - mcast aged-out entry 7042 * @grp_addr: IPv4/6 mcast group addr 7043 * @vdev_id: vdev id 7044 */ 7045 typedef struct { 7046 uint8_t grp_addr[16]; 7047 uint32_t vdev_id; 7048 } wmi_host_mcast_ageout_entry; 7049 7050 /** 7051 * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out 7052 * @num_entry: Number of mcast entries timed-out 7053 * @entry: List of wmi_host_mcast_ageout_entry 7054 */ 7055 typedef struct { 7056 uint32_t num_entry; 7057 wmi_host_mcast_ageout_entry entry[1]; 7058 } wmi_host_mcast_list_ageout_event; 7059 7060 /** 7061 * enum wmi_host_pdev_tpc_event_offset: offsets of TPC events 7062 * @WMI_HOST_TX_POWER_MAX: offset of max tx power 7063 * @WMI_HOST_TX_POWER_MIN: offset of min tx power 7064 * @WMI_HOST_TX_POWER_LEN: size of tpc values 7065 */ 7066 enum wmi_host_pdev_tpc_event_offset { 7067 WMI_HOST_TX_POWER_MAX, 7068 WMI_HOST_TX_POWER_MIN, 7069 WMI_HOST_TX_POWER_LEN, 7070 }; 7071 7072 /** 7073 * struct wmi_host_pdev_generic_buffer_event 7074 * @buf_type: Buffer type 7075 * @frag_id: Frag id 7076 * @more_frag: more frags pending 7077 * @buf_len: buffer length 7078 * @buf_info: variable length buffer 7079 */ 7080 typedef struct { 7081 uint32_t buf_type; 7082 uint32_t frag_id; 7083 uint32_t more_frag; 7084 uint32_t buf_len; 7085 uint32_t buf_info[1]; 7086 } wmi_host_pdev_generic_buffer_event; 7087 7088 /** 7089 * enum WMI_HOST_BUFFER_TYPE - Enum for host buffer event 7090 * @WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE: 7091 * @WMI_HOST_BUFFER_TYPE_CTL_TABLE: 7092 */ 7093 enum WMI_HOST_BUFFER_TYPE { 7094 WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE, 7095 WMI_HOST_BUFFER_TYPE_CTL_TABLE, 7096 }; 7097 7098 /** 7099 * enum WMI_HOST_TPC_CONFIG_EVENT_FLAG - Enums for TPC event 7100 * @WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD: 7101 * @WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC: 7102 * @WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF: 7103 */ 7104 typedef enum { 7105 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, 7106 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, 7107 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, 7108 } WMI_HOST_TPC_CONFIG_EVENT_FLAG; 7109 7110 /** 7111 * enum WMI_HOST_MU_ALGO_TYPE - Medium Utilization evaluation algorithms 7112 * These algorithms can be complementary rather than exclusive. 7113 * @WMI_HOST_MU_BASIC_ALGO: 7114 * @WMI_HOST_MU_PER_BSSID_ALGO: 7115 * @WMI_HOST_MU_HIDDEN_NODE_ALGO: 7116 */ 7117 typedef enum { 7118 WMI_HOST_MU_BASIC_ALGO = 0x1, 7119 WMI_HOST_MU_PER_BSSID_ALGO = 0x2, 7120 WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4, 7121 } WMI_HOST_MU_ALGO_TYPE; 7122 /* max MU alg combinations supported by target */ 7123 #define WMI_HOST_MU_MAX_ALGO_TYPE 3 7124 7125 /** 7126 * struct wmi_host_mu_db_entry 7127 * @entry_type: 0=AP, 1=STA, 2=Small Cell(SC) 7128 * @bssid_mac_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC 7129 * @tx_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC 7130 * @avg_duration_us: Avg. duration for which node was transmitting 7131 * @avg_rssi: Avg. RSSI of all TX packets by node. Unit dBm 7132 * @mu_percent: % medium utilization by node 7133 */ 7134 typedef struct { 7135 uint32_t entry_type; 7136 wmi_host_mac_addr bssid_mac_addr; 7137 wmi_host_mac_addr tx_addr; 7138 uint32_t avg_duration_us; 7139 uint32_t avg_rssi; 7140 uint32_t mu_percent; 7141 } wmi_host_mu_db_entry; 7142 7143 /** 7144 * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID 7145 * @mu_request_id: request id 7146 * @status_reason: MU_STATUS_REASON 7147 * @total_mu: MU_ALG_TYPE combinations 7148 * @num_active_bssid: number of active bssid 7149 * @hidden_node_mu : hidden node algo MU per bin 7150 * @num_TA_entries : No. of entries found in MU db report 7151 */ 7152 typedef struct { 7153 uint32_t mu_request_id; 7154 uint32_t status_reason; 7155 uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE]; 7156 uint32_t num_active_bssid; 7157 uint32_t hidden_node_mu[LTEU_MAX_BINS]; 7158 uint32_t num_TA_entries; 7159 } wmi_host_mu_report_event; 7160 7161 #define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17 7162 7163 /** 7164 * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event 7165 * @type_count: Absence count 7166 * @duration: NoA duration 7167 * @interval: NoA interval 7168 * @start_time: start time 7169 */ 7170 typedef struct { 7171 uint32_t type_count; 7172 uint32_t duration; 7173 uint32_t interval; 7174 uint32_t start_time; 7175 } wmi_host_p2p_noa_descriptor; 7176 7177 /* Maximum CCK, OFDM rates supported */ 7178 #define WMI_SA_MAX_CCK_OFDM_RATES 12 7179 /* Maximum MCS rates supported; 4 rates in each dword */ 7180 /* Maximum MCS ratecodes with 11ax */ 7181 #define WMI_SA_MAX_MCS_RATES 96 7182 /* Maximum ratecode per BW supported legacy, 20, 40, 80, 160 and 320 MHz */ 7183 #define WMI_SA_MAX_RATE_COUNTERS 6 7184 /* Maximum rate series used for transmission */ 7185 #define SA_MAX_RATE_SERIES 2 7186 7187 #define SA_MAX_LEGACY_RATE_DWORDS 3 7188 #define SA_MAX_HT_RATE_DWORDS 10 7189 #define SA_BYTES_IN_DWORD 4 7190 #define SA_MASK_BYTE 0xff 7191 #define SA_MASK_BYTE3 0xff0000 7192 7193 /* Support 11ax 11bit ratecode */ 7194 #define SA_MASK_RCODE 0x7ff 7195 #define SA_WORD_BITS_LEN 16 7196 #define SA_WORDS_IN_DWORD 2 7197 #define SA_MAX_LEGACY_RATE_WORDS 6 7198 #define SA_MAX_HT_RATE_WORDS 48 7199 7200 #define SA_INVALID_PARAM_VALUE 0xffff 7201 /* Mask to check PER threshold */ 7202 #define SA_MASK_PER_TH 0xff 7203 /* Mask to check Minimum packets for Smart Antenna Training */ 7204 #define SA_MASK_MIN_PKTS 0xffff 7205 7206 /** 7207 * struct wmi_sa_rate_cap - smart antenna rat capabilities 7208 * @pdev_id: pdev_id 7209 * @ratecode_legacy: Rate code array for CCK OFDM 7210 * @ratecode_20: Rate code array for 20 MHz BW 7211 * @ratecode_40: Rate code array for 40 MHz BW 7212 * @ratecode_80: Rate code array for 80 MHz BW 7213 * @ratecode_160: Rate code array for 160 MHz BW 7214 * @ratecode_320: Rate code array for 320 MHz BW 7215 * @ratecount: Max Rate count for each mode 7216 */ 7217 typedef struct { 7218 uint16_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES]; 7219 uint16_t ratecode_20[WMI_SA_MAX_MCS_RATES]; 7220 uint16_t ratecode_40[WMI_SA_MAX_MCS_RATES]; 7221 uint16_t ratecode_80[WMI_SA_MAX_MCS_RATES]; 7222 uint16_t ratecode_160[WMI_SA_MAX_MCS_RATES]; 7223 uint16_t ratecode_320[WMI_SA_MAX_MCS_RATES]; 7224 uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS]; 7225 } wmi_sa_rate_cap; 7226 7227 /** Preamble types to be used with VDEV fixed rate configuration */ 7228 typedef enum { 7229 WMI_HOST_RATE_PREAMBLE_OFDM, 7230 WMI_HOST_RATE_PREAMBLE_CCK, 7231 WMI_HOST_RATE_PREAMBLE_HT, 7232 WMI_HOST_RATE_PREAMBLE_VHT, 7233 WMI_HOST_RATE_PREAMBLE_HE, 7234 #ifdef WLAN_FEATURE_11BE 7235 WMI_HOST_RATE_PREAMBLE_EHT, 7236 #endif 7237 } WMI_HOST_RATE_PREAMBLE; 7238 7239 #define WMI_HOST_FIXED_RATE_NONE (0xff) 7240 7241 /** preablbe long */ 7242 #define WMI_HOST_VDEV_PREAMBLE_LONG 0x1 7243 /** preablbe short */ 7244 #define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2 7245 /** found a better AP */ 7246 #define WMI_HOST_ROAM_REASON_BETTER_AP 0x1 7247 /** beacon miss detected */ 7248 #define WMI_HOST_ROAM_REASON_BMISS 0x2 7249 /** deauth/disassoc received */ 7250 #define WMI_HOST_ROAM_REASON_DEAUTH 0x2 7251 /** connected AP's low rssi condition detected */ 7252 #define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3 7253 /** found another AP that matches SSID and Security profile in 7254 * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS 7255 */ 7256 #define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4 7257 /** LFR3.0 roaming failed, indicate the disconnection to host */ 7258 #define WMI_HOST_ROAM_REASON_HO_FAILED 0x5 7259 7260 /** values for vdev_type */ 7261 #define WMI_HOST_VDEV_TYPE_AP 0x1 7262 #define WMI_HOST_VDEV_TYPE_STA 0x2 7263 #define WMI_HOST_VDEV_TYPE_IBSS 0x3 7264 #define WMI_HOST_VDEV_TYPE_MONITOR 0x4 7265 7266 /** values for vdev_subtype */ 7267 #define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1 7268 #define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2 7269 #define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3 7270 #define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4 7271 #define WMI_HOST_VDEV_SUBTYPE_MESH 0x5 7272 7273 #define WMI_HOST_MGMT_TID 17 7274 /* Disable aging & learning */ 7275 #define WMI_HOST_WDS_FLAG_STATIC 0x1 7276 7277 #ifdef ENABLE_HOST_TO_TARGET_CONVERSION 7278 #define PEER_PARAM(name) WMI_HOST_ ## name 7279 #else 7280 #define PEER_PARAM(name) WMI_HOST_ ## name = WMI_ ## name 7281 #endif /* ENABLE_HOST_TO_TARGET_CONVERSION */ 7282 7283 /* 7284 * Peer param enum abstracted from target 7285 * @WMI_HOST_PEER_MIMO_PS_STATE: mimo powersave state 7286 * @WMI_HOST_PEER_AMPDU: enable/disable AMPDU . initial value (enabled) 7287 * @WMI_HOST_PEER_AUTHORIZE: authorize/unauthorize peer. 7288 * initial value is unauthorized (0) 7289 * @WMI_HOST_PEER_CHWIDTH: Peer channel bandwidth 7290 * @WMI_HOST_PEER_NSS: peer NSS 7291 * @WMI_HOST_PEER_USE_4ADDR: USE 4 ADDR 7292 * @WMI_HOST_PEER_EXT_STATS_ENABLE: Enable extended peer stats 7293 * NON-TLV special 7294 * @WMI_HOST_PEER_USE_FIXED_PWR: Use FIXED Pwr, 7295 * @WMI_HOST_PEER_PARAM_FIXED_RATE: Set peer fixed rate 7296 * @WMI_HOST_PEER_SET_MU_ALLOWLIST: Allowlist peer TIDs 7297 * @WMI_HOST_PEER_MEMBERSHIP: set group membership status 7298 * @WMI_HOST_PEER_USERPOS: User POS 7299 * @WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED: Critical Protocol Hint enabled 7300 * @WMI_HOST_PEER_TX_FAIL_CNT_THR: Tx Fail count threshold 7301 * @WMI_HOST_PEER_SET_HW_RETRY_CTS2S: Set hardware retry CTS to self 7302 * @WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH: IBSS ATIM window length 7303 * @WMI_HOST_PEER_PHYMODE: Peer Phymode 7304 * @WMI_HOST_PEER_SET_MAX_TX_RATE: Set MAX Tx rate 7305 * @WMI_HOST_PEER_SET_DEFAULT_ROUTING: Set default Rx routing 7306 * @WMI_HOST_PEER_SET_MIN_TX_RATE: Set Minimum T rate 7307 * @WMI_HOST_PEER_NSS_VHT160: peer NSS for 160Mhz 7308 * @WMI_HOST_PEER_NSS_VHT80_80: peer NSS for 80+80MHz 7309 * @WMI_HOST_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL: Set SU sounding interval 7310 * @WMI_HOST_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL: Set MU sounding interval 7311 * @WMI_HOST_PEER_PARAM_TXBF_SOUNDING_ENABLE: Enable sounding interval set 7312 * @WMI_HOST_PEER_PARAM_MU_ENABLE: Enable MU support 7313 * @WMI_HOST_PEER_PARAM_OFDMA_ENABLE: Enable OFDMA support 7314 * @WMI_HOST_PEER_PARAM_ENABLE_FT: Notify FT roam 7315 * @WMI_HOST_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP: Peer channel bandwidth and 7316 * puncture bitmap 7317 * @WMI_HOST_PEER_FT_ROAMING_PEER_UPDATE: Reset PN value on 7318 * every roam event 7319 */ 7320 enum { 7321 PEER_PARAM(PEER_MIMO_PS_STATE), 7322 PEER_PARAM(PEER_AMPDU), 7323 PEER_PARAM(PEER_AUTHORIZE), 7324 PEER_PARAM(PEER_CHWIDTH), 7325 PEER_PARAM(PEER_NSS), 7326 PEER_PARAM(PEER_USE_4ADDR), 7327 #if defined(WMI_NON_TLV_SUPPORT) || defined(WMI_TLV_AND_NON_TLV_SUPPORT) 7328 PEER_PARAM(PEER_EXT_STATS_ENABLE), 7329 #endif 7330 PEER_PARAM(PEER_USE_FIXED_PWR), 7331 PEER_PARAM(PEER_PARAM_FIXED_RATE), 7332 PEER_PARAM(PEER_SET_MU_ALLOWLIST), 7333 PEER_PARAM(PEER_MEMBERSHIP), 7334 PEER_PARAM(PEER_USERPOS), 7335 PEER_PARAM(PEER_CRIT_PROTO_HINT_ENABLED), 7336 PEER_PARAM(PEER_TX_FAIL_CNT_THR), 7337 PEER_PARAM(PEER_SET_HW_RETRY_CTS2S), 7338 PEER_PARAM(PEER_IBSS_ATIM_WINDOW_LENGTH), 7339 PEER_PARAM(PEER_PHYMODE), 7340 PEER_PARAM(PEER_SET_MAX_TX_RATE), 7341 PEER_PARAM(PEER_SET_DEFAULT_ROUTING), 7342 PEER_PARAM(PEER_SET_MIN_TX_RATE), 7343 PEER_PARAM(PEER_NSS_VHT160), 7344 PEER_PARAM(PEER_NSS_VHT80_80), 7345 PEER_PARAM(PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL), 7346 PEER_PARAM(PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL), 7347 PEER_PARAM(PEER_PARAM_TXBF_SOUNDING_ENABLE), 7348 PEER_PARAM(PEER_PARAM_MU_ENABLE), 7349 PEER_PARAM(PEER_PARAM_OFDMA_ENABLE), 7350 PEER_PARAM(PEER_PARAM_ENABLE_FT), 7351 PEER_PARAM(PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP), 7352 PEER_PARAM(PEER_FT_ROAMING_PEER_UPDATE), 7353 7354 }; 7355 #define WMI_HOST_PEER_MIMO_PS_NONE 0x0 7356 #define WMI_HOST_PEER_MIMO_PS_STATIC 0x1 7357 #define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2 7358 typedef enum { 7359 HOST_PLATFORM_HIGH_PERF, 7360 HOST_PLATFORM_LOW_PERF, 7361 HOST_PLATFORM_LOW_PERF_NO_FETCH, 7362 } HOST_PLATFORM_TYPE; 7363 7364 enum wmi_host_sta_ps_mode { 7365 /** enable power save for the given STA VDEV */ 7366 WMI_HOST_STA_PS_MODE_DISABLED = 0, 7367 /** disable power save for a given STA VDEV */ 7368 WMI_HOST_STA_PS_MODE_ENABLED = 1, 7369 }; 7370 enum wmi_host_sta_powersave_param { 7371 /** 7372 * Controls how frames are retrievd from AP while STA is sleeping 7373 * 7374 * (see enum wmi_sta_ps_param_rx_wake_policy) 7375 */ 7376 WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0, 7377 7378 /** 7379 * The STA will go active after this many TX 7380 * 7381 * (see enum wmi_sta_ps_param_tx_wake_threshold) 7382 */ 7383 WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1, 7384 7385 /** 7386 * Number of PS-Poll to send before STA wakes up 7387 * 7388 * (see enum wmi_sta_ps_param_pspoll_count) 7389 * 7390 */ 7391 WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2, 7392 7393 /** 7394 * TX/RX inactivity time in msec before going to sleep. 7395 * 7396 * The power save SM will monitor tx/rx activity on the VDEV, if no 7397 * activity for the specified msec of the parameter 7398 * the Power save SM will go to sleep. 7399 */ 7400 WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3, 7401 7402 /** 7403 * Set uapsd configuration. 7404 * 7405 * (see enum wmi_sta_ps_param_uapsd) 7406 */ 7407 WMI_HOST_STA_PS_PARAM_UAPSD = 4, 7408 }; 7409 /* prefix used by scan requestor ids on the host 7410 * replicated here form wmi_unified.h*/ 7411 #define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000 7412 /* prefix used by scan request ids generated on the host */ 7413 /* host cycles through the lower 12 bits to generate ids */ 7414 #define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000 7415 7416 #define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */ 7417 #define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */ 7418 #define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */ 7419 #define WMI_HOST_RC_HT_FLAG 0x08 /* HT */ 7420 #define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */ 7421 #define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */ 7422 #define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */ 7423 #define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */ 7424 #define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */ 7425 #define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */ 7426 #define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */ 7427 7428 /** HT Capabilities*/ 7429 #define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ 7430 /* Short Guard Interval with HT20 */ 7431 #define WMI_HOST_HT_CAP_HT20_SGI 0x0002 7432 #define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */ 7433 #define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */ 7434 #define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3 7435 #define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */ 7436 #define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4 7437 #define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */ 7438 #define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */ 7439 #define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ 7440 #define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 7441 #define WMI_HOST_HT_CAP_HT40_SGI 0x0800 7442 #define WMI_HOST_HT_CAP_RX_LDPC 0x1000 7443 #define WMI_HOST_HT_CAP_TX_LDPC 0x2000 7444 #define WMI_HOST_HT_CAP_IBF_BFER 0x4000 7445 7446 /* These macros should be used when we wish to advertise STBC support for 7447 * only 1SS or 2SS or 3SS. */ 7448 #define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */ 7449 #define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */ 7450 #define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */ 7451 7452 7453 #define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \ 7454 WMI_HOST_HT_CAP_HT20_SGI | \ 7455 WMI_HOST_HT_CAP_HT40_SGI | \ 7456 WMI_HOST_HT_CAP_TX_STBC | \ 7457 WMI_HOST_HT_CAP_RX_STBC | \ 7458 WMI_HOST_HT_CAP_LDPC) 7459 7460 /* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information 7461 field. The fields not defined here are not supported, or reserved. 7462 Do not change these masks and if you have to add new one follow the 7463 bitmask as specified by 802.11ac draft. 7464 */ 7465 7466 #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003 7467 #define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010 7468 #define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020 7469 #define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040 7470 #define WMI_HOST_VHT_CAP_TX_STBC 0x00000080 7471 #define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300 7472 #define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8 7473 #define WMI_HOST_VHT_CAP_SU_BFER 0x00000800 7474 #define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000 7475 #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000 7476 #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13 7477 #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000 7478 #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16 7479 #define WMI_HOST_VHT_CAP_MU_BFER 0x00080000 7480 #define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000 7481 #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000 7482 #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23 7483 #define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000 7484 #define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000 7485 7486 #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002 7487 7488 /* These macros should be used when we wish to advertise STBC support for 7489 * only 1SS or 2SS or 3SS. */ 7490 #define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100 7491 #define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200 7492 #define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300 7493 7494 #define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \ 7495 WMI_HOST_VHT_CAP_SGI_80MHZ | \ 7496 WMI_HOST_VHT_CAP_TX_STBC | \ 7497 WMI_HOST_VHT_CAP_RX_STBC_MASK | \ 7498 WMI_HOST_VHT_CAP_RX_LDPC | \ 7499 WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \ 7500 WMI_HOST_VHT_CAP_RX_FIXED_ANT | \ 7501 WMI_HOST_VHT_CAP_TX_FIXED_ANT) 7502 7503 /* Interested readers refer to Rx/Tx MCS Map definition as defined in 7504 802.11ac 7505 */ 7506 #define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1)) 7507 #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 7508 #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 7509 7510 /** U-APSD configuration of peer station from (re)assoc request and TSPECs */ 7511 enum wmi_host_ap_ps_param_uapsd { 7512 WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), 7513 WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), 7514 WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), 7515 WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), 7516 WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), 7517 WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), 7518 WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), 7519 WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), 7520 }; 7521 /** U-APSD maximum service period of peer station */ 7522 enum wmi_host_ap_ps_peer_param_max_sp { 7523 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, 7524 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1, 7525 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2, 7526 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3, 7527 7528 /* keep last! */ 7529 MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP, 7530 }; 7531 7532 #define WMI_HOST_UAPSD_AC_TYPE_DELI 0 7533 #define WMI_HOST_UAPSD_AC_TYPE_TRIG 1 7534 7535 #define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \ 7536 ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\ 7537 (1<<((ac<<1)+1))) 7538 7539 enum wmi_host_ap_ps_peer_param_wnm_sleep { 7540 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE, 7541 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE, 7542 }; 7543 7544 enum wmi_host_ap_ps_peer_param { 7545 /** Set uapsd configuration for a given peer. 7546 * 7547 * This will include the delivery and trigger enabled state for every AC. 7548 * The host MLME needs to set this based on AP capability and stations 7549 * request Set in the association request received from the station. 7550 * 7551 * Lower 8 bits of the value specify the UAPSD configuration. 7552 * 7553 * (see enum wmi_ap_ps_param_uapsd) 7554 * The default value is 0. 7555 */ 7556 WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0, 7557 7558 /** 7559 * Set the service period for a UAPSD capable station 7560 * 7561 * The service period from wme ie in the (re)assoc request frame. 7562 * 7563 * (see enum wmi_ap_ps_peer_param_max_sp) 7564 */ 7565 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1, 7566 7567 /** Time in seconds for aging out buffered frames 7568 * for STA in power save */ 7569 WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, 7570 7571 /** Specify frame types that are considered SIFS 7572 * RESP trigger frame */ 7573 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3, 7574 7575 /** Specifies the trigger state of TID. 7576 * Valid only for UAPSD frame type */ 7577 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4, 7578 7579 /** Specifies the WNM sleep state of a STA */ 7580 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5, 7581 }; 7582 #define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */ 7583 #define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ 7584 #define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */ 7585 #define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */ 7586 #define WMI_HOST_RXERR_PN 0x80 /* invalid PN in frame */ 7587 7588 enum wmi_host_sta_ps_param_rx_wake_policy { 7589 /* Wake up when ever there is an RX activity on the VDEV. In this mode 7590 * the Power save SM(state machine) will come out of sleep by either 7591 * sending null frame (or) a data frame (with PS==0) in response to TIM 7592 * bit set in the received beacon frame from AP. 7593 */ 7594 WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0, 7595 7596 /* Here the power save state machine will not wakeup in response to TIM 7597 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD 7598 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all 7599 * access categories are delivery-enabled, the station will send a UAPSD 7600 * trigger frame, otherwise it will send a PS-Poll. 7601 */ 7602 WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1, 7603 }; 7604 enum wmi_host_sta_ps_param_pspoll_count { 7605 WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0, 7606 /* Values greater than 0 indicate the maximum number of PS-Poll frames FW 7607 * will send before waking up. 7608 */ 7609 }; 7610 /** Number of tx frames/beacon that cause the power save SM to wake up. 7611 * 7612 * Value 1 causes the SM to wake up for every TX. Value 0 has a special 7613 * meaning, It will cause the SM to never wake up. This is useful if you want 7614 * to keep the system to sleep all the time for some kind of test mode . host 7615 * can change this parameter any time. It will affect at the next tx frame. 7616 */ 7617 enum wmi_host_sta_ps_param_tx_wake_threshold { 7618 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0, 7619 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1, 7620 7621 /* Values greater than one indicate that many TX attempts per beacon 7622 * interval before the STA will wake up 7623 */ 7624 }; 7625 /* 7626 * Transmit power scale factor. 7627 * 7628 */ 7629 typedef enum { 7630 WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */ 7631 WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */ 7632 WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */ 7633 WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */ 7634 WMI_HOST_TP_SCALE_6 = 4, /* 6% of max (-12 dBm) */ 7635 WMI_HOST_TP_SCALE_MIN = 5, /* min, but still on */ 7636 WMI_HOST_TP_SCALE_SIZE = 6, /* max num of enum */ 7637 } WMI_HOST_TP_SCALE; 7638 enum { 7639 WMI_HOST_RATEPWR_TABLE_OPS_SET, 7640 WMI_HOST_RATEPWR_TABLE_OPS_GET, 7641 }; 7642 /* reserved up through 0xF */ 7643 /** 7644 * struct _hp_dcs_mib_stats - WLAN IM stats from target to host 7645 * Below statistics are sent from target to host periodically. 7646 * These are collected at target as long as target is running 7647 * and target chip is not in sleep. 7648 * @listen_time: 7649 * @reg_tx_frame_cnt: 7650 * @reg_rx_frame_cnt: 7651 * @reg_rxclr_cnt: 7652 * @reg_cycle_cnt: delta cycle count 7653 * @reg_rxclr_ext_cnt: 7654 * @reg_ofdm_phyerr_cnt: 7655 * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register 7656 */ 7657 typedef struct _hp_dcs_mib_stats { 7658 int32_t listen_time; 7659 uint32_t reg_tx_frame_cnt; 7660 uint32_t reg_rx_frame_cnt; 7661 uint32_t reg_rxclr_cnt; 7662 uint32_t reg_cycle_cnt; 7663 uint32_t reg_rxclr_ext_cnt; 7664 uint32_t reg_ofdm_phyerr_cnt; 7665 uint32_t reg_cck_phyerr_cnt; 7666 } wmi_host_dcs_mib_stats_t; 7667 7668 /** 7669 * struct _wmi_host_dcs_im_tgt_stats - DCS IM target stats 7670 * @reg_tsf32: current running TSF from the TSF-1 7671 * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if 7672 * and at different ranges, this would not guarantee that 7673 * this is the least rssi. 7674 * @tx_waste_time: Sum of all the failed durations in the last 7675 * one second interval. 7676 * @rx_time: count how many times the hal_rxerr_phy is marked, in this 7677 * time period 7678 * @phyerr_cnt: 7679 * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained 7680 * in mib structure 7681 * @chan_nf: Channel noise floor (Units are in dBm) 7682 * @my_bss_rx_cycle_count: BSS rx cycle count 7683 * @reg_rxclr_ext40_cnt: extension channel 40Mhz rxclear count 7684 * @reg_rxclr_ext80_cnt: extension channel 80Mhz rxclear count 7685 */ 7686 typedef struct _wmi_host_dcs_im_tgt_stats { 7687 uint32_t reg_tsf32; 7688 uint32_t last_ack_rssi; 7689 uint32_t tx_waste_time; 7690 uint32_t rx_time; 7691 uint32_t phyerr_cnt; 7692 wmi_host_dcs_mib_stats_t mib_stats; 7693 uint32_t chan_nf; 7694 uint32_t my_bss_rx_cycle_count; 7695 /* these fields are added here for backward compatibility instead of 7696 * wmi_host_dcs_mib_stats_t 7697 */ 7698 uint32_t reg_rxclr_ext40_cnt; 7699 uint32_t reg_rxclr_ext80_cnt; 7700 } wmi_host_dcs_im_tgt_stats_t; 7701 7702 #ifndef BIT 7703 #define BIT(n) (1 << (n)) 7704 #endif 7705 7706 /* 7707 * Enum for pktlog req 7708 */ 7709 enum { 7710 WMI_HOST_PKTLOG_EVENT_RX_BIT, 7711 WMI_HOST_PKTLOG_EVENT_TX_BIT, 7712 WMI_HOST_PKTLOG_EVENT_RCF_BIT, 7713 WMI_HOST_PKTLOG_EVENT_RCU_BIT, 7714 WMI_HOST_PKTLOG_EVENT_DBG_PRINT_BIT, 7715 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA_BIT, 7716 WMI_HOST_PKTLOG_EVENT_H_INFO_BIT, 7717 WMI_HOST_PKTLOG_EVENT_STEERING_BIT, 7718 WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT, 7719 WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT, 7720 WMI_HOST_PKTLOG_EVENT_CBF_BIT, 7721 #ifdef BE_PKTLOG_SUPPORT 7722 WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT, 7723 #endif 7724 }; 7725 7726 typedef enum { 7727 WMI_HOST_PKTLOG_EVENT_RX = BIT(WMI_HOST_PKTLOG_EVENT_RX_BIT), 7728 WMI_HOST_PKTLOG_EVENT_TX = BIT(WMI_HOST_PKTLOG_EVENT_TX_BIT), 7729 WMI_HOST_PKTLOG_EVENT_RCF = 7730 BIT(WMI_HOST_PKTLOG_EVENT_RCF_BIT), /* Rate Control Find */ 7731 WMI_HOST_PKTLOG_EVENT_RCU = 7732 BIT(WMI_HOST_PKTLOG_EVENT_RCU_BIT), /* Rate Control Update */ 7733 WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 7734 BIT(WMI_HOST_PKTLOG_EVENT_DBG_PRINT_BIT), /* DEBUG prints */ 7735 /* To support Smart Antenna */ 7736 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 7737 BIT(WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA_BIT), 7738 WMI_HOST_PKTLOG_EVENT_H_INFO = 7739 BIT(WMI_HOST_PKTLOG_EVENT_H_INFO_BIT), 7740 WMI_HOST_PKTLOG_EVENT_STEERING = 7741 BIT(WMI_HOST_PKTLOG_EVENT_STEERING_BIT), 7742 /* To support Tx data Capture */ 7743 WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE = 7744 BIT(WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT), 7745 /* To support PHY logging */ 7746 WMI_HOST_PKTLOG_EVENT_PHY_LOGGING = 7747 BIT(WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT), 7748 WMI_HOST_PKTLOG_EVENT_CBF = 7749 BIT(WMI_HOST_PKTLOG_EVENT_CBF_BIT), 7750 #ifdef BE_PKTLOG_SUPPORT 7751 WMI_HOST_PKTLOG_EVENT_HYBRID_TX = 7752 BIT(WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT), 7753 #endif 7754 } WMI_HOST_PKTLOG_EVENT; 7755 7756 /* 7757 * wmi_host_phyerr 7758 * 7759 */ 7760 #define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26 7761 #define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24 7762 7763 #define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4 7764 #define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000 7765 7766 /** 7767 * struct wmi_host_perchain_rssi_info - per chain RSSI info 7768 * @rssi_pri20: RSSI on primary 20 7769 * @rssi_sec20: RSSI on secomdary 20 7770 * @rssi_sec40: RSSI secondary 40 7771 * @rssi_sec80: RSSI secondary 80 7772 */ 7773 typedef struct wmi_host_perchain_rssi_info { 7774 int8_t rssi_pri20; 7775 int8_t rssi_sec20; 7776 int8_t rssi_sec40; 7777 int8_t rssi_sec80; 7778 } wmi_host_perchain_rssi_info_t; 7779 7780 /** 7781 * struct _wmi_host_rf_info - RF measurement information 7782 * @rssi_comb: RSSI Information 7783 * @pc_rssi_info: For now, we know we are getting information 7784 * for only 4 chains at max. For future extensions 7785 * use a define 7786 * @noise_floor: Noise floor information 7787 */ 7788 typedef struct _wmi_host_rf_info { 7789 int8_t rssi_comb; 7790 wmi_host_perchain_rssi_info_t pc_rssi_info[4]; 7791 int16_t noise_floor[4]; 7792 } wmi_host_rf_info_t; 7793 7794 /** 7795 * struct _wmi_host_chan_info 7796 * @center_freq1: center frequency 1 in MHz 7797 * @center_freq2: center frequency 2 in MHz -valid only for 7798 * 11ACVHT 80PLUS80 mode 7799 * @chan_width: channel width in MHz 7800 */ 7801 typedef struct _wmi_host_chan_info { 7802 u_int16_t center_freq1; 7803 u_int16_t center_freq2; 7804 u_int8_t chan_width; 7805 } wmi_host_chan_info_t; 7806 7807 /** 7808 * struct _wmi_host_phyerr 7809 * @rf_info: 7810 * @chan_info: 7811 * @tsf64: 7812 * @phy_err_code: 7813 * @tsf_timestamp: 7814 * @bufp: 7815 * @buf_len: 7816 * @phy_err_mask0: 7817 * @phy_err_mask1: 7818 * @pdev_id: pdev_id 7819 */ 7820 typedef struct _wmi_host_phyerr { 7821 wmi_host_rf_info_t rf_info; 7822 wmi_host_chan_info_t chan_info; 7823 uint64_t tsf64; 7824 int32_t phy_err_code; 7825 uint32_t tsf_timestamp; 7826 uint8_t *bufp; 7827 uint32_t buf_len; 7828 uint32_t phy_err_mask0; 7829 uint32_t phy_err_mask1; 7830 uint32_t pdev_id; 7831 } wmi_host_phyerr_t; 7832 7833 /** 7834 * struct wmi_host_rtt_event_hdr 7835 * @req_id: request id 7836 * @status: status 7837 * @meas_done: measurement done flag 7838 * @meas_type: measurement type 7839 * @report_type: report type 7840 * @v3_status: v2 status 7841 * @v3_finish: 7842 * @v3_tm_start: 7843 * @num_ap: number of AP 7844 * @result: resuult 7845 * @dest_mac: destination mac 7846 */ 7847 typedef struct { 7848 uint16_t req_id; 7849 uint16_t status:1, 7850 meas_done:1, 7851 meas_type:3, 7852 report_type:3, 7853 v3_status:2, 7854 v3_finish:1, 7855 v3_tm_start:1, 7856 num_ap:4; 7857 uint16_t result; 7858 uint8_t dest_mac[QDF_MAC_ADDR_SIZE]; 7859 } wmi_host_rtt_event_hdr; 7860 7861 /** 7862 * struct wmi_host_rtt_meas_event - RTT measurement event 7863 * @chain_mask: 7864 * @bw: 7865 * @rsvd: 7866 * @txrxchain_mask: Bit:0-3:chain mask 7867 * Bit 4-5: band width info 7868 * 00 --Legacy 20, 01 --HT/VHT20 7869 * 10 --HT/VHT40, 11 -- VHT80 7870 * @tod: resolution of 0.1ns 7871 * @toa: resolution of 0.1ns 7872 * @t3: 7873 * @t4: 7874 * @rssi0: 7875 * @rssi1: 7876 * @rssi2: 7877 * @rssi3: 7878 */ 7879 typedef struct { 7880 uint32_t chain_mask:3, 7881 bw:2, 7882 rsvd:27; 7883 uint32_t txrxchain_mask; 7884 uint64_t tod; 7885 uint64_t toa; 7886 uint64_t t3; 7887 uint64_t t4; 7888 uint32_t rssi0; 7889 uint32_t rssi1; 7890 uint32_t rssi2; 7891 uint32_t rssi3; 7892 } wmi_host_rtt_meas_event; 7893 7894 /*----RTT Report event definition ----*/ 7895 typedef enum { 7896 /* rtt cmd header parsing error --terminate */ 7897 WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0, 7898 /* rtt body parsing error -- skip current STA REQ */ 7899 WMI_HOST_RTT_COMMAND_ERROR, 7900 /* rtt no resource -- terminate */ 7901 WMI_HOST_RTT_MODULE_BUSY, 7902 /* STA exceed the support limit -- only server the first n STA */ 7903 WMI_HOST_RTT_TOO_MANY_STA, 7904 /* any allocate failure */ 7905 WMI_HOST_RTT_NO_RESOURCE, 7906 /* can not find vdev with vdev ID - skip current STA REQ */ 7907 WMI_HOST_RTT_VDEV_ERROR, 7908 /* Tx failure -- continiue and measure number */ 7909 WMI_HOST_RTT_TRANSIMISSION_ERROR, 7910 /* wait for first TM timer expire-terminate current STA measurement */ 7911 WMI_HOST_RTT_TM_TIMER_EXPIRE, 7912 /* we do not support RTT measurement with this type of frame */ 7913 WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT, 7914 /* whole RTT measurement timer expire-terminate 7915 ** current STA measurement */ 7916 WMI_HOST_RTT_TIMER_EXPIRE, 7917 /* channel switch failed */ 7918 WMI_HOST_RTT_CHAN_SWITCH_ERROR, 7919 /* TMR trans error, this dest peer will be skipped */ 7920 WMI_HOST_RTT_TMR_TRANS_ERROR, 7921 /* V3 only. If both CFR and Token mismatch, do not report */ 7922 WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN, 7923 /* For First TM, if CFR is bad, then do not report */ 7924 WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR, 7925 /* do not allow report type2 mix with type 0, 1 */ 7926 WMI_HOST_RTT_REPORT_TYPE2_MIX, 7927 /* LCI Configuration OK. - Responder only */ 7928 WMI_HOST_RTT_LCI_CFG_OK, 7929 /* LCR configuration OK. - Responder only */ 7930 WMI_HOST_RTT_LCR_CFG_OK, 7931 /* Bad configuration LCI (or) LCR request - Responder only */ 7932 WMI_HOST_RTT_CFG_ERROR, 7933 WMI_HOST_WMI_RTT_REJECT_MAX, 7934 } WMI_HOST_RTT_ERROR_INDICATOR; 7935 typedef struct { 7936 wmi_host_rtt_event_hdr hdr; 7937 WMI_HOST_RTT_ERROR_INDICATOR reject_reason; 7938 } wmi_host_rtt_error_report_event; 7939 7940 #if defined(AR9888) 7941 typedef enum { 7942 WMI_HOST_PROF_CPU_IDLE, 7943 WMI_HOST_PROF_PPDU_PROC, 7944 WMI_HOST_PROF_PPDU_POST, 7945 WMI_HOST_PROF_HTT_TX_INPUT, 7946 WMI_HOST_PROF_MSDU_ENQ, 7947 WMI_HOST_PROF_PPDU_POST_HAL, 7948 WMI_HOST_PROF_COMPUTE_TX_TIME, 7949 7950 /* Add new ID's above this. */ 7951 WMI_HOST_PROF_MAX_ID, 7952 } wmi_host_profile_id_t; 7953 #endif 7954 7955 #define WMI_HOST_WLAN_PROFILE_MAX_HIST 3 7956 #define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32 7957 7958 #if defined(AR9888) 7959 #define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID 7960 #else 7961 #define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 7962 #endif 7963 7964 /** 7965 * struct wmi_host_wlan_profile_t - Host profile param 7966 * @id: profile id 7967 * @cnt: Count 7968 * @tot: 7969 * @min: minimum 7970 * @max: Mac 7971 * @hist_intvl: history interval 7972 * @hist: profile data history 7973 */ 7974 typedef struct { 7975 uint32_t id; 7976 uint32_t cnt; 7977 uint32_t tot; 7978 uint32_t min; 7979 uint32_t max; 7980 uint32_t hist_intvl; 7981 uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST]; 7982 } wmi_host_wlan_profile_t; 7983 7984 /** 7985 * struct wmi_host_wlan_profile_ctx_t - profile context 7986 * @tot: time in us 7987 * @tx_msdu_cnt: MSDU TX count 7988 * @tx_mpdu_cnt: MPDU tx count 7989 * @tx_ppdu_cnt: PPDU tx count 7990 * @rx_msdu_cnt: MSDU RX count 7991 * @rx_mpdu_cnt: MPDU RXcount 7992 * @bin_count: Bin count 7993 */ 7994 typedef struct { 7995 uint32_t tot; 7996 uint32_t tx_msdu_cnt; 7997 uint32_t tx_mpdu_cnt; 7998 uint32_t tx_ppdu_cnt; 7999 uint32_t rx_msdu_cnt; 8000 uint32_t rx_mpdu_cnt; 8001 uint32_t bin_count; 8002 } wmi_host_wlan_profile_ctx_t; 8003 8004 /** 8005 * struct wmi_host_pdev_bss_chan_info_event 8006 * @pdev_id: pdev_id 8007 * @freq: Units in MHz 8008 * @noise_floor: units are dBm 8009 * @rx_clear_count_low: 8010 * @rx_clear_count_high: 8011 * @cycle_count_low: 8012 * @cycle_count_high: 8013 * @tx_cycle_count_low: 8014 * @tx_cycle_count_high: 8015 * @rx_cycle_count_low: 8016 * @rx_cycle_count_high: 8017 * @rx_bss_cycle_count_low: 8018 * @rx_bss_cycle_count_high: 8019 * @reserved: 8020 */ 8021 typedef struct { 8022 uint32_t pdev_id; 8023 uint32_t freq; 8024 uint32_t noise_floor; 8025 uint32_t rx_clear_count_low; 8026 uint32_t rx_clear_count_high; 8027 uint32_t cycle_count_low; 8028 uint32_t cycle_count_high; 8029 uint32_t tx_cycle_count_low; 8030 uint32_t tx_cycle_count_high; 8031 uint32_t rx_cycle_count_low; 8032 uint32_t rx_cycle_count_high; 8033 uint32_t rx_bss_cycle_count_low; 8034 uint32_t rx_bss_cycle_count_high; 8035 uint32_t reserved; 8036 } wmi_host_pdev_bss_chan_info_event; 8037 8038 /** 8039 * struct wmi_host_pdev_ctl_failsafe_event 8040 * @ctl_failsafe_status: Indicate if Failsafe value is imposed on CTL 8041 */ 8042 struct wmi_host_pdev_ctl_failsafe_event { 8043 uint32_t ctl_failsafe_status; 8044 }; 8045 8046 #define WMI_HOST_INST_STATS_INVALID_RSSI 0 8047 8048 /* Event definition and new structure addition to send event 8049 * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id 8050 */ 8051 #define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff 8052 #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1 8053 #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2 8054 /** 8055 * struct wmi_host_tx_data_traffic_ctrl_event 8056 * @peer_ast_idx: For vdev based control, peer_ast_idx will be 8057 * WMI_INVALID_PEER_AST_INDEX 8058 * @vdev_id: only applies if peer_ast_idx == INVALID 8059 * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or 8060 * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK 8061 * @wmm_ac: Indicates AC to be blocked or unblocked 8062 * Bits 4-31 : Reserved (Shall be zero) 8063 * Bits 0-3 : WMM AC NO [ BE (1), BK (2), VI (3), VO (4)] 8064 * Started numbering from 1 to preserve backward compatibility 8065 */ 8066 typedef struct { 8067 uint32_t peer_ast_idx; 8068 uint32_t vdev_id; 8069 uint32_t ctrl_cmd; 8070 uint32_t wmm_ac; 8071 } wmi_host_tx_data_traffic_ctrl_event; 8072 8073 /** 8074 * struct wmi_host_ath_dcs_cw_int 8075 * @channel: either number or freq in mhz 8076 */ 8077 typedef struct { 8078 uint32_t channel; 8079 } wmi_host_ath_dcs_cw_int; 8080 8081 /** 8082 * struct wmi_host_dcs_awgn_info: 8083 * @channel_width : Channel width of interference 8084 * @center_freq : Center frequency of primary channel 8085 * @center_freq0 : Center frequency of segment 1 8086 * @center_freq1 : Center frequency of segment 2 8087 * @chan_bw_intf_bitmap: Per-20MHz interference bitmap 8088 */ 8089 struct wmi_host_dcs_awgn_info { 8090 wmi_host_channel_width channel_width; 8091 uint32_t center_freq; 8092 uint32_t center_freq0; 8093 uint32_t center_freq1; 8094 uint32_t chan_bw_intf_bitmap; 8095 }; 8096 8097 #define WMI_MAX_POWER_DBG_ARGS 8 8098 8099 /** 8100 * struct wmi_power_dbg_params - power debug command parameter 8101 * @pdev_id: subsystem identifier 8102 * @module_id: parameter id 8103 * @num_args: no of arguments 8104 * @args: arguments 8105 */ 8106 struct wmi_power_dbg_params { 8107 uint32_t pdev_id; 8108 uint32_t module_id; 8109 uint32_t num_args; 8110 uint32_t args[WMI_MAX_POWER_DBG_ARGS]; 8111 }; 8112 8113 /** 8114 * struct wmi_fw_dump_seg_req - individual segment details 8115 * @seg_id: segment id. 8116 * @seg_start_addr_lo: lower address of the segment. 8117 * @seg_start_addr_hi: higher address of the segment. 8118 * @seg_length: length of the segment. 8119 * @dst_addr_lo: lower address of the destination buffer. 8120 * @dst_addr_hi: higher address of the destination buffer. 8121 * 8122 * This structure carries the information to firmware about the 8123 * individual segments. This structure is part of firmware memory 8124 * dump request. 8125 */ 8126 struct wmi_fw_dump_seg_req { 8127 uint8_t seg_id; 8128 uint32_t seg_start_addr_lo; 8129 uint32_t seg_start_addr_hi; 8130 uint32_t seg_length; 8131 uint32_t dst_addr_lo; 8132 uint32_t dst_addr_hi; 8133 }; 8134 8135 /** 8136 * enum wmi_userspace_log_level - Log level at userspace 8137 * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection 8138 * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log 8139 * level with minimal user impact. This is the default value. 8140 * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily 8141 * trying to reproduce a problem, wifi performances and power can be impacted 8142 * but device should not otherwise be significantly impacted 8143 * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to 8144 * actively debug a problem 8145 * 8146 * Various log levels defined in the userspace for logging applications 8147 */ 8148 enum wmi_userspace_log_level { 8149 WMI_LOG_LEVEL_NO_COLLECTION, 8150 WMI_LOG_LEVEL_NORMAL_COLLECT, 8151 WMI_LOG_LEVEL_ISSUE_REPRO, 8152 WMI_LOG_LEVEL_ACTIVE, 8153 }; 8154 8155 /** 8156 * enum wmi_host_hw_mode_config_type - HW mode config type replicated from 8157 * FW header 8158 * @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active. 8159 * @WMI_HOST_HW_MODE_DBS: Both PHYs are active in different bands, 8160 * one in 2G and another in 5G. 8161 * @WMI_HOST_HW_MODE_SBS_PASSIVE: Both PHYs are in passive mode (only rx) in 8162 * same band; no tx allowed. 8163 * @WMI_HOST_HW_MODE_SBS: Both PHYs are active in the same band. 8164 * Support for both PHYs within one band is planned 8165 * for 5G only(as indicated in WMI_MAC_PHY_CAPABILITIES), 8166 * but could be extended to other bands in the future. 8167 * The separation of the band between the two PHYs needs 8168 * to be communicated separately. 8169 * @WMI_HOST_HW_MODE_DBS_SBS: 3 PHYs, with 2 on the same band doing SBS 8170 * as in WMI_HW_MODE_SBS, and 3rd on the other band 8171 * @WMI_HOST_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and 8172 * 5G. It can support SBS (5G + 5G) OR DBS (5G + 2G). 8173 * @WMI_HOST_HW_MODE_FW_INTERNAL: FW specific internal mode 8174 * @WMI_HOST_HW_MODE_2G_PHYB: Only one phy is active. 2G mode on PhyB. 8175 * @WMI_HOST_HW_MODE_MAX: Max hw_mode_id. Used to indicate invalid mode. 8176 * @WMI_HOST_HW_MODE_DETECT: Mode id used by host to choose mode from target 8177 * supported modes. 8178 */ 8179 enum wmi_host_hw_mode_config_type { 8180 WMI_HOST_HW_MODE_SINGLE = 0, 8181 WMI_HOST_HW_MODE_DBS = 1, 8182 WMI_HOST_HW_MODE_SBS_PASSIVE = 2, 8183 WMI_HOST_HW_MODE_SBS = 3, 8184 WMI_HOST_HW_MODE_DBS_SBS = 4, 8185 WMI_HOST_HW_MODE_DBS_OR_SBS = 5, 8186 WMI_HOST_HW_MODE_FW_INTERNAL = 6, 8187 WMI_HOST_HW_MODE_2G_PHYB = 7, 8188 WMI_HOST_HW_MODE_MAX, 8189 WMI_HOST_HW_MODE_DETECT, 8190 }; 8191 8192 /** 8193 * enum wmi_host_dynamic_hw_mode_config_type - Host defined enum for 8194 * dynamic mode switch 8195 * @WMI_HOST_DYNAMIC_HW_MODE_DISABLED: hw mode switch is disabled 8196 * @WMI_HOST_DYNAMIC_HW_MODE_SLOW: hw mode switch with interface down/up 8197 * @WMI_HOST_DYNAMIC_HW_MODE_FAST: hw mode switch without interface down/up 8198 * @WMI_HOST_DYNAMIC_HW_MODE_MAX: Max value to indicate invalid mode 8199 */ 8200 enum wmi_host_dynamic_hw_mode_config_type { 8201 WMI_HOST_DYNAMIC_HW_MODE_DISABLED = 0, 8202 WMI_HOST_DYNAMIC_HW_MODE_SLOW = 1, 8203 WMI_HOST_DYNAMIC_HW_MODE_FAST = 2, 8204 WMI_HOST_DYNAMIC_HW_MODE_MAX, 8205 }; 8206 8207 /* 8208 * struct wmi_host_peer_txmu_cnt_event 8209 * @tx_mu_transmitted - MU-MIMO tx count 8210 */ 8211 typedef struct { 8212 uint32_t tx_mu_transmitted; 8213 } wmi_host_peer_txmu_cnt_event; 8214 8215 /** 8216 * struct esp_estimation_event - esp airtime estimation event 8217 * @ac_airtime_percentage: Estimated Airtime 8218 * @pdev_id: PDEV_ID of Data 8219 */ 8220 struct esp_estimation_event { 8221 uint32_t ac_airtime_percentage; 8222 uint32_t pdev_id; 8223 }; 8224 8225 /* 8226 * struct wmi_peer_gid_userpos_list_event 8227 * @usr_list - User list 8228 */ 8229 #define GID_OVERLOAD_GROUP_COUNT 15 8230 typedef struct { 8231 uint32_t usr_list[GID_OVERLOAD_GROUP_COUNT]; 8232 } wmi_host_peer_gid_userpos_list_event; 8233 8234 /** 8235 * enum rcpi_measurement_type - for identifying type of rcpi measurement 8236 * @RCPI_MEASUREMENT_TYPE_AVG_MGMT: avg rcpi of mgmt frames 8237 * @RCPI_MEASUREMENT_TYPE_AVG_DATA: avg rcpi of data frames 8238 * @RCPI_MEASUREMENT_TYPE_LAST_MGMT: rcpi of last mgmt frame 8239 * @RCPI_MEASUREMENT_TYPE_LAST_DATA: rcpi of last data frame 8240 * @RCPI_MEASUREMENT_TYPE_INVALID: invalid rcpi measurement type 8241 */ 8242 enum rcpi_measurement_type { 8243 RCPI_MEASUREMENT_TYPE_AVG_MGMT = 0x1, 8244 RCPI_MEASUREMENT_TYPE_AVG_DATA = 0x2, 8245 RCPI_MEASUREMENT_TYPE_LAST_MGMT = 0x3, 8246 RCPI_MEASUREMENT_TYPE_LAST_DATA = 0x4, 8247 RCPI_MEASUREMENT_TYPE_INVALID = 0x5, 8248 }; 8249 8250 /** 8251 * struct rcpi_req - RCPI req parameter 8252 * @vdev_id: virtual device id 8253 * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type 8254 * @mac_addr: peer mac addr for which measurement is required 8255 */ 8256 struct rcpi_req { 8257 uint32_t vdev_id; 8258 enum rcpi_measurement_type measurement_type; 8259 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 8260 }; 8261 8262 /** 8263 * struct rcpi_res - RCPI response parameter 8264 * @vdev_id: virtual device id 8265 * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type 8266 * @mac_addr: peer mac addr for which measurement is required 8267 * @rcpi_value: value of RCPI computed by firmware 8268 */ 8269 struct rcpi_res { 8270 uint32_t vdev_id; 8271 enum rcpi_measurement_type measurement_type; 8272 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 8273 int32_t rcpi_value; 8274 }; 8275 8276 #define WMI_HOST_BOARD_MCN_STRING_MAX_SIZE 19 8277 #define WMI_HOST_BOARD_MCN_STRING_BUF_SIZE \ 8278 (WMI_HOST_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */ 8279 8280 /** 8281 * enum WMI_HOST_CALIBRATION_STATUS - Host defined Enums for cal status 8282 * @WMI_HOST_NO_FEATURE: The board was calibrated with a meta 8283 * which did not have this feature 8284 * @WMI_HOST_CALIBRATION_OK: The calibration status is OK 8285 * @WMI_HOST_CALIBRATION_NOT_OK: The calibration status is NOT OK 8286 */ 8287 enum WMI_HOST_CALIBRATION_STATUS { 8288 WMI_HOST_NO_FEATURE = 0, 8289 WMI_HOST_CALIBRATION_OK, 8290 WMI_HOST_CALIBRATION_NOT_OK, 8291 }; 8292 8293 /** 8294 * struct wmi_host_pdev_utf_event - Host defined struct to hold utf event data 8295 * @data: Pointer to data 8296 * @datalen: Data length 8297 * @pdev_id: Pdev_id of data 8298 * 8299 */ 8300 struct wmi_host_pdev_utf_event { 8301 uint8_t *data; 8302 uint16_t datalen; 8303 uint32_t pdev_id; 8304 }; 8305 8306 /** 8307 * struct wmi_host_utf_seg_header_info - Host defined struct to map seg info in 8308 * UTF event 8309 * @len: segment length 8310 * @msgref: message reference 8311 * @segment_info: segment info 8312 * @pdev_id: pdev_id 8313 * 8314 */ 8315 struct wmi_host_utf_seg_header_info { 8316 uint32_t len; 8317 uint32_t msgref; 8318 uint32_t segment_info; 8319 uint32_t pdev_id; 8320 }; 8321 8322 /** 8323 * struct wmi_host_pdev_qvit_event - Host defined struct to hold qvit event data 8324 * @data: Pointer to data 8325 * @datalen: Data length 8326 * @pdev_id: Pdev ID 8327 */ 8328 struct wmi_host_pdev_qvit_event { 8329 uint8_t *data; 8330 uint16_t datalen; 8331 uint32_t pdev_id; 8332 }; 8333 8334 /** 8335 * enum wmi_peer_create_status - Peer Create response status 8336 * @WMI_PEER_CREATE_SUCCESS: Peer creation successful at fw 8337 * @WMI_PEER_EXISTS: Peer with same mac exists at fw 8338 * @WMI_PEER_CREATE_FAILED: Peer creation failed at fw 8339 */ 8340 enum wmi_peer_create_status { 8341 WMI_PEER_CREATE_SUCCESS = 0, 8342 WMI_PEER_EXISTS = 1, 8343 WMI_PEER_CREATE_FAILED = 2, 8344 }; 8345 8346 /** 8347 * struct wmi_host_dcs_interference_param - DCS interference param 8348 * @interference_type: Type of DCS Interference 8349 * @pdev_id: pdev id 8350 */ 8351 struct wmi_host_dcs_interference_param { 8352 uint32_t interference_type; 8353 uint32_t pdev_id; 8354 }; 8355 8356 /** 8357 * struct wmi_host_rf_characterization_event_param - rf characterization table 8358 * @freq: center frequency of primary channel (in MHz) 8359 * @chan_metric: primary channel-specific metric 8360 * @bw: bandwidth of primary channel (in MHz) 8361 */ 8362 struct wmi_host_rf_characterization_event_param { 8363 uint16_t freq; 8364 uint8_t chan_metric; 8365 wmi_host_channel_width bw; 8366 }; 8367 8368 /* 8369 * struct wmi_host_fips_event_param: FIPS event param 8370 * @pdev_id: pdev id 8371 * @error_status: Error status: 0 (no err), 1, or OPER_TIMEOUR 8372 * @data_len: FIPS data length 8373 * @data: pointer to data 8374 */ 8375 struct wmi_host_fips_event_param { 8376 uint32_t pdev_id; 8377 uint32_t error_status; 8378 uint32_t data_len; 8379 uint32_t *data; 8380 }; 8381 8382 #ifdef WLAN_FEATURE_FIPS_BER_CCMGCM 8383 /* 8384 * struct wmi_host_fips_extend_event_param: FIPS extend event param 8385 * @pdev_id: pdev id 8386 * @fips_cookie: fips_cookie 8387 * @cmd_frag_idx: cmd_frag_idx 8388 * @more_bit: more_bit 8389 * @error_status: Error status: 0 (no err), 1, or OPER_TIMEOUR 8390 * @data_len: FIPS data length 8391 * @data: pointer to data 8392 */ 8393 struct wmi_host_fips_extend_event_param { 8394 uint32_t pdev_id; 8395 uint32_t fips_cookie; 8396 uint32_t cmd_frag_idx; 8397 uint32_t more_bit; 8398 uint32_t error_status; 8399 uint32_t data_len; 8400 uint32_t *data; 8401 }; 8402 #endif 8403 8404 #ifdef WLAN_FEATURE_DISA_FIPS 8405 /** 8406 * struct disa_encrypt_decrypt_resp_params - disa encrypt response 8407 * @vdev_id: vdev id 8408 * @status: status 8409 * @data_len: data length 8410 * @data: data pointer 8411 */ 8412 struct disa_encrypt_decrypt_resp_params { 8413 uint32_t vdev_id; 8414 int32_t status; 8415 uint32_t data_len; 8416 uint8_t *data; 8417 }; 8418 #endif 8419 8420 /** 8421 * struct wmi_host_proxy_ast_reserve_param 8422 * @pdev_id: pdev id 8423 * @result: result 8424 */ 8425 struct wmi_host_proxy_ast_reserve_param { 8426 uint32_t pdev_id; 8427 uint32_t result; 8428 }; 8429 8430 /** 8431 * struct wmi_host_pdev_band_to_mac - freq range for mac 8432 * @pdev_id: PDEV ID to identify mac 8433 * @start_freq: start frequency value 8434 * @end_freq: end frequency value 8435 */ 8436 struct wmi_host_pdev_band_to_mac { 8437 uint32_t pdev_id; 8438 uint32_t start_freq; 8439 uint32_t end_freq; 8440 }; 8441 #define WMI_HOST_MAX_PDEV 3 8442 8443 #ifdef OL_ATH_SMART_LOGGING 8444 8445 #define WMI_HOST_SMART_LOG_SCENARIO_SET(flag, scenario) ((flag) |= (scenario)) 8446 #define WMI_HOST_SMART_LOG_SCENARIO_GET(flag, scenario) ((flag) & (scenario)) 8447 8448 /** 8449 * enum wmi_host_smart_log_scenario - Smart log scenarios to be enabled/disabled 8450 * @WMI_HOST_SMART_LOG_ALL: All smart logging features. 8451 * @WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW: CE with full detect by FW. 8452 * @WMI_HOST_SMART_LOG_TX_RX_TIMEOUT: Tx/Rx timeout. 8453 * @WMI_HOST_SMART_LOG_STA_KICKOUT: STA Kickout. 8454 * @WMI_HOST_SMART_LOG_BCN_CMD_FAILURE: Beacon command failure. 8455 * @WMI_HOST_SMART_LOG_P1_PING_FAILURE: P1 ping failure. Ping failure detection 8456 * is done by host entities. So, host should be able to control the 8457 * enable/disable of this feature. Yet, this is provided in case the 8458 * corresponding FW specific debugs alone have to be enabled/disabled. 8459 * @WMI_HOST_SMART_LOG_CONNECTION_FAILURE: Connection failure. Connection 8460 * failure detection is done by host entities. So, host should be able to 8461 * control the enable/disable of this feature. Yet, this is provided in case the 8462 * corresponding FW specific debugs alone have to be enabled/disabled. 8463 * @WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG: FW Initiated packetlog. 8464 * @WMI_HOST_SMART_LOG_EXTENSION_1: If WMI_HOST_SMART_LOG_EXTENSION_1 is set, 8465 * then the 'log_case_ext_1' field in 'wmi_smart_logging' is used; else 8466 * log_case_ext_1 is ignored. 8467 */ 8468 enum wmi_host_smart_log_scenario { 8469 WMI_HOST_SMART_LOG_ALL = 0x0, 8470 WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW = 0x1, 8471 WMI_HOST_SMART_LOG_TX_RX_TIMEOUT = 0x2, 8472 WMI_HOST_SMART_LOG_STA_KICKOUT = 0x4, 8473 WMI_HOST_SMART_LOG_BCN_CMD_FAILURE = 0x8, 8474 WMI_HOST_SMART_LOG_P1_PING_FAILURE = 0x10, 8475 WMI_HOST_SMART_LOG_CONNECTION_FAILURE = 0x20, 8476 WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG = 0x40, 8477 8478 /* New scenarios to be added here */ 8479 8480 WMI_HOST_SMART_LOG_EXTENSION_1 = 0x80000000, 8481 }; 8482 8483 /** 8484 * struct wmi_fatal_condition_event - Fatal condition event param 8485 * @type: Type of event 8486 * @subtype: Subtype of event 8487 * @reserved0: obsolete 8488 * @type_subtype_specific_data: Data specific to combination of type and 8489 * subtype. This is held in a union with the original "reserved0" for backward 8490 * compatibility with any code that might refer to it. The previously-reserved 8491 * field now holds data under some conditions. The kind of data depends on the 8492 * above "type" and "subtype" fields. The interpretation of the 8493 * type_subtype_specific_data field based on different type + subtype values is 8494 * shown below: 8495 * 1. type == WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG + subtype 8496 * == WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START -> 8497 * type_subtype_specific_data = WMI_HOST_PKTLOG_EVENT 8498 * For any type+subtype combinations not listed above, the recipient is expected 8499 * to ignore the type_subtype_specific_data field. 8500 */ 8501 struct wmi_fatal_condition_event { 8502 uint32_t type; 8503 uint32_t subtype; 8504 union { 8505 uint32_t reserved0; 8506 uint32_t type_subtype_specific_data; 8507 }; 8508 }; 8509 8510 /*Currently the Max fatal events is 3 */ 8511 #define FATAL_EVENTS_MAX 3 8512 8513 /** 8514 * struct wmi_debug_fatal_events - Fatal events list 8515 * @num_events:Number of events 8516 * @event: Each event data 8517 */ 8518 struct wmi_debug_fatal_events { 8519 uint32_t num_events; 8520 struct wmi_fatal_condition_event event[FATAL_EVENTS_MAX]; 8521 }; 8522 8523 /** 8524 * enum wmi_host_fatal_condition_type - Values that 'type' can take in 8525 * wmi_fatal_condition_event 8526 * @WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION: Fatal condition event completion 8527 * @WMI_HOST_FATAL_CONDITION_CE_FAILURE: CE failure 8528 * @WMI_HOST_FATAL_CONDITION_TIMEOUTS: Communication timeouts 8529 * @WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE: Connection issue 8530 * @WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG: Configuration for FW initiated 8531 * packetlog 8532 */ 8533 enum wmi_host_fatal_condition_type { 8534 WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION, 8535 WMI_HOST_FATAL_CONDITION_CE_FAILURE, 8536 WMI_HOST_FATAL_CONDITION_TIMEOUTS, 8537 WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE, 8538 WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG, 8539 }; 8540 8541 /** 8542 * enum wmi_host_fatal_condition_subtype_timeouts - Possible subtypes for 8543 * WMI_HOST_FATAL_CONDITION_TIMEOUTS 8544 * @WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT: Tx timeout 8545 * @WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT: Rx timeout 8546 */ 8547 enum wmi_host_fatal_condition_subtype_timeouts { 8548 WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT, 8549 WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT, 8550 }; 8551 8552 /** 8553 * enum wmi_host_fatal_condition_subtype_connection_issue - Possible subtypes 8554 * for WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE 8555 * @WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT: STA Kickout 8556 * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG: Start debugging for P1 8557 * ping failure 8558 * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG: Stop debugging for P1 8559 * ping failure 8560 * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG: Start debugging for 8561 * connection failure 8562 * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG: Stop debugging for 8563 * connection failure 8564 */ 8565 enum wmi_host_fatal_condition_subtype_connection_issue { 8566 WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT, 8567 WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG, 8568 WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG, 8569 WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG, 8570 WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG, 8571 }; 8572 8573 /** 8574 * enum wmi_host_fatal_condition_subtype_packet_log_config - Possible subtypes 8575 * for WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG 8576 * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START: Start FW initiated packetlog 8577 * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP: Stop FW initiated packetlog 8578 */ 8579 enum wmi_host_fatal_condition_subtype_packet_log_config { 8580 WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START, 8581 WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP, 8582 }; 8583 8584 #endif /* OL_ATH_SMART_LOGGING */ 8585 8586 #define GET_PN_MAX_LEN 16 8587 #define GET_RX_PN_MAX_LEN 8 8588 8589 /** 8590 * struct wmi_host_get_pn_event - PN event params 8591 * @vdev_id: vdev id 8592 * @mac_addr: Peer mac address 8593 * @key_ix: Key index 8594 * @key_type: key type 8595 * @pn: pn value 8596 */ 8597 struct wmi_host_get_pn_event { 8598 uint32_t vdev_id; 8599 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 8600 uint8_t key_ix; 8601 uint32_t key_type; 8602 uint8_t pn[GET_PN_MAX_LEN]; 8603 }; 8604 8605 /** 8606 * struct wmi_host_get_rxpn_event - Rx PN event params 8607 * @vdev_id: vdev id 8608 * @mac_addr: Peer mac address 8609 * @keyix: key index 8610 * @pn: pn value 8611 */ 8612 struct wmi_host_get_rxpn_event { 8613 uint32_t vdev_id; 8614 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 8615 uint16_t keyix; 8616 uint8_t pn[GET_RX_PN_MAX_LEN]; 8617 }; 8618 8619 /** 8620 * struct wmi_init_cmd_param - INIT command params 8621 * @res_cfg: pointer to resource config 8622 * @num_mem_chunks: number of memory chunks 8623 * @mem_chunks: pointer to memory chunks 8624 * @hw_mode_id: HW mode index chosen 8625 * @num_band_to_mac: Number of band to mac setting 8626 * @band_to_mac: band to mac setting 8627 */ 8628 struct wmi_init_cmd_param { 8629 target_resource_config *res_cfg; 8630 uint8_t num_mem_chunks; 8631 struct wmi_host_mem_chunk *mem_chunks; 8632 uint32_t hw_mode_id; 8633 uint32_t num_band_to_mac; 8634 struct wmi_host_pdev_band_to_mac band_to_mac[WMI_HOST_MAX_PDEV]; 8635 }; 8636 8637 /** 8638 * struct pdev_csa_switch_count_status - CSA switch count status event param 8639 * @pdev_id: Physical device identifier 8640 * @current_switch_count: Current CSA switch count 8641 * @num_vdevs: Number of vdevs that need restart 8642 * @vdev_ids: Array containing the vdev ids that need restart 8643 */ 8644 struct pdev_csa_switch_count_status { 8645 uint32_t pdev_id; 8646 uint32_t current_switch_count; 8647 uint32_t num_vdevs; 8648 uint32_t *vdev_ids; 8649 }; 8650 8651 /** 8652 * enum wmi_host_active_apf_mode - FW_ACTIVE_APF_MODE, replicated from FW header 8653 * @WMI_HOST_ACTIVE_APF_DISABLED: APF is disabled for all packets in active mode 8654 * @WMI_HOST_ACTIVE_APF_ENABLED: APF is enabled for all packets in active mode 8655 * @WMI_HOST_ACTIVE_APF_ADAPTIVE: APF is enabled for packets up to some 8656 * threshold in active mode 8657 */ 8658 enum wmi_host_active_apf_mode { 8659 WMI_HOST_ACTIVE_APF_DISABLED = (1 << 1), 8660 WMI_HOST_ACTIVE_APF_ENABLED = (1 << 2), 8661 WMI_HOST_ACTIVE_APF_ADAPTIVE = (1 << 3) 8662 }; 8663 8664 /** 8665 * struct coex_config_params - Coex config command params 8666 * @vdev_id: Virtual AP device identifier 8667 * @config_type: Configuration type - wmi_coex_config_type enum 8668 * @config_arg1: Configuration argument based on config type 8669 * @config_arg2: Configuration argument based on config type 8670 * @config_arg3: Configuration argument based on config type 8671 * @config_arg4: Configuration argument based on config type 8672 * @config_arg5: Configuration argument based on config type 8673 * @config_arg6: Configuration argument based on config type 8674 */ 8675 struct coex_config_params { 8676 uint32_t vdev_id; 8677 uint32_t config_type; 8678 uint32_t config_arg1; 8679 uint32_t config_arg2; 8680 uint32_t config_arg3; 8681 uint32_t config_arg4; 8682 uint32_t config_arg5; 8683 uint32_t config_arg6; 8684 }; 8685 8686 #define WMI_HOST_PDEV_ID_SOC 0xFF 8687 #define WMI_HOST_PDEV_ID_0 0 8688 #define WMI_HOST_PDEV_ID_1 1 8689 #define WMI_HOST_PDEV_ID_2 2 8690 #define WMI_HOST_PDEV_ID_INVALID 0xFFFFFFFF 8691 8692 /** 8693 * struct wmi_host_ready_ev_param - Data revieved in ready event 8694 * @status: FW init status. Success or Failure. 8695 * @num_dscp_table: Number of DSCP table supported in FW 8696 * @num_extra_mac_addr: Extra mac address present in ready event. Used 8697 * in DBDC mode to provide multiple mac per pdev. 8698 * @num_total_peer: Total number of peers FW could allocate. Zero means 8699 * FW could allocate num peers requested by host in init. 8700 * Otherwise, host need update it max_peer to this value. 8701 * @num_extra_peer: Number of extra peers created and used within FW. Host 8702 * should expect peer_id can be num_total_peer + num_extra_peer 8703 * but it can create only upto num_total_peer. 8704 * @agile_capability: Boolean specification of whether the target supports 8705 * agile DFS, by means of using one 80 MHz radio chain for 8706 * radar detection, concurrently with using another radio 8707 * chain for non-160 MHz regular operation. 8708 * @max_ast_index: Max number of AST entries that FW could allocate. 8709 * @pktlog_defs_checksum: checksum computed from the definitions of the enums 8710 * and structs used within pktlog traces. This is sent 8711 * from the FW as part of FW ready event and needs 8712 * to be embedded in the pktlog buffer header as version. 8713 * @num_max_active_vdevs: number of max active virtual devices (VAPs) to 8714 * support 8715 */ 8716 struct wmi_host_ready_ev_param { 8717 uint32_t status; 8718 uint32_t num_dscp_table; 8719 uint32_t num_extra_mac_addr; 8720 uint32_t num_total_peer; 8721 uint32_t num_extra_peer; 8722 bool agile_capability; 8723 uint32_t max_ast_index; 8724 uint32_t pktlog_defs_checksum; 8725 uint32_t num_max_active_vdevs; 8726 }; 8727 8728 enum bcn_offload_control_param { 8729 BCN_OFFLD_CTRL_TX_DISABLE = 0, 8730 BCN_OFFLD_CTRL_TX_ENABLE, 8731 BCN_OFFLD_CTRL_SWBA_DISABLE, 8732 BCN_OFFLD_CTRL_SWBA_ENABLE, 8733 }; 8734 8735 #ifdef OBSS_PD 8736 /** 8737 * struct wmi_host_obss_spatial_reuse_set_param - OBSS_PD_SPATIAL Reuse 8738 * structure 8739 * @enable: Enable/Disable Spatial Reuse 8740 * @obss_min: Minimum OBSS level to use 8741 * @obss_max: Maximum OBSS level to use 8742 * @vdev_id: Vdev id 8743 */ 8744 struct wmi_host_obss_spatial_reuse_set_param { 8745 uint32_t enable; 8746 int32_t obss_min; 8747 int32_t obss_max; 8748 uint32_t vdev_id; 8749 }; 8750 8751 /** 8752 * struct wmi_host_obss_spatial_reuse_set_def_thresh - default obsspd offsets 8753 * @obss_min: Minimum OBSS level to use 8754 * @obss_max: Maximum OBSS level to use 8755 * @vdev_type: vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP 8756 */ 8757 struct wmi_host_obss_spatial_reuse_set_def_thresh { 8758 int32_t obss_min; 8759 int32_t obss_max; 8760 uint32_t vdev_type; 8761 }; 8762 #endif 8763 8764 /** 8765 * struct wmi_host_injector_frame_params - Injector frame configuration params 8766 * @vdev_id: vdev identifier of VAP 8767 * @enable: Enable/disable flag for the frame 8768 * @frame_type: Frame type to be enabled 8769 * @frame_inject_period: Periodicity of injector frame transmission in msecs 8770 * @frame_duration: Frame Duration field in usecs 8771 * @frame_bw: Bandwidth of the injected frame 8772 * @dstmac: Destination address to be used for the frame 8773 */ 8774 struct wmi_host_injector_frame_params { 8775 uint32_t vdev_id; 8776 uint32_t enable; 8777 uint32_t frame_type; 8778 uint32_t frame_inject_period; 8779 uint32_t frame_duration; 8780 uint32_t frame_bw; 8781 uint8_t dstmac[QDF_MAC_ADDR_SIZE]; 8782 }; 8783 8784 /** 8785 * struct wdsentry - WDS entry structure 8786 * @peer_mac: peer mac 8787 * @wds_mac: wds mac address 8788 * @flags: flags 8789 */ 8790 struct wdsentry { 8791 u_int8_t peer_mac[QDF_MAC_ADDR_SIZE]; 8792 u_int8_t wds_mac[QDF_MAC_ADDR_SIZE]; 8793 uint32_t flags; 8794 }; 8795 8796 /** 8797 * struct wmi_obss_detection_cfg_param - obss detection cfg 8798 * @vdev_id: vdev id 8799 * @obss_detect_period_ms: detection period in ms 8800 * @obss_11b_ap_detect_mode: detect whether there is 11b ap/ibss 8801 * @obss_11b_sta_detect_mode: detect whether there is 11b sta 8802 * connected with other APs 8803 * @obss_11g_ap_detect_mode: detect whether there is 11g AP 8804 * @obss_11a_detect_mode: detect whether there is legacy 11a traffic 8805 * @obss_ht_legacy_detect_mode: detect whether there is ap which is 8806 * ht legacy mode 8807 * @obss_ht_mixed_detect_mode: detect whether there is ap which is ht mixed mode 8808 * @obss_ht_20mhz_detect_mode: detect whether there is ap which has 20M only 8809 * station 8810 */ 8811 struct wmi_obss_detection_cfg_param { 8812 uint32_t vdev_id; 8813 uint32_t obss_detect_period_ms; 8814 uint32_t obss_11b_ap_detect_mode; 8815 uint32_t obss_11b_sta_detect_mode; 8816 uint32_t obss_11g_ap_detect_mode; 8817 uint32_t obss_11a_detect_mode; 8818 uint32_t obss_ht_legacy_detect_mode; 8819 uint32_t obss_ht_mixed_detect_mode; 8820 uint32_t obss_ht_20mhz_detect_mode; 8821 }; 8822 8823 /** 8824 * enum wmi_obss_detection_reason - obss detection event reasons 8825 * @OBSS_OFFLOAD_DETECTION_DISABLED: OBSS detection disabled 8826 * @OBSS_OFFLOAD_DETECTION_PRESENT: OBSS present detection 8827 * @OBSS_OFFLOAD_DETECTION_ABSENT: OBSS absent detection 8828 * 8829 * Defines different types of reasons for obss detection event from firmware. 8830 */ 8831 enum wmi_obss_detection_reason { 8832 OBSS_OFFLOAD_DETECTION_DISABLED = 0, 8833 OBSS_OFFLOAD_DETECTION_PRESENT = 1, 8834 OBSS_OFFLOAD_DETECTION_ABSENT = 2, 8835 }; 8836 8837 /** 8838 * struct wmi_obss_detect_info - OBSS detection info from firmware 8839 * @vdev_id: ID of the vdev to which this info belongs. 8840 * @reason: Indicate if present or Absent detection, 8841 * also if not supported offload for this vdev. 8842 * @matched_detection_masks: Detection bit map. 8843 * @matched_bssid_addr: MAC address valid for only if info is present detection. 8844 */ 8845 struct wmi_obss_detect_info { 8846 uint32_t vdev_id; 8847 enum wmi_obss_detection_reason reason; 8848 uint32_t matched_detection_masks; 8849 uint8_t matched_bssid_addr[QDF_MAC_ADDR_SIZE]; 8850 }; 8851 8852 #ifdef QCA_SUPPORT_CP_STATS 8853 /** 8854 * struct wmi_host_congestion_stats - host definition of congestion stats 8855 * @vdev_id: ID of the vdev to which this info belongs. 8856 * @congestion: This field holds the congestion percentage = 8857 * (busy_time/total_time)*100 8858 * for the interval from when the vdev was started to the current time 8859 * (or the time at which the vdev was stopped). 8860 */ 8861 struct wmi_host_congestion_stats { 8862 uint32_t vdev_id; 8863 uint32_t congestion; 8864 }; 8865 #endif 8866 8867 #ifdef FEATURE_WLAN_APF 8868 /** 8869 * struct wmi_apf_write_memory_params - Android Packet Filter write memory 8870 * params 8871 * @vdev_id: VDEV on which APF memory is to be written 8872 * @apf_version: APF version number 8873 * @program_len: Length reserved for program in the APF work memory 8874 * @addr_offset: Relative address in APF work memory to start writing 8875 * @length: Size of the write 8876 * @buf: Pointer to the buffer 8877 */ 8878 struct wmi_apf_write_memory_params { 8879 uint8_t vdev_id; 8880 uint32_t apf_version; 8881 uint32_t program_len; 8882 uint32_t addr_offset; 8883 uint32_t length; 8884 uint8_t *buf; 8885 }; 8886 8887 /** 8888 * struct wmi_apf_read_memory_params - Android Packet Filter read memory params 8889 * @vdev_id: vdev id 8890 * @addr_offset: Relative address in APF work memory to read from 8891 * @length: Size of the memory fetch 8892 */ 8893 struct wmi_apf_read_memory_params { 8894 uint8_t vdev_id; 8895 uint32_t addr_offset; 8896 uint32_t length; 8897 }; 8898 8899 /** 8900 * struct wmi_apf_read_memory_resp_event_params - Event containing read Android 8901 * Packet Filter memory response 8902 * @vdev_id: vdev id 8903 * @offset: Read memory offset 8904 * @length: Read memory length 8905 * @more_data: Indicates more data to come 8906 * @data: Pointer to the data 8907 */ 8908 struct wmi_apf_read_memory_resp_event_params { 8909 uint32_t vdev_id; 8910 uint32_t offset; 8911 uint32_t length; 8912 bool more_data; 8913 uint8_t *data; 8914 }; 8915 #endif /* FEATURE_WLAN_APF */ 8916 8917 /* vdev control flags (per bits) */ 8918 #define WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP 0x00000001 8919 #define WMI_HOST_VDEV_FLAGS_TRANSMIT_AP 0x00000002 8920 #define WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 8921 8922 /* Begin of roam scan stats definitions */ 8923 8924 #define WMI_ROAM_SCAN_STATS_MAX 5 8925 #define WMI_ROAM_SCAN_STATS_CANDIDATES_MAX 4 8926 #define WMI_ROAM_SCAN_STATS_CHANNELS_MAX 50 8927 8928 /** 8929 * struct wmi_roam_scan_stats_req - Structure to hold roam scan stats request 8930 * @vdev_id: interface id 8931 */ 8932 struct wmi_roam_scan_stats_req { 8933 uint32_t vdev_id; 8934 }; 8935 8936 /** 8937 * struct wmi_roam_scan_cand - Roam scan candidates 8938 * @score: score of AP 8939 * @rssi: rssi of the AP 8940 * @freq: center frequency 8941 * @bssid: bssid of AP 8942 */ 8943 struct wmi_roam_scan_cand { 8944 uint32_t score; 8945 uint32_t rssi; 8946 uint32_t freq; 8947 uint8_t bssid[QDF_MAC_ADDR_SIZE]; 8948 }; 8949 8950 /** 8951 * struct wmi_roam_scan_stats_params - Roam scan details 8952 * @time_stamp: time at which this roam scan happened 8953 * @client_id: id of client which triggered this scan 8954 * @num_scan_chans: number of channels that were scanned as part of this scan 8955 * @scan_freqs: frequencies of the channels that were scanned 8956 * @is_roam_successful: whether a successful roaming happened after this scan 8957 * @old_bssid: bssid to which STA is connected just before this scan 8958 * @new_bssid: bssid to which STA is roamed to in case of successful roaming 8959 * @num_roam_candidates: no.of roam candidates that are being reported 8960 * @cand: roam scan candidate details 8961 * @trigger_id: reason for triggering this roam or roam scan 8962 * @trigger_value: threshold value related to trigger_id 8963 */ 8964 struct wmi_roam_scan_stats_params { 8965 uint64_t time_stamp; 8966 uint32_t client_id; 8967 uint32_t num_scan_chans; 8968 uint32_t scan_freqs[WMI_ROAM_SCAN_STATS_CHANNELS_MAX]; 8969 uint32_t is_roam_successful; 8970 8971 /* Bssid to which STA is connected when the roam scan is triggered */ 8972 uint8_t old_bssid[QDF_MAC_ADDR_SIZE]; 8973 8974 /* 8975 * Bssid to which STA is connected after roaming. Will be valid only 8976 * if is_roam_successful is true. 8977 */ 8978 uint8_t new_bssid[QDF_MAC_ADDR_SIZE]; 8979 8980 /* Number of roam candidates that are being reported in the stats */ 8981 uint32_t num_roam_candidates; 8982 struct wmi_roam_scan_cand cand[WMI_ROAM_SCAN_STATS_CANDIDATES_MAX]; 8983 uint32_t trigger_id; 8984 uint32_t trigger_value; 8985 }; 8986 8987 /** 8988 * struct wmi_roam_scan_stats_res - Roam scan stats response from firmware 8989 * @num_roam_scans: number of roam scans triggered 8990 * @roam_scan: place holder to indicate the array of 8991 * wmi_roam_scan_stats_params followed by this structure 8992 */ 8993 struct wmi_roam_scan_stats_res { 8994 uint32_t num_roam_scans; 8995 struct wmi_roam_scan_stats_params roam_scan[0]; 8996 }; 8997 8998 #define MAX_ROAM_CANDIDATE_AP 9 8999 #define MAX_ROAM_SCAN_CHAN 38 9000 #define MAX_ROAM_SCAN_STATS_TLV 5 9001 #define WLAN_MAX_BTM_CANDIDATE 8 9002 #define WLAN_ROAM_MAX_FRAME_INFO (MAX_ROAM_CANDIDATE_AP * 6) 9003 /** 9004 * struct wmi_btm_req_candidate_info - BTM request candidate info 9005 * @candidate_bssid: Candidate bssid received in BTM request 9006 * @timestamp: candidate_timestamp; 9007 * @preference: candidate preference 9008 */ 9009 struct wmi_btm_req_candidate_info { 9010 struct qdf_mac_addr candidate_bssid; 9011 uint32_t timestamp; 9012 uint8_t preference; 9013 }; 9014 9015 /** 9016 * struct wmi_roam_trigger_per_data - per roam trigger related information 9017 * @rx_rate_thresh_percent: percentage of lower than rx rate threshold 9018 * @tx_rate_thresh_percent: percentage of lower than tx rate threshold 9019 */ 9020 struct wmi_roam_trigger_per_data { 9021 uint8_t rx_rate_thresh_percent; 9022 uint8_t tx_rate_thresh_percent; 9023 }; 9024 9025 /** 9026 * struct wmi_roam_trigger_bmiss_data - bmiss roam trigger related information 9027 * @final_bmiss_cnt: final beacon miss count 9028 * @consecutive_bmiss_cnt: consecutive beacon miss count 9029 * @qos_null_success: is Qos-Null tx Success: 0: success, 1:fail 9030 */ 9031 struct wmi_roam_trigger_bmiss_data { 9032 uint32_t final_bmiss_cnt; 9033 uint32_t consecutive_bmiss_cnt; 9034 uint8_t qos_null_success; 9035 }; 9036 9037 /** 9038 * struct wmi_roam_trigger_low_rssi_data - low rssi roam trigger 9039 * related information 9040 * @current_rssi: Connected AP rssi in dBm 9041 * @roam_rssi_threshold: rssi threshold value in dBm 9042 * @rx_linkspeed_status: rx linkspeed status, 0:good linkspeed, 1:bad 9043 */ 9044 struct wmi_roam_trigger_low_rssi_data { 9045 uint8_t current_rssi; 9046 uint8_t roam_rssi_threshold; 9047 uint8_t rx_linkspeed_status; 9048 }; 9049 9050 /** 9051 * struct wmi_roam_trigger_hi_rssi_data - high rssi roam trigger 9052 * related information 9053 * @current_rssi: Connected AP rssi in dBm 9054 * @hirssi_threshold: roam high RSSI threshold 9055 */ 9056 struct wmi_roam_trigger_hi_rssi_data { 9057 uint8_t current_rssi; 9058 uint8_t hirssi_threshold; 9059 }; 9060 9061 /** 9062 * struct wmi_roam_trigger_congestion_data - congestion roam trigger 9063 * related information 9064 * @rx_tput: RX Throughput in bytes per second in dense env 9065 * @tx_tput: TX Throughput in bytes per second in dense env 9066 * @roamable_count: roamable AP count info in dense env 9067 */ 9068 struct wmi_roam_trigger_congestion_data { 9069 uint32_t rx_tput; 9070 uint32_t tx_tput; 9071 uint8_t roamable_count; 9072 }; 9073 9074 /** 9075 * struct wmi_roam_trigger_user_data - user roam trigger related information 9076 * @invoke_reason: defined in wlan_roam_invoke_reason 9077 */ 9078 struct wmi_roam_trigger_user_data { 9079 uint32_t invoke_reason; 9080 }; 9081 9082 /** 9083 * struct wmi_roam_trigger_background_data - roam trigger related information 9084 * @current_rssi: Connected AP rssi in dBm 9085 * @data_rssi: data frame rssi in dBm 9086 * @data_rssi_threshold: data rssi threshold in dBm 9087 */ 9088 struct wmi_roam_trigger_background_data { 9089 uint8_t current_rssi; 9090 uint8_t data_rssi; 9091 uint8_t data_rssi_threshold; 9092 }; 9093 9094 /** 9095 * struct wmi_roam_btm_trigger_data - BTM roam trigger related information 9096 * @timestamp: timestamp 9097 * @btm_request_mode: BTM request mode - solicited/unsolicited 9098 * @disassoc_timer: Number of TBTT before AP disassociates the STA in ms 9099 * @validity_interval: Preferred candidate list validity interval in ms 9100 * @candidate_list_count: Number of candidates in BTM request. 9101 * @btm_resp_status: Status code of the BTM response. 9102 * @btm_bss_termination_timeout: BTM BSS termination timeout value 9103 * in milli seconds 9104 * @btm_mbo_assoc_retry_timeout: BTM MBO assoc retry timeout value in 9105 * milli seconds 9106 * @token: BTM request dialog token 9107 * @btm_cand: BTM request candidate information 9108 */ 9109 struct wmi_roam_btm_trigger_data { 9110 uint32_t timestamp; 9111 uint32_t btm_request_mode; 9112 uint32_t disassoc_timer; 9113 uint32_t validity_interval; 9114 uint32_t candidate_list_count; 9115 uint32_t btm_resp_status; 9116 uint32_t btm_bss_termination_timeout; 9117 uint32_t btm_mbo_assoc_retry_timeout; 9118 uint16_t token; 9119 struct wmi_btm_req_candidate_info btm_cand[WLAN_MAX_BTM_CANDIDATE]; 9120 }; 9121 9122 /** 9123 * struct wmi_roam_cu_trigger_data - BSS Load roam trigger parameters 9124 * @cu_load: Connected AP CU load percentage 9125 */ 9126 struct wmi_roam_cu_trigger_data { 9127 uint32_t cu_load; 9128 /* TODO: Add threshold value */ 9129 }; 9130 9131 /** 9132 * struct wmi_roam_rssi_trigger_data - RSSI roam trigger related 9133 * parameters 9134 * @threshold: RSSI threshold value in dBm for LOW rssi roam trigger 9135 */ 9136 struct wmi_roam_rssi_trigger_data { 9137 uint32_t threshold; 9138 }; 9139 9140 /** 9141 * struct wmi_roam_deauth_trigger_data - Deauth roaming trigger related 9142 * parameters 9143 * @type: 1- Deauthentication 2- Disassociation 9144 * @reason: Status code of the Deauth/Disassoc received 9145 */ 9146 struct wmi_roam_deauth_trigger_data { 9147 uint32_t type; 9148 uint32_t reason; 9149 }; 9150 9151 /** 9152 * struct wmi_roam_trigger_periodic_data - periodic roam trigger 9153 * related information 9154 * @periodic_timer_ms: roam scan periodic, milliseconds 9155 */ 9156 struct wmi_roam_trigger_periodic_data { 9157 uint32_t periodic_timer_ms; 9158 }; 9159 9160 /** 9161 * struct wmi_roam_trigger_tx_failures_data - tx failures roam trigger 9162 * related information 9163 * @kickout_threshold: consecutive tx failure threshold 9164 * @kickout_reason: defined in wmi_peer_sta_kickout_reason 9165 */ 9166 struct wmi_roam_trigger_tx_failures_data { 9167 uint32_t kickout_threshold; 9168 uint32_t kickout_reason; 9169 }; 9170 9171 /** 9172 * struct wmi_roam_wtc_btm_trigger_data - wtc btm roaming trigger related 9173 * parameters 9174 * @roaming_mode: Roaming Mode 9175 * @vsie_trigger_reason: Roam trigger reason present in btm request 9176 * @sub_code: Sub code present in btm request 9177 * @wtc_mode: WTC mode 9178 * @wtc_scan_mode: WTC scan mode 9179 * @wtc_rssi_th: Connected AP threshold 9180 * @wtc_candi_rssi_th: Candidate AP threshold 9181 * @wtc_candi_rssi_ext_present: Flag to notify that whether fw sends rssi 9182 * threshold for 5g & 6g AP to host or not 9183 * @wtc_candi_rssi_th_5g: 5g candidate AP rssi threshold 9184 * @wtc_candi_rssi_th_6g: 6g candidate AP rssi threshold 9185 * @duration: WTC duration 9186 */ 9187 struct wmi_roam_wtc_btm_trigger_data { 9188 uint32_t roaming_mode; 9189 uint32_t vsie_trigger_reason; 9190 uint32_t sub_code; 9191 uint32_t wtc_mode; 9192 uint32_t wtc_scan_mode; 9193 uint32_t wtc_rssi_th; 9194 uint32_t wtc_candi_rssi_th; 9195 uint32_t wtc_candi_rssi_ext_present; 9196 uint32_t wtc_candi_rssi_th_5g; 9197 uint32_t wtc_candi_rssi_th_6g; 9198 uint32_t duration; 9199 }; 9200 9201 /** 9202 * struct wmi_roam_trigger_abort_reason - abort roam related information 9203 * @abort_reason_code: detail in qca_wlan_roam_abort_reason 9204 * @data_rssi: data rssi in dBm 9205 * @data_rssi_threshold: data rssi threshold in dBm 9206 * @rx_linkspeed_status: rx linkspeed status, 0:good linkspeed, 1:bad 9207 */ 9208 struct wmi_roam_trigger_abort_reason { 9209 uint32_t abort_reason_code; 9210 uint8_t data_rssi; 9211 uint8_t data_rssi_threshold; 9212 uint8_t rx_linkspeed_status; 9213 }; 9214 9215 /** 9216 * struct wmi_roam_candidate_info - Roam scan candidate APs related info 9217 * @timestamp: Host timestamp in millisecs 9218 * @type: 0 - Candidate AP; 1 - Current connected AP. 9219 * @bssid: AP bssid. 9220 * @freq: Channel frquency 9221 * @cu_load: Channel utilization load of the AP. 9222 * @cu_score: Channel Utilization score. 9223 * @rssi: Candidate AP rssi 9224 * @rssi_score: AP RSSI score 9225 * @total_score: Total score of the candidate AP. 9226 * @etp: Estimated throughput value of the AP in Mbps 9227 * @dl_reason: Denylist reason 9228 * @dl_source: Source of adding AP to DL 9229 * @dl_timestamp:This timestamp indicates the time when AP added 9230 * to denylist. 9231 * @dl_original_timeout: Original timeout value in milli seconds 9232 * when AP added to DL 9233 */ 9234 struct wmi_roam_candidate_info { 9235 uint32_t timestamp; 9236 uint8_t type; 9237 struct qdf_mac_addr bssid; 9238 uint16_t freq; 9239 uint32_t cu_load; 9240 uint32_t cu_score; 9241 uint32_t rssi; 9242 uint32_t rssi_score; 9243 uint32_t total_score; 9244 uint32_t etp; 9245 uint32_t dl_reason; 9246 uint32_t dl_source; 9247 uint32_t dl_timestamp; 9248 uint32_t dl_original_timeout; 9249 }; 9250 9251 /** 9252 * struct wmi_roam_scan_data - Roam scan event details 9253 * @present: Flag to check if the roam scan tlv is present 9254 * @is_btcoex_active: is bluetooth connection active 9255 * @type: 0 - Partial roam scan; 1 - Full roam scan 9256 * @num_ap: Number of candidate APs. 9257 * @num_chan: Number of channels. 9258 * @frame_info_count: Frame info TLV count 9259 * @next_rssi_threshold: Next roam can trigger rssi threshold 9260 * @chan_freq: List of frequencies scanned as part of roam scan 9261 * @ap: List of candidate AP info 9262 * @dwell_type: roam scan channel dwell type, enum in roam_scan_dwell_type 9263 * @scan_complete_timestamp: timestamp of all channels scan completed 9264 */ 9265 struct wmi_roam_scan_data { 9266 bool present; 9267 bool is_btcoex_active; 9268 uint16_t type; 9269 uint16_t num_ap; 9270 uint16_t num_chan; 9271 uint16_t frame_info_count; 9272 uint32_t next_rssi_threshold; 9273 uint16_t chan_freq[MAX_ROAM_SCAN_CHAN]; 9274 struct wmi_roam_candidate_info ap[MAX_ROAM_CANDIDATE_AP]; 9275 uint8_t dwell_type[MAX_ROAM_SCAN_CHAN]; 9276 uint32_t scan_complete_timestamp; 9277 }; 9278 9279 /** 9280 * struct wmi_roam_result - Roam result related info. 9281 * @present: Flag to check if the roam result tlv is present 9282 * @timestamp: Host timestamp in millisecs 9283 * @status: 0 - Roaming is success ; 1 - Roaming failed ; 9284 * 2 - No roam 9285 * @fail_reason: One of WMI_ROAM_FAIL_REASON_ID 9286 * @fail_bssid: BSSID of the last attempted roam failed AP 9287 */ 9288 struct wmi_roam_result { 9289 bool present; 9290 uint32_t timestamp; 9291 uint32_t status; 9292 uint32_t fail_reason; 9293 struct qdf_mac_addr fail_bssid; 9294 }; 9295 9296 #define WLAN_11KV_TYPE_BTM_REQ 1 9297 #define WLAN_11KV_TYPE_NEIGHBOR_RPT 2 9298 9299 /** 9300 * struct wmi_neighbor_report_data - Neighbor report/BTM request related 9301 * data. 9302 * @present: Flag to check if the roam 11kv tlv is present 9303 * @timestamp: Host timestamp in millisecs 9304 * @req_type: 1 - BTM query ; 2 - 11K neighbor report request 9305 * @req_time: Request timestamp in ms 9306 * @resp_time: Response timestamp in ms 9307 * @num_freq: Number of frequencies 9308 * @freq: Channel frequency in Mhz 9309 * @btm_query_token: BTM query dialog token. 9310 * @btm_query_reason: BTM query reasons as defined in 9311 * IEEE802.11v spec table 7-43x 9312 * @req_token: Request token 9313 * @resp_token: Response Token 9314 * @num_rpt: Number of report element 9315 */ 9316 struct wmi_neighbor_report_data { 9317 bool present; 9318 uint32_t timestamp; 9319 uint8_t req_type; 9320 uint32_t req_time; 9321 uint32_t resp_time; 9322 uint8_t num_freq; 9323 uint32_t freq[MAX_ROAM_SCAN_CHAN]; 9324 uint16_t btm_query_token; 9325 uint8_t btm_query_reason; 9326 uint8_t req_token; 9327 uint8_t resp_token; 9328 uint8_t num_rpt; 9329 }; 9330 9331 /** 9332 * struct wmi_roam_trigger_info() - Roam trigger related details 9333 * @present: Flag to check if the roam_trigger_info tlv is present 9334 * @common_roam: Flag to indicate common roam or special roam 9335 * @trigger_reason: Roam trigger reason(enum WMI_ROAM_TRIGGER_REASON_ID) 9336 * @trigger_sub_reason: Sub reason for roam trigger if multiple roam scans 9337 * @current_rssi: Connected AP RSSI 9338 * @timestamp: Host timestamp in millisecs when roam scan was triggered 9339 * @per_trig_data: per roam trigger parameters 9340 * @bmiss_trig_data: beacon miss roam trigger parameters. 9341 * @low_rssi_trig_data: low rssi roam trigger parameters. 9342 * @hi_rssi_trig_data: high rssi roam trigger parameters. 9343 * @congestion_trig_data: congestion roam trigger parameters. 9344 * @user_trig_data: user trigger roam parameters. 9345 * @background_trig_data: background roam trigger parameters. 9346 * @btm_trig_data: BTM roam trigger parameters. 9347 * @cu_trig_data: BSS Load roam trigger parameters. 9348 * @rssi_trig_data: RSSI trigger related info. 9349 * @deauth_trig_data: Deauth roam trigger related info 9350 * @periodic_trig_data: periodic roam trigger parameters. 9351 * @tx_failures_trig_data: tx failures roam trigger parameters. 9352 * @wtc_btm_trig_data: WTC BTM roam trigger related info 9353 * @abort_reason: roam abort reason 9354 * @scan_type: roam scan type 9355 * @roam_status: roam result status 9356 * @fail_reason: roam fail reason 9357 */ 9358 struct wmi_roam_trigger_info { 9359 bool present; 9360 bool common_roam; 9361 uint32_t trigger_reason; 9362 uint32_t trigger_sub_reason; 9363 uint32_t current_rssi; 9364 uint32_t timestamp; 9365 union { 9366 struct wmi_roam_trigger_per_data per_trig_data; 9367 struct wmi_roam_trigger_bmiss_data bmiss_trig_data; 9368 struct wmi_roam_trigger_low_rssi_data low_rssi_trig_data; 9369 struct wmi_roam_trigger_hi_rssi_data hi_rssi_trig_data; 9370 struct wmi_roam_trigger_congestion_data congestion_trig_data; 9371 struct wmi_roam_trigger_user_data user_trig_data; 9372 struct wmi_roam_trigger_background_data background_trig_data; 9373 struct wmi_roam_btm_trigger_data btm_trig_data; 9374 struct wmi_roam_cu_trigger_data cu_trig_data; 9375 struct wmi_roam_rssi_trigger_data rssi_trig_data; 9376 struct wmi_roam_deauth_trigger_data deauth_trig_data; 9377 struct wmi_roam_trigger_periodic_data periodic_trig_data; 9378 struct wmi_roam_trigger_tx_failures_data tx_failures_trig_data; 9379 struct wmi_roam_wtc_btm_trigger_data wtc_btm_trig_data; 9380 }; 9381 struct wmi_roam_trigger_abort_reason abort_reason; 9382 uint32_t scan_type; 9383 uint32_t roam_status; 9384 uint32_t fail_reason; 9385 }; 9386 9387 /* End of roam scan stats definitions */ 9388 9389 /** 9390 * enum wmi_obss_color_collision_evt_type - bss color collision event type 9391 * @OBSS_COLOR_COLLISION_DETECTION_DISABLE: OBSS color detection disabled 9392 * @OBSS_COLOR_COLLISION_DETECTION: OBSS color collision detection 9393 * @OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY: OBSS free slot detection with 9394 * within expiry period 9395 * @OBSS_COLOR_FREE_SLOT_AVAILABLE: OBSS free slot detection 9396 * 9397 * Defines different types of type for obss color collision event type. 9398 */ 9399 enum wmi_obss_color_collision_evt_type { 9400 OBSS_COLOR_COLLISION_DETECTION_DISABLE = 0, 9401 OBSS_COLOR_COLLISION_DETECTION = 1, 9402 OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY = 2, 9403 OBSS_COLOR_FREE_SLOT_AVAILABLE = 3, 9404 }; 9405 9406 /** 9407 * struct wmi_obss_color_collision_cfg_param - obss color collision cfg 9408 * @vdev_id: vdev id 9409 * @flags: proposed for future use cases, currently not used. 9410 * @evt_type: bss color collision event. 9411 * @current_bss_color: current bss color. 9412 * @detection_period_ms: scan interval for both AP and STA mode. 9413 * @scan_period_ms: scan period for passive scan to detect collision. 9414 * @free_slot_expiry_time_ms: FW to notify host at timer expiry after 9415 * which Host will disable the bss color. 9416 */ 9417 struct wmi_obss_color_collision_cfg_param { 9418 uint32_t vdev_id; 9419 uint32_t flags; 9420 enum wmi_obss_color_collision_evt_type evt_type; 9421 uint32_t current_bss_color; 9422 uint32_t detection_period_ms; 9423 uint32_t scan_period_ms; 9424 uint32_t free_slot_expiry_time_ms; 9425 }; 9426 9427 /** 9428 * struct wmi_obss_color_collision_info - bss color detection info from firmware 9429 * @vdev_id: ID of the vdev to which this info belongs. 9430 * @evt_type: bss color collision event. 9431 * @obss_color_bitmap_bit0to31: Bit set indicating BSS color present. 9432 * @obss_color_bitmap_bit32to63: Bit set indicating BSS color present. 9433 */ 9434 struct wmi_obss_color_collision_info { 9435 uint32_t vdev_id; 9436 enum wmi_obss_color_collision_evt_type evt_type; 9437 uint32_t obss_color_bitmap_bit0to31; 9438 uint32_t obss_color_bitmap_bit32to63; 9439 }; 9440 9441 #ifdef WMI_AP_SUPPORT 9442 /** 9443 * struct vap_pcp_tid_map_params - PCP tid map params 9444 * @vdev_id: vdev id 9445 * @pcp_to_tid_map: pointer to array of pcp to tid map table 9446 */ 9447 struct vap_pcp_tid_map_params { 9448 uint32_t vdev_id; 9449 uint32_t *pcp_to_tid_map; 9450 }; 9451 9452 /** 9453 * struct vap_tidmap_prec_params - tidmap precedence params 9454 * @vdev_id: vdev id 9455 * @map_precedence: precedence of tid mapping 9456 */ 9457 struct vap_tidmap_prec_params { 9458 uint32_t vdev_id; 9459 uint32_t map_precedence; 9460 }; 9461 9462 #endif 9463 9464 /** 9465 * struct peer_vlan_config_param - peer vlan parameter 9466 * @tx_cmd: Tx command 9467 * @rx_cmd: Rx Command 9468 * @tx_strip_insert: Strip or Insert vlan in Tx[0:Strip, 1: Insert] 9469 * @tx_strip_insert_inner: Enable tx_strip_insert operation for inner vlan tag. 9470 * @tx_strip_insert_outer: Enable tx_strip_insert operation for outer vlan tag. 9471 * @rx_strip_c_tag: Strip c_tag 9472 * @rx_strip_s_tag: Strip s_tag 9473 * @rx_insert_c_tag: Insert c_tag 9474 * @rx_insert_s_tag: Insert s_tag 9475 * @insert_vlan_inner_tci: Vlan inner tci 9476 * @insert_vlan_outer_tci: Vlan outer tci 9477 * @vdev_id: vdev id corresponding to peer. 9478 */ 9479 struct peer_vlan_config_param { 9480 uint16_t tx_cmd:1; 9481 uint16_t rx_cmd:1; 9482 uint16_t tx_strip_insert:1; 9483 uint16_t tx_strip_insert_inner:1; 9484 uint16_t tx_strip_insert_outer:1; 9485 uint16_t rx_strip_c_tag:1; 9486 uint16_t rx_strip_s_tag:1; 9487 uint16_t rx_insert_c_tag:1; 9488 uint16_t rx_insert_s_tag:1; 9489 uint16_t insert_vlan_inner_tci; 9490 uint16_t insert_vlan_outer_tci; 9491 uint8_t vdev_id; 9492 }; 9493 9494 /** 9495 * struct wmi_cfr_peer_tx_event_param - CFR peer tx_event params 9496 * @capture_method: CFR data capture method 9497 * @vdev_id: ID of vdev to which this info belongs 9498 * @peer_mac_addr: Peer MAC address. In AP mode, it is the address of connected 9499 * peer for which CFR capture is needed. In STA mode, this is 9500 * the address of AP it is connected to. 9501 * @primary_20mhz_chan: Primary 20 MHz channel frequency in MHz 9502 * @bandwidth: BW of measurement 9503 * 0 - 20MHz, 1 - 40MHz, 2 - 80MHz, 3 - 160MHz, 4 - 80+80MHz 9504 * @phy_mode: Phy mode of channel, type - WMI_HOST_WLAN_PHY_MODE 9505 * @band_center_freq1: Center frequency 1 in MHz 9506 * @band_center_freq2: Center frequency 2 in MHz 9507 * @spatial_streams: Number of spatial streams 9508 * @correlation_info_1: Address of data from wmi_dma_buf_release_entry [31:0] 9509 * @correlation_info_2: 9510 * Bits [3:0] - Address of data from wmi_dma_buf_release_entry [35:32] 9511 * Bits [15:4] - Reserved 9512 * Bits [31:16] - Hardware PPDU ID [15:0] 9513 * @status: 9514 * Bits [1:0] - TX status, if any. 0-OK, 1-XRETRY, 2-DROP, 3-FILTERED. 9515 * Bits [30:2] - Reserved 9516 * Bit [31] - Status of the CFR capture of the peer 9517 * 1 - Successful, 0 - Unsuccessful. 9518 * @timestamp_us: Timestamp in microseconds at which the CFR was captured 9519 * in the hardware. The clock used for this timestamp is private 9520 * to the target and not visible to the host. So, Host can 9521 * interpret only the relative timestamp deltas from one message 9522 * to the next, but can't interpret the absolute timestamp 9523 * from a single message 9524 * @counter: Count of the current CFR capture from FW. 9525 * This is helpful to identify any drops in FW 9526 * @chain_rssi: Per chain RSSI of the peer, for upto WMI_HOST_MAX_CHAINS. 9527 * Each chain's entry reports the RSSI for different bandwidths. 9528 * Bits [7:0] - Primary 20 MHz 9529 * Bits [15:8] - Secondary 20 MHz of 40 MHz channel (if applicable) 9530 * Bits [23:16] - Secondary 40 MHz of 80 MHz channel (if applicable) 9531 * Bits [31:24] - Secondary 80 MHz of 160 MHz channel (if applicable) 9532 * Each of these 8-bit RSSI reports is in dBm units. 0x80 means invalid. 9533 * Unused bytes within used chain_rssi indices will be 0x80. 9534 * Unused rssi_chain indices will be set to 0x80808080. 9535 * @chain_phase: Per chain phase of peer for upto WMI_HOST_MAX_CHAINS. 9536 * @cfo_measurement: 9537 * @agc_gain: 9538 * @rx_start_ts: 9539 * @rx_ts_reset: 9540 * @mcs_rate: 9541 * @gi_type: 9542 * @agc_gain_tbl_index: 9543 */ 9544 typedef struct { 9545 uint32_t capture_method; 9546 uint32_t vdev_id; 9547 struct qdf_mac_addr peer_mac_addr; 9548 uint32_t primary_20mhz_chan; 9549 uint32_t bandwidth; 9550 uint32_t phy_mode; 9551 uint32_t band_center_freq1; 9552 uint32_t band_center_freq2; 9553 uint32_t spatial_streams; 9554 uint32_t correlation_info_1; 9555 uint32_t correlation_info_2; 9556 uint32_t status; 9557 uint32_t timestamp_us; 9558 uint32_t counter; 9559 uint32_t chain_rssi[WMI_HOST_MAX_CHAINS]; 9560 uint16_t chain_phase[WMI_HOST_MAX_CHAINS]; 9561 int32_t cfo_measurement; 9562 uint8_t agc_gain[WMI_HOST_MAX_CHAINS]; 9563 uint32_t rx_start_ts; 9564 uint32_t rx_ts_reset; 9565 uint32_t mcs_rate; 9566 uint32_t gi_type; 9567 uint8_t agc_gain_tbl_index[WMI_HOST_MAX_CHAINS]; 9568 } wmi_cfr_peer_tx_event_param; 9569 9570 /** 9571 * struct wmi_cfr_phase_delta_param - AoA phase delta params 9572 * @pdev_id: pdev id 9573 * @freq: primary 20 MHz channel frequency in mhz 9574 * @max_chains: indicates max chains for which AoA will be reported 9575 * @chain_phase_mask: indicates the chains to which phase values are 9576 * reported by target 9577 * @phase_delta: phase delta associated with reported chain's each gain value 9578 * @ibf_cal_val: IBF values to be added with phase delta of chains reported 9579 */ 9580 struct wmi_cfr_phase_delta_param { 9581 uint32_t pdev_id; 9582 uint32_t freq; 9583 uint32_t max_chains; 9584 uint32_t chain_phase_mask; 9585 uint32_t phase_delta[WMI_MAX_CHAINS_PHASE][WMI_MAX_AOA_PHASE_DELTA]; 9586 uint32_t ibf_cal_val[WMI_MAX_CHAINS_PHASE]; 9587 }; 9588 9589 /** 9590 * struct wmi_host_oem_indirect_data - Indirect OEM data 9591 * @pdev_id: pdev id 9592 * @len: length of data in bytes 9593 * @addr: 36 bit address 9594 */ 9595 struct wmi_host_oem_indirect_data { 9596 uint32_t pdev_id; 9597 uint32_t len; 9598 uint64_t addr; 9599 }; 9600 9601 /** 9602 * struct wmi_oem_response_param - OEM response info 9603 * @num_data1: First data response length 9604 * @num_data2: Second data response length 9605 * @data_1: First data 9606 * @data_2: Second data 9607 * @indirect_data: Indirect data 9608 */ 9609 struct wmi_oem_response_param { 9610 uint32_t num_data1; 9611 uint32_t num_data2; 9612 uint8_t *data_1; 9613 uint8_t *data_2; 9614 struct wmi_host_oem_indirect_data indirect_data; 9615 }; 9616 9617 /** 9618 * struct wifi_pos_pasn_peer_data - Wifi pos 11az ranging peer 9619 * data. This structure is used to copy the peer related info from 9620 * PASN events and pass it to wifi pos module 9621 * @vdev_id: vdev id 9622 * @num_peers: Total number of peers to be deleted 9623 * @peer_info: PASN peer entry details 9624 */ 9625 struct wifi_pos_pasn_peer_data { 9626 uint8_t vdev_id; 9627 uint8_t num_peers; 9628 struct wlan_pasn_request peer_info[WLAN_MAX_11AZ_PEERS]; 9629 }; 9630 9631 /** 9632 * struct mws_coex_state - Modem Wireless Subsystem(MWS) coex info 9633 * @vdev_id : vdev id 9634 * @coex_scheme_bitmap: LTE-WLAN coexistence scheme bitmap 9635 * Indicates the final schemes applied for the current Coex scenario. 9636 * Bit 0 - TDM policy 9637 * Bit 1 - Forced TDM policy 9638 * Bit 2 - Dynamic Power Back-off policy 9639 * Bit 3 - Channel Avoidance policy 9640 * Bit 4 - Static Power Back-off policy. 9641 * @active_conflict_count : active conflict count 9642 * @potential_conflict_count: Potential conflict count 9643 * @chavd_group0_bitmap: Indicates the WLAN channels to be avoided in 9644 * b/w WLAN CH-1 and WLAN CH-14 9645 * @chavd_group1_bitmap: Indicates the WLAN channels to be avoided in 9646 * WLAN CH-36 and WLAN CH-64 9647 * @chavd_group2_bitmap: Indicates the WLAN channels to be avoided in 9648 * b/w WLAN CH-100 and WLAN CH-140 9649 * @chavd_group3_bitmap: Indicates the WLAN channels to be avoided in 9650 * b/w WLAN CH-149 and WLAN CH-165 9651 */ 9652 struct mws_coex_state { 9653 uint32_t vdev_id; 9654 uint32_t coex_scheme_bitmap; 9655 uint32_t active_conflict_count; 9656 uint32_t potential_conflict_count; 9657 uint32_t chavd_group0_bitmap; 9658 uint32_t chavd_group1_bitmap; 9659 uint32_t chavd_group2_bitmap; 9660 uint32_t chavd_group3_bitmap; 9661 }; 9662 9663 /** 9664 * struct mws_coex_dpwb_state - Modem Wireless Subsystem(MWS) coex DPWB info 9665 * @vdev_id: vdev id 9666 * @current_dpwb_state: Current state of the Dynamic Power Back-off SM 9667 * @pnp1_value: Tx power to be applied in next Dynamic Power Back-off cycle 9668 * @lte_dutycycle: Indicates the duty cycle of current LTE frame 9669 * @sinr_wlan_on: LTE SINR value in dB, when WLAN is ON 9670 * @sinr_wlan_off: LTE SINR value in dB, when WLAN is OFF 9671 * @bler_count: LTE blocks with error for the current block err report. 9672 * @block_count: Number of LTE blocks considered for bler count report. 9673 * @wlan_rssi_level: WLAN RSSI level 9674 * @wlan_rssi: WLAN RSSI value in dBm considered in DP backoff algo 9675 * @is_tdm_running: Indicates whether any TDM policy triggered 9676 */ 9677 struct mws_coex_dpwb_state { 9678 uint32_t vdev_id; 9679 int32_t current_dpwb_state; 9680 int32_t pnp1_value; 9681 uint32_t lte_dutycycle; 9682 int32_t sinr_wlan_on; 9683 int32_t sinr_wlan_off; 9684 uint32_t bler_count; 9685 uint32_t block_count; 9686 uint32_t wlan_rssi_level; 9687 int32_t wlan_rssi; 9688 uint32_t is_tdm_running; 9689 }; 9690 9691 /** 9692 * struct mws_coex_tdm_state - Modem Wireless Subsystem(MWS) coex TDM state info 9693 * @vdev_id: vdev id 9694 * @tdm_policy_bitmap: Time Division Multiplexing (TDM) LTE-Coex Policy type. 9695 * @tdm_sf_bitmap: TDM LTE/WLAN sub-frame bitmap. 9696 */ 9697 struct mws_coex_tdm_state { 9698 uint32_t vdev_id; 9699 uint32_t tdm_policy_bitmap; 9700 uint32_t tdm_sf_bitmap; 9701 }; 9702 9703 /** 9704 * struct mws_coex_idrx_state - Modem Wireless Subsystem(MWS) coex IDRX state 9705 * @vdev_id: vdev id 9706 * @sub0_techid: SUB0 LTE-coex tech. 9707 * @sub0_policy: SUB0 mitigation policy. 9708 * @sub0_is_link_critical: Set if SUB0 is in link critical state. 9709 * @sub0_static_power: LTE SUB0 imposed static power applied 9710 * to WLAN due to LTE-WLAN coex. 9711 * @sub0_rssi: LTE SUB0 RSSI value in dBm. 9712 * @sub1_techid: SUB1 LTE-coex tech. 9713 * @sub1_policy: SUB1 mitigation policy. 9714 * @sub1_is_link_critical: Set if SUB1 is in link critical state. 9715 * @sub1_static_power: LTE SUB1 imposed static power applied 9716 * to WLAN due to LTE-WLAN coex. 9717 * @sub1_rssi: LTE SUB1 RSSI value in dBm. 9718 */ 9719 struct mws_coex_idrx_state { 9720 uint32_t vdev_id; 9721 uint32_t sub0_techid; 9722 uint32_t sub0_policy; 9723 uint32_t sub0_is_link_critical; 9724 int32_t sub0_static_power; 9725 int32_t sub0_rssi; 9726 uint32_t sub1_techid; 9727 uint32_t sub1_policy; 9728 uint32_t sub1_is_link_critical; 9729 int32_t sub1_static_power; 9730 int32_t sub1_rssi; 9731 }; 9732 9733 /** 9734 * struct mws_antenna_sharing_info - MWS Antenna sharing Info 9735 * @vdev_id: vdev id 9736 * @coex_flags: BDF values of Coex flags 9737 * @coex_config: BDF values of Coex Antenna sharing config 9738 * @tx_chain_mask: Tx Chain mask value 9739 * @rx_chain_mask: Rx Chain mask value 9740 * @rx_nss: Currently active Rx Spatial streams 9741 * @force_mrc: Forced MRC policy type 9742 * @rssi_type: RSSI value considered for MRC 9743 * @chain0_rssi: RSSI value measured at Chain-0 in dBm 9744 * @chain1_rssi: RSSI value measured at Chain-1 in dBm 9745 * @combined_rssi: RSSI value of two chains combined in dBm 9746 * @imbalance: Absolute imbalance between two Rx chains in dB 9747 * @mrc_threshold: RSSI threshold defined for the above imbalance value in dBm 9748 * @grant_duration: Antenna grant duration to WLAN, in milliseconds 9749 */ 9750 struct mws_antenna_sharing_info { 9751 uint32_t vdev_id; 9752 uint32_t coex_flags; 9753 uint32_t coex_config; 9754 uint32_t tx_chain_mask; 9755 uint32_t rx_chain_mask; 9756 uint32_t rx_nss; 9757 uint32_t force_mrc; 9758 uint32_t rssi_type; 9759 int32_t chain0_rssi; 9760 int32_t chain1_rssi; 9761 int32_t combined_rssi; 9762 uint32_t imbalance; 9763 int32_t mrc_threshold; 9764 uint32_t grant_duration; 9765 }; 9766 9767 #ifdef FEATURE_ANI_LEVEL_REQUEST 9768 /* Maximum number of freqs for which ANI level can be requested */ 9769 #define MAX_NUM_FREQS_FOR_ANI_LEVEL 20 9770 9771 /* A valid ANI level lies between 0 to 9 */ 9772 #define MAX_ANI_LEVEL 9 9773 9774 struct wmi_host_ani_level_event { 9775 uint32_t chan_freq; 9776 uint32_t ani_level; 9777 }; 9778 #endif /* FEATURE_ANI_LEVEL_REQUEST */ 9779 9780 #define WMI_HOST_TBTT_OFFSET_INVALID 0xffffffff 9781 #define MAX_SUPPORTED_NEIGHBORS 16 9782 9783 /* command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */ 9784 enum wmi_host_tbtt_offset_cmd_type { 9785 WMI_HOST_PDEV_GET_TBTT_OFFSET, 9786 WMI_HOST_PDEV_SET_TBTT_OFFSET, 9787 }; 9788 9789 /** 9790 * struct wmi_raw_event_buffer - fw event buffers 9791 * @evt_raw_buf: event raw buffer 9792 * @evt_processed_buf: event processed buffer 9793 */ 9794 struct wmi_raw_event_buffer { 9795 void *evt_raw_buf; 9796 void *evt_processed_buf; 9797 }; 9798 9799 /* dpd_status from WMI_PDEV_GET_DPD_STATUS_EVENTID */ 9800 enum wmi_host_dpd_status { 9801 WMI_HOST_DPD_STATUS_FAIL = 0, 9802 WMI_HOST_DPD_STATUS_PASS = 1, 9803 WMI_HOST_DPD_STATUS_INVALID = 2, 9804 }; 9805 9806 /** 9807 * struct wmi_host_pdev_get_dpd_status_event 9808 * @pdev_id: pdev id 9809 * @dpd_status: dpd status from FW - FAIL/PASS/INVALID 9810 */ 9811 struct wmi_host_pdev_get_dpd_status_event { 9812 uint32_t pdev_id; 9813 enum wmi_host_dpd_status dpd_status; 9814 }; 9815 9816 struct wmi_host_pdev_get_halphy_cal_status_event { 9817 uint32_t pdev_id; 9818 uint32_t halphy_cal_adc_status:1, 9819 halphy_cal_bwfilter_status:1, 9820 halphy_cal_pdet_and_pal_status:1, 9821 halphy_cal_rxdco_status:1, 9822 halphy_cal_comb_txiq_rxiq_status:1, 9823 halphy_cal_ibf_status:1, 9824 halphy_cal_pa_droop_status:1, 9825 halphy_cal_dac_status:1, 9826 halphy_cal_ani_status:1, 9827 halphy_cal_noise_floor_status:1; 9828 }; 9829 9830 /** 9831 * enum wmi_host_set_halphy_cal_chan_sel - channel select values for 9832 * set halphy cal 9833 * @WMI_HOST_SET_HALPHY_CAL_HOME_CHANNEL: Home channel 9834 * @WMI_HOST_SET_HALPHY_CAL_SCAN_CHANNEL: Scan channel 9835 * @WMI_HOST_SET_HALPHY_CAL_BOTH_CHANNELS: Both (Home + Scan) channels 9836 */ 9837 9838 enum wmi_host_set_halphy_cal_chan_sel { 9839 WMI_HOST_SET_HALPHY_CAL_HOME_CHANNEL = 0, 9840 WMI_HOST_SET_HALPHY_CAL_SCAN_CHANNEL = 1, 9841 WMI_HOST_SET_HALPHY_CAL_BOTH_CHANNELS = 2, 9842 }; 9843 9844 /** 9845 * struct wmi_host_send_set_halphy_cal_info 9846 * @pdev_id: pdev id 9847 * @value: bmap value 9848 * @chan_sel: channel for calibration - HOME/SCAN/BOTH 9849 */ 9850 struct wmi_host_send_set_halphy_cal_info { 9851 uint8_t pdev_id; 9852 uint32_t value; 9853 enum wmi_host_set_halphy_cal_chan_sel chan_sel; 9854 }; 9855 9856 /** 9857 * struct wmi_install_key_comp_event - params of install key complete event 9858 * @vdev_id: unique id identifying the VDEV, generated by the caller 9859 * @key_ix: key index 9860 * @key_flags: key flags 9861 * @status: Event status 9862 * @peer_macaddr: MAC address used for installing 9863 */ 9864 struct wmi_install_key_comp_event { 9865 uint32_t vdev_id; 9866 uint32_t key_ix; 9867 uint32_t key_flags; 9868 uint32_t status; 9869 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 9870 }; 9871 9872 /** 9873 * enum wmi_host_set_halphy_cal_status - status values from 9874 * WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID 9875 * @WMI_HOST_SET_HALPHY_CAL_STATUS_SUCCESS: set halphy cal success 9876 * @WMI_HOST_SET_HALPHY_CAL_STATUS_FAIL: set halphy cal failure 9877 */ 9878 enum wmi_host_set_halphy_cal_status { 9879 WMI_HOST_SET_HALPHY_CAL_STATUS_SUCCESS = 0, 9880 WMI_HOST_SET_HALPHY_CAL_STATUS_FAIL = 1, 9881 }; 9882 9883 /** 9884 * struct wmi_host_pdev_set_halphy_cal_event 9885 * @pdev_id: pdev id 9886 * @status: PASS/FAIL 9887 */ 9888 struct wmi_host_pdev_set_halphy_cal_event { 9889 uint32_t pdev_id; 9890 enum wmi_host_set_halphy_cal_status status; 9891 }; 9892 9893 #ifdef FEATURE_MEC_OFFLOAD 9894 /** 9895 * struct set_mec_timer_params - params MEC timer params 9896 * @pdev_id: unique id identifying the PDEV, generated by the caller 9897 * @vdev_id: unique id identifying the VDEV, generated by the caller 9898 * @mec_aging_timer_threshold: The Threshold for mec aging timer in ms 9899 * @enable: Enable/Disable the command 9900 */ 9901 struct set_mec_timer_params { 9902 uint32_t pdev_id; 9903 uint32_t vdev_id; 9904 uint32_t mec_aging_timer_threshold; 9905 }; 9906 #endif 9907 9908 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE 9909 /** 9910 * struct set_mac_addr_params - Set MAC address command parameter 9911 * @vdev_id: vdev id 9912 * @mac_addr: VDEV MAC address 9913 * @mld_addr: MLD address of the vdev 9914 */ 9915 struct set_mac_addr_params { 9916 uint8_t vdev_id; 9917 struct qdf_mac_addr mac_addr; 9918 struct qdf_mac_addr mld_addr; 9919 }; 9920 #endif 9921 9922 #ifdef WLAN_FEATURE_SON 9923 /** 9924 * struct wmi_host_inst_rssi_stats_resp - inst rssi stats 9925 * @inst_rssi: instantaneous rssi above the noise floor in dB unit 9926 * @peer_macaddr: peer mac address 9927 * @vdev_id: vdev_id 9928 */ 9929 struct wmi_host_inst_rssi_stats_resp { 9930 uint32_t inst_rssi; 9931 struct qdf_mac_addr peer_macaddr; 9932 uint32_t vdev_id; 9933 }; 9934 #endif 9935 9936 /** 9937 * struct vdev_pn_mgmt_rxfilter_params - Send PN mgmt RxFilter command params 9938 * @vdev_id: vdev id 9939 * @pn_rxfilter: Rx Filter 9940 */ 9941 struct vdev_pn_mgmt_rxfilter_params { 9942 uint8_t vdev_id; 9943 uint32_t pn_rxfilter; 9944 }; 9945 9946 /** 9947 * struct wmi_host_sw_cal_ver - BDF and FTM cal version data 9948 * @bdf_cal_ver: SW cal version in BDF 9949 * @ftm_cal_ver: SW cal version in factory data 9950 * @status: status. 0 for success, non-zero if version is incorrect 9951 */ 9952 struct wmi_host_sw_cal_ver { 9953 uint32_t bdf_cal_ver; 9954 uint32_t ftm_cal_ver; 9955 uint32_t status; 9956 }; 9957 9958 #ifdef HEALTH_MON_SUPPORT 9959 /** 9960 * struct wmi_health_mon_params - Health mon params 9961 * @ring_buf_paddr_low: Ring buffer physical address LOW 9962 * @ring_buf_paddr_high: Ring buffer physical address HIGH 9963 * @initial_upload_period_ms: Health mon periodic time 9964 * @read_index: ring element read_index 9965 */ 9966 struct wmi_health_mon_params { 9967 uint32_t ring_buf_paddr_low; 9968 uint32_t ring_buf_paddr_high; 9969 uint32_t initial_upload_period_ms; 9970 uint32_t read_index; 9971 }; 9972 #endif /* HEALTH_MON_SUPPORT */ 9973 9974 /** 9975 * struct edca_pifs_vparam - edca/pifs param for ll sap 9976 * @vdev_id: vdev id 9977 * @param: pointer to wlan_edca_pifs_param_ie struct 9978 */ 9979 struct edca_pifs_vparam { 9980 uint8_t vdev_id; 9981 struct wlan_edca_pifs_param_ie param; 9982 }; 9983 9984 /** 9985 * struct wmi_host_coex_fix_chan_cap - fw capability to support fixed chan SAP 9986 * @fix_chan_priority: Fix channel priority, set to 1 if firmware supports it 9987 */ 9988 struct wmi_host_coex_fix_chan_cap { 9989 uint32_t fix_chan_priority; 9990 }; 9991 #endif /* _WMI_UNIFIED_PARAM_H_ */ 9992