1 /* 2 * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /* 20 * This file contains the API definitions for the Unified Wireless Module 21 * Interface (WMI). 22 */ 23 24 #ifndef _WMI_UNIFIED_PARAM_H_ 25 #define _WMI_UNIFIED_PARAM_H_ 26 27 #include <wlan_scan_public_structs.h> 28 #ifdef FEATURE_WLAN_TDLS 29 #include <wlan_tdls_public_structs.h> 30 #endif 31 #ifdef WLAN_CONV_SPECTRAL_ENABLE 32 #include <wlan_spectral_public_structs.h> 33 #endif /* WLAN_CONV_SPECTRAL_ENABLE */ 34 #include <wlan_vdev_mgr_tgt_if_tx_defs.h> 35 #include <wlan_vdev_mgr_tgt_if_rx_defs.h> 36 37 #define MAC_MAX_KEY_LENGTH 32 38 #define MAC_PN_LENGTH 8 39 #define MAX_MAC_HEADER_LEN 32 40 #define MIN_MAC_HEADER_LEN 24 41 #define QOS_CONTROL_LEN 2 42 43 #define WMI_MAC_MAX_SSID_LENGTH 32 44 #ifndef CONFIG_HL_SUPPORT 45 #define mgmt_tx_dl_frm_len 64 46 #else 47 #define mgmt_tx_dl_frm_len 1532 48 #endif 49 #define WMI_SMPS_MASK_LOWER_16BITS 0xFF 50 #define WMI_SMPS_MASK_UPPER_3BITS 0x7 51 #define WMI_SMPS_PARAM_VALUE_S 29 52 #define WMI_UNIT_TEST_MAX_NUM_ARGS 100 53 /* The size of the utc time in bytes. */ 54 #define WMI_SIZE_UTC_TIME (10) 55 /* The size of the utc time error in bytes. */ 56 #define WMI_SIZE_UTC_TIME_ERROR (5) 57 #define WMI_MCC_MIN_CHANNEL_QUOTA 20 58 #define WMI_MCC_MAX_CHANNEL_QUOTA 80 59 #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30 60 61 #ifdef WMI_AP_SUPPORT 62 #define WMI_BEACON_TX_BUFFER_SIZE (1500) 63 #else 64 #define WMI_BEACON_TX_BUFFER_SIZE (512) 65 #endif 66 67 #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3 68 #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 69 #define WMI_RSSI_THOLD_DEFAULT -300 70 #define WMI_NLO_FREQ_THRESH 1000 71 #define WMI_SEC_TO_MSEC(sec) (sec * 1000) 72 #define WMI_MSEC_TO_USEC(msec) (msec * 1000) 73 #define WMI_ETH_LEN 64 74 #define WMI_QOS_NUM_TSPEC_MAX 2 75 #define WMI_IPV4_ADDR_LEN 4 76 #define WMI_KEEP_ALIVE_NULL_PKT 1 77 #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 78 #define WMI_MAC_MAX_KEY_LENGTH 32 79 #define WMI_KRK_KEY_LEN 16 80 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 81 #define WMI_BTK_KEY_LEN 32 82 #define WMI_ROAM_R0KH_ID_MAX_LEN 48 83 #define WMI_ROAM_SCAN_PSK_SIZE 48 84 #endif 85 #define WMI_NOISE_FLOOR_DBM_DEFAULT (-96) 86 #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8 87 #define WMI_ROAM_MAX_CHANNELS 80 88 #ifdef FEATURE_WLAN_EXTSCAN 89 #define WMI_MAX_EXTSCAN_MSG_SIZE 1536 90 #define WMI_EXTSCAN_REST_TIME 100 91 #define WMI_EXTSCAN_MAX_SCAN_TIME 50000 92 #define WMI_EXTSCAN_BURST_DURATION 150 93 #endif 94 #define WMI_SCAN_NPROBES_DEFAULT (2) 95 #define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */ 96 #define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */ 97 #define WMI_NLO_FREQ_THRESH 1000 /* in MHz */ 98 99 #define WMI_SVC_MSG_MAX_SIZE 1536 100 #define MAX_UTF_EVENT_LENGTH 2048 101 #define MAX_WMI_UTF_LEN 252 102 #define MAX_WMI_QVIT_LEN 252 103 #define THERMAL_LEVELS 4 104 #define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES 256 105 #define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \ 106 (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32) 107 #define LTEU_MAX_BINS 10 108 #define ATF_ACTIVED_MAX_CLIENTS 50 109 #define ATF_ACTIVED_MAX_ATFGROUPS 16 110 #define CTL_5G_SIZE 1536 111 #define CTL_2G_SIZE 684 112 #define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE) 113 #define IEEE80211_MICBUF_SIZE (8+8) 114 #define IEEE80211_TID_SIZE 17 115 #define WME_NUM_AC 4 116 #define SMART_ANT_MODE_SERIAL 0 117 #define SMART_ANT_MODE_PARALLEL 1 118 #define IEEE80211_WEP_NKID 4 /* number of key ids */ 119 #define WPI_IV_LEN 16 120 #define WMI_SCAN_MAX_NUM_BSSID 10 121 #define MAX_CHANS 1023 122 #define TARGET_OEM_CONFIGURE_LCI 0x0A 123 #define RTT_LCI_ALTITUDE_MASK 0x3FFFFFFF 124 #define TARGET_OEM_CONFIGURE_LCR 0x09 125 #define RTT_TIMEOUT_MS 180 126 #define MAX_SUPPORTED_RATES 128 127 #define WMI_HOST_MAX_BUFFER_SIZE 1712 128 #define WMI_HAL_MAX_SANTENNA 4 129 #define WMI_HOST_PDEV_VI_PRIORITY_BIT (1<<2) 130 #define WMI_HOST_PDEV_BEACON_PRIORITY_BIT (1<<4) 131 #define WMI_HOST_PDEV_MGMT_PRIORITY_BIT (1<<5) 132 #define WMI_MAX_CMDS 1024 133 134 #define FIPS_ALIGN 4 135 #define FIPS_ALIGNTO(__addr, __to) \ 136 ((((unsigned long int)(__addr)) + (__to) - 1) & ~((__to) - 1)) 137 #define FIPS_IS_ALIGNED(__addr, __to) \ 138 (!(((unsigned long int)(__addr)) & ((__to)-1))) 139 140 #define WMI_HOST_MAX_SERIAL_ANTENNA 2 141 #define WMI_SMART_ANT_MAX_RATE_SERIES 2 142 143 #define WMI_HOST_F_MS(_v, _f) \ 144 (((_v) & (_f)) >> (_f##_S)) 145 146 #define WMI_HOST_F_RMW(_var, _v, _f) \ 147 do { \ 148 (_var) &= ~(_f); \ 149 (_var) |= (((_v) << (_f##_S)) & (_f)); \ 150 } while (0) 151 152 /* vdev capabilities bit mask */ 153 #define WMI_HOST_VDEV_BEACON_SUPPORT 0x1 154 #define WMI_HOST_VDEV_WDS_LRN_ENABLED 0x2 155 #define WMI_HOST_VDEV_VOW_ENABLED 0x4 156 #define WMI_HOST_VDEV_IS_BEACON_SUPPORTED(param) \ 157 ((param) & WMI_HOST_VDEV_BEACON_SUPPORT) 158 #define WMI_HOST_VDEV_IS_WDS_LRN_ENABLED(param) \ 159 ((param) & WMI_HOST_VDEV_WDS_LRN_ENABLED) 160 #define WMI_HOST_VDEV_IS_VOW_ENABLED(param) \ 161 ((param) & WMI_HOST_VDEV_VOW_ENABLED) 162 163 /* TXBF capabilities masks */ 164 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0 165 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1 166 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE \ 167 (WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S) 168 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \ 169 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE) 170 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \ 171 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE) 172 173 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1 174 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1 175 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE \ 176 (WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S) 177 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \ 178 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE) 179 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \ 180 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE) 181 182 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2 183 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1 184 #define WMI_HOST_TXBF_CONF_SU_TX_BFER \ 185 (WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S) 186 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \ 187 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER) 188 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \ 189 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER) 190 191 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3 192 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1 193 #define WMI_HOST_TXBF_CONF_MU_TX_BFER \ 194 (WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S) 195 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \ 196 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER) 197 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \ 198 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER) 199 200 #define WMI_HOST_TXBF_CONF_STS_CAP_S 4 201 #define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7 202 #define WMI_HOST_TXBF_CONF_STS_CAP \ 203 (WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S) 204 #define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \ 205 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP); 206 #define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \ 207 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP) 208 209 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7 210 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1 211 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF \ 212 (WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S) 213 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \ 214 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF) 215 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \ 216 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF) 217 218 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8 219 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7 220 #define WMI_HOST_TXBF_CONF_BF_SND_DIM \ 221 (WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S) 222 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \ 223 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM) 224 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \ 225 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM) 226 227 /* The following WMI_HOST_HEOPS_BSSCOLOR_XXX macros correspond to the 228 * WMI_HEOPS_COLOR_XXX macros in the FW wmi_unified.h */ 229 #ifdef SUPPORT_11AX_D3 230 #define WMI_HOST_HEOPS_BSSCOLOR_S 24 231 #else 232 #define WMI_HOST_HEOPS_BSSCOLOR_S 0 233 #endif 234 235 #define WMI_HOST_HEOPS_BSSCOLOR_M 0x3f 236 #define WMI_HOST_HEOPS_BSSCOLOR \ 237 (WMI_HOST_HEOPS_BSSCOLOR_M << WMI_HOST_HEOPS_BSSCOLOR_S) 238 #define WMI_HOST_HEOPS_BSSCOLOR_GET(x) \ 239 WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR) 240 #define WMI_HOST_HEOPS_BSSCOLOR_SET(x, z) \ 241 WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR) 242 243 /* The following WMI_HOST_HEOPS_BSSCOLOR_DISABLE_XXX macros correspond to the 244 * WMI_HEOPS_BSSCOLORDISABLE_XXX macros in the FW wmi_unified.h */ 245 #ifdef SUPPORT_11AX_D3 246 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S 31 247 #else 248 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S 30 249 #endif 250 251 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M 0x1 252 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE \ 253 (WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M << WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S) 254 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_GET(x) \ 255 WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR_DISABLE) 256 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_SET(x, z) \ 257 WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR_DISABLE) 258 259 /* HE BF capabilities mask */ 260 #define WMI_HOST_HE_BF_CONF_SU_BFEE_S 0 261 #define WMI_HOST_HE_BF_CONF_SU_BFEE_M 0x1 262 #define WMI_HOST_HE_BF_CONF_SU_BFEE \ 263 (WMI_HOST_HE_BF_CONF_SU_BFEE_M << WMI_HOST_HE_BF_CONF_SU_BFEE_S) 264 #define WMI_HOST_HE_BF_CONF_SU_BFEE_GET(x) \ 265 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFEE) 266 #define WMI_HOST_HE_BF_CONF_SU_BFEE_SET(x, z) \ 267 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFEE) 268 269 #define WMI_HOST_HE_BF_CONF_SU_BFER_S 1 270 #define WMI_HOST_HE_BF_CONF_SU_BFER_M 0x1 271 #define WMI_HOST_HE_BF_CONF_SU_BFER \ 272 (WMI_HOST_HE_BF_CONF_SU_BFER_M << WMI_HOST_HE_BF_CONF_SU_BFER_S) 273 #define WMI_HOST_HE_BF_CONF_SU_BFER_GET(x) \ 274 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFER) 275 #define WMI_HOST_HE_BF_CONF_SU_BFER_SET(x, z) \ 276 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFER) 277 278 #define WMI_HOST_HE_BF_CONF_MU_BFEE_S 2 279 #define WMI_HOST_HE_BF_CONF_MU_BFEE_M 0x1 280 #define WMI_HOST_HE_BF_CONF_MU_BFEE \ 281 (WMI_HOST_HE_BF_CONF_MU_BFEE_M << WMI_HOST_HE_BF_CONF_MU_BFEE_S) 282 #define WMI_HOST_HE_BF_CONF_MU_BFEE_GET(x) \ 283 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFEE) 284 #define WMI_HOST_HE_BF_CONF_MU_BFEE_SET(x, z) \ 285 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFEE) 286 287 #define WMI_HOST_HE_BF_CONF_MU_BFER_S 3 288 #define WMI_HOST_HE_BF_CONF_MU_BFER_M 0x1 289 #define WMI_HOST_HE_BF_CONF_MU_BFER \ 290 (WMI_HOST_HE_BF_CONF_MU_BFER_M << WMI_HOST_HE_BF_CONF_MU_BFER_S) 291 #define WMI_HOST_HE_BF_CONF_MU_BFER_GET(x) \ 292 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFER) 293 #define WMI_HOST_HE_BF_CONF_MU_BFER_SET(x, z) \ 294 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFER) 295 296 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_S 4 297 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_M 0x1 298 #define WMI_HOST_HE_BF_CONF_DL_OFDMA \ 299 (WMI_HOST_HE_BF_CONF_DL_OFDMA_M << WMI_HOST_HE_BF_CONF_DL_OFDMA_S) 300 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_GET(x) \ 301 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_DL_OFDMA) 302 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_SET(x, z) \ 303 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_DL_OFDMA) 304 305 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_S 5 306 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_M 0x1 307 #define WMI_HOST_HE_BF_CONF_UL_OFDMA \ 308 (WMI_HOST_HE_BF_CONF_UL_OFDMA_M << WMI_HOST_HE_BF_CONF_UL_OFDMA_S) 309 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_GET(x) \ 310 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_OFDMA) 311 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_SET(x, z) \ 312 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_OFDMA) 313 314 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_S 6 315 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_M 0x1 316 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO \ 317 (WMI_HOST_HE_BF_CONF_UL_MUMIMO_M << WMI_HOST_HE_BF_CONF_UL_MUMIMO_S) 318 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_GET(x) \ 319 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_MUMIMO) 320 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_SET(x, z) \ 321 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_MUMIMO) 322 323 /* HE or VHT Sounding */ 324 #define WMI_HOST_HE_VHT_SOUNDING_MODE_S 0 325 #define WMI_HOST_HE_VHT_SOUNDING_MODE_M 0x1 326 #define WMI_HOST_HE_VHT_SOUNDING_MODE \ 327 (WMI_HOST_HE_VHT_SOUNDING_MODE_M << WMI_HOST_HE_VHT_SOUNDING_MODE_S) 328 #define WMI_HOST_HE_VHT_SOUNDING_MODE_GET(x) \ 329 WMI_HOST_F_MS(x, WMI_HOST_HE_VHT_SOUNDING_MODE) 330 #define WMI_HOST_HE_VHT_SOUNDING_MODE_SET(x, z) \ 331 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_VHT_SOUNDING_MODE) 332 333 /* SU or MU Sounding */ 334 #define WMI_HOST_SU_MU_SOUNDING_MODE_S 2 335 #define WMI_HOST_SU_MU_SOUNDING_MODE_M 0x1 336 #define WMI_HOST_SU_MU_SOUNDING_MODE \ 337 (WMI_HOST_SU_MU_SOUNDING_MODE_M << \ 338 WMI_HOST_SU_MU_SOUNDING_MODE_S) 339 #define WMI_HOST_SU_MU_SOUNDING_MODE_GET(x) \ 340 WMI_HOST_F_MS(x, WMI_HOST_SU_MU_SOUNDING_MODE) 341 #define WMI_HOST_SU_MU_SOUNDING_MODE_SET(x, z) \ 342 WMI_HOST_F_RMW(x, z, WMI_HOST_SU_MU_SOUNDING_MODE) 343 344 /* Trig or Non-Trig Sounding */ 345 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S 3 346 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M 0x1 347 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE \ 348 (WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M << \ 349 WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S) 350 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_GET(x) \ 351 WMI_HOST_F_MS(x, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE) 352 #define WMI_HOST_HE_VHT_SU_MU_SOUNDING_MODE_SET(x, z) \ 353 WMI_HOST_F_RMW(x, z, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE) 354 355 #define WMI_HOST_TPC_RATE_MAX 160 356 #define WMI_HOST_TPC_TX_NUM_CHAIN 4 357 #define WMI_HOST_RXG_CAL_CHAN_MAX 8 358 #define WMI_HOST_MAX_NUM_CHAINS 8 359 #define WMI_MAX_NUM_OF_RATE_THRESH 4 360 361 #define WMI_HOST_PDEV_MAX_VDEVS 17 362 363 /* for QC98XX only */ 364 /*6 modes (A, HT20, HT40, VHT20, VHT40, VHT80) * 3 reg dommains 365 */ 366 #define WMI_HOST_NUM_CTLS_5G 18 367 /*6 modes (B, G, HT20, HT40, VHT20, VHT40) * 3 reg domains */ 368 #define WMI_HOST_NUM_CTLS_2G 18 369 #define WMI_HOST_NUM_BAND_EDGES_5G 8 370 #define WMI_HOST_NUM_BAND_EDGES_2G 4 371 372 /*Beelinier 5G*/ 373 #define WMI_HOST_NUM_CTLS_5G_11A 9 374 #define WMI_HOST_NUM_BAND_EDGES_5G_11A 25 375 #define WMI_HOST_NUM_CTLS_5G_HT20 24 376 #define WMI_HOST_NUM_BAND_EDGES_5G_HT20 25 377 #define WMI_HOST_NUM_CTLS_5G_HT40 18 378 #define WMI_HOST_NUM_BAND_EDGES_5G_HT40 12 379 #define WMI_HOST_NUM_CTLS_5G_HT80 18 380 #define WMI_HOST_NUM_BAND_EDGES_5G_HT80 6 381 #define WMI_HOST_NUM_CTLS_5G_HT160 9 382 #define WMI_HOST_NUM_BAND_EDGES_5G_HT160 2 383 384 /* Beeliner 2G */ 385 #define WMI_HOST_NUM_CTLS_2G_11B 6 386 #define WMI_HOST_NUM_BAND_EDGES_2G_11B 9 387 #define WMI_HOST_NUM_CTLS_2G_20MHZ 30 388 #define WMI_HOST_NUM_BAND_EDGES_2G_20MHZ 11 389 #define WMI_HOST_NUM_CTLS_2G_40MHZ 18 390 #define WMI_HOST_NUM_BAND_EDGES_2G_40MHZ 6 391 392 /* for QC98XX only */ 393 #define WMI_HOST_TX_NUM_CHAIN 0x3 394 #define WMI_HOST_TPC_REGINDEX_MAX 4 395 #define WMI_HOST_ARRAY_GAIN_NUM_STREAMS 2 396 397 /* AST Index for flow override */ 398 #define WMI_CONFIG_MSDU_AST_INDEX_0 0x0 399 #define WMI_CONFIG_MSDU_AST_INDEX_1 0x1 400 #define WMI_CONFIG_MSDU_AST_INDEX_2 0x2 401 #define WMI_CONFIG_MSDU_AST_INDEX_3 0x3 402 403 #include "qdf_atomic.h" 404 405 #ifdef BIG_ENDIAN_HOST 406 /* This API is used in copying in elements to WMI message, 407 since WMI message uses multilpes of 4 bytes, This API 408 converts length into multiples of 4 bytes, and performs copy 409 */ 410 #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) do { \ 411 int j; \ 412 u_int32_t *src, *dest; \ 413 src = (u_int32_t *)srcp; \ 414 dest = (u_int32_t *)destp; \ 415 for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \ 416 *(dest+j) = qdf_le32_to_cpu(*(src+j)); \ 417 } \ 418 } while (0) 419 #else 420 421 #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\ 422 srcp, len) 423 424 #endif 425 426 /** macro to convert MAC address from WMI word format to char array */ 427 #define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \ 428 (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \ 429 (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \ 430 (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \ 431 (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \ 432 (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \ 433 (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \ 434 } while (0) 435 436 #define TARGET_INIT_STATUS_SUCCESS 0x0 437 #define TARGET_INIT_STATUS_GEN_FAILED 0x1 438 #define TARGET_GET_INIT_STATUS_REASON(status) ((status) & 0xffff) 439 #define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff) 440 441 #define MAX_ASSOC_IE_LENGTH 1024 442 typedef uint32_t TARGET_INIT_STATUS; 443 444 /** 445 * @brief Opaque handle of wmi structure 446 */ 447 struct wmi_unified; 448 typedef struct wmi_unified *wmi_unified_t; 449 450 typedef void *ol_scn_t; 451 /** 452 * @wmi_event_handler function prototype 453 */ 454 typedef int (*wmi_unified_event_handler)(ol_scn_t scn_handle, 455 uint8_t *event_buf, uint32_t len); 456 457 /** 458 * @WMI_HOST_WLAN_PHY_MODE: Host based enum ID for corresponding in 459 * WLAN_PHY_MODE. This should be consistent with WLAN_PHY_MODE always to avoid 460 * breaking the WMI 461 */ 462 typedef enum { 463 WMI_HOST_MODE_11A = 0, /* 11a Mode */ 464 WMI_HOST_MODE_11G = 1, /* 11b/g Mode */ 465 WMI_HOST_MODE_11B = 2, /* 11b Mode */ 466 WMI_HOST_MODE_11GONLY = 3, /* 11g only Mode */ 467 WMI_HOST_MODE_11NA_HT20 = 4, /* 11a HT20 mode */ 468 WMI_HOST_MODE_11NG_HT20 = 5, /* 11g HT20 mode */ 469 WMI_HOST_MODE_11NA_HT40 = 6, /* 11a HT40 mode */ 470 WMI_HOST_MODE_11NG_HT40 = 7, /* 11g HT40 mode */ 471 WMI_HOST_MODE_11AC_VHT20 = 8, 472 WMI_HOST_MODE_11AC_VHT40 = 9, 473 WMI_HOST_MODE_11AC_VHT80 = 10, 474 WMI_HOST_MODE_11AC_VHT20_2G = 11, 475 WMI_HOST_MODE_11AC_VHT40_2G = 12, 476 WMI_HOST_MODE_11AC_VHT80_2G = 13, 477 WMI_HOST_MODE_11AC_VHT80_80 = 14, 478 WMI_HOST_MODE_11AC_VHT160 = 15, 479 WMI_HOST_MODE_11AX_HE20 = 16, 480 WMI_HOST_MODE_11AX_HE40 = 17, 481 WMI_HOST_MODE_11AX_HE80 = 18, 482 WMI_HOST_MODE_11AX_HE80_80 = 19, 483 WMI_HOST_MODE_11AX_HE160 = 20, 484 WMI_HOST_MODE_11AX_HE20_2G = 21, 485 WMI_HOST_MODE_11AX_HE40_2G = 22, 486 WMI_HOST_MODE_11AX_HE80_2G = 23, 487 WMI_HOST_MODE_UNKNOWN = 24, 488 WMI_HOST_MODE_MAX = 24 489 } WMI_HOST_WLAN_PHY_MODE; 490 491 /* 492 * Needs to be removed and use channel_param based 493 * on how it is processed 494 */ 495 typedef struct { 496 /** primary 20 MHz channel frequency in mhz */ 497 uint32_t mhz; 498 /** Center frequency 1 in MHz*/ 499 uint32_t band_center_freq1; 500 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/ 501 uint32_t band_center_freq2; 502 /** channel info described below */ 503 uint32_t info; 504 /** contains min power, max power, reg power and reg class id. */ 505 uint32_t reg_info_1; 506 /** contains antennamax */ 507 uint32_t reg_info_2; 508 } wmi_host_channel; 509 510 /** 511 * enum WMI_HOST_REGDMN_MODE: 512 * @WMI_HOST_REGDMN_MODE_11A: 11a channels 513 * @WMI_HOST_REGDMN_MODE_TURBO: 11a turbo-only channels 514 * @WMI_HOST_REGDMN_MODE_11B: 11b channels 515 * @WMI_HOST_REGDMN_MODE_PUREG: 11g channels (OFDM only) 516 * @WMI_HOST_REGDMN_MODE_11G: historical 517 * @WMI_HOST_REGDMN_MODE_108G: 11g+Turbo channels 518 * @WMI_HOST_REGDMN_MODE_108A: 11a+Turbo channels 519 * @WMI_HOST_REGDMN_MODE_11AC_VHT20_2G: 2GHz, VHT20 520 * @WMI_HOST_REGDMN_MODE_XR: XR channels 521 * @WMI_HOST_REGDMN_MODE_11A_HALF_RATE: 11a half rate channels 522 * @WMI_HOST_REGDMN_MODE_11A_QUARTER_RATE: 11a quarter rate channels 523 * @WMI_HOST_REGDMN_MODE_11NG_HT20: 11ng HT20 channels 524 * @WMI_HOST_REGDMN_MODE_11NA_HT20: 11na HT20 channels 525 * @WMI_HOST_REGDMN_MODE_11NG_HT40PLUS: 11ng HT40+ channels 526 * @WMI_HOST_REGDMN_MODE_11NG_HT40MINUS: 11ng HT40- channels 527 * @WMI_HOST_REGDMN_MODE_11NA_HT40PLUS: 11na HT40+ channels 528 * @WMI_HOST_REGDMN_MODE_11NA_HT40MINUS: 11na HT40- channels 529 * @WMI_HOST_REGDMN_MODE_11AC_VHT20: 5GHz, VHT20 530 * @WMI_HOST_REGDMN_MODE_11AC_VHT40PLUS: 5GHz, VHT40+ channels 531 * @WMI_HOST_REGDMN_MODE_11AC_VHT40MINUS: 5GHz, VHT40- channels 532 * @WMI_HOST_REGDMN_MODE_11AC_VHT80: 5GHz, VHT80 channels 533 * @WMI_HOST_REGDMN_MODE_11AC_VHT160: 5GHz, VHT160 channels 534 * @WMI_HOST_REGDMN_MODE_11AC_VHT80_80: 5GHz, VHT80+80 channels 535 * @WMI_HOST_REGDMN_MODE_11AXG_HE20: 11ax 2.4GHz, HE20 channels 536 * @WMI_HOST_REGDMN_MODE_11AXA_HE20: 11ax 5GHz, HE20 channels 537 * @WMI_HOST_REGDMN_MODE_11AXG_HE40PLUS: 11ax 2.4GHz, HE40+ channels 538 * @WMI_HOST_REGDMN_MODE_11AXG_HE40MINUS: 11ax 2.4GHz, HE40- channels 539 * @WMI_HOST_REGDMN_MODE_11AXA_HE40PLUS: 11ax 5GHz, HE40+ channels 540 * @WMI_HOST_REGDMN_MODE_11AXA_HE40MINUS: 11ax 5GHz, HE40- channels 541 * @WMI_HOST_REGDMN_MODE_11AXA_HE80: 11ax 5GHz, HE80 channels 542 * @WMI_HOST_REGDMN_MODE_11AXA_HE160: 11ax 5GHz, HE160 channels 543 * @WMI_HOST_REGDMN_MODE_11AXA_HE80_80: 11ax 5GHz, HE80+80 channels 544 */ 545 typedef enum { 546 WMI_HOST_REGDMN_MODE_11A = 0x00000001, 547 WMI_HOST_REGDMN_MODE_TURBO = 0x00000002, 548 WMI_HOST_REGDMN_MODE_11B = 0x00000004, 549 WMI_HOST_REGDMN_MODE_PUREG = 0x00000008, 550 WMI_HOST_REGDMN_MODE_11G = 0x00000008, 551 WMI_HOST_REGDMN_MODE_108G = 0x00000020, 552 WMI_HOST_REGDMN_MODE_108A = 0x00000040, 553 WMI_HOST_REGDMN_MODE_11AC_VHT20_2G = 0x00000080, 554 WMI_HOST_REGDMN_MODE_XR = 0x00000100, 555 WMI_HOST_REGDMN_MODE_11A_HALF_RATE = 0x00000200, 556 WMI_HOST_REGDMN_MODE_11A_QUARTER_RATE = 0x00000400, 557 WMI_HOST_REGDMN_MODE_11NG_HT20 = 0x00000800, 558 WMI_HOST_REGDMN_MODE_11NA_HT20 = 0x00001000, 559 WMI_HOST_REGDMN_MODE_11NG_HT40PLUS = 0x00002000, 560 WMI_HOST_REGDMN_MODE_11NG_HT40MINUS = 0x00004000, 561 WMI_HOST_REGDMN_MODE_11NA_HT40PLUS = 0x00008000, 562 WMI_HOST_REGDMN_MODE_11NA_HT40MINUS = 0x00010000, 563 WMI_HOST_REGDMN_MODE_11AC_VHT20 = 0x00020000, 564 WMI_HOST_REGDMN_MODE_11AC_VHT40PLUS = 0x00040000, 565 WMI_HOST_REGDMN_MODE_11AC_VHT40MINUS = 0x00080000, 566 WMI_HOST_REGDMN_MODE_11AC_VHT80 = 0x00100000, 567 WMI_HOST_REGDMN_MODE_11AC_VHT160 = 0x00200000, 568 WMI_HOST_REGDMN_MODE_11AC_VHT80_80 = 0x00400000, 569 WMI_HOST_REGDMN_MODE_11AXG_HE20 = 0x00800000, 570 WMI_HOST_REGDMN_MODE_11AXA_HE20 = 0x01000000, 571 WMI_HOST_REGDMN_MODE_11AXG_HE40PLUS = 0x02000000, 572 WMI_HOST_REGDMN_MODE_11AXG_HE40MINUS = 0x04000000, 573 WMI_HOST_REGDMN_MODE_11AXA_HE40PLUS = 0x08000000, 574 WMI_HOST_REGDMN_MODE_11AXA_HE40MINUS = 0x10000000, 575 WMI_HOST_REGDMN_MODE_11AXA_HE80 = 0x20000000, 576 WMI_HOST_REGDMN_MODE_11AXA_HE160 = 0x40000000, 577 WMI_HOST_REGDMN_MODE_11AXA_HE80_80 = 0x80000000, 578 WMI_HOST_REGDMN_MODE_ALL = 0xffffffff 579 } WMI_HOST_REGDMN_MODE; 580 581 /** 582 * enum WMI_HOST_WLAN_BAND_CAPABILITY: Band capability (2.4 GHz, 5 GHz). Maps to 583 * WLAN_BAND_CAPABILITY used in firmware header file(s). 584 * @WMI_HOST_WLAN_2G_CAPABILITY: 2.4 GHz capable 585 * @WMI_HOST_WLAN_5G_CAPABILITY: 5 GHz capable 586 */ 587 typedef enum { 588 WMI_HOST_WLAN_2G_CAPABILITY = 0x1, 589 WMI_HOST_WLAN_5G_CAPABILITY = 0x2, 590 } WMI_HOST_WLAN_BAND_CAPABILITY; 591 592 /** 593 * enum wmi_host_channel_width: Channel operating width. Maps to 594 * wmi_channel_width used in firmware header file(s). 595 * @WMI_HOST_CHAN_WIDTH_20: 20 MHz channel operating width 596 * @WMI_HOST_CHAN_WIDTH_40: 40 MHz channel operating width 597 * @WMI_HOST_CHAN_WIDTH_80: 80 MHz channel operating width 598 * @WMI_HOST_CHAN_WIDTH_160: 160 MHz channel operating width 599 * @WMI_HOST_CHAN_WIDTH_80P80: 80+80 MHz channel operating width 600 * @WMI_HOST_CHAN_WIDTH_5: 5 MHz channel operating width 601 * @WMI_HOST_CHAN_WIDTH_10: 10 MHz channel operating width 602 * @WMI_HOST_CHAN_WIDTH_165: 165 MHz channel operating width 603 */ 604 typedef enum { 605 WMI_HOST_CHAN_WIDTH_20 = 0, 606 WMI_HOST_CHAN_WIDTH_40 = 1, 607 WMI_HOST_CHAN_WIDTH_80 = 2, 608 WMI_HOST_CHAN_WIDTH_160 = 3, 609 WMI_HOST_CHAN_WIDTH_80P80 = 4, 610 WMI_HOST_CHAN_WIDTH_5 = 5, 611 WMI_HOST_CHAN_WIDTH_10 = 6, 612 WMI_HOST_CHAN_WIDTH_165 = 7, 613 } wmi_host_channel_width; 614 615 #define ATH_EXPONENT_TO_VALUE(v) ((1<<v)-1) 616 #define ATH_TXOP_TO_US(v) (v<<5) 617 /* WME stream classes */ 618 #define WMI_HOST_AC_BE 0 /* best effort */ 619 #define WMI_HOST_AC_BK 1 /* background */ 620 #define WMI_HOST_AC_VI 2 /* video */ 621 #define WMI_HOST_AC_VO 3 /* voice */ 622 #define WMI_TID_TO_AC(_tid) (\ 623 (((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \ 624 (((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \ 625 (((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \ 626 WMI_HOST_AC_VO) 627 628 /** 629 * struct channel_param - Channel parameters with all 630 * info required by target. 631 * @chan_id: channel id 632 * @pwr: channel power 633 * @mhz: channel frequency 634 * @half_rate: is half rate 635 * @quarter_rate: is quarter rate 636 * @dfs_set: is dfs channel 637 * @dfs_set_cfreq2: is secondary freq dfs channel 638 * @is_chan_passive: is this passive channel 639 * @allow_ht: HT allowed in chan 640 * @allow_vht: VHT allowed on chan 641 * @set_agile: is agile mode 642 * @allow_he: HE allowed on chan 643 * @psc_channel: 6 ghz preferred scan chan 644 * @nan_disabled: is NAN disabled on @mhz 645 * @phy_mode: phymode (vht80 or ht40 or ...) 646 * @cfreq1: centre frequency on primary 647 * @cfreq2: centre frequency on secondary 648 * @maxpower: max power for channel 649 * @minpower: min power for channel 650 * @maxreqpower: Max regulatory power 651 * @antennamac: Max antenna 652 * @reg_class_id: Regulatory class id. 653 * @max_bw_supported: max BW supported 654 */ 655 656 struct channel_param { 657 uint8_t chan_id; 658 uint8_t pwr; 659 uint32_t mhz; 660 uint32_t half_rate:1, 661 quarter_rate:1, 662 dfs_set:1, 663 dfs_set_cfreq2:1, 664 is_chan_passive:1, 665 allow_ht:1, 666 allow_vht:1, 667 set_agile:1, 668 allow_he:1, 669 psc_channel:1, 670 nan_disabled:1; 671 uint32_t phy_mode; 672 uint32_t cfreq1; 673 uint32_t cfreq2; 674 int8_t maxpower; 675 int8_t minpower; 676 int8_t maxregpower; 677 uint8_t antennamax; 678 uint8_t reg_class_id; 679 wmi_host_channel_width max_bw_supported; 680 }; 681 682 #ifdef FEATURE_OEM_DATA 683 /** 684 * struct oem_data - oem data to be sent to firmware 685 * @vdev_id: Unique identifier assigned to the vdev 686 * @data_len: len of data 687 * @pdev_id: pdev id to identify the pdev 688 * @pdev_vdev_flag: 0 when vdev is valid, 1 when pdev is valid 689 * @is_host_pdev_id: 1 for host pdev id, 0 otherwise 690 * @data: the pointer to the buffer containing data 691 */ 692 struct oem_data { 693 uint8_t vdev_id; 694 size_t data_len; 695 uint8_t pdev_id; 696 bool pdev_vdev_flag; 697 bool is_host_pdev_id; 698 uint8_t *data; 699 }; 700 #endif 701 702 /** 703 * enum nss_chains_band_info - Band info for dynamic nss, chains change feature 704 * @NSS_CHAINS_BAND_2GHZ: 2.4Ghz band 705 * @NSS_CHAINS_BAND_5GHZ: 5Ghz band 706 * @NSS_CHAINS_BAND_MAX: Max bands supported 707 */ 708 enum nss_chains_band_info { 709 NSS_CHAINS_BAND_2GHZ = 0, 710 NSS_CHAINS_BAND_5GHZ, 711 NSS_CHAINS_BAND_MAX, 712 }; 713 714 /** 715 * struct vdev_nss_chains - vdev config of nss, and chains 716 * @num_tx_chains: tx chains of vdev config 717 * @num_rx_chains: rx chains of vdev config 718 * @tx_nss: tx nss of vdev config 719 * @rx_nss: rx nss of vdev config 720 * @num_tx_chains_11b: number of tx chains in 11b mode 721 * @num_tx_chains_11g: number of tx chains in 11g mode 722 * @num_tx_chains_11a: number of tx chains in 11a mode 723 * @disable_rx_mrc: disable 2 rx chains, in rx nss 1 mode 724 * @disable_tx_mrc: disable 2 tx chains, in tx nss 1 mode 725 */ 726 struct vdev_nss_chains { 727 uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX]; 728 uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX]; 729 uint32_t tx_nss[NSS_CHAINS_BAND_MAX]; 730 uint32_t rx_nss[NSS_CHAINS_BAND_MAX]; 731 uint32_t num_tx_chains_11b; 732 uint32_t num_tx_chains_11g; 733 uint32_t num_tx_chains_11a; 734 bool disable_rx_mrc[NSS_CHAINS_BAND_MAX]; 735 bool disable_tx_mrc[NSS_CHAINS_BAND_MAX]; 736 }; 737 738 739 /** 740 * struct peer_delete_params - peer delete cmd parameter 741 * @vdev_id: vdev id 742 */ 743 struct peer_delete_params { 744 uint8_t vdev_id; 745 }; 746 747 /** 748 * struct peer_set_params - peer set cmd parameter 749 * @param_id: parameter id 750 * @param_value: parameter value 751 * @vdev_id: vdev id 752 */ 753 struct peer_set_params { 754 uint32_t param_id; 755 uint32_t param_value; 756 uint32_t vdev_id; 757 }; 758 759 /** 760 * struct peer_create_params - peer create cmd parameter 761 * @peer_addr: peer mac addr 762 * @peer_type: peer type 763 * @vdev_id: vdev id 764 */ 765 struct peer_create_params { 766 const uint8_t *peer_addr; 767 uint32_t peer_type; 768 uint32_t vdev_id; 769 }; 770 771 /** 772 * struct peer_remove_params - peer remove cmd parameter 773 * @bssid: bss id 774 * @vdev_id: vdev id 775 * @roam_synch_in_progress: flag to indicate if roaming is in progress 776 */ 777 struct peer_remove_params { 778 uint8_t *bssid; 779 uint8_t vdev_id; 780 bool roam_synch_in_progress; 781 }; 782 783 /** 784 * Stats ID enums defined in host 785 */ 786 typedef enum { 787 WMI_HOST_REQUEST_PEER_STAT = 0x01, 788 WMI_HOST_REQUEST_AP_STAT = 0x02, 789 WMI_HOST_REQUEST_PDEV_STAT = 0x04, 790 WMI_HOST_REQUEST_VDEV_STAT = 0x08, 791 WMI_HOST_REQUEST_BCNFLT_STAT = 0x10, 792 WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20, 793 WMI_HOST_REQUEST_INST_STAT = 0x40, 794 WMI_HOST_REQUEST_PEER_EXTD_STAT = 0x80, 795 WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100, 796 WMI_HOST_REQUEST_NAC_RSSI = 0x200, 797 WMI_HOST_REQUEST_BCN_STAT = 0x800, 798 WMI_HOST_REQUEST_BCN_STAT_RESET = 0x1000, 799 WMI_HOST_REQUEST_PEER_RETRY_STAT = 0x2000, 800 WMI_HOST_REQUEST_PEER_ADV_STATS = 0x4000, 801 WMI_HOST_REQUEST_PMF_BCN_PROTECT_STAT = 0x8000, 802 WMI_HOST_REQUEST_VDEV_PRB_FILS_STAT = 0x10000, 803 } wmi_host_stats_id; 804 805 typedef struct { 806 uint16_t cfg_retry_count; 807 uint16_t retry_count; 808 } wmi_host_inst_rssi_args; 809 810 /** 811 * struct stats_request_params - stats_request cmd parameter 812 * @stats_id: Bit mask of all the STATS request are specified with values from wmi_host_stats_id 813 * @vdev_id: vdev id 814 * @pdev_id: pdev_id 815 * @wmi_host_inst_rssi_args: Instantaneous rssi stats args 816 */ 817 struct stats_request_params { 818 uint32_t stats_id; 819 uint8_t vdev_id; 820 uint8_t pdev_id; 821 wmi_host_inst_rssi_args rssi_args; 822 }; 823 824 /** 825 * struct bss_chan_info_request_params - BSS chan info params 826 * @param: parameter value 827 */ 828 struct bss_chan_info_request_params { 829 uint32_t param; 830 }; 831 832 /** 833 * struct wow_cmd_params - wow cmd parameter 834 * @enable: wow enable or disable flag 835 * @can_suspend_link: flag to indicate if link can be suspended 836 * @pause_iface_config: interface config 837 */ 838 struct wow_cmd_params { 839 bool enable; 840 bool can_suspend_link; 841 uint8_t pause_iface_config; 842 uint32_t flags; 843 }; 844 845 /** 846 * struct wow_add_wakeup_params - wow wakeup parameter 847 * @type: param type 848 */ 849 struct wow_add_wakeup_params { 850 uint32_t type; 851 }; 852 853 /** 854 * struct wow_add_wakeup_pattern_params - Add WoW pattern params 855 * @pattern_bytes: pointer to pattern bytes 856 * @mask_bytes: pointer to mask bytes 857 * @pattern_len: pattern length 858 * @pattern_id: pattern id 859 */ 860 struct wow_add_wakeup_pattern_params { 861 uint8_t *pattern_bytes; 862 uint8_t *mask_bytes; 863 uint32_t pattern_len; 864 uint32_t pattern_id; 865 }; 866 867 /** 868 * struct wow_remove_wakeup_pattern params - WoW remove pattern param 869 * @pattern_bytes: pointer to pattern bytes 870 * @mask_bytes: Mask bytes 871 * @pattern_id: pattern identifier 872 */ 873 struct wow_remove_wakeup_pattern_params { 874 uint32_t *pattern_bytes; 875 uint32_t *mask_bytes; 876 uint32_t pattern_id; 877 }; 878 879 880 /** 881 * struct packet_enable_params - packet enable cmd parameter 882 * @vdev_id: vdev id 883 * @enable: flag to indicate if parameter can be enabled or disabled 884 */ 885 struct packet_enable_params { 886 uint8_t vdev_id; 887 bool enable; 888 }; 889 890 /** 891 * struct suspend_params - suspend cmd parameter 892 * @disable_target_intr: disable target interrupt 893 */ 894 struct suspend_params { 895 uint8_t disable_target_intr; 896 }; 897 898 /** 899 * struct pdev_params - pdev set cmd parameter 900 * @param_id: parameter id 901 * @param_value: parameter value 902 * @is_host_pdev_id: indicate whether pdev_id is host pdev_id or not 903 */ 904 struct pdev_params { 905 uint32_t param_id; 906 uint32_t param_value; 907 bool is_host_pdev_id; 908 }; 909 910 /** 911 * struct fd_params - FD cmd parameter 912 * @vdev_id: vdev id 913 * @frame_ctrl: frame control field 914 * @wbuf: FD buffer 915 */ 916 struct fd_params { 917 uint8_t vdev_id; 918 uint16_t frame_ctrl; 919 qdf_nbuf_t wbuf; 920 }; 921 922 /** 923 * struct bcn_prb_template_params - beacon probe template parameter 924 * @vdev_id: vdev id 925 * @buf_len: Template length 926 * @caps: capabilities field 927 * @erp: ERP field 928 */ 929 struct bcn_prb_template_params { 930 uint8_t vdev_id; 931 int buf_len; 932 uint16_t caps; 933 uint8_t erp; 934 }; 935 936 #define WMI_MAX_SUPPORTED_RATES 128 937 /** 938 * struct target_rate_set - Rate set bitmap 939 * @num_rate: number of rates in rates bitmap 940 * @rates: rates (each 8bit value) packed into a 32 bit word. 941 * the rates are filled from least significant byte to most 942 * significant byte. 943 */ 944 typedef struct { 945 uint32_t num_rates; 946 uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1]; 947 } target_rate_set; 948 949 950 #define WMI_HOST_MAX_NUM_SS 8 951 #define WMI_HOST_MAX_HECAP_PHY_SIZE 3 952 #define WMI_HOST_MAX_HECAP_MAC_SIZE 2 953 #define WMI_HOST_HECAP_MAC_WORD1 0 954 #define WMI_HOST_HECAP_MAC_WORD2 1 955 #define WMI_HOST_MAX_HE_RATE_SET 3 956 957 #define WMI_HOST_HE_INVALID_MCSNSSMAP (0xFFFF) 958 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80 0 959 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_160 1 960 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80_80 2 961 962 /** 963 * struct wmi_host_ppe_threshold -PPE threshold 964 * @numss_m1: NSS - 1 965 * @ru_bit_mask: RU bit mask indicating the supported RU's 966 * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss 967 */ 968 struct wmi_host_ppe_threshold { 969 uint32_t numss_m1; 970 uint32_t ru_bit_mask; 971 uint32_t ppet16_ppet8_ru3_ru0[WMI_HOST_MAX_NUM_SS]; 972 }; 973 974 /** 975 * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr 976 * @mac_addr31to0: upper 4 bytes of MAC address 977 * @mac_addr47to32: lower 2 bytes of MAC address 978 */ 979 typedef struct { 980 uint32_t mac_addr31to0; 981 uint32_t mac_addr47to32; 982 } wmi_host_mac_addr; 983 984 /** 985 * struct peer_assoc_params - peer assoc cmd parameter 986 * @vdev_id: vdev id 987 * @peer_new_assoc: peer association type 988 * @peer_associd: peer association id 989 * @peer_caps: peer capabalities 990 * @peer_listen_intval: peer listen interval 991 * @peer_ht_caps: HT capabalities 992 * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k 993 * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4) 994 * @peer_rate_caps: peer rate capabalities 995 * @peer_nss: peer nss 996 * @peer_phymode: peer phymode 997 * @peer_ht_info: peer HT info 998 * @peer_legacy_rates: peer legacy rates 999 * @peer_ht_rates: peer ht rates 1000 * @rx_max_rate: max rx rates 1001 * @rx_mcs_set: rx mcs 1002 * @tx_max_rate: max tx rates 1003 * @tx_mcs_set: tx mcs 1004 * @vht_capable: VHT capabalities 1005 * @min_data_rate: Peer minimum rate 1006 * @tx_max_mcs_nss: max tx MCS and NSS 1007 * @peer_bw_rxnss_override: Peer BW RX NSS overridden or not. 1008 * @is_pmf_enabled: PMF enabled 1009 * @is_wme_set: WME enabled 1010 * @qos_flag: QoS Flags 1011 * @apsd_flag: APSD flags 1012 * @ht_flag: HT flags 1013 * @bw_40: 40 capabale 1014 * @bw_80: 80 capabale 1015 * @bw_160: 160 capabale 1016 * @stbc_flag: STBC flag 1017 * @ldpc_flag: LDPC flag 1018 * @static_mimops_flag: statis MIMO PS flags 1019 * @dynamic_mimops_flag: Dynamic MIMO PS flags 1020 * @spatial_mux_flag: spatial MUX flags 1021 * @vht_flag: VHT flags 1022 * @vht_ng_flag: VHT on 11N/G flags 1023 * @need_ptk_4_way: Needs 4 way handshake 1024 * @need_gtk_2_way: Needs 2 way GTK 1025 * @auth_flag: Is peer authenticated 1026 * @safe_mode_enabled: Safe enabled for this peer 1027 * @amsdu_disable: AMSDU disble 1028 * @peer_mac: Peer mac address 1029 * @he_flag: HE flags 1030 * @twt_requester: TWT Requester Support bit in Extended Capabilities element 1031 * @twt_responder: TWT Responder Support bit in Extended Capabilities element 1032 * @peer_he_cap_macinfo: Peer HE Cap MAC info 1033 * @peer_he_ops: Peer HE operation info 1034 * @peer_he_cap_phyinfo: Peer HE Cap PHY info 1035 * @peer_he_cap_info_internal: Peer HE internal PHY capability info 1036 * @peer_he_caps_6ghz: Peer HE 6GHz Band Capabilities info 1037 * @peer_he_mcs_count: Peer HE MCS TX/RX MAP count 1038 * @peer_he_rx_mcs_set: Peer HE RX MCS MAP 1039 * @peer_he_tx_mcs_set: Peer HE TX MCS MAP 1040 * @peer_ppet: Peer HE PPET info 1041 * @peer_bss_max_idle_option: Peer BSS Max Idle option update 1042 */ 1043 struct peer_assoc_params { 1044 uint32_t vdev_id; 1045 uint32_t peer_new_assoc; 1046 uint32_t peer_associd; 1047 uint32_t peer_caps; 1048 uint32_t peer_listen_intval; 1049 uint32_t peer_ht_caps; 1050 uint32_t peer_max_mpdu; 1051 uint32_t peer_mpdu_density; 1052 uint32_t peer_rate_caps; 1053 uint32_t peer_nss; 1054 uint32_t peer_vht_caps; 1055 uint32_t peer_phymode; 1056 uint32_t peer_ht_info[2]; 1057 target_rate_set peer_legacy_rates; 1058 target_rate_set peer_ht_rates; 1059 uint32_t rx_max_rate; 1060 uint32_t rx_mcs_set; 1061 uint32_t tx_max_rate; 1062 uint32_t tx_mcs_set; 1063 uint8_t vht_capable; 1064 uint8_t min_data_rate; 1065 uint32_t peer_bw_rxnss_override; 1066 uint32_t tx_max_mcs_nss; 1067 uint32_t is_pmf_enabled:1, 1068 is_wme_set:1, 1069 qos_flag:1, 1070 apsd_flag:1, 1071 ht_flag:1, 1072 bw_40:1, 1073 bw_80:1, 1074 bw_160:1, 1075 stbc_flag:1, 1076 ldpc_flag:1, 1077 static_mimops_flag:1, 1078 dynamic_mimops_flag:1, 1079 spatial_mux_flag:1, 1080 vht_flag:1, 1081 vht_ng_flag:1, 1082 need_ptk_4_way:1, 1083 need_gtk_2_way:1, 1084 auth_flag:1, 1085 safe_mode_enabled:1, 1086 amsdu_disable:1, 1087 p2p_capable_sta:1, 1088 inter_bss_peer:1; 1089 /* Use common structure */ 1090 uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; 1091 bool he_flag; 1092 bool twt_requester; 1093 bool twt_responder; 1094 uint32_t peer_he_cap_macinfo[WMI_HOST_MAX_HECAP_MAC_SIZE]; 1095 uint32_t peer_he_ops; 1096 uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE]; 1097 uint32_t peer_he_cap_info_internal; 1098 uint32_t peer_he_caps_6ghz; 1099 uint32_t peer_he_mcs_count; 1100 uint32_t peer_he_rx_mcs_set[WMI_HOST_MAX_HE_RATE_SET]; 1101 uint32_t peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET]; 1102 struct wmi_host_ppe_threshold peer_ppet; 1103 u_int8_t peer_bsscolor_rept_info; 1104 uint32_t peer_bss_max_idle_option; 1105 }; 1106 1107 /** 1108 * struct ap_ps_params - ap ps cmd parameter 1109 * @vdev_id: vdev id 1110 * @param: ap ps parameter 1111 * @value: ap ps parameter value 1112 */ 1113 struct ap_ps_params { 1114 uint32_t vdev_id; 1115 uint32_t param; 1116 uint32_t value; 1117 }; 1118 1119 #define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0 1120 #define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff 1121 #define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16 1122 #define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff 1123 1124 #define WMI_HOST_MAX_CHANS_PER_WMI_CMD 58 1125 1126 /** 1127 * struct scan_chan_list_params - scan channel list cmd parameter 1128 * @pdev_id: pdev_id 1129 * @num_chan: no of scan channels 1130 * @nallchans: nall chans 1131 * @append: append to existing chan list 1132 * @max_bw_support_present: max BW support present 1133 * @ch_param: pointer to channel_paramw 1134 */ 1135 struct scan_chan_list_params { 1136 uint32_t pdev_id; 1137 uint16_t nallchans; 1138 bool append; 1139 bool max_bw_support_present; 1140 struct channel_param ch_param[1]; 1141 }; 1142 1143 #ifdef QCA_SUPPORT_AGILE_DFS 1144 /** 1145 * struct vdev_adfs_ch_cfg_params - Agile dfs channel set request params 1146 * @vdev_id: Vdev indentifier 1147 * @ocac_mode: Off Channel CAC mode 1148 * @min_duration_ms: Minimum Off channel CAC duration 1149 * @max_duration_ms: Maximum Off channel CAC duration 1150 * @chan_freq: channel number of precac channel 1151 * @chan_width: Precac Channel width 1152 * @center_freq1: Agile preCAC channel frequency in MHz for 20/40/80/160 1153 * and left center frequency(5690MHz) for restricted 80p80. 1154 * @center_freq2: Second segment Agile frequency if applicable. 0 for 1155 * 20/40/80/160 and right center frequency(5775MHz) for 1156 * restricted 80p80. 1157 */ 1158 struct vdev_adfs_ch_cfg_params { 1159 uint32_t vdev_id; 1160 uint32_t ocac_mode; /* WMI_ADFS_OCAC_MODE */ 1161 uint32_t min_duration_ms; 1162 uint32_t max_duration_ms; 1163 uint32_t chan_freq; 1164 uint32_t chan_width; 1165 uint32_t center_freq1; /* in MHz */ 1166 uint32_t center_freq2; /* in MHz */ 1167 }; 1168 1169 /** 1170 * struct vdev_adfs_ch_cfg_params - Agile dfs ocac abort command to stop precac. 1171 * @vdev_id: Vdev indentifier 1172 */ 1173 struct vdev_adfs_abort_params { 1174 uint32_t vdev_id; 1175 }; 1176 #endif 1177 /** 1178 * struct fw_hang_params - fw hang command parameters 1179 * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full 1180 * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) 1181 */ 1182 struct fw_hang_params { 1183 uint32_t type; 1184 uint32_t delay_time_ms; 1185 }; 1186 1187 /** 1188 * struct pdev_utf_params - pdev utf command parameters 1189 * @utf_payload: 1190 * @len: 1191 * @is_ar900b: is it 900b target 1192 */ 1193 struct pdev_utf_params { 1194 uint8_t *utf_payload; 1195 uint32_t len; 1196 bool is_ar900b; 1197 }; 1198 1199 /*Adding this due to dependency on wmi_unified.h 1200 */ 1201 typedef struct { 1202 uint32_t len; 1203 uint32_t msgref; 1204 uint32_t segmentInfo; 1205 } QVIT_SEG_HDR_INFO_STRUCT; 1206 1207 struct pdev_qvit_params { 1208 uint8_t *utf_payload; 1209 uint32_t len; 1210 }; 1211 /** 1212 * struct crash_inject - crash inject command parameters 1213 * @type: crash inject type 1214 * @delay_time_ms: time in milliseconds for FW to delay the crash 1215 */ 1216 struct crash_inject { 1217 uint32_t type; 1218 uint32_t delay_time_ms; 1219 }; 1220 1221 /** 1222 * struct dbglog_params - fw deboglog command parameters 1223 * @param: command parameter 1224 * @val: parameter value 1225 * @module_id_bitmap: fixed length module id bitmap 1226 * @bitmap_len: module id bitmap length 1227 * @cfgvalid: cfgvalid 1228 */ 1229 struct dbglog_params { 1230 uint32_t param; 1231 uint32_t val; 1232 uint32_t *module_id_bitmap; 1233 uint32_t bitmap_len; 1234 uint32_t cfgvalid[3]; 1235 }; 1236 1237 /** 1238 * struct seg_hdr_info - header info 1239 * @len: length 1240 * @msgref: message reference 1241 * @segmentInfo: segment info 1242 * @pad: padding 1243 */ 1244 struct seg_hdr_info { 1245 uint32_t len; 1246 uint32_t msgref; 1247 uint32_t segmentInfo; 1248 uint32_t pad; 1249 }; 1250 1251 /** 1252 * struct tx_send_params - TX parameters 1253 * @pwr: Tx frame transmission power 1254 * @mcs_mask: Modulation and coding index mask for transmission 1255 * bit 0 -> CCK 1 Mbps rate is allowed 1256 * bit 1 -> CCK 2 Mbps rate is allowed 1257 * bit 2 -> CCK 5.5 Mbps rate is allowed 1258 * bit 3 -> CCK 11 Mbps rate is allowed 1259 * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed 1260 * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed 1261 * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed 1262 * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed 1263 * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed 1264 * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed 1265 * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed 1266 * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed 1267 * @nss_mask: Spatial streams permitted 1268 * bit 0: if set, Nss = 1 (non-MIMO) is permitted 1269 * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted 1270 * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted 1271 * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted 1272 * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted 1273 * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted 1274 * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted 1275 * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted 1276 * If no bits are set, target will choose what NSS type to use 1277 * @retry_limit: Maximum number of retries before ACK 1278 * @chain_mask: Chains to be used for transmission 1279 * @bw_mask: Bandwidth to be used for transmission 1280 * bit 0 -> 5MHz 1281 * bit 1 -> 10MHz 1282 * bit 2 -> 20MHz 1283 * bit 3 -> 40MHz 1284 * bit 4 -> 80MHz 1285 * bit 5 -> 160MHz 1286 * bit 6 -> 80_80MHz 1287 * @preamble_type: Preamble types for transmission 1288 * bit 0: if set, OFDM 1289 * bit 1: if set, CCK 1290 * bit 2: if set, HT 1291 * bit 3: if set, VHT 1292 * bit 4: if set, HE 1293 * @frame_type: Data or Management frame 1294 * Data:1 Mgmt:0 1295 * @cfr_enable: flag to enable CFR capture 1296 * 0:disable 1:enable 1297 */ 1298 struct tx_send_params { 1299 uint32_t pwr:8, 1300 mcs_mask:12, 1301 nss_mask:8, 1302 retry_limit:4; 1303 uint32_t chain_mask:8, 1304 bw_mask:7, 1305 preamble_type:5, 1306 frame_type:1, 1307 cfr_enable:1, 1308 reserved:10; 1309 }; 1310 1311 /** 1312 * struct wmi_mgmt_params - wmi mgmt cmd parameters 1313 * @tx_frame: management tx frame 1314 * @frm_len: frame length 1315 * @vdev_id: vdev id 1316 * @tx_type: type of management frame (determines what callback to use) 1317 * @chanfreq: channel frequency 1318 * @desc_id: descriptor id relyaed back by target 1319 * @pdata: frame data 1320 * @macaddr: macaddr of peer 1321 * @qdf_ctx: qdf context for qdf_nbuf_map 1322 * @tx_param: TX send parameters 1323 * @tx_params_valid: Flag that indicates if TX params are valid 1324 * @use_6mbps: specify whether management frame to transmit should 1325 * @tx_flags: additional configuration flags for mgmt frames 1326 * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P) 1327 * @peer_rssi: peer RSSI value 1328 */ 1329 struct wmi_mgmt_params { 1330 void *tx_frame; 1331 uint16_t frm_len; 1332 uint8_t vdev_id; 1333 uint8_t tx_type; 1334 uint16_t chanfreq; 1335 uint16_t desc_id; 1336 void *pdata; 1337 uint8_t *macaddr; 1338 void *qdf_ctx; 1339 struct tx_send_params tx_param; 1340 bool tx_params_valid; 1341 uint8_t use_6mbps; 1342 uint32_t tx_flags; 1343 int8_t peer_rssi; 1344 }; 1345 1346 /** 1347 * struct wmi_offchan_data_tx_params - wmi offchan data tx cmd parameters 1348 * @tx_frame: management tx frame 1349 * @frm_len: frame length 1350 * @vdev_id: vdev id 1351 * @tx_params_valid: Flag that indicates if TX params are valid 1352 * @chanfreq: channel frequency 1353 * @desc_id: descriptor id relyaed back by target 1354 * @pdata: frame data 1355 * @macaddr: macaddr of peer 1356 * @qdf_ctx: qdf context for qdf_nbuf_map 1357 * @tx_param: TX send parameters 1358 */ 1359 struct wmi_offchan_data_tx_params { 1360 void *tx_frame; 1361 uint16_t frm_len; 1362 uint8_t vdev_id; 1363 bool tx_params_valid; 1364 uint16_t chanfreq; 1365 uint16_t desc_id; 1366 void *pdata; 1367 uint8_t *macaddr; 1368 void *qdf_ctx; 1369 struct tx_send_params tx_param; 1370 }; 1371 1372 /** 1373 * struct sta_uapsd_params - uapsd auto trig params 1374 * @wmm_ac: WMM access category from 0 to 3 1375 * @user_priority: User priority to use in trigger frames 1376 * @service_interval: service interval 1377 * @suspend_interval: suspend interval 1378 * @delay_interval: delay interval 1379 */ 1380 struct sta_uapsd_params { 1381 uint32_t wmm_ac; 1382 uint32_t user_priority; 1383 uint32_t service_interval; 1384 uint32_t suspend_interval; 1385 uint32_t delay_interval; 1386 }; 1387 1388 /** 1389 * struct ta_uapsd_trig_params - uapsd trigger parameter 1390 * @vdevid: vdev id 1391 * @peer_addr: peer address 1392 * @num_ac: no of access category 1393 * @auto_triggerparam: trigger parameters 1394 */ 1395 struct sta_uapsd_trig_params { 1396 uint32_t vdevid; 1397 uint8_t peer_addr[QDF_MAC_ADDR_SIZE]; 1398 uint32_t num_ac; 1399 struct sta_uapsd_params *auto_triggerparam; 1400 }; 1401 1402 #define WMI_NUM_AC (4) 1403 #define WMI_MAX_NUM_AC 4 1404 1405 1406 enum wmi_peer_rate_report_cond_phy_type { 1407 WMI_PEER_RATE_REPORT_COND_11B = 0, 1408 WMI_PEER_RATE_REPORT_COND_11A_G, 1409 WMI_PEER_RATE_REPORT_COND_11N, 1410 WMI_PEER_RATE_REPORT_COND_11AC, 1411 WMI_PEER_RATE_REPORT_COND_MAX_NUM 1412 }; 1413 1414 /** 1415 * struct report_rate_delta - peer specific parameters 1416 * @percent: percentage 1417 * @delta_min: rate min delta 1418 */ 1419 struct report_rate_delta { 1420 uint32_t percent; /* in unit of 12.5% */ 1421 uint32_t delta_min; /* in unit of Mbps */ 1422 }; 1423 1424 /** 1425 * struct report_rate_per_phy - per phy report parameters 1426 * @cond_flags: condition flag val 1427 * @delta: rate delta 1428 * @report_rate_threshold: rate threshold 1429 */ 1430 struct report_rate_per_phy { 1431 /* 1432 * PEER_RATE_REPORT_COND_FLAG_DELTA, 1433 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD 1434 * Any of these two conditions or both of 1435 * them can be set. 1436 */ 1437 uint32_t cond_flags; 1438 struct report_rate_delta delta; 1439 /* 1440 * In unit of Mbps. There are at most 4 thresholds 1441 * If the threshold count is less than 4, set zero to 1442 * the one following the last threshold 1443 */ 1444 uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH]; 1445 }; 1446 1447 /** 1448 * struct peer_rate_report_params - peer rate report parameters 1449 * @rate_report_enable: enable rate report param 1450 * @backoff_time: backoff time 1451 * @timer_period: timer 1452 * @report_per_phy: report per phy type 1453 */ 1454 struct wmi_peer_rate_report_params { 1455 uint32_t rate_report_enable; 1456 uint32_t backoff_time; /* in unit of msecond */ 1457 uint32_t timer_period; /* in unit of msecond */ 1458 /* 1459 *In the following field, the array index means the phy type, 1460 * please see enum wmi_peer_rate_report_cond_phy_type for detail 1461 */ 1462 struct report_rate_per_phy report_per_phy[ 1463 WMI_PEER_RATE_REPORT_COND_MAX_NUM]; 1464 1465 }; 1466 1467 /** 1468 * enum thermal_mgmt_action_code - thermal mgmt action code 1469 * @THERMAL_MGMT_ACTION_DEFAULT: target chooses what action to take, based 1470 * on its default thermal management policy. 1471 * @THERMAL_MGMT_ACTION_HALT_TRAFFIC: If the temperature rises above 1472 * configured upper thresh degreeC, the target will halt tx. 1473 * @THERMAL_MGMT_ACTION_NOTIFY_HOST: the target will notify the host 1474 * if the temperature either rises above configured upper thresh degreeC or 1475 * falls below lower thresh degreeC. 1476 * @THERMAL_MGMT_ACTION_CHAINSCALING: The target will switch tx chain 1477 * mask from multi chains to single chain if the temperature rises 1478 * above upper thresh degreeC. 1479 * The target will switch tx chainmask back to multi chains if the 1480 * temperature drops below upper_thresh_degreeC. 1481 */ 1482 enum thermal_mgmt_action_code { 1483 THERMAL_MGMT_ACTION_DEFAULT, 1484 THERMAL_MGMT_ACTION_HALT_TRAFFIC, 1485 THERMAL_MGMT_ACTION_NOTIFY_HOST, 1486 THERMAL_MGMT_ACTION_CHAINSCALING, 1487 }; 1488 1489 /** 1490 * struct thermal_cmd_params - thermal command parameters 1491 * @min_temp: minimum temprature 1492 * @max_temp: maximum temprature 1493 * @thermal_enable: thermal enable 1494 * @thermal_action: thermal action code 1495 */ 1496 struct thermal_cmd_params { 1497 uint16_t min_temp; 1498 uint16_t max_temp; 1499 uint8_t thermal_enable; 1500 enum thermal_mgmt_action_code thermal_action; 1501 }; 1502 1503 #define WMI_LRO_IPV4_SEED_ARR_SZ 5 1504 #define WMI_LRO_IPV6_SEED_ARR_SZ 11 1505 1506 /** 1507 * struct wmi_lro_config_cmd_t - set LRO init parameters 1508 * @lro_enable: indicates whether lro is enabled 1509 * @tcp_flag: If the TCP flags from the packet do not match 1510 * the values in this field after masking with TCP flags mask 1511 * below, packet is not LRO eligible 1512 * @tcp_flag_mask: field for comparing the TCP values provided 1513 * above with the TCP flags field in the received packet 1514 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id 1515 * 5-tuple toeplitz hash for ipv4 packets 1516 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id 1517 * 5-tuple toeplitz hash for ipv6 packets 1518 * @pdev_id: radio on which lro hash is configured 1519 */ 1520 struct wmi_lro_config_cmd_t { 1521 uint32_t lro_enable; 1522 uint32_t tcp_flag:9, 1523 tcp_flag_mask:9; 1524 uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ]; 1525 uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ]; 1526 uint32_t pdev_id; 1527 }; 1528 1529 /** 1530 * struct wmi_probe_resp_params - send probe response parameters 1531 * @prb_rsp_template_frm: pointer to template probe response template 1532 * @prb_rsp_template_len: length of probe response template 1533 */ 1534 struct wmi_probe_resp_params { 1535 uint8_t *prb_rsp_template_frm; 1536 uint32_t prb_rsp_template_len; 1537 }; 1538 1539 /* struct set_key_params: structure containing 1540 * installation key parameters 1541 * @vdev_id: vdev id 1542 * @key_len: key length 1543 * @key_idx: key index 1544 * @group_key_idx: group key index for VLAN 1545 * @peer_mac: peer mac address 1546 * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key 1547 * @key_cipher: key cipher based on security mode 1548 * @key_txmic_len: tx mic length 1549 * @key_rxmic_len: rx mic length 1550 * @key_tsc_counter: key tx sc counter 1551 * @key_rsc_counter: key rx sc counter 1552 * @key_rsc_ctr: key rx sc counter (stack variable, unnecessary heap alloc for 1553 * key_rsc_counter should be cleaned up eventually) 1554 * @rx_iv: receive IV, applicable only in case of WAPI 1555 * @tx_iv: transmit IV, applicable only in case of WAPI 1556 * @key_data: key data 1557 */ 1558 struct set_key_params { 1559 uint8_t vdev_id; 1560 uint16_t key_len; 1561 uint32_t key_idx; 1562 uint32_t group_key_idx; 1563 uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; 1564 uint32_t key_flags; 1565 uint32_t key_cipher; 1566 uint32_t key_txmic_len; 1567 uint32_t key_rxmic_len; 1568 uint64_t key_tsc_counter; 1569 uint64_t *key_rsc_counter; 1570 uint64_t key_rsc_ctr; 1571 #if defined(ATH_SUPPORT_WAPI) || defined(FEATURE_WLAN_WAPI) 1572 uint8_t rx_iv[16]; 1573 uint8_t tx_iv[16]; 1574 #endif 1575 uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH]; 1576 }; 1577 1578 /** 1579 * struct scan_mac_oui - oui parameters 1580 * @oui: oui parameters 1581 * @vdev_id: interface id 1582 * @enb_probe_req_sno_randomization: control probe req sequence no randomization 1583 * @ie_whitelist: probe req IE whitelist attrs 1584 */ 1585 struct scan_mac_oui { 1586 uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH]; 1587 uint32_t vdev_id; 1588 bool enb_probe_req_sno_randomization; 1589 struct probe_req_whitelist_attr ie_whitelist; 1590 }; 1591 1592 #define WMI_PASSPOINT_REALM_LEN 256 1593 #define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16 1594 #define WMI_PASSPOINT_PLMN_LEN 3 1595 /** 1596 * struct wifi_passpoint_network_param - passpoint network block 1597 * @id: identifier of this network block 1598 * @realm: null terminated UTF8 encoded realm, 0 if unspecified 1599 * @plmn: mcc/mnc combination as per rules, 0s if unspecified 1600 * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified 1601 */ 1602 struct wifi_passpoint_network_param { 1603 uint32_t id; 1604 uint8_t realm[WMI_PASSPOINT_REALM_LEN]; 1605 uint8_t plmn[WMI_PASSPOINT_PLMN_LEN]; 1606 int64_t roaming_consortium_ids[ 1607 WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM]; 1608 }; 1609 1610 /** 1611 * struct wifi_passpoint_req_param - passpoint request 1612 * @request_id: request identifier 1613 * @vdev_id: vdev that is the target of the request 1614 * @num_networks: number of valid entries in @networks 1615 * @networks: passpoint networks 1616 */ 1617 struct wifi_passpoint_req_param { 1618 uint32_t request_id; 1619 uint32_t vdev_id; 1620 uint32_t num_networks; 1621 struct wifi_passpoint_network_param networks[]; 1622 }; 1623 1624 /* struct mobility_domain_info - structure containing 1625 * mobility domain info 1626 * @mdie_present: mobility domain present or not 1627 * @mobility_domain: mobility domain 1628 */ 1629 struct mobility_domain_info { 1630 uint8_t mdie_present; 1631 uint16_t mobility_domain; 1632 }; 1633 1634 /** 1635 * struct wifi_epno_network - enhanced pno network block 1636 * @ssid: ssid 1637 * @rssi_threshold: threshold for considering this SSID as found, required 1638 * granularity for this threshold is 4dBm to 8dBm 1639 * @flags: WIFI_PNO_FLAG_XXX 1640 * @auth_bit_field: auth bit field for matching WPA IE 1641 */ 1642 struct wifi_epno_network_params { 1643 struct wlan_ssid ssid; 1644 int8_t rssi_threshold; 1645 uint8_t flags; 1646 uint8_t auth_bit_field; 1647 }; 1648 1649 /** 1650 * struct wifi_enhanced_pno_params - enhanced pno network params 1651 * @request_id: request id number 1652 * @vdev_id: vdev id 1653 * @min_5ghz_rssi: minimum 5GHz RSSI for a BSSID to be considered 1654 * @min_24ghz_rssi: minimum 2.4GHz RSSI for a BSSID to be considered 1655 * @initial_score_max: maximum score that a network can have before bonuses 1656 * @current_connection_bonus: only report when there is a network's score this 1657 * much higher than the current connection 1658 * @same_network_bonus: score bonus for all n/w with the same network flag 1659 * @secure_bonus: score bonus for networks that are not open 1660 * @band_5ghz_bonus: 5GHz RSSI score bonus (applied to all 5GHz networks) 1661 * @num_networks: number of ssids 1662 * @networks: EPNO networks 1663 */ 1664 struct wifi_enhanced_pno_params { 1665 uint32_t request_id; 1666 uint32_t vdev_id; 1667 uint32_t min_5ghz_rssi; 1668 uint32_t min_24ghz_rssi; 1669 uint32_t initial_score_max; 1670 uint32_t current_connection_bonus; 1671 uint32_t same_network_bonus; 1672 uint32_t secure_bonus; 1673 uint32_t band_5ghz_bonus; 1674 uint32_t num_networks; 1675 struct wifi_epno_network_params networks[]; 1676 }; 1677 1678 enum { 1679 WMI_AP_RX_DATA_OFFLOAD = 0x00, 1680 WMI_STA_RX_DATA_OFFLOAD = 0x01, 1681 }; 1682 1683 /** 1684 * enum extscan_configuration_flags - extscan config flags 1685 * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching 1686 */ 1687 enum wmi_extscan_configuration_flags { 1688 WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001, 1689 }; 1690 1691 /** 1692 * enum extscan_report_events_type - extscan report events type 1693 * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full 1694 * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan 1695 * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results 1696 * (beacons/probe responses + IEs) 1697 * in real time to HAL, in addition to completion events. 1698 * Note: To keep backward compatibility, 1699 * fire completion events regardless of REPORT_EVENTS_EACH_SCAN. 1700 * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching, 1701 * 0 => batching, 1 => no batching 1702 */ 1703 enum wmi_extscan_report_events_type { 1704 WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00, 1705 WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01, 1706 WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02, 1707 WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04, 1708 }; 1709 1710 /** 1711 * struct extscan_capabilities_params - ext scan capablities 1712 * @request_id: request_id 1713 * @vdev_id: vdev id 1714 */ 1715 struct extscan_capabilities_params { 1716 uint32_t request_id; 1717 uint8_t vdev_id; 1718 }; 1719 1720 /** 1721 * struct extscan_capabilities_reset_params - ext scan capablities reset 1722 * parameter 1723 * @request_id: request_id 1724 * @vdev_id: vdev id 1725 */ 1726 struct extscan_capabilities_reset_params { 1727 uint32_t request_id; 1728 uint8_t vdev_id; 1729 }; 1730 1731 /** 1732 * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter 1733 * @request_id: request_id 1734 * @vdev_id: vdev id 1735 */ 1736 struct extscan_bssid_hotlist_reset_params { 1737 uint32_t request_id; 1738 uint8_t vdev_id; 1739 }; 1740 1741 /** 1742 * struct extscan_stop_req_params - ext scan stop parameter 1743 * @request_id: request_id 1744 * @vdev_id: vdev id 1745 */ 1746 struct extscan_stop_req_params { 1747 uint32_t request_id; 1748 uint8_t vdev_id; 1749 }; 1750 1751 /** 1752 * struct ap_threshold_params - ap threshold parameter 1753 * @bssid: mac address 1754 * @low: low threshold 1755 * @high: high threshold 1756 */ 1757 struct ap_threshold_params { 1758 struct qdf_mac_addr bssid; 1759 int32_t low; 1760 int32_t high; 1761 }; 1762 1763 /** 1764 * struct extscan_set_sig_changereq_params - ext scan channel parameter 1765 * @request_id: request_id 1766 * @vdev_id: vdev id 1767 * @rssi_sample_size: Number of samples for averaging RSSI 1768 * @lostap_sample_size: Number of missed samples to confirm AP loss 1769 * @min_breaching: Number of APs breaching threshold required for firmware 1770 * @num_ap: no of scanned ap 1771 * @ap: ap threshold parameter 1772 */ 1773 struct extscan_set_sig_changereq_params { 1774 uint32_t request_id; 1775 uint8_t vdev_id; 1776 uint32_t rssi_sample_size; 1777 uint32_t lostap_sample_size; 1778 uint32_t min_breaching; 1779 uint32_t num_ap; 1780 struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS]; 1781 }; 1782 1783 /** 1784 * struct extscan_cached_result_params - ext scan cached parameter 1785 * @request_id: request_id 1786 * @vdev_id: vdev id 1787 * @flush: cached results flush 1788 */ 1789 struct extscan_cached_result_params { 1790 uint32_t request_id; 1791 uint8_t vdev_id; 1792 bool flush; 1793 }; 1794 1795 #define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36 1796 #define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16 1797 #define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128 1798 #define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 1799 #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8 1800 1801 /** 1802 * struct wifi_scan_channelspec_params - wifi scan channel parameter 1803 * @channel: Frequency in MHz 1804 * @dwell_time_ms: dwell time in milliseconds 1805 * @passive: passive scan 1806 * @channel_class: channel class 1807 */ 1808 struct wifi_scan_channelspec_params { 1809 uint32_t channel; 1810 uint32_t dwell_time_ms; 1811 bool passive; 1812 uint8_t channel_class; 1813 }; 1814 1815 /** 1816 * enum wmi_wifi_band - wifi band 1817 * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band 1818 * @WMI_WIFI_BAND_BG: 2.4 GHz 1819 * @WMI_WIFI_BAND_A: 5 GHz without DFS 1820 * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS 1821 * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only 1822 * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS 1823 * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS 1824 * @WMI_WIFI_BAND_MAX: max range 1825 */ 1826 enum wmi_wifi_band { 1827 WMI_WIFI_BAND_UNSPECIFIED, 1828 WMI_WIFI_BAND_BG = 1, 1829 WMI_WIFI_BAND_A = 2, 1830 WMI_WIFI_BAND_ABG = 3, 1831 WMI_WIFI_BAND_A_DFS_ONLY = 4, 1832 /* 5 is reserved */ 1833 WMI_WIFI_BAND_A_WITH_DFS = 6, 1834 WMI_WIFI_BAND_ABG_WITH_DFS = 7, 1835 /* Keep it last */ 1836 WMI_WIFI_BAND_MAX 1837 }; 1838 1839 /** 1840 * struct wifi_scan_bucket_params - wifi scan bucket spec 1841 * @bucket: bucket identifier 1842 * @band: wifi band 1843 * @period: Desired period, in millisecond; if this is too 1844 * low, the firmware should choose to generate results as fast as 1845 * it can instead of failing the command byte 1846 * for exponential backoff bucket this is the min_period 1847 * @report_events: 0 => normal reporting (reporting rssi history 1848 * only, when rssi history buffer is % full) 1849 * 1 => same as 0 + report a scan completion event after scanning 1850 * this bucket 1851 * 2 => same as 1 + forward scan results 1852 * (beacons/probe responses + IEs) in real time to HAL 1853 * @max_period: if max_period is non zero or different than period, 1854 * then this bucket is an exponential backoff bucket and 1855 * the scan period will grow exponentially as per formula: 1856 * actual_period(N) = period ^ (N/(step_count+1)) to a 1857 * maximum period of max_period 1858 * @exponent: for exponential back off bucket: multiplier: 1859 * new_period = old_period * exponent 1860 * @step_count: for exponential back off bucket, number of scans performed 1861 * at a given period and until the exponent is applied 1862 * @num_channels: channels to scan; these may include DFS channels 1863 * Note that a given channel may appear in multiple buckets 1864 * @min_dwell_time_active: per bucket minimum active dwell time 1865 * @max_dwell_time_active: per bucket maximum active dwell time 1866 * @min_dwell_time_passive: per bucket minimum passive dwell time 1867 * @max_dwell_time_passive: per bucket maximum passive dwell time 1868 * @channels: Channel list 1869 */ 1870 struct wifi_scan_bucket_params { 1871 uint8_t bucket; 1872 enum wmi_wifi_band band; 1873 uint32_t period; 1874 uint32_t report_events; 1875 uint32_t max_period; 1876 uint32_t exponent; 1877 uint32_t step_count; 1878 uint32_t num_channels; 1879 uint32_t min_dwell_time_active; 1880 uint32_t max_dwell_time_active; 1881 uint32_t min_dwell_time_passive; 1882 uint32_t max_dwell_time_passive; 1883 struct wifi_scan_channelspec_params 1884 channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS]; 1885 }; 1886 1887 /** 1888 * struct wifi_scan_cmd_req_params - wifi scan command request params 1889 * @base_period: base timer period 1890 * @max_ap_per_scan: max ap per scan 1891 * @report_threshold_percent: report threshold 1892 * in %, when buffer is this much full, wake up host 1893 * @report_threshold_num_scans: report threshold number of scans 1894 * in number of scans, wake up host after these many scans 1895 * @request_id: request id 1896 * @vdev_id: vdev that is the target of the request 1897 * @num_buckets: number of buckets 1898 * @min_dwell_time_active: per bucket minimum active dwell time 1899 * @max_dwell_time_active: per bucket maximum active dwell time 1900 * @min_dwell_time_passive: per bucket minimum passive dwell time 1901 * @max_dwell_time_passive: per bucket maximum passive dwell time 1902 * @configuration_flags: configuration flags 1903 * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan 1904 * @buckets: buckets array 1905 */ 1906 struct wifi_scan_cmd_req_params { 1907 uint32_t base_period; 1908 uint32_t max_ap_per_scan; 1909 uint32_t report_threshold_percent; 1910 uint32_t report_threshold_num_scans; 1911 uint32_t request_id; 1912 uint8_t vdev_id; 1913 uint32_t num_buckets; 1914 uint32_t min_dwell_time_active; 1915 uint32_t max_dwell_time_active; 1916 uint32_t min_dwell_time_passive; 1917 uint32_t max_dwell_time_passive; 1918 uint32_t configuration_flags; 1919 enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode; 1920 struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS]; 1921 }; 1922 1923 /** 1924 * struct mac_ts_info_tfc - mac ts info parameters 1925 * @burstSizeDefn: burst size 1926 * @reserved: reserved 1927 * @ackPolicy: ack policy 1928 * @psb: psb 1929 * @aggregation: aggregation 1930 * @accessPolicy: access policy 1931 * @direction: direction 1932 * @tsid: direction 1933 * @trafficType: traffic type 1934 */ 1935 struct mac_ts_info_tfc { 1936 #ifndef ANI_LITTLE_BIT_ENDIAN 1937 uint8_t burstSizeDefn:1; 1938 uint8_t reserved:7; 1939 #else 1940 uint8_t reserved:7; 1941 uint8_t burstSizeDefn:1; 1942 #endif 1943 1944 #ifndef ANI_LITTLE_BIT_ENDIAN 1945 uint16_t ackPolicy:2; 1946 uint16_t userPrio:3; 1947 uint16_t psb:1; 1948 uint16_t aggregation:1; 1949 uint16_t accessPolicy:2; 1950 uint16_t direction:2; 1951 uint16_t tsid:4; 1952 uint16_t trafficType:1; 1953 #else 1954 uint16_t trafficType:1; 1955 uint16_t tsid:4; 1956 uint16_t direction:2; 1957 uint16_t accessPolicy:2; 1958 uint16_t aggregation:1; 1959 uint16_t psb:1; 1960 uint16_t userPrio:3; 1961 uint16_t ackPolicy:2; 1962 #endif 1963 } qdf_packed; 1964 1965 /** 1966 * struct mac_ts_info_sch - mac ts info schedule parameters 1967 * @rsvd: reserved 1968 * @schedule: schedule bit 1969 */ 1970 struct mac_ts_info_sch { 1971 #ifndef ANI_LITTLE_BIT_ENDIAN 1972 uint8_t rsvd:7; 1973 uint8_t schedule:1; 1974 #else 1975 uint8_t schedule:1; 1976 uint8_t rsvd:7; 1977 #endif 1978 } qdf_packed; 1979 1980 /** 1981 * struct mac_ts_info_sch - mac ts info schedule parameters 1982 * @traffic: mac tfc parameter 1983 * @schedule: mac schedule parameters 1984 */ 1985 struct mac_ts_info { 1986 struct mac_ts_info_tfc traffic; 1987 struct mac_ts_info_sch schedule; 1988 } qdf_packed; 1989 1990 /** 1991 * struct mac_tspec_ie - mac ts spec 1992 * @type: type 1993 * @length: length 1994 * @tsinfo: tsinfo 1995 * @nomMsduSz: nomMsduSz 1996 * @maxMsduSz: maxMsduSz 1997 * @minSvcInterval: minSvcInterval 1998 * @maxSvcInterval: maxSvcInterval 1999 * @inactInterval: inactInterval 2000 * @suspendInterval: suspendInterval 2001 * @svcStartTime: svcStartTime 2002 * @minDataRate: minDataRate 2003 * @meanDataRate: meanDataRate 2004 * @peakDataRate: peakDataRate 2005 * @maxBurstSz: maxBurstSz 2006 * @delayBound: delayBound 2007 * @minPhyRate: minPhyRate 2008 * @surplusBw: surplusBw 2009 * @mediumTime: mediumTime 2010 */ 2011 struct mac_tspec_ie { 2012 uint8_t type; 2013 uint8_t length; 2014 struct mac_ts_info tsinfo; 2015 uint16_t nomMsduSz; 2016 uint16_t maxMsduSz; 2017 uint32_t minSvcInterval; 2018 uint32_t maxSvcInterval; 2019 uint32_t inactInterval; 2020 uint32_t suspendInterval; 2021 uint32_t svcStartTime; 2022 uint32_t minDataRate; 2023 uint32_t meanDataRate; 2024 uint32_t peakDataRate; 2025 uint32_t maxBurstSz; 2026 uint32_t delayBound; 2027 uint32_t minPhyRate; 2028 uint16_t surplusBw; 2029 uint16_t mediumTime; 2030 } qdf_packed; 2031 2032 /** 2033 * struct add_ts_param - ADDTS related parameters 2034 * @vdev_id: vdev id 2035 * @tspec_idx: TSPEC handle uniquely identifying a TSPEC for a STA in a BSS 2036 * @tspec: tspec value 2037 * @status: QDF status 2038 * @pe_session_id: protocol engine session id 2039 * @tsm_interval: TSM interval period passed from UMAC to WMI 2040 * @set_ric_params: Should RIC parameters be set? 2041 */ 2042 struct add_ts_param { 2043 uint8_t vdev_id; 2044 uint16_t tspec_idx; 2045 struct mac_tspec_ie tspec; 2046 QDF_STATUS status; 2047 uint8_t pe_session_id; 2048 #ifdef FEATURE_WLAN_ESE 2049 uint16_t tsm_interval; 2050 #endif /* FEATURE_WLAN_ESE */ 2051 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 2052 bool set_ric_params; 2053 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ 2054 }; 2055 2056 /** 2057 * struct delts_req_info - DELTS request parameter 2058 * @tsinfo: ts info 2059 * @tspec: ts spec 2060 * @wmeTspecPresent: wme ts spec flag 2061 * @wsmTspecPresent: wsm ts spec flag 2062 * @lleTspecPresent: lle ts spec flag 2063 */ 2064 struct delts_req_info { 2065 struct mac_ts_info tsinfo; 2066 struct mac_tspec_ie tspec; 2067 uint8_t wmeTspecPresent:1; 2068 uint8_t wsmTspecPresent:1; 2069 uint8_t lleTspecPresent:1; 2070 }; 2071 2072 /** 2073 * struct del_ts_params - DELTS related parameters 2074 * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS 2075 * @bssId: BSSID 2076 * @sessionId: session id 2077 * @userPrio: user priority 2078 * @delTsInfo: DELTS info 2079 * @setRICparams: RIC parameters 2080 */ 2081 struct del_ts_params { 2082 uint16_t tspecIdx; 2083 uint8_t bssId[QDF_MAC_ADDR_SIZE]; 2084 uint8_t sessionId; 2085 uint8_t userPrio; 2086 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 2087 struct delts_req_info delTsInfo; 2088 uint8_t setRICparams; 2089 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ 2090 }; 2091 2092 /** 2093 * struct ll_stats_clear_params - ll stats clear parameter 2094 * @req_id: request id 2095 * @vdev_id: vdev id 2096 * @stats_clear_mask: stats clear mask 2097 * @stop_req: stop request 2098 * @peer_macaddr: MAC address of the peer for which stats are to be cleared 2099 */ 2100 struct ll_stats_clear_params { 2101 uint32_t req_id; 2102 uint8_t vdev_id; 2103 uint32_t stats_clear_mask; 2104 uint8_t stop_req; 2105 struct qdf_mac_addr peer_macaddr; 2106 }; 2107 2108 /** 2109 * struct ll_stats_set_params - ll stats get parameter 2110 * @req_id: request id 2111 * @mpdu_size_threshold: mpdu size threshold 2112 * @aggressive_statistics_gathering: aggressive_statistics_gathering 2113 */ 2114 struct ll_stats_set_params { 2115 uint32_t req_id; 2116 uint32_t mpdu_size_threshold; 2117 uint32_t aggressive_statistics_gathering; 2118 }; 2119 2120 /** 2121 * struct ll_stats_get_params - ll stats parameter 2122 * @req_id: request id 2123 * @vdev_id: vdev id 2124 * @param_id_mask: param is mask 2125 * @peer_macaddr: MAC address of the peer for which stats are desired 2126 */ 2127 struct ll_stats_get_params { 2128 uint32_t req_id; 2129 uint8_t vdev_id; 2130 uint32_t param_id_mask; 2131 struct qdf_mac_addr peer_macaddr; 2132 }; 2133 2134 2135 /** 2136 * struct link_status_params - link stats parameter 2137 * @vdev_id: ID of the vdev for which link status is desired 2138 */ 2139 struct link_status_params { 2140 uint8_t vdev_id; 2141 }; 2142 2143 /** 2144 * struct dhcp_stop_ind_params - DHCP Stop indication message 2145 * @msgtype: message type is same as the request type 2146 * @msglen: length of the entire request 2147 * @device_mode: Mode of the device(ex:STA, AP) 2148 * @adapter_macaddr: MAC address of the adapter 2149 * @peer_macaddr: MAC address of the connected peer 2150 */ 2151 struct dhcp_stop_ind_params { 2152 uint16_t msgtype; 2153 uint16_t msglen; 2154 uint8_t device_mode; 2155 struct qdf_mac_addr adapter_macaddr; 2156 struct qdf_mac_addr peer_macaddr; 2157 }; 2158 2159 #define WMI_MAX_FILTER_TEST_DATA_LEN 8 2160 #define WMI_MAX_NUM_MULTICAST_ADDRESS 240 2161 #define WMI_MAX_NUM_FILTERS 20 2162 #define WMI_MAX_NUM_TESTS_PER_FILTER 10 2163 2164 /** 2165 * enum packet_filter_type - packet filter type 2166 * @WMI_RCV_FILTER_TYPE_INVALID: invalid type 2167 * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type 2168 * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type 2169 * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size 2170 */ 2171 enum packet_filter_type { 2172 WMI_RCV_FILTER_TYPE_INVALID, 2173 WMI_RCV_FILTER_TYPE_FILTER_PKT, 2174 WMI_RCV_FILTER_TYPE_BUFFER_PKT, 2175 WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE 2176 }; 2177 2178 /** 2179 * enum packet_protocol_type - packet protocol type 2180 * @WMI_FILTER_HDR_TYPE_INVALID: invalid type 2181 * @WMI_FILTER_HDR_TYPE_MAC: mac type 2182 * @WMI_FILTER_HDR_TYPE_ARP: trp type 2183 * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type 2184 * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type 2185 * @WMI_FILTER_HDR_TYPE_UDP: udp type 2186 * @WMI_FILTER_HDR_TYPE_MAX: max type 2187 */ 2188 enum packet_protocol_type { 2189 WMI_FILTER_HDR_TYPE_INVALID, 2190 WMI_FILTER_HDR_TYPE_MAC, 2191 WMI_FILTER_HDR_TYPE_ARP, 2192 WMI_FILTER_HDR_TYPE_IPV4, 2193 WMI_FILTER_HDR_TYPE_IPV6, 2194 WMI_FILTER_HDR_TYPE_UDP, 2195 WMI_FILTER_HDR_TYPE_MAX 2196 }; 2197 2198 /** 2199 * enum packet_filter_comp_type - packet filter comparison type 2200 * @WMI_FILTER_CMP_TYPE_INVALID: invalid type 2201 * @WMI_FILTER_CMP_TYPE_EQUAL: type equal 2202 * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal 2203 * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal 2204 * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal 2205 * @WMI_FILTER_CMP_TYPE_MAX: max type 2206 */ 2207 enum packet_filter_comp_type { 2208 WMI_FILTER_CMP_TYPE_INVALID, 2209 WMI_FILTER_CMP_TYPE_EQUAL, 2210 WMI_FILTER_CMP_TYPE_MASK_EQUAL, 2211 WMI_FILTER_CMP_TYPE_NOT_EQUAL, 2212 WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL, 2213 WMI_FILTER_CMP_TYPE_MAX 2214 }; 2215 2216 /** 2217 * struct rcv_pkt_filter_params - receive packet filter parameters 2218 * @protocolLayer - protocol layer 2219 * @cmpFlag - comparison flag 2220 * @dataLength - data length 2221 * @dataOffset - data offset 2222 * @reserved - resserved 2223 * @compareData - compare data 2224 * @dataMask - data mask 2225 */ 2226 struct rcv_pkt_filter_params { 2227 enum packet_protocol_type protocolLayer; 2228 enum packet_filter_comp_type cmpFlag; 2229 uint16_t dataLength; 2230 uint8_t dataOffset; 2231 uint8_t reserved; 2232 uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN]; 2233 uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN]; 2234 }; 2235 2236 /** 2237 * struct rcv_pkt_filter_config - receive packet filter info 2238 * @filterId - filter id 2239 * @filterType - filter type 2240 * @numFieldParams - no of fields 2241 * @coalesceTime - reserved parameter 2242 * @self_macaddr - self mac address 2243 * @bssid - Bssid of the connected AP 2244 * @paramsData - data parameter 2245 */ 2246 struct rcv_pkt_filter_config { 2247 uint8_t filterId; 2248 enum packet_filter_type filterType; 2249 uint32_t numFieldParams; 2250 uint32_t coalesceTime; 2251 struct qdf_mac_addr self_macaddr; 2252 struct qdf_mac_addr bssid; 2253 struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER]; 2254 }; 2255 2256 /** 2257 * struct cfg_action_frm_tb_ppdu_param - action frm in TB PPDU cfg 2258 * @cfg - enable/disable 2259 * @frm_len - length of the frame 2260 * @data - data pointer 2261 */ 2262 struct cfg_action_frm_tb_ppdu_param { 2263 uint32_t cfg; 2264 uint32_t frm_len; 2265 uint8_t *data; 2266 }; 2267 2268 #define WMI_MAX_NUM_FW_SEGMENTS 4 2269 2270 /** 2271 * struct fw_dump_seg_req_param - individual segment details 2272 * @seg_id - segment id. 2273 * @seg_start_addr_lo - lower address of the segment. 2274 * @seg_start_addr_hi - higher address of the segment. 2275 * @seg_length - length of the segment. 2276 * @dst_addr_lo - lower address of the destination buffer. 2277 * @dst_addr_hi - higher address of the destination buffer. 2278 * 2279 * This structure carries the information to firmware about the 2280 * individual segments. This structure is part of firmware memory 2281 * dump request. 2282 */ 2283 struct fw_dump_seg_req_param { 2284 uint8_t seg_id; 2285 uint32_t seg_start_addr_lo; 2286 uint32_t seg_start_addr_hi; 2287 uint32_t seg_length; 2288 uint32_t dst_addr_lo; 2289 uint32_t dst_addr_hi; 2290 }; 2291 2292 /** 2293 * struct fw_dump_req_param - firmware memory dump request details. 2294 * @request_id - request id. 2295 * @num_seg - requested number of segments. 2296 * @fw_dump_seg_req - individual segment information. 2297 * 2298 * This structure carries information about the firmware 2299 * memory dump request. 2300 */ 2301 struct fw_dump_req_param { 2302 uint32_t request_id; 2303 uint32_t num_seg; 2304 struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS]; 2305 }; 2306 2307 /** 2308 * struct dhcp_offload_info_params - dhcp offload parameters 2309 * @vdev_id: request data length 2310 * @dhcp_offload_enabled: dhcp offload enabled 2311 * @dhcp_client_num: dhcp client no 2312 * @dhcp_srv_addr: dhcp server ip 2313 */ 2314 struct dhcp_offload_info_params { 2315 uint32_t vdev_id; 2316 bool dhcp_offload_enabled; 2317 uint32_t dhcp_client_num; 2318 uint32_t dhcp_srv_addr; 2319 }; 2320 2321 /** 2322 * struct app_type2_params - app type2parameter 2323 * @vdev_id: vdev id 2324 * @rc4_key: rc4 key 2325 * @rc4_key_len: rc4 key length 2326 * @ip_id: NC id 2327 * @ip_device_ip: NC IP address 2328 * @ip_server_ip: Push server IP address 2329 * @tcp_src_port: NC TCP port 2330 * @tcp_dst_port: Push server TCP port 2331 * @tcp_seq: tcp sequence 2332 * @tcp_ack_seq: tcp ack sequence 2333 * @keepalive_init: Initial ping interval 2334 * @keepalive_min: Minimum ping interval 2335 * @keepalive_max: Maximum ping interval 2336 * @keepalive_inc: Increment of ping interval 2337 * @gateway_mac: gateway mac address 2338 * @tcp_tx_timeout_val: tcp tx timeout value 2339 * @tcp_rx_timeout_val: tcp rx timeout value 2340 */ 2341 struct app_type2_params { 2342 uint8_t vdev_id; 2343 uint8_t rc4_key[16]; 2344 uint32_t rc4_key_len; 2345 /** ip header parameter */ 2346 uint32_t ip_id; 2347 uint32_t ip_device_ip; 2348 uint32_t ip_server_ip; 2349 /** tcp header parameter */ 2350 uint16_t tcp_src_port; 2351 uint16_t tcp_dst_port; 2352 uint32_t tcp_seq; 2353 uint32_t tcp_ack_seq; 2354 uint32_t keepalive_init; 2355 uint32_t keepalive_min; 2356 uint32_t keepalive_max; 2357 uint32_t keepalive_inc; 2358 struct qdf_mac_addr gateway_mac; 2359 uint32_t tcp_tx_timeout_val; 2360 uint32_t tcp_rx_timeout_val; 2361 }; 2362 2363 /** 2364 * struct app_type1_params - app type1 parameter 2365 * @vdev_id: vdev id 2366 * @wakee_mac_addr: mac address 2367 * @identification_id: identification id 2368 * @password: password 2369 * @id_length: id length 2370 * @pass_length: password length 2371 */ 2372 struct app_type1_params { 2373 uint8_t vdev_id; 2374 struct qdf_mac_addr wakee_mac_addr; 2375 uint8_t identification_id[8]; 2376 uint8_t password[16]; 2377 uint32_t id_length; 2378 uint32_t pass_length; 2379 }; 2380 2381 /** 2382 * enum wmi_ext_wow_type - wow type 2383 * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1 2384 * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2 2385 * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2 2386 */ 2387 enum wmi_ext_wow_type { 2388 WMI_EXT_WOW_TYPE_APP_TYPE1, 2389 WMI_EXT_WOW_TYPE_APP_TYPE2, 2390 WMI_EXT_WOW_TYPE_APP_TYPE1_2, 2391 }; 2392 2393 /** 2394 * struct ext_wow_params - ext wow parameters 2395 * @vdev_id: vdev id 2396 * @type: wow type 2397 * @wakeup_pin_num: wake up gpio no 2398 */ 2399 struct ext_wow_params { 2400 uint8_t vdev_id; 2401 enum wmi_ext_wow_type type; 2402 uint32_t wakeup_pin_num; 2403 }; 2404 2405 /** 2406 * struct stats_ext_params - ext stats request 2407 * @vdev_id: vdev id 2408 * @request_data_len: request data length 2409 * @request_data: request data 2410 */ 2411 struct stats_ext_params { 2412 uint32_t vdev_id; 2413 uint32_t request_data_len; 2414 uint8_t request_data[]; 2415 }; 2416 2417 #define WMI_GTK_OFFLOAD_KEK_BYTES 64 2418 #define WMI_GTK_OFFLOAD_KCK_BYTES 16 2419 #define WMI_GTK_OFFLOAD_ENABLE 0 2420 #define WMI_GTK_OFFLOAD_DISABLE 1 2421 2422 #define MAX_MEM_CHUNKS 32 2423 /** 2424 * struct wmi_host_mem_chunk - host memory chunk structure 2425 * @vaddr: Pointer to virtual address 2426 * @paddr: Physical address 2427 * @memctx: qdf memory context for mapped address. 2428 * @len: length of chunk 2429 * @req_id: request id from target 2430 */ 2431 struct wmi_host_mem_chunk { 2432 uint32_t *vaddr; 2433 qdf_dma_addr_t paddr; 2434 qdf_dma_mem_context(memctx); 2435 uint32_t len; 2436 uint32_t req_id; 2437 }; 2438 2439 /** 2440 * struct wmi_wifi_start_log - Structure to store the params sent to start/ 2441 * stop logging 2442 * @name: Attribute which indicates the type of logging like per packet 2443 * statistics, connectivity etc. 2444 * @verbose_level: Verbose level which can be 0,1,2,3 2445 * @flag: Flag field for future use 2446 */ 2447 struct wmi_wifi_start_log { 2448 uint32_t ring_id; 2449 uint32_t verbose_level; 2450 uint32_t flag; 2451 }; 2452 2453 /** 2454 * struct wmi_pcl_list - Format of PCL 2455 * @pcl_list: List of preferred channels 2456 * @weight_list: Weights of the PCL 2457 * @pcl_len: Number of channels in the PCL 2458 */ 2459 struct wmi_pcl_list { 2460 uint8_t pcl_list[NUM_CHANNELS]; 2461 uint8_t weight_list[NUM_CHANNELS]; 2462 uint32_t pcl_len; 2463 }; 2464 2465 /** 2466 * struct wmi_hw_mode_params - HW mode params 2467 * @mac0_tx_ss: MAC0 Tx spatial stream 2468 * @mac0_rx_ss: MAC0 Rx spatial stream 2469 * @mac1_tx_ss: MAC1 Tx spatial stream 2470 * @mac1_rx_ss: MAC1 Rx spatial stream 2471 * @mac0_bw: MAC0 bandwidth 2472 * @mac1_bw: MAC1 bandwidth 2473 * @dbs_cap: DBS capabality 2474 * @agile_dfs_cap: Agile DFS capabality 2475 */ 2476 struct wmi_hw_mode_params { 2477 uint8_t mac0_tx_ss; 2478 uint8_t mac0_rx_ss; 2479 uint8_t mac1_tx_ss; 2480 uint8_t mac1_rx_ss; 2481 uint8_t mac0_bw; 2482 uint8_t mac1_bw; 2483 uint8_t dbs_cap; 2484 uint8_t agile_dfs_cap; 2485 }; 2486 2487 /** 2488 * struct wmi_unit_test_cmd - unit test command parameters 2489 * @vdev_id: vdev id 2490 * @module_id: module id 2491 * @num_args: number of arguments 2492 * @diag_token: dialog token, which identifies the transaction. 2493 * this number is generated by wifitool and may be used to 2494 * identify the transaction in the event path 2495 * @args: arguments 2496 */ 2497 struct wmi_unit_test_cmd { 2498 uint32_t vdev_id; 2499 uint32_t module_id; 2500 uint32_t num_args; 2501 uint32_t diag_token; 2502 uint32_t args[WMI_UNIT_TEST_MAX_NUM_ARGS]; 2503 }; 2504 2505 /** 2506 * struct extscan_bssid_hotlist_set_params - set hotlist request 2507 * @request_id: request_id 2508 * @vdev_id: vdev id 2509 * @lost_ap_sample_size: number of samples to confirm AP loss 2510 * @num_ap: Number of hotlist APs 2511 * @ap: hotlist APs 2512 */ 2513 struct extscan_bssid_hotlist_set_params { 2514 uint32_t request_id; 2515 uint8_t vdev_id; 2516 uint32_t lost_ap_sample_size; 2517 uint32_t num_ap; 2518 struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS]; 2519 }; 2520 2521 /** 2522 * struct host_mem_req - Host memory request paramseters request by target 2523 * @req_id: Request id to identify the request. 2524 * @unit_size: Size of single unit requested. 2525 * @num_unit_info: Memory chunk info 2526 * @num_units: number of units requested. 2527 * @tgt_num_units: number of units request by target. 2528 */ 2529 typedef struct { 2530 uint32_t req_id; 2531 uint32_t unit_size; 2532 uint32_t num_unit_info; 2533 uint32_t num_units; 2534 uint32_t tgt_num_units; 2535 } host_mem_req; 2536 2537 #define WMI_HOST_DSCP_MAP_MAX (64) 2538 2539 /** 2540 * struct wmi_host_ext_resource_config - Extended resource config 2541 * @host_platform_config: Host plaform configuration. 2542 * @fw_featuew_bitmap: FW feature requested bitmap. 2543 */ 2544 typedef struct { 2545 uint32_t host_platform_config; 2546 2547 #define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001 2548 #define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002 2549 #define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004 2550 #define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008 2551 #define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010 2552 #define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020 2553 #define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040 2554 #define WMI_HOST_FW_FEATURE_VOW_FEATURES 0x00004000 2555 #define WMI_HOST_FW_FEATURE_VOW_STATS 0x00008000 2556 /** 2557 * @brief fw_feature_bitmask - Enable/Disable features in FW 2558 * @details 2559 * The bits in fw_feature_bitmask are used as shown by the masks below: 2560 * 0x0001 - LTEU Config enable/disable 2561 * 0x0002 - COEX GPIO Config enable/disable 2562 * 0x0004 - Aux Radio enhancement for spectral scan enable/disable 2563 * 0x0008 - Aux Radio enhancement for chan load scan enable/disable 2564 * 0x0010 - BSS channel info stats enable/disable 2565 * The features in question are enabled by setting 2566 * the feature's bit to 1, 2567 * or disabled by setting the feature's bit to 0. 2568 */ 2569 uint32_t fw_feature_bitmap; 2570 2571 /* WLAN priority GPIO number 2572 * The target uses a GPIO pin to indicate when it is transmitting 2573 * high-priority traffic (e.g. beacon, management, or AC_VI) or 2574 * low-priority traffic (e.g. AC_BE, AC_BK). The HW uses this 2575 * WLAN GPIO pin to determine whether to abort WLAN tx in favor of 2576 * BT activity. 2577 * Which GPIO is used for this WLAN tx traffic priority specification 2578 * varies between platforms, so the host needs to indicate to the 2579 * target which GPIO to use. 2580 */ 2581 uint32_t wlan_priority_gpio; 2582 2583 /* Host will notify target which coex algorithm has to be 2584 * enabled based on HW, FW capability and device tree config. 2585 * Till now the coex algorithms were target specific. Now the 2586 * same target can choose between multiple coex algorithms 2587 * depending on device tree config on host. For backward 2588 * compatibility, version support will have option 0 and will 2589 * rely on FW compile time flags to decide the coex version 2590 * between VERSION_1, VERSION_2 and VERSION_3. Version info is 2591 * mandatory from VERSION_4 onwards for any new coex algorithms. 2592 * 2593 * 0 = no version support 2594 * 1 = COEX_VERSION_1 (3 wire coex) 2595 * 2 = COEX_VERSION_2 (2.5 wire coex) 2596 * 3 = COEX_VERSION_3 (2.5 wire coex+duty cycle) 2597 * 4 = COEX_VERSION_4 (4 wire coex) 2598 */ 2599 uint32_t coex_version; 2600 2601 /* There are multiple coex implementations on FW to support different 2602 * hardwares. Since the coex algos are mutually exclusive, host will 2603 * use below fields to send GPIO info to FW and these GPIO pins will 2604 * have different usages depending on the feature enabled. This is to 2605 * avoid adding multiple GPIO fields here for different features. 2606 * 2607 * COEX VERSION_4 (4 wire coex) : 2608 * 4 wire coex feature uses 1 common input request line from BT/ZB/ 2609 * Thread which interrupts the WLAN target processor directly, 1 input 2610 * priority line from BT and ZB each, 1 output line to grant access to 2611 * requesting IOT subsystem. WLAN uses the input priority line to 2612 * identify the requesting IOT subsystem. Request is granted based on 2613 * IOT interface priority and WLAN traffic. GPIO pin usage is as below: 2614 * coex_gpio_pin_1 = BT PRIORITY INPUT GPIO 2615 * coex_gpio_pin_2 = ZIGBEE PRIORITY INPUT GPIO 2616 * coex_gpio_pin_3 = GRANT OUTPUT GPIO 2617 * when a BT active interrupt is raised, WLAN reads 2618 * BT and ZB priority input GPIO pins to compare against the coex 2619 * priority table and accordingly sets the grant output GPIO to give 2620 * access to requesting IOT subsystem. 2621 */ 2622 uint32_t coex_gpio_pin_1; 2623 uint32_t coex_gpio_pin_2; 2624 uint32_t coex_gpio_pin_3; 2625 2626 /* add new members here */ 2627 } wmi_host_ext_resource_config; 2628 2629 /** 2630 * struct set_fwtest_params - FW test params 2631 * @arg: FW param id 2632 * @value: value 2633 */ 2634 struct set_fwtest_params { 2635 uint32_t arg; 2636 uint32_t value; 2637 }; 2638 2639 /** 2640 * enum wfa_test_cmds - WFA test config command 2641 * @WFA_CONFIG_RXNE: configure an override for the RSNXE Used 2642 * @WFA_CONFIG_CSA: configure the driver to ignore CSA 2643 * @WFA_CONFIG_OCV: configure OCI 2644 * @WFA_CONFIG_SA_QUERY: configure driver/firmware to ignore SAquery timeout 2645 * @WFA_FILS_DISCV_FRAMES: FD frames TX enable disable config 2646 */ 2647 enum wfa_test_cmds { 2648 WFA_CONFIG_RXNE, 2649 WFA_CONFIG_CSA, 2650 WFA_CONFIG_OCV, 2651 WFA_CONFIG_SA_QUERY, 2652 WFA_FILS_DISCV_FRAMES, 2653 }; 2654 2655 /** 2656 * enum wmi_host_wfa_config_ocv_frmtype - OCI override frame type 2657 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ: SA Query Request frame 2658 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP: SA Query Response frame 2659 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ: FT Reassociation Req frm 2660 * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ: FILS Reassoc Req frm 2661 */ 2662 enum wmi_host_wfa_config_ocv_frmtype { 2663 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ = 0x00000001, 2664 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP = 0x00000002, 2665 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ = 0x00000004, 2666 WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ = 0x00000008, 2667 }; 2668 2669 /** 2670 * struct ocv_wfatest_params - ocv WFA test params 2671 * @frame_type: frame type req for OCV config 2672 * @freq: frequency to set 2673 */ 2674 struct ocv_wfatest_params { 2675 uint8_t frame_type; 2676 uint32_t freq; 2677 }; 2678 2679 /** 2680 * struct set_wfatest_params - WFA test params 2681 * @vdev_id: vdev id 2682 * @value: wfa test config value 2683 * @cmd: WFA test command 2684 * @ocv_param: pointer to ocv params 2685 */ 2686 struct set_wfatest_params { 2687 uint8_t vdev_id; 2688 uint32_t value; 2689 enum wfa_test_cmds cmd; 2690 struct ocv_wfatest_params *ocv_param; 2691 }; 2692 2693 /* 2694 * msduq_update_params - MSDUQ update param structure 2695 * @tid_num: TID number 2696 * @msduq_update_mask: update bit mask 2697 * @qdepth_thresh_value: threshold value for the queue depth 2698 */ 2699 2700 #define QDEPTH_THRESH_MAX_UPDATES 1 2701 2702 typedef struct { 2703 uint32_t tid_num; 2704 uint32_t msduq_update_mask; 2705 uint32_t qdepth_thresh_value; 2706 } msduq_update_params; 2707 2708 /** 2709 * struct set_qdepth_thresh_params - MSDU Queue Depth Threshold Params 2710 * @vdev_id: vdev id 2711 * @pdev_id: pdev id 2712 * @mac_addr: MAC address 2713 * @num_of_msduq_updates: holds the number of tid updates 2714 */ 2715 2716 struct set_qdepth_thresh_params { 2717 uint32_t pdev_id; 2718 uint32_t vdev_id; 2719 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 2720 uint32_t num_of_msduq_updates; 2721 msduq_update_params update_params[QDEPTH_THRESH_MAX_UPDATES]; 2722 }; 2723 2724 /** 2725 * struct peer_chan_width_switch_info - Peer channel width capability params 2726 * @mac_addr: MAC address of peer 2727 * @chan_width: Max supported channel width of peer 2728 * (enum ieee80211_cwm_width) 2729 */ 2730 2731 struct peer_chan_width_switch_info { 2732 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 2733 uint32_t chan_width; 2734 }; 2735 2736 /** 2737 * struct peer_chan_width_switch_params - Peer channel width capability wrapper 2738 * @num_peers: Total number of peers connected to AP 2739 * @max_peers_per_cmd: Peer limit per WMI command 2740 * @vdev_id: vdev id 2741 * @chan_width_peer_list: List of capabilities for all connected peers 2742 */ 2743 2744 struct peer_chan_width_switch_params { 2745 uint32_t num_peers; 2746 uint32_t max_peers_per_cmd; 2747 uint32_t vdev_id; 2748 struct peer_chan_width_switch_info *chan_width_peer_list; 2749 }; 2750 2751 /** 2752 * struct peer_add_wds_entry_params - WDS peer entry add params 2753 * @dest_addr: Pointer to destination macaddr 2754 * @peer_addr: Pointer to peer mac addr 2755 * @flags: flags 2756 * @vdev_id: Vdev id 2757 */ 2758 struct peer_add_wds_entry_params { 2759 const uint8_t *dest_addr; 2760 uint8_t *peer_addr; 2761 uint32_t flags; 2762 uint32_t vdev_id; 2763 }; 2764 2765 /** 2766 * struct peer_del_wds_entry_params - WDS peer entry del params 2767 * @dest_addr: Pointer to destination macaddr 2768 * @vdev_id: Vdev id 2769 */ 2770 struct peer_del_wds_entry_params { 2771 uint8_t *dest_addr; 2772 uint32_t vdev_id; 2773 }; 2774 2775 /** 2776 * struct set_bridge_mac_addr_params - set bridge MAC addr params 2777 * @dest_addr: Pointer to bridge macaddr 2778 */ 2779 struct set_bridge_mac_addr_params { 2780 uint8_t *bridge_addr; 2781 }; 2782 2783 /** 2784 * struct peer_updatewds_entry_params - WDS peer entry update params 2785 * @wds_macaddr: Pointer to destination macaddr 2786 * @peer_add: Pointer to peer mac addr 2787 * @flags: flags 2788 * @vdev_id: Vdev id 2789 */ 2790 struct peer_update_wds_entry_params { 2791 uint8_t *wds_macaddr; 2792 uint8_t *peer_macaddr; 2793 uint32_t flags; 2794 uint32_t vdev_id; 2795 }; 2796 2797 /** 2798 * struct peer_del_all_wds_entries_params - WDS peer entries del params 2799 * @wds_macaddr: Pointer to destination macaddr 2800 * @peer_macaddr: Pointer to peer mac addr 2801 * @flags: flags 2802 */ 2803 struct peer_del_all_wds_entries_params { 2804 uint8_t *wds_macaddr; 2805 uint8_t *peer_macaddr; 2806 uint32_t flags; 2807 }; 2808 2809 /** 2810 * struct set_ps_mode_params - PS mode params 2811 * @vdev_id: vdev id 2812 * @psmode: PS mode 2813 */ 2814 struct set_ps_mode_params { 2815 uint8_t vdev_id; 2816 uint8_t psmode; 2817 }; 2818 2819 /** 2820 * @struct tt_level_config - Set Thermal throttlling config 2821 * @tmplwm: Temperature low water mark 2822 * @tmphwm: Temperature high water mark 2823 * @dcoffpercent: dc off percentage 2824 * @priority: priority 2825 */ 2826 typedef struct { 2827 uint32_t tmplwm; 2828 uint32_t tmphwm; 2829 uint32_t dcoffpercent; 2830 uint32_t priority; 2831 } tt_level_config; 2832 2833 /** 2834 * struct thermal_mitigation_params - Thermal mitigation params 2835 * @enable: Enable/Disable Thermal mitigation 2836 * @dc: DC 2837 * @dc_per_event: DC per event 2838 * @num_thermal_conf: Number of thermal configurations to be sent 2839 * @client_id: Thermal client id either apps or wpps 2840 * @priority: Priority of apps/wpps 2841 * @tt_level_config: TT level config params 2842 */ 2843 struct thermal_mitigation_params { 2844 uint32_t pdev_id; 2845 uint32_t enable; 2846 uint32_t dc; 2847 uint32_t dc_per_event; 2848 uint8_t num_thermal_conf; 2849 uint8_t client_id; 2850 uint8_t priority; 2851 tt_level_config levelconf[THERMAL_LEVELS]; 2852 }; 2853 2854 /** 2855 * struct smart_ant_enable_tx_feedback_params - SA tx feeback params 2856 * @enable: Enable TX feedback for SA 2857 */ 2858 struct smart_ant_enable_tx_feedback_params { 2859 int enable; 2860 }; 2861 2862 /** 2863 * struct vdev_spectral_configure_params - SPectral config params 2864 * @vdev_id: VDEV id 2865 * @count: count 2866 * @period: period 2867 * @spectral_pri: Spectral priority 2868 * @fft_size: FFT size 2869 * @gc_enable: GC enable 2870 * @restart_enable: restart enabled 2871 * @noise_floor_ref: Noise floor reference 2872 * @init_delay: Init delays 2873 * @nb_tone_thr: NB tone threshold 2874 * @str_bin_thr: STR BIN threshold 2875 * @wb_rpt_mode: WB BIN threshold 2876 * @rssi_rpt_mode: RSSI report mode 2877 * @rssi_thr: RSSI threshold 2878 * @pwr_format: Power format 2879 * @rpt_mode: Report mdoe 2880 * @bin_scale: BIN scale 2881 * @dbm_adj: DBM adjust 2882 * @chn_mask: chain mask 2883 * @mode: Mode 2884 * @center_freq1: Center frequency 1 2885 * @center_freq2: Center frequency 2 2886 * @chan_freq: Primary channel frequency 2887 * @chan_width: Channel width 2888 */ 2889 struct vdev_spectral_configure_params { 2890 uint8_t vdev_id; 2891 uint16_t count; 2892 uint16_t period; 2893 uint16_t spectral_pri; 2894 uint16_t fft_size; 2895 uint16_t gc_enable; 2896 uint16_t restart_enable; 2897 uint16_t noise_floor_ref; 2898 uint16_t init_delay; 2899 uint16_t nb_tone_thr; 2900 uint16_t str_bin_thr; 2901 uint16_t wb_rpt_mode; 2902 uint16_t rssi_rpt_mode; 2903 uint16_t rssi_thr; 2904 uint16_t pwr_format; 2905 uint16_t rpt_mode; 2906 uint16_t bin_scale; 2907 uint16_t dbm_adj; 2908 uint16_t chn_mask; 2909 uint16_t mode; 2910 uint16_t center_freq1; 2911 uint16_t center_freq2; 2912 uint16_t chan_freq; 2913 uint16_t chan_width; 2914 }; 2915 2916 /** 2917 * struct vdev_spectral_enable_params - Spectral enabled params 2918 * @vdev_id: VDEV id 2919 * @active_valid: Active valid 2920 * @active: active 2921 * @enabled_valid: Enabled valid 2922 * @enabled: enabled 2923 * @mode: Mode 2924 */ 2925 struct vdev_spectral_enable_params { 2926 uint8_t vdev_id; 2927 uint8_t active_valid; 2928 uint8_t active; 2929 uint8_t enabled_valid; 2930 uint8_t enabled; 2931 uint8_t mode; 2932 }; 2933 2934 #ifdef WLAN_CONV_SPECTRAL_ENABLE 2935 /** 2936 * struct spectral_fft_bin_markers_160_165mhz - Stores the start index 2937 * and length of FFT bins in 165 MHz/Restricted 80p80 or 160 MHz 2938 * mode in targets with a single Spectral detector 2939 * @is_valid: Indicates whether this structure holds valid data 2940 * @start_pri80: Starting index of FFT bins corresponding to primary 80 MHz 2941 * in 165 MHz/Restricted 80p80 or 160 MHz mode 2942 * @num_pri80: Number of FFT bins corresponding to primary 80 MHz 2943 * in 165 MHz/Restricted 80p80 or 160 MHz mode 2944 * @start_5mhz: Starting index of FFT bins corresponding to extra 5 MHz 2945 * in 165 MHz/Restricted 80p80 mode 2946 * @num_5mhz: Number of FFT bins corresponding to extra 5 MHz 2947 * in 165 MHz/Restricted 80p80 mode 2948 * @start_sec80: Starting index of FFT bins corresponding to secondary 80 MHz 2949 * in 165 MHz/Restricted 80p80 or 160 MHz mode 2950 * @num_sec80: Number of FFT bins corresponding to secondary 80 MHz 2951 * in 165 MHz/Restricted 80p80 or 160 MHz mode 2952 */ 2953 struct spectral_fft_bin_markers_160_165mhz { 2954 bool is_valid; 2955 uint16_t start_pri80; 2956 uint16_t num_pri80; 2957 uint16_t start_5mhz; 2958 uint16_t num_5mhz; 2959 uint16_t start_sec80; 2960 uint16_t num_sec80; 2961 }; 2962 2963 /** 2964 * struct spectral_startscan_resp_params - Params from the event send by 2965 * FW as a response to the scan start command 2966 * @pdev_id: Pdev id 2967 * @smode: Spectral scan mode 2968 * @num_fft_bin_index: Number of TLVs with FFT bin start and end indices 2969 */ 2970 struct spectral_startscan_resp_params { 2971 uint32_t pdev_id; 2972 enum spectral_scan_mode smode; 2973 uint8_t num_fft_bin_index; 2974 }; 2975 #endif 2976 2977 /** 2978 * struct pdev_set_regdomain_params - PDEV set reg domain params 2979 * @currentRDinuse: Current Reg domain 2980 * @currentRD2G: Current Reg domain 2G 2981 * @currentRD5G: Current Reg domain 5G 2982 * @ctl_2G: CTL 2G 2983 * @ctl_5G: CTL 5G 2984 * @dfsDomain: DFS domain 2985 * @pdev_id: pdev_id 2986 */ 2987 struct pdev_set_regdomain_params { 2988 uint16_t currentRDinuse; 2989 uint16_t currentRD2G; 2990 uint16_t currentRD5G; 2991 uint32_t ctl_2G; 2992 uint32_t ctl_5G; 2993 uint8_t dfsDomain; 2994 uint32_t pdev_id; 2995 }; 2996 2997 /** 2998 * struct set_quiet_mode_params - Set quiet mode params 2999 * @enabled: Enabled 3000 * @period: Quite period 3001 * @intval: Quite interval 3002 * @duration: Quite duration 3003 * @offset: offset 3004 */ 3005 struct set_quiet_mode_params { 3006 uint8_t enabled; 3007 uint8_t period; 3008 uint16_t intval; 3009 uint16_t duration; 3010 uint16_t offset; 3011 }; 3012 3013 /** 3014 * struct set_bcn_offload_quiet_mode_params - Set quiet mode params 3015 * @vdev_id: Vdev ID 3016 * @period: Quite period 3017 * @duration: Quite duration 3018 * @next_start: Next quiet start 3019 * @flag: 0 - disable, 1 - enable and continuous, 3 - enable and single shot 3020 */ 3021 struct set_bcn_offload_quiet_mode_params { 3022 uint32_t vdev_id; 3023 uint32_t period; 3024 uint32_t duration; 3025 uint32_t next_start; 3026 uint32_t flag; 3027 }; 3028 3029 /** 3030 * struct set_beacon_filter_params - Set beacon filter params 3031 * @vdev_id: VDEV id 3032 * @ie: Pointer to IE fields 3033 */ 3034 struct set_beacon_filter_params { 3035 uint8_t vdev_id; 3036 uint32_t *ie; 3037 }; 3038 3039 /** 3040 * struct remove_beacon_filter_params - Remove beacon filter params 3041 * @vdev_id: VDEV id 3042 */ 3043 struct remove_beacon_filter_params { 3044 uint8_t vdev_id; 3045 }; 3046 3047 /** 3048 * struct mgmt_params - Mgmt params 3049 * @vdev_id: vdev id 3050 * @buf_len: length of frame buffer 3051 * @wbuf: frame buffer 3052 */ 3053 struct mgmt_params { 3054 int vdev_id; 3055 uint32_t buf_len; 3056 qdf_nbuf_t wbuf; 3057 }; 3058 3059 /** 3060 * struct addba_clearresponse_params - Addba clear response params 3061 * @vdev_id: VDEV id 3062 */ 3063 struct addba_clearresponse_params { 3064 uint8_t vdev_id; 3065 }; 3066 3067 /** 3068 * struct addba_send_params - ADDBA send params 3069 * @vdev_id: vdev id 3070 * @tidno: TID 3071 * @buffersize: buffer size 3072 */ 3073 struct addba_send_params { 3074 uint8_t vdev_id; 3075 uint8_t tidno; 3076 uint16_t buffersize; 3077 }; 3078 3079 /** 3080 * struct delba_send_params - DELBA send params 3081 * @vdev_id: vdev id 3082 * @tidno: TID 3083 * @initiator: initiator 3084 * @reasoncode: reason code 3085 */ 3086 struct delba_send_params { 3087 uint8_t vdev_id; 3088 uint8_t tidno; 3089 uint8_t initiator; 3090 uint16_t reasoncode; 3091 }; 3092 /** 3093 * struct addba_setresponse_arams - Set ADDBA response params 3094 * @vdev_id: vdev id 3095 * @tidno: TID 3096 * @statuscode: status code in response 3097 */ 3098 struct addba_setresponse_params { 3099 uint8_t vdev_id; 3100 uint8_t tidno; 3101 uint16_t statuscode; 3102 }; 3103 3104 /** 3105 * struct singleamsdu_params - Single AMSDU params 3106 * @vdev_id: vdev is 3107 * @tidno: TID 3108 */ 3109 struct singleamsdu_params { 3110 uint8_t vdev_id; 3111 uint8_t tidno; 3112 }; 3113 3114 /** 3115 * struct set_qbosst_params - Set QBOOST params 3116 * @vdev_id: vdev id 3117 * @value: value 3118 */ 3119 struct set_qboost_params { 3120 uint8_t vdev_id; 3121 uint32_t value; 3122 }; 3123 3124 /** 3125 * struct mu_scan_params - MU scan params 3126 * @id: id 3127 * @type: type 3128 * @duration: Duration 3129 * @lteu_tx_power: LTEU tx power 3130 */ 3131 struct mu_scan_params { 3132 uint8_t id; 3133 uint8_t type; 3134 uint32_t duration; 3135 uint32_t lteu_tx_power; 3136 uint32_t rssi_thr_bssid; 3137 uint32_t rssi_thr_sta; 3138 uint32_t rssi_thr_sc; 3139 uint32_t plmn_id; 3140 uint32_t alpha_num_bssid; 3141 }; 3142 3143 /** 3144 * struct lteu_config_params - LTEU config params 3145 * @lteu_gpio_start: start MU/AP scan after GPIO toggle 3146 * @lteu_num_bins: no. of elements in the following arrays 3147 * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one 3148 * @lteu_weight: weights for MU algo 3149 * @lteu_thresh: thresholds for MU algo 3150 * @lteu_gamma: gamma's for MU algo 3151 * @lteu_scan_timeout: timeout in ms to gpio toggle 3152 * @alpha_num_ssid: alpha for num active bssid calculation 3153 * @wifi_tx_power: Wifi Tx power 3154 */ 3155 struct lteu_config_params { 3156 uint8_t lteu_gpio_start; 3157 uint8_t lteu_num_bins; 3158 uint8_t use_actual_nf; 3159 uint32_t lteu_weight[LTEU_MAX_BINS]; 3160 uint32_t lteu_thresh[LTEU_MAX_BINS]; 3161 uint32_t lteu_gamma[LTEU_MAX_BINS]; 3162 uint32_t lteu_scan_timeout; 3163 uint32_t alpha_num_bssid; 3164 uint32_t wifi_tx_power; 3165 uint32_t allow_err_packets; 3166 }; 3167 3168 struct wmi_macaddr_t { 3169 /** upper 4 bytes of MAC address */ 3170 uint32_t mac_addr31to0; 3171 /** lower 2 bytes of MAC address */ 3172 uint32_t mac_addr47to32; 3173 }; 3174 3175 /** 3176 * struct wlan_profile_params - WLAN profile params 3177 * @param_id: param id 3178 * @profile_id: profile id 3179 * @enable: enable 3180 */ 3181 struct wlan_profile_params { 3182 uint32_t param_id; 3183 uint32_t profile_id; 3184 uint32_t enable; 3185 }; 3186 3187 /* struct ht_ie_params - HT IE params 3188 * @ie_len: IE length 3189 * @ie_data: pointer to IE data 3190 * @tx_streams: Tx streams supported for this HT IE 3191 * @rx_streams: Rx streams supported for this HT IE 3192 */ 3193 struct ht_ie_params { 3194 uint32_t ie_len; 3195 uint8_t *ie_data; 3196 uint32_t tx_streams; 3197 uint32_t rx_streams; 3198 }; 3199 3200 /* struct vht_ie_params - VHT IE params 3201 * @ie_len: IE length 3202 * @ie_data: pointer to IE data 3203 * @tx_streams: Tx streams supported for this VHT IE 3204 * @rx_streams: Rx streams supported for this VHT IE 3205 */ 3206 struct vht_ie_params { 3207 uint32_t ie_len; 3208 uint8_t *ie_data; 3209 uint32_t tx_streams; 3210 uint32_t rx_streams; 3211 }; 3212 3213 /** 3214 * struct wmi_host_wmeParams - WME params 3215 * @wmep_acm: ACM paramete 3216 * @wmep_aifsn: AIFSN parameters 3217 * @wmep_logcwmin: cwmin in exponential form 3218 * @wmep_logcwmax: cwmax in exponential form 3219 * @wmep_txopLimit: txopLimit 3220 * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack 3221 */ 3222 struct wmi_host_wmeParams { 3223 u_int8_t wmep_acm; 3224 u_int8_t wmep_aifsn; 3225 u_int8_t wmep_logcwmin; 3226 u_int8_t wmep_logcwmax; 3227 u_int16_t wmep_txopLimit; 3228 u_int8_t wmep_noackPolicy; 3229 }; 3230 3231 /** 3232 * struct wmm_update_params - WMM update params 3233 * @wmep_array: WME params for each AC 3234 */ 3235 struct wmm_update_params { 3236 struct wmi_host_wmeParams *wmep_array; 3237 }; 3238 3239 /** 3240 * struct wmi_host_wmevParams - WME params 3241 * @wmep_acm: ACM paramete 3242 * @wmep_aifsn: AIFSN parameters 3243 * @wmep_logcwmin: cwmin in exponential form 3244 * @wmep_logcwmax: cwmax in exponential form 3245 * @wmep_txopLimit: txopLimit 3246 * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack 3247 */ 3248 struct wmi_host_wme_vparams { 3249 u_int32_t acm; 3250 u_int32_t aifs; 3251 u_int32_t cwmin; 3252 u_int32_t cwmax; 3253 union { 3254 u_int32_t txoplimit; 3255 u_int32_t mu_edca_timer; 3256 }; 3257 u_int32_t noackpolicy; 3258 }; 3259 3260 /** 3261 * struct ratepwr_table_params - Rate power table params 3262 * @ratepwr_tbl: pointer to rate power table 3263 * @ratepwr_len: rate power table len 3264 */ 3265 struct ratepwr_table_params { 3266 uint8_t *ratepwr_tbl; 3267 uint16_t ratepwr_len; 3268 }; 3269 3270 /** 3271 * struct ctl_table_params - Ctl table params 3272 * @ctl_array: pointer to ctl array 3273 * @ctl_cmd_len: ctl command length 3274 * @is_2g: is 2G 3275 * @target_type: target type 3276 * @ctl_band: ctl band 3277 * @pdev_id: pdev id 3278 */ 3279 struct ctl_table_params { 3280 uint8_t *ctl_array; 3281 uint16_t ctl_cmd_len; 3282 bool is_2g; 3283 uint32_t target_type; 3284 uint32_t ctl_band; 3285 uint32_t pdev_id; 3286 }; 3287 3288 /** 3289 * struct mimogain_table_params - MIMO gain table params 3290 * @array_gain: pointer to array gain table 3291 * @tbl_len: table length 3292 * @multichain_gain_bypass: bypass multichain gain 3293 */ 3294 struct mimogain_table_params { 3295 uint8_t *array_gain; 3296 uint16_t tbl_len; 3297 bool multichain_gain_bypass; 3298 uint32_t pdev_id; 3299 }; 3300 3301 /** 3302 * struct ratepwr_chainmask_params - Rate power chainmask params 3303 * @ratepwr_chain_tbl: pointer to ratepwr chain table 3304 * @num_rate: number of rate in table 3305 * @pream_type: preamble type 3306 * @ops: ops 3307 */ 3308 struct ratepwr_chainmsk_params { 3309 uint32_t *ratepwr_chain_tbl; 3310 uint16_t num_rate; 3311 uint8_t pream_type; 3312 uint8_t ops; 3313 }; 3314 3315 struct macaddr_params { 3316 uint8_t *macaddr; 3317 }; 3318 3319 /** 3320 * struct acparams_params - acparams config structure 3321 * @ac: AC to configure 3322 * @use_rts: Use rts for this AC 3323 * @aggrsize_scaling: Aggregrate size scaling for the AC 3324 * @min_kbps: min kbps req 3325 */ 3326 struct acparams_params { 3327 uint8_t ac; 3328 uint8_t use_rts; 3329 uint8_t aggrsize_scaling; 3330 uint32_t min_kbps; 3331 }; 3332 3333 /** 3334 * struct vap_dscp_tid_map_params - DSCP tid map params 3335 * @vdev_id: vdev id 3336 * @dscp_to_tid_map: pointer to arry of tid to dscp map table 3337 */ 3338 struct vap_dscp_tid_map_params { 3339 uint8_t vdev_id; 3340 uint32_t *dscp_to_tid_map; 3341 }; 3342 3343 /** 3344 * struct proxy_ast_reserve_params - Proxy AST reserve params 3345 * @macaddr: macaddr for proxy ast entry 3346 */ 3347 struct proxy_ast_reserve_params { 3348 uint8_t *macaddr; 3349 }; 3350 3351 /** 3352 * struct fips_params - FIPS params config 3353 * @key: pointer to key 3354 * @key_len: length of key 3355 * @data: pointer data buf 3356 * @data_len: length of data buf 3357 * @mode: mode 3358 * @op: operation 3359 * @pdev_id: pdev_id for identifying the MAC 3360 */ 3361 struct fips_params { 3362 uint8_t *key; 3363 uint32_t key_len; 3364 uint8_t *data; 3365 uint32_t data_len; 3366 uint32_t mode; 3367 uint32_t op; 3368 uint32_t pdev_id; 3369 }; 3370 3371 #ifdef WLAN_FEATURE_DISA_FIPS 3372 /** 3373 * struct disa_encrypt_decrypt_req_params - disa encrypt request 3374 * @vdev_id: virtual device id 3375 * @key_flag: This indicates firmware to encrypt/decrypt payload 3376 * see ENCRYPT_DECRYPT_FLAG 3377 * @key_idx: Index used in storing key 3378 * @key_cipher: cipher used for encryption/decryption 3379 * Eg: see WMI_CIPHER_AES_CCM for CCMP 3380 * @key_len: length of key data 3381 * @key_txmic_len: length of Tx MIC 3382 * @key_rxmic_len: length of Rx MIC 3383 * @key_data: Key 3384 * @pn: packet number 3385 * @mac_header: MAC header 3386 * @data_len: length of data 3387 * @data: pointer to payload 3388 */ 3389 struct disa_encrypt_decrypt_req_params { 3390 uint32_t vdev_id; 3391 uint8_t key_flag; 3392 uint32_t key_idx; 3393 uint32_t key_cipher; 3394 uint32_t key_len; 3395 uint32_t key_txmic_len; 3396 uint32_t key_rxmic_len; 3397 uint8_t key_data[MAC_MAX_KEY_LENGTH]; 3398 uint8_t pn[MAC_PN_LENGTH]; 3399 uint8_t mac_header[MAX_MAC_HEADER_LEN]; 3400 uint32_t data_len; 3401 uint8_t *data; 3402 }; 3403 #endif 3404 3405 /** 3406 * struct mcast_group_update_param - Mcast group table update to target 3407 * @action: Addition/deletion 3408 * @wildcard: iwldcard table entry? 3409 * @mcast_ip_addr: mcast ip address to be updated 3410 * @mcast_ip_addr_bytes: mcast ip addr bytes 3411 * @nsrcs: number of entries in source list 3412 * @filter_mode: filter mode 3413 * @is_action_delete: is delete 3414 * @is_filter_mode_snoop: is filter mode snoop 3415 * @ucast_mac_addr: ucast peer mac subscribed to mcast ip 3416 * @srcs: source mac accpted 3417 * @mask: mask 3418 * @vap_id: vdev id 3419 * @is_mcast_addr_len: is mcast address length 3420 */ 3421 struct mcast_group_update_params { 3422 int action; 3423 int wildcard; 3424 uint8_t *mcast_ip_addr; 3425 int mcast_ip_addr_bytes; 3426 uint8_t nsrcs; 3427 uint8_t filter_mode; 3428 bool is_action_delete; 3429 bool is_filter_mode_snoop; 3430 uint8_t *ucast_mac_addr; 3431 uint8_t *srcs; 3432 uint8_t *mask; 3433 uint8_t vap_id; 3434 bool is_mcast_addr_len; 3435 }; 3436 3437 /** 3438 * struct periodic_chan_stats_param - periodic channel stats req param 3439 * @stats_period: stats period update 3440 * @enable: enable/disable 3441 */ 3442 struct periodic_chan_stats_params { 3443 uint32_t stats_period; 3444 bool enable; 3445 uint32_t pdev_id; 3446 }; 3447 3448 /** 3449 * enum wmi_host_packet_power_rate_flags: packer power rate flags 3450 * @WMI_HOST_FLAG_RTSENA: RTS enabled 3451 * @WMI_HOST_FLAG_CTSENA: CTS enabled 3452 * @WMI_HOST_FLAG_STBC: STBC is set 3453 * @WMI_HOST_FLAG_LDPC: LDPC is set 3454 * @WMI_HOST_FLAG_TXBF: Tx Bf enabled 3455 * @WMI_HOST_FLAG_MU2: MU2 data 3456 * @WMI_HOST_FLAG_MU3: MU3 data 3457 * @WMI_HOST_FLAG_SERIES1: Rate series 1 3458 * @WMI_HOST_FLAG_SGI: Short gaurd interval 3459 */ 3460 enum wmi_host_packet_power_rate_flags { 3461 WMI_HOST_FLAG_RTSENA = 0x0001, 3462 WMI_HOST_FLAG_CTSENA = 0x0002, 3463 WMI_HOST_FLAG_STBC = 0x0004, 3464 WMI_HOST_FLAG_LDPC = 0x0008, 3465 WMI_HOST_FLAG_TXBF = 0x0010, 3466 WMI_HOST_FLAG_MU2 = 0x0020, 3467 WMI_HOST_FLAG_MU3 = 0x0040, 3468 WMI_HOST_FLAG_SERIES1 = 0x0080, 3469 WMI_HOST_FLAG_SGI = 0x0100, 3470 }; 3471 3472 /** 3473 * enum wmi_host_su_mu_ofdma_flags: packer power su mu ofdma flags 3474 * @WMI_HOST_FLAG_SU: SU Data 3475 * @WMI_HOST_FLAG_DL_MU_MIMO_AC: DL AC MU data 3476 * @WMI_HOST_FLAG_DL_MU_MIMO_AX: DL AX MU data 3477 * @WMI_HOST_FLAG_DL_OFDMA: DL OFDMA data 3478 * @WMI_HOST_FLAG_UL_OFDMA: UL OFDMA data 3479 * @WMI_HOST_FLAG_UL_MU_MIMO: UL MU data 3480 */ 3481 enum wmi_host_su_mu_ofdma_flags { 3482 WMI_HOST_FLAG_SU = 0x0001, 3483 WMI_HOST_FLAG_DL_MU_MIMO_AC = 0x0002, 3484 WMI_HOST_FLAG_DL_MU_MIMO_AX = 0x0003, 3485 WMI_HOST_FLAG_DL_OFDMA = 0x0004, 3486 WMI_HOST_FLAG_UL_OFDMA = 0x0005, 3487 WMI_HOST_FLAG_UL_MU_MIMO = 0x0006, 3488 }; 3489 3490 /** 3491 * enum wmi_host_preamble_type: preamble type 3492 * @WMI_HOST_PREAMBLE_OFDM: ofdm rate 3493 * @WMI_HOST_PREAMBLE_CCK: cck rate 3494 * @WMI_HOST_PREAMBLE_HT: ht rate 3495 * @WMI_HOST_PREAMBLE_VHT: vht rate 3496 * @WMI_HOST_PREAMBLE_HE: 11ax he rate 3497 */ 3498 enum wmi_host_preamble_type { 3499 WMI_HOST_PREAMBLE_OFDM = 0, 3500 WMI_HOST_PREAMBLE_CCK = 1, 3501 WMI_HOST_PREAMBLE_HT = 2, 3502 WMI_HOST_PREAMBLE_VHT = 3, 3503 WMI_HOST_PREAMBLE_HE = 4, 3504 }; 3505 3506 /** 3507 * enum wmi_ratemask_type: ratemask type 3508 * @WMI_RATEMASK_TYPE_CCK: CCK rate mask type 3509 * @WMI_RATEMASK_TYPE_HT: HT rate mask type 3510 * @WMI_RATEMASK_TYPE_VHT: VHT rate mask type 3511 * @WMI_RATEMASK_TYPE_HE: HE rate mask type 3512 * 3513 * This is used for 'type' in WMI_VDEV_RATEMASK_CMDID 3514 */ 3515 enum wmi_ratemask_type { 3516 WMI_RATEMASK_TYPE_CCK = 0, 3517 WMI_RATEMASK_TYPE_HT = 1, 3518 WMI_RATEMASK_TYPE_VHT = 2, 3519 WMI_RATEMASK_TYPE_HE = 3, 3520 }; 3521 3522 /** 3523 * struct packet_power_info_params - packet power info params 3524 * @chainmask: chain mask 3525 * @chan_width: channel bandwidth 3526 * @rate_flags: rate flags 3527 * @su_mu_ofdma: su/mu/ofdma flags 3528 * @nss: number of spatial streams 3529 * @preamble: preamble 3530 * @hw_rate: 3531 */ 3532 struct packet_power_info_params { 3533 uint16_t chainmask; 3534 uint16_t chan_width; 3535 uint16_t rate_flags; 3536 uint16_t su_mu_ofdma; 3537 uint16_t nss; 3538 uint16_t preamble; 3539 uint16_t hw_rate; 3540 uint32_t pdev_id; 3541 }; 3542 3543 /** 3544 * enum gpio_pull_type - GPIO PULL TYPE 3545 * @WMI_HOST_GPIO_PULL_NONE: set gpio pull type to none 3546 * @WMI_HOST_GPIO_PULL_UP: set gpio to pull up 3547 * @WMI_HOST_GPIO_PULL_DOWN: set gpio to pull down 3548 * @WMI_HOST_GPIO_PULL_MAX: invalid pull type 3549 */ 3550 enum gpio_pull_type { 3551 WMI_HOST_GPIO_PULL_NONE = 0, 3552 WMI_HOST_GPIO_PULL_UP = 1, 3553 WMI_HOST_GPIO_PULL_DOWN = 2, 3554 WMI_HOST_GPIO_PULL_MAX, 3555 }; 3556 3557 /** 3558 * enum gpio_interrupt_mode - GPIO INTERRUPT MODE 3559 * @WMI_HOST_GPIO_INTMODE_DISABLE: disable interrupt mode 3560 * @WMI_HOST_GPIO_INTMODE_RISING_EDGE: interrupt with rising edge trigger 3561 * @WMI_HOST_GPIO_INTMODE_FALLING_EDGE: interrupt with falling edge trigger 3562 * @WMI_HOST_GPIO_INTMODE_BOTH_EDGE: interrupt with both edge trigger 3563 * @WMI_HOST_GPIO_INTMODE_LEVEL_LOW: interrupt with gpio level low trigger 3564 * @WMI_HOST_GPIO_INTMODE_LEVEL_HIGH: interrupt with gpio level high trigger 3565 * @WMI_HOST_GPIO_INTMODE_MAX: invalid interrupt mode 3566 */ 3567 enum gpio_interrupt_mode { 3568 WMI_HOST_GPIO_INTMODE_DISABLE = 0, 3569 WMI_HOST_GPIO_INTMODE_RISING_EDGE = 1, 3570 WMI_HOST_GPIO_INTMODE_FALLING_EDGE = 2, 3571 WMI_HOST_GPIO_INTMODE_BOTH_EDGE = 3, 3572 WMI_HOST_GPIO_INTMODE_LEVEL_LOW = 4, 3573 WMI_HOST_GPIO_INTMODE_LEVEL_HIGH = 5, 3574 WMI_HOST_GPIO_INTMODE_MAX, 3575 }; 3576 3577 /** 3578 * enum qca_gpio_direction - GPIO Direction 3579 * @WLAN_GPIO_INPUT: set gpio as input mode 3580 * @WLAN_GPIO_OUTPUT: set gpio as output mode 3581 * @WLAN_GPIO_VALUE_MAX: invalid gpio direction 3582 */ 3583 enum gpio_direction { 3584 WMI_HOST_GPIO_INPUT = 0, 3585 WMI_HOST_GPIO_OUTPUT = 1, 3586 WMI_HOST_GPIO_DIR_MAX, 3587 }; 3588 3589 /** 3590 * enum qca_gpio_value - GPIO Value 3591 * @WLAN_GPIO_LEVEL_LOW: set gpio output level low 3592 * @WLAN_GPIO_LEVEL_HIGH: set gpio output level high 3593 * @WLAN_GPIO_LEVEL_MAX: invalid gpio value 3594 */ 3595 enum gpio_value { 3596 WMI_HOST_GPIO_LEVEL_LOW = 0, 3597 WMI_HOST_GPIO_LEVEL_HIGH = 1, 3598 WMI_HOST_GPIO_LEVEL_MAX, 3599 }; 3600 3601 /** 3602 * enum gpio_init_enable - GPIO init enable 3603 * @WMI_HOST_GPIO_INIT_DISABLE: Disable INIT 3604 * @WMI_HOST_GPIO_INIT_ENABLE: Enable INIT 3605 * @WMI_HOST_GPIO_INIT_MAX: invalid gpio init_enable 3606 */ 3607 enum gpio_init_enable { 3608 WMI_HOST_GPIO_INIT_DISABLE = 0, 3609 WMI_HOST_GPIO_INIT_ENABLE = 1, 3610 WMI_HOST_GPIO_INIT_MAX, 3611 }; 3612 3613 /** 3614 * enum gpio_drive - GPIO drive 3615 * @WMI_HOST_GPIO_DRIVE_2MA: drive 2MA 3616 * @WMI_HOST_GPIO_DRIVE_4MA: drive 4MA 3617 * @WMI_HOST_GPIO_DRIVE_6MA: drive 6MA 3618 * @WMI_HOST_GPIO_DRIVE_8MA: drive 8MA 3619 * @WMI_HOST_GPIO_DRIVE_10MA: drive 10MA 3620 * @WMI_HOST_GPIO_DRIVE_12MA: drive 12MA 3621 * @WMI_HOST_GPIO_DRIVE_14MA: drive 14MA 3622 * @WMI_HOST_GPIO_DRIVE_16MA: drive 16MA 3623 * @WMI_HOST_GPIO_DRIVE_MAX: invalid gpio drive 3624 */ 3625 enum gpio_drive { 3626 WMI_HOST_GPIO_DRIVE_2MA = 0, 3627 WMI_HOST_GPIO_DRIVE_4MA = 1, 3628 WMI_HOST_GPIO_DRIVE_6MA = 2, 3629 WMI_HOST_GPIO_DRIVE_8MA = 3, 3630 WMI_HOST_GPIO_DRIVE_10MA = 4, 3631 WMI_HOST_GPIO_DRIVE_12MA = 5, 3632 WMI_HOST_GPIO_DRIVE_14MA = 6, 3633 WMI_HOST_GPIO_DRIVE_16MA = 7, 3634 WMI_HOST_GPIO_DRIVE_MAX, 3635 }; 3636 3637 /** 3638 * enum gpio_mux_config - GPIO mux_config 3639 * @WMI_HOST_GPIO_MUX_DEFAULT: Default mux value 3640 * @WMI_HOST_GPIO_MUX_MAX: maximum allowed gpio mux_config 3641 */ 3642 enum gpio_mux_config { 3643 WMI_HOST_GPIO_MUX_DEFAULT = 0, 3644 WMI_HOST_GPIO_MUX_MAX = 15, 3645 }; 3646 3647 /** 3648 * struct wmi_host_gpio_input_event - GPIO input event structure 3649 * @gpio_num: GPIO number which changed state 3650 */ 3651 typedef struct { 3652 uint32_t gpio_num; /* GPIO number which changed state */ 3653 } wmi_host_gpio_input_event; 3654 3655 /** 3656 * struct gpio_config_params - GPIO config params 3657 * @pin_num: GPIO number to config 3658 * @pin_dir: gpio direction, 1-input/0-output 3659 * @pin_pull_type: pull type define in gpio_pull_type 3660 * @pin_intr_mode: interrupt mode define in gpio_interrupt_mode 3661 */ 3662 struct gpio_config_params { 3663 uint32_t pin_num; 3664 enum gpio_direction pin_dir; 3665 enum gpio_pull_type pin_pull_type; 3666 enum gpio_interrupt_mode pin_intr_mode; 3667 enum gpio_mux_config mux_config_val; 3668 enum gpio_drive drive; 3669 enum gpio_init_enable init_enable; 3670 }; 3671 3672 /** 3673 * struct gpio_output_params - GPIO output params 3674 * @pin_num: GPIO number to configure 3675 * @pinset: 1 mean gpio output high level, 0 mean gpio output low level 3676 */ 3677 struct gpio_output_params { 3678 uint32_t pin_num; 3679 enum gpio_value pin_set; 3680 }; 3681 3682 /* flags bit 0: to configure wlan priority bitmap */ 3683 #define WMI_HOST_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT (1<<0) 3684 /* flags bit 1: to configure both period and wlan duration */ 3685 #define WMI_HOST_BTCOEX_PARAM_FLAGS_DUTY_CYCLE_BIT (1<<1) 3686 struct btcoex_cfg_params { 3687 /* WLAN priority bitmask for different frame types */ 3688 uint32_t btcoex_wlan_priority_bitmap; 3689 /* This command is used to configure different btcoex params 3690 * in different situations.The host sets the appropriate bit(s) 3691 * in btcoex_param_flags to indicate which configuration parameters 3692 * are valid within a particular BT coex config message, so that one 3693 * BT configuration parameter can be configured without affecting 3694 * other BT configuration parameters.E.g. if the host wants to 3695 * configure only btcoex_wlan_priority_bitmap it sets only 3696 * WMI_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT in 3697 * btcoex_param_flags so that firmware will not overwrite 3698 * other params with default value passed in the command. 3699 * Host can also set multiple bits in btcoex_param_flags 3700 * to configure more than one param in single message. 3701 */ 3702 uint32_t btcoex_param_flags; 3703 /* period denotes the total time in milliseconds which WLAN and BT share 3704 * configured percentage for transmission and reception. 3705 */ 3706 uint32_t period; 3707 /* wlan duration is the time in milliseconds given for wlan 3708 * in above period. 3709 */ 3710 uint32_t wlan_duration; 3711 }; 3712 3713 #define WMI_HOST_COEX_CONFIG_BUF_MAX_LEN 32 /* 128 bytes */ 3714 /** 3715 * coex_ver_cfg_t 3716 * @coex_version: Version for 4 wire coex 3717 * @length: Length of payload buffer based on version 3718 * @config_buf: Payload Buffer 3719 */ 3720 typedef struct { 3721 /* VERSION_4 (4 wire coex) */ 3722 uint32_t coex_version; 3723 3724 /* No. of uint32_t elements in payload buffer. Will depend on the coex 3725 * version 3726 */ 3727 uint32_t length; 3728 3729 /* Payload buffer */ 3730 uint32_t config_buf[WMI_HOST_COEX_CONFIG_BUF_MAX_LEN]; 3731 } coex_ver_cfg_t; 3732 3733 #define WMI_HOST_RTT_REPORT_CFR 0 3734 #define WMI_HOST_RTT_NO_REPORT_CFR 1 3735 #define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2 3736 /** 3737 * struct rtt_meas_req_test_params 3738 * @peer: peer mac address 3739 * @req_frame_type: RTT request frame type 3740 * @req_bw: requested bandwidth 3741 * @req_preamble: Preamble 3742 * @req_num_req: num of requests 3743 * @req_report_type: report type 3744 * @num_measurements: number of measurements 3745 * @asap_mode: priority 3746 * @lci_requested: LCI requested 3747 * @loc_civ_requested: 3748 * @channel_param: channel param 3749 * @req_id: requested id 3750 */ 3751 struct rtt_meas_req_test_params { 3752 uint8_t peer[QDF_MAC_ADDR_SIZE]; 3753 int req_frame_type; 3754 int req_bw; 3755 int req_preamble; 3756 int req_num_req; 3757 int req_report_type; 3758 uint32_t num_measurements; 3759 uint32_t asap_mode; 3760 uint32_t lci_requested; 3761 uint32_t loc_civ_requested; 3762 struct channel_param channel; 3763 uint8_t req_id; 3764 }; 3765 3766 /** 3767 * struct peer_request_pn_param - PN request params 3768 * @vdev_id: vdev id 3769 * @peer_macaddr: Peer mac address 3770 * @key_type: key type 3771 */ 3772 struct peer_request_pn_param { 3773 uint32_t vdev_id; 3774 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 3775 uint32_t key_type; 3776 }; 3777 3778 /** 3779 * struct rtt_meas_req_params - RTT measurement request params 3780 * @req_id: Request id 3781 * @vdev_id: vdev id 3782 * @is_mode_na: 11NA 3783 * @is_mode_ac: AC 3784 * @is_bw_20: 20 3785 * @is_bw_40: 40 3786 * @is_bw_80: 80 3787 * @sta_mac_addr: pointer to station mac address 3788 * @spoof_mac_addr: pointer to spoof mac address 3789 * @num_probe_rqst: number of probe request 3790 * @channel_param: channel param 3791 */ 3792 struct rtt_meas_req_params { 3793 uint8_t req_id; 3794 uint8_t vdev_id; 3795 bool is_mode_na; 3796 bool is_mode_ac; 3797 bool is_bw_20; 3798 bool is_bw_40; 3799 bool is_bw_80; 3800 uint8_t *sta_mac_addr; 3801 uint8_t *spoof_mac_addr; 3802 uint32_t num_probe_rqst; 3803 struct channel_param channel; 3804 }; 3805 3806 /** 3807 * struct lci_set_params - LCI params 3808 * @lci_data: pointer to LCI data 3809 * @latitude_unc: latitude 3810 * @latitude_0_12: bits 0 to 1 of latitude 3811 * @latitude_2_33: bits 2 to 33 of latitude 3812 * @longitude_unc: longitude 3813 * @longitude_0_1: bits 0 to 1 of longitude 3814 * @longitude_2_33: bits 2 to 33 of longitude 3815 * @altitude_type: altitude type 3816 * @altitude_unc_0_3: altitude bits 0 - 3 3817 * @altitude_unc_4_5: altitude bits 4 - 5 3818 * @altitude: altitude 3819 * @datum: dataum 3820 * @reg_loc_agmt: 3821 * @reg_loc_dse: 3822 * @dep_sta: 3823 * @version: version 3824 */ 3825 struct lci_set_params { 3826 void *lci_data; 3827 uint8_t latitude_unc:6, 3828 latitude_0_1:2; 3829 uint32_t latitude_2_33; 3830 uint8_t longitude_unc:6, 3831 longitude_0_1:2; 3832 uint32_t longitude_2_33; 3833 uint8_t altitude_type:4, 3834 altitude_unc_0_3:4; 3835 uint32_t altitude_unc_4_5:2, 3836 altitude:30; 3837 uint8_t datum:3, 3838 reg_loc_agmt:1, 3839 reg_loc_dse:1, 3840 dep_sta:1, 3841 version:2; 3842 uint8_t *colocated_bss; 3843 int msg_len; 3844 }; 3845 3846 /** 3847 * struct lcr_set_params - LCR params 3848 * @lcr_data: pointer to lcr data 3849 */ 3850 struct lcr_set_params { 3851 void *lcr_data; 3852 int msg_len; 3853 }; 3854 3855 /** 3856 * struct rtt_keepalive_req_params - RTT keepalive params 3857 * @macaddr: pointer to macaddress 3858 * @req_id: Request id 3859 * @vdev_id: vdev id 3860 * @stop: start/stop 3861 */ 3862 struct rtt_keepalive_req_params { 3863 uint8_t *macaddr; 3864 uint8_t req_id; 3865 uint8_t vdev_id; 3866 bool stop; 3867 }; 3868 3869 /** 3870 * struct rx_reorder_queue_setup_params - Reorder queue setup params 3871 * @peer_mac_addr: Peer mac address 3872 * @tid: TID 3873 * @vdev_id: vdev id 3874 * @hw_qdesc_paddr_lo: lower 32 bits of queue desc adddress 3875 * @hw_qdesc_paddr_hi: upper 32 bits of queue desc adddress 3876 * @queue_no: 16-bit number assigned by host for queue 3877 * @ba_window_size_valid: BA window size validity flag 3878 * @ba_window_size: BA window size 3879 */ 3880 struct rx_reorder_queue_setup_params { 3881 uint8_t *peer_macaddr; 3882 uint16_t tid; 3883 uint16_t vdev_id; 3884 uint32_t hw_qdesc_paddr_lo; 3885 uint32_t hw_qdesc_paddr_hi; 3886 uint16_t queue_no; 3887 uint8_t ba_window_size_valid; 3888 uint16_t ba_window_size; 3889 3890 }; 3891 3892 /** 3893 * struct rx_reorder_queue_remove_params - Reorder queue setup params 3894 * @peer_mac_addr: Peer mac address 3895 * @vdev_id: vdev id 3896 * @peer_tid_bitmap: peer tid bitmap 3897 */ 3898 struct rx_reorder_queue_remove_params { 3899 uint8_t *peer_macaddr; 3900 uint16_t vdev_id; 3901 uint32_t peer_tid_bitmap; 3902 }; 3903 3904 /** 3905 * struct wmi_host_stats_event - Stats event params 3906 * @stats_id: stats id of type wmi_host_stats_event 3907 * @num_pdev_stats: number of pdev stats event structures 0 or 1 3908 * @num_pdev_ext_stats: number of pdev ext stats event structures 3909 * @num_vdev_stats: number of vdev stats 3910 * @num_peer_stats: number of peer stats event structures 0 or max peers 3911 * @num_peer_extd_stats: number of peer extended stats event structures 0 3912 * or max peers 3913 * @num_bcnflt_stats: number of beacon filter stats 3914 * @num_chan_stats: number of channel stats 3915 * @pdev_id: device id for the radio 3916 * @num_bcn_stats: number of beacon stats 3917 * @num_rssi_stats: number of rssi stats 3918 * @num_peer_adv_stats: number of peer adv stats 3919 * @num_mib_stats: number of mib stats 3920 * @num_mib_extd_stats: number of extended mib stats 3921 * @num_peer_stats_info_ext: number of peer extended stats info 3922 * @num_vdev_extd_stats: number of vdev extended stats info 3923 * @last_event: specify if the current event is the last event 3924 */ 3925 typedef struct { 3926 wmi_host_stats_id stats_id; 3927 uint32_t num_pdev_stats; 3928 uint32_t num_pdev_ext_stats; 3929 uint32_t num_vdev_stats; 3930 uint32_t num_peer_stats; 3931 uint32_t num_peer_extd_stats; 3932 uint32_t num_bcnflt_stats; 3933 uint32_t num_chan_stats; 3934 uint32_t pdev_id; 3935 uint32_t num_bcn_stats; 3936 uint32_t num_rssi_stats; 3937 uint32_t num_peer_adv_stats; 3938 uint32_t num_mib_stats; 3939 uint32_t num_mib_extd_stats; 3940 uint32_t num_peer_stats_info_ext; 3941 uint32_t num_vdev_extd_stats; 3942 uint32_t last_event; 3943 } wmi_host_stats_event; 3944 3945 /** 3946 * struct wmi_host_peer_extd_stats - peer extd stats event structure 3947 * @peer_macaddr: Peer mac address 3948 * @inactive_time: inactive time in secs 3949 * @peer_chain_rssi: peer rssi 3950 * @rx_duration: RX duration 3951 * @peer_tx_bytes: TX bytes 3952 * @last_tx_rate_code: Tx rate code of last frame 3953 * @last_tx_power: Tx power latest 3954 * @atf_tokens_allocated: atf tokens allocated 3955 * @atf_tokens_utilized: atf tokens utilized 3956 * @num_mu_tx_blacklisted: Blacklisted MU Tx count 3957 * @sgi_count: sgi count of the peer 3958 * @rx_mc_bc_cnt: Total number of received multicast & broadcast data frames 3959 * corresponding to this peer, 1 in the MSB of rx_mc_bc_cnt represents a 3960 * valid data 3961 * @rx_retry_cnt: Number of rx retries received from current station 3962 */ 3963 typedef struct { 3964 wmi_host_mac_addr peer_macaddr; 3965 uint32_t inactive_time; 3966 uint32_t peer_chain_rssi; 3967 uint32_t rx_duration; 3968 uint32_t peer_tx_bytes; 3969 uint32_t last_tx_rate_code; 3970 uint32_t last_tx_power; 3971 uint32_t atf_tokens_allocated; 3972 uint32_t atf_tokens_utilized; 3973 uint32_t num_mu_tx_blacklisted; 3974 uint32_t sgi_count; 3975 uint32_t rx_mc_bc_cnt; 3976 uint32_t rx_retry_cnt; 3977 } wmi_host_peer_extd_stats; 3978 3979 /** 3980 * struct wmi_host_peer_adv_stats - peer adv stats event structure 3981 * @peer_macaddr: mac address 3982 * @fcs_count: fcs count 3983 * @rx_count: rx count 3984 * @rx_bytes: rx bytes 3985 */ 3986 struct wmi_host_peer_adv_stats { 3987 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 3988 uint32_t fcs_count; 3989 uint32_t rx_count; 3990 uint64_t rx_bytes; 3991 }; 3992 3993 /** 3994 * struct wmi_host_pdev_ext_stats - peer ext stats structure 3995 * @rx_rssi_comb: RX rssi 3996 * @rx_rssi_chain0: RX rssi chain 0 3997 * @rx_rssi_chain1: RX rssi chain 1 3998 * @rx_rssi_chain2: RX rssi chain 2 3999 * @rx_rssi_chain3: RX rssi chain 3 4000 * @rx_mcs: RX MCS array 4001 * @tx_mcs: TX MCS array 4002 * @ack_rssi: Ack rssi 4003 */ 4004 typedef struct { 4005 uint32_t rx_rssi_comb; 4006 uint32_t rx_rssi_chain0; 4007 uint32_t rx_rssi_chain1; 4008 uint32_t rx_rssi_chain2; 4009 uint32_t rx_rssi_chain3; 4010 uint32_t rx_mcs[10]; 4011 uint32_t tx_mcs[10]; 4012 uint32_t ack_rssi; 4013 } wmi_host_pdev_ext_stats; 4014 4015 /** 4016 * struct wmi_host_dbg_tx_stats - Debug stats 4017 * @comp_queued: Num HTT cookies queued to dispatch list 4018 * @comp_delivered: Num HTT cookies dispatched 4019 * @msdu_enqued: Num MSDU queued to WAL 4020 * @mpdu_enqued: Num MPDU queue to WAL 4021 * @wmm_drop: Num MSDUs dropped by WMM limit 4022 * @local_enqued: Num Local frames queued 4023 * @local_freed: Num Local frames done 4024 * @hw_queued: Num queued to HW 4025 * @hw_reaped: Num PPDU reaped from HW 4026 * @underrun: Num underruns 4027 * @hw_paused: HW Paused. 4028 * @tx_abort: Num PPDUs cleaned up in TX abort 4029 * @mpdus_requed: Num MPDUs requed by SW 4030 * @tx_ko: excessive retries 4031 * @tx_xretry: 4032 * @data_rc: data hw rate code 4033 * @self_triggers: Scheduler self triggers 4034 * @sw_retry_failure: frames dropped due to excessive sw retries 4035 * @illgl_rate_phy_err: illegal rate phy errors 4036 * @pdev_cont_xretry: wal pdev continuous xretry 4037 * @pdev_tx_timeout: wal pdev continuous xretry 4038 * @pdev_resets: wal pdev resets 4039 * @stateless_tid_alloc_failure: frames dropped due to non-availability of 4040 * stateless TIDs 4041 * @phy_underrun: PhY/BB underrun 4042 * @txop_ovf: MPDU is more than txop limit 4043 * @seq_posted: Number of Sequences posted 4044 * @seq_failed_queueing: Number of Sequences failed queueing 4045 * @seq_completed: Number of Sequences completed 4046 * @seq_restarted: Number of Sequences restarted 4047 * @mu_seq_posted: Number of MU Sequences posted 4048 * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT 4049 * (Reset,channel change) 4050 * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition 4051 * (TTL expired) 4052 * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT, 4053 * PPDU_duration based on rate, dyn_bw) 4054 * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA 4055 * @mpdus_expired: Num MPDUs that was dropped du to expiry. 4056 * @mc_dropr: Num mc drops 4057 */ 4058 typedef struct { 4059 int32_t comp_queued; 4060 int32_t comp_delivered; 4061 int32_t msdu_enqued; 4062 int32_t mpdu_enqued; 4063 int32_t wmm_drop; 4064 int32_t local_enqued; 4065 int32_t local_freed; 4066 int32_t hw_queued; 4067 int32_t hw_reaped; 4068 int32_t underrun; 4069 uint32_t hw_paused; 4070 int32_t tx_abort; 4071 int32_t mpdus_requed; 4072 uint32_t tx_ko; 4073 uint32_t tx_xretry; 4074 uint32_t data_rc; 4075 uint32_t self_triggers; 4076 uint32_t sw_retry_failure; 4077 uint32_t illgl_rate_phy_err; 4078 uint32_t pdev_cont_xretry; 4079 uint32_t pdev_tx_timeout; 4080 uint32_t pdev_resets; 4081 uint32_t stateless_tid_alloc_failure; 4082 uint32_t phy_underrun; 4083 uint32_t txop_ovf; 4084 uint32_t seq_posted; 4085 uint32_t seq_failed_queueing; 4086 uint32_t seq_completed; 4087 uint32_t seq_restarted; 4088 uint32_t mu_seq_posted; 4089 int32_t mpdus_sw_flush; 4090 int32_t mpdus_hw_filter; 4091 int32_t mpdus_truncated; 4092 int32_t mpdus_ack_failed; 4093 int32_t mpdus_expired; 4094 uint32_t mc_drop; 4095 } wmi_host_dbg_tx_stats; 4096 4097 /** 4098 * struct wmi_host_dbg_rx_stats - RX Debug stats 4099 * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu 4100 * @status_rcvd: Total number of statuses processed 4101 * @r0_frags: Extra frags on rings 0 4102 * @r1_frags: Extra frags on rings 1 4103 * @r2_frags: Extra frags on rings 2 4104 * @r3_frags: Extra frags on rings 3 4105 * @htt_msdus: MSDUs delivered to HTT 4106 * @htt_mpdus: MPDUs delivered to HTT 4107 * @loc_msdus: MSDUs delivered to local stack 4108 * @loc_mpdus: MPDUS delivered to local stack 4109 * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size 4110 * @phy_errs: Number of PHY errors 4111 * @phy_err_drop: Number of PHY errors drops 4112 * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc. 4113 * @pdev_rx_timeout: Number of rx inactivity timeouts 4114 * @rx_ovfl_errs: Number of rx overflow errors. 4115 */ 4116 typedef struct { 4117 int32_t mid_ppdu_route_change; 4118 int32_t status_rcvd; 4119 int32_t r0_frags; 4120 int32_t r1_frags; 4121 int32_t r2_frags; 4122 int32_t r3_frags; 4123 int32_t htt_msdus; 4124 int32_t htt_mpdus; 4125 int32_t loc_msdus; 4126 int32_t loc_mpdus; 4127 int32_t oversize_amsdu; 4128 int32_t phy_errs; 4129 int32_t phy_err_drop; 4130 int32_t mpdu_errs; 4131 uint32_t pdev_rx_timeout; 4132 int32_t rx_ovfl_errs; 4133 } wmi_host_dbg_rx_stats; 4134 4135 /** struct wmi_host_dbg_mem_stats - memory stats 4136 * @iram_free_size: IRAM free size on target 4137 * @dram_free_size: DRAM free size on target 4138 * @sram_free_size: SRAM free size on target 4139 */ 4140 typedef struct { 4141 uint32_t iram_free_size; 4142 uint32_t dram_free_size; 4143 /* Only Non-TLV */ 4144 uint32_t sram_free_size; 4145 } wmi_host_dbg_mem_stats; 4146 4147 typedef struct { 4148 /* Only TLV */ 4149 int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ 4150 } wmi_host_dbg_peer_stats; 4151 4152 /** 4153 * struct wmi_host_dbg_stats - host debug stats 4154 * @tx: TX stats of type wmi_host_dbg_tx_stats 4155 * @rx: RX stats of type wmi_host_dbg_rx_stats 4156 * @mem: Memory stats of type wmi_host_dbg_mem_stats 4157 * @peer: peer stats of type wmi_host_dbg_peer_stats 4158 */ 4159 typedef struct { 4160 wmi_host_dbg_tx_stats tx; 4161 wmi_host_dbg_rx_stats rx; 4162 wmi_host_dbg_mem_stats mem; 4163 wmi_host_dbg_peer_stats peer; 4164 } wmi_host_dbg_stats; 4165 4166 /** 4167 * struct wmi_host_pdev_stats - PDEV stats 4168 * @chan_nf: Channel noise floor 4169 * @tx_frame_count: TX frame count 4170 * @rx_frame_count: RX frame count 4171 * @rx_clear_count: rx clear count 4172 * @cycle_count: cycle count 4173 * @phy_err_count: Phy error count 4174 * @chan_tx_pwr: Channel Tx Power 4175 * @pdev_stats: WAL dbg stats 4176 * @ackRcvBad: 4177 * @rtsBad: 4178 * @rtsGood: 4179 * @fcsBad: 4180 * @noBeacons: 4181 * @mib_int_count: 4182 */ 4183 typedef struct { 4184 int32_t chan_nf; 4185 uint32_t tx_frame_count; 4186 uint32_t rx_frame_count; 4187 uint32_t rx_clear_count; 4188 uint32_t cycle_count; 4189 uint32_t phy_err_count; 4190 uint32_t chan_tx_pwr; 4191 wmi_host_dbg_stats pdev_stats; 4192 uint32_t ackRcvBad; 4193 uint32_t rtsBad; 4194 uint32_t rtsGood; 4195 uint32_t fcsBad; 4196 uint32_t noBeacons; 4197 uint32_t mib_int_count; 4198 } wmi_host_pdev_stats; 4199 4200 /** 4201 * struct wmi_host_pmf_bcn_protect_stats - PMF bcn protect stats 4202 * @igtk_mic_fail_cnt: MIC failure count of management packets using IGTK 4203 * @igtk_replay_cnt: Replay detection count of management packets using IGTK 4204 * @bcn_mic_fail_cnt: MIC failure count of beacon packets using BIGTK 4205 * @bcn_replay_cnt: Replay detection count of beacon packets using BIGTK 4206 */ 4207 typedef struct { 4208 uint32_t igtk_mic_fail_cnt; 4209 uint32_t igtk_replay_cnt; 4210 uint32_t bcn_mic_fail_cnt; 4211 uint32_t bcn_replay_cnt; 4212 } wmi_host_pmf_bcn_protect_stats; 4213 4214 /** 4215 * struct wmi_unit_test_event - Structure corresponding to WMI Unit test event 4216 * @vdev_id: VDEV ID 4217 * @module_id: MODULE ID 4218 * @diag_token: Diag Token (the number that was generated in the unit-test cmd) 4219 * @flag: flag has 2 bits 0x1 indicates status, and 0x2 indicates done-bit 4220 * @payload_len: payload_len (blindly copied from payload_len field in WMI) 4221 * @buffer_len: actual number of data bytes in the variable data size TLV 4222 * buffer_len is likely to be the nearest multiple of 4 (from 4223 * payload_len). both buffer_len and payload_len need to be 4224 * passed to wifitool so that the driver can be agnostic 4225 * regarding these differences. 4226 * @buffer: data buffer 4227 */ 4228 typedef struct { 4229 uint32_t vdev_id; 4230 uint32_t module_id; 4231 uint32_t diag_token; 4232 uint32_t flag; 4233 uint32_t payload_len; 4234 uint32_t buffer_len; 4235 uint8_t buffer[1]; 4236 } wmi_unit_test_event; 4237 4238 4239 /** 4240 * struct wmi_host_snr_info - WMI host Signal to noise ration info 4241 * @bcn_snr: beacon SNR 4242 * @dat_snr: Data frames SNR 4243 */ 4244 typedef struct { 4245 int32_t bcn_snr; 4246 int32_t dat_snr; 4247 } wmi_host_snr_info; 4248 4249 #define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */ 4250 #define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */ 4251 4252 /* The WLAN_MAX_AC macro cannot be changed without breaking 4253 * * WMI compatibility. 4254 * * The maximum value of access category 4255 * */ 4256 #define WMI_HOST_WLAN_MAX_AC 4 4257 4258 /* The WMI_HOST_MAX_CHAINS macro cannot be changed without breaking WMI 4259 * compatibility. 4260 * The maximum value of number of chains 4261 */ 4262 #define WMI_HOST_MAX_CHAINS 8 4263 4264 /** 4265 * struct wmi_host_vdev_stats - vdev stats structure 4266 * @vdev_id: unique id identifying the VDEV, generated by the caller 4267 * Rest all Only TLV 4268 * @vdev_snr: wmi_host_snr_info 4269 * @tx_frm_cnt: Total number of packets(per AC) that were successfully 4270 * transmitted (with and without retries, 4271 * including multi-cast, broadcast) 4272 * @rx_frm_cnt: Total number of packets that were successfully received 4273 * (after appropriate filter rules including multi-cast, broadcast) 4274 * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC 4275 * that the 802.11 station successfully transmitted after 4276 * more than one retransmission attempt 4277 * @fail_cnt: Total number packets(per AC) failed to transmit 4278 * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission 4279 * of a packet 4280 * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission 4281 * of a packet 4282 * @rx_err_cnt: The receive error count. HAL will provide the 4283 * RxP FCS error global 4284 * @rx_discard_cnt: The sum of the receive error count and 4285 * dropped-receive-buffer error count (FCS error) 4286 * @ack_fail_cnt: Total number packets failed transmit because of no 4287 * ACK from the remote entity 4288 * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec 4289 * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss 4290 */ 4291 typedef struct { 4292 uint32_t vdev_id; 4293 /* Rest all Only TLV */ 4294 wmi_host_snr_info vdev_snr; 4295 uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC]; 4296 uint32_t rx_frm_cnt; 4297 uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC]; 4298 uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC]; 4299 uint32_t rts_fail_cnt; 4300 uint32_t rts_succ_cnt; 4301 uint32_t rx_err_cnt; 4302 uint32_t rx_discard_cnt; 4303 uint32_t ack_fail_cnt; 4304 uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES]; 4305 uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES]; 4306 } wmi_host_vdev_stats; 4307 4308 /** 4309 * struct wmi_host_vdev_stats - vdev stats structure 4310 * @vdev_id: unique id identifying the VDEV, generated by the caller 4311 * @tx_bcn_succ_cnt: Total number of beacon frame transmitted successfully 4312 * @tx_bcn_outage_cnt: Total number of failed beacons 4313 */ 4314 typedef struct { 4315 uint32_t vdev_id; 4316 uint32_t tx_bcn_succ_cnt; 4317 uint32_t tx_bcn_outage_cnt; 4318 } wmi_host_bcn_stats; 4319 4320 /** 4321 * struct wmi_host_vdev_extd_stats - VDEV extended stats 4322 * @vdev_id: unique id identifying the VDEV, generated by the caller 4323 * @ppdu_aggr_cnt: No of Aggrs Queued to HW 4324 * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's 4325 * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates 4326 * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW 4327 * in Legacy NonAggregates 4328 * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes 4329 * both Aggr and NonAggr 4330 * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully 4331 * after Single/mul HW retry 4332 * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success 4333 * after Multiple HW retry 4334 * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission 4335 * after Multiple HW retry 4336 * @reserved[13]: for future extensions set to 0x0 4337 */ 4338 typedef struct { 4339 uint32_t vdev_id; 4340 uint32_t ppdu_aggr_cnt; 4341 uint32_t ppdu_noack; 4342 uint32_t mpdu_queued; 4343 uint32_t ppdu_nonaggr_cnt; 4344 uint32_t mpdu_sw_requed; 4345 uint32_t mpdu_suc_retry; 4346 uint32_t mpdu_suc_multitry; 4347 uint32_t mpdu_fail_retry; 4348 uint32_t reserved[13]; 4349 } wmi_host_vdev_extd_stats; 4350 4351 /** 4352 * struct wmi_host_vdev_prb_fils_stats - VDEV probe response fils stats 4353 * @vdev_id: unique id identifying the VDEV, generated by the caller 4354 * @fd_succ_cnt: Total number of successfully transmitted Fils Discovery frames 4355 * @fd_fail_cnt: Toatl number of Fils discovery failed count 4356 * @unsolicited_prb_succ_cnt: Successful unsolicited probe response frames cnt 4357 * @unsolicited_prb_fail_cnt: Failed unsolictied probe response frames cnt 4358 */ 4359 struct wmi_host_vdev_prb_fils_stats { 4360 uint32_t vdev_id; 4361 uint32_t fd_succ_cnt; 4362 uint32_t fd_fail_cnt; 4363 uint32_t unsolicited_prb_succ_cnt; 4364 uint32_t unsolicited_prb_fail_cnt; 4365 }; 4366 4367 /** 4368 * struct wmi_host_vdev_nac_rssi_event - VDEV nac rssi stats 4369 * @vdev_id: unique id identifying the VDEV, generated by the caller 4370 * @last_rssi: rssi 4371 * @avg_rssi: averge rssi 4372 * @rssi_seq_num: rssi sequence number 4373 */ 4374 struct wmi_host_vdev_nac_rssi_event { 4375 uint32_t vdev_id; 4376 uint32_t last_rssi; 4377 uint32_t avg_rssi; 4378 uint32_t rssi_seq_num; 4379 }; 4380 4381 /** 4382 * structure wmi_host_peer_retry_stats - peer retry stats 4383 * @peer_macaddr: peer macaddr 4384 * @retry_counter_wraparnd_ind: wraparound counter indication 4385 * @msdu_success: successfully transmitted msdus 4386 * @msdu_retried: Retried msdus 4387 * @msdu_mul_retried: msdus retried for more than once 4388 * @msdu_failed: msdus failed 4389 * @reserved: for furure extensions 4390 */ 4391 struct wmi_host_peer_retry_stats { 4392 wmi_host_mac_addr peer_macaddr; 4393 uint32_t retry_counter_wraparnd_ind; 4394 uint32_t msdus_success; 4395 uint32_t msdus_retried; 4396 uint32_t msdus_mul_retried; 4397 uint32_t msdus_failed; 4398 uint32_t reserved[4]; 4399 }; 4400 4401 /** 4402 * struct wmi_host_per_chain_rssi_stats - VDEV nac rssi stats 4403 * @vdev_id: unique id identifying the VDEV, generated by the caller 4404 * @rssi_avg_beacon: per chain avg rssi for beacon 4405 * @rssi_avg_data: per chain avg rssi for data 4406 * @peer_macaddr: peer macaddr 4407 */ 4408 struct wmi_host_per_chain_rssi_stats { 4409 uint32_t vdev_id; 4410 int32_t rssi_avg_beacon[WMI_HOST_MAX_CHAINS]; 4411 int32_t rssi_avg_data[WMI_HOST_MAX_CHAINS]; 4412 wmi_host_mac_addr peer_macaddr; 4413 }; 4414 4415 /** 4416 * struct wmi_host_peer_stats - peer stats 4417 * @peer_macaddr: peer MAC address 4418 * @peer_rssi: rssi 4419 * @peer_rssi_seq_num: rssi sequence number 4420 * @peer_tx_rate: last tx data rate used for peer 4421 * @peer_rx_rate: last rx data rate used for peer 4422 * @currentper: Current PER 4423 * @retries: Retries happened during transmission 4424 * @txratecount: Maximum Aggregation Size 4425 * @max4msframelen: Max4msframelen of tx rates used 4426 * @totalsubframes: Total no of subframes 4427 * @txbytes: No of bytes transmitted to the client 4428 * @nobuffs[4]: Packet Loss due to buffer overflows 4429 * @excretries[4]: Packet Loss due to excessive retries 4430 * @peer_rssi_changed: how many times peer's RSSI changed by a 4431 * non-negligible amount 4432 */ 4433 typedef struct { 4434 wmi_host_mac_addr peer_macaddr; 4435 int8_t peer_rssi; 4436 uint32_t peer_rssi_seq_num; 4437 uint32_t peer_tx_rate; 4438 uint32_t peer_rx_rate; 4439 uint32_t currentper; 4440 uint32_t retries; 4441 uint32_t txratecount; 4442 uint32_t max4msframelen; 4443 uint32_t totalsubframes; 4444 uint32_t txbytes; 4445 uint32_t nobuffs[4]; 4446 uint32_t excretries[4]; 4447 uint32_t peer_rssi_changed; 4448 } wmi_host_peer_stats; 4449 4450 typedef struct { 4451 uint32_t dummy; 4452 } wmi_host_bcnflt_stats; 4453 4454 /** 4455 * struct wmi_host_chan_stats - WMI chan stats 4456 * @chan_mhz: Primary channel freq of the channel for which stats are sent 4457 * @sampling_period_us: Time spent on the channel 4458 * @rx_clear_count: Aggregate duration over a sampling period for 4459 * which channel activity was observed 4460 * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period 4461 * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period 4462 */ 4463 typedef struct { 4464 uint32_t chan_mhz; 4465 uint32_t sampling_period_us; 4466 uint32_t rx_clear_count; 4467 uint32_t tx_duration_us; 4468 uint32_t rx_duration_us; 4469 } wmi_host_chan_stats; 4470 4471 #ifdef FEATURE_WLAN_TIME_SYNC_FTM 4472 4473 #define FTM_TIME_SYNC_QTIME_PAIR_MAX 32 4474 4475 /** 4476 * struct ftm_time_sync_start_stop_param- Get wlan time sync ftm info 4477 * @vdev_id: vdev id 4478 * @timer_interval: periodicity to trigger wlan time sync strobe 4479 * @num_reads: Number of times to trigger wlabn time sync strobe 4480 * @qtime: ref Qtimer value 4481 * @mac_time: ref Mac timer value 4482 */ 4483 struct ftm_time_sync_start_stop_params { 4484 uint32_t vdev_id; 4485 uint32_t timer_interval; 4486 uint32_t num_reads; 4487 uint64_t qtime; 4488 uint64_t mac_time; 4489 }; 4490 4491 /** 4492 * struct wlan_time_sync_qtime_pair- Get wlan time sync qtime pair value 4493 * @vdev_id: vdev id 4494 * @qtime_master: qtimer value of master 4495 * @qtime_slave: qtimer value of slave 4496 */ 4497 struct wlan_time_sync_qtime_pair { 4498 uint64_t qtime_master; 4499 uint64_t qtime_slave; 4500 }; 4501 4502 /** 4503 * struct ftm_time_sync_offset- Get ftm time sync offset 4504 * @vdev_id: vdev id 4505 * @num_qtime: number of qtime values received 4506 * @pairs: array of qtime pairs 4507 */ 4508 struct ftm_time_sync_offset { 4509 uint32_t vdev_id; 4510 uint32_t num_qtime; 4511 struct wlan_time_sync_qtime_pair pairs[FTM_TIME_SYNC_QTIME_PAIR_MAX]; 4512 }; 4513 #endif 4514 4515 /** 4516 * struct wmi_host_tsf_event_- Get tsf event info 4517 * @vdev_id: vdev id 4518 * @tsf: tsf 4519 */ 4520 struct wmi_host_tsf_event { 4521 uint32_t vdev_id; 4522 uint64_t tsf; 4523 }; 4524 4525 #define WMI_EVENT_ID_INVALID 0 4526 /** 4527 * Host based ENUM IDs for events to abstract target enums for event_id 4528 */ 4529 typedef enum { 4530 wmi_service_ready_event_id = 0, 4531 wmi_ready_event_id, 4532 wmi_dbg_msg_event_id, 4533 wmi_scan_event_id, 4534 wmi_echo_event_id, 4535 wmi_update_stats_event_id, 4536 wmi_inst_rssi_stats_event_id, 4537 wmi_vdev_start_resp_event_id, 4538 wmi_vdev_standby_req_event_id, 4539 wmi_vdev_resume_req_event_id, 4540 wmi_vdev_stopped_event_id, 4541 wmi_peer_sta_kickout_event_id, 4542 wmi_host_swba_event_id, 4543 wmi_tbttoffset_update_event_id, 4544 wmi_mgmt_rx_event_id, 4545 wmi_chan_info_event_id, 4546 wmi_phyerr_event_id, 4547 wmi_roam_event_id, 4548 wmi_profile_match, 4549 wmi_debug_print_event_id, 4550 wmi_pdev_qvit_event_id, 4551 wmi_wlan_profile_data_event_id, 4552 wmi_rtt_meas_report_event_id, 4553 wmi_tsf_meas_report_event_id, 4554 wmi_rtt_error_report_event_id, 4555 wmi_rtt_keepalive_event_id, 4556 wmi_oem_cap_event_id, 4557 wmi_oem_meas_report_event_id, 4558 wmi_oem_report_event_id, 4559 wmi_nan_event_id, 4560 wmi_wow_wakeup_host_event_id, 4561 wmi_gtk_offload_status_event_id, 4562 wmi_gtk_rekey_fail_event_id, 4563 wmi_dcs_interference_event_id, 4564 wmi_pdev_tpc_config_event_id, 4565 wmi_csa_handling_event_id, 4566 wmi_gpio_input_event_id, 4567 wmi_peer_ratecode_list_event_id, 4568 wmi_generic_buffer_event_id, 4569 wmi_mcast_buf_release_event_id, 4570 wmi_mcast_list_ageout_event_id, 4571 wmi_vdev_get_keepalive_event_id, 4572 wmi_wds_peer_event_id, 4573 wmi_peer_sta_ps_statechg_event_id, 4574 wmi_pdev_fips_event_id, 4575 wmi_tt_stats_event_id, 4576 wmi_pdev_channel_hopping_event_id, 4577 wmi_pdev_ani_cck_level_event_id, 4578 wmi_pdev_ani_ofdm_level_event_id, 4579 wmi_pdev_reserve_ast_entry_event_id, 4580 wmi_pdev_nfcal_power_event_id, 4581 wmi_pdev_tpc_event_id, 4582 wmi_pdev_get_ast_info_event_id, 4583 wmi_pdev_temperature_event_id, 4584 wmi_pdev_nfcal_power_all_channels_event_id, 4585 wmi_pdev_bss_chan_info_event_id, 4586 wmi_mu_report_event_id, 4587 wmi_pdev_utf_event_id, 4588 wmi_pdev_dump_event_id, 4589 wmi_tx_pause_event_id, 4590 wmi_dfs_radar_event_id, 4591 wmi_pdev_l1ss_track_event_id, 4592 wmi_service_ready_ext_event_id, 4593 wmi_vdev_install_key_complete_event_id, 4594 wmi_vdev_mcc_bcn_intvl_change_req_event_id, 4595 wmi_vdev_tsf_report_event_id, 4596 wmi_peer_info_event_id, 4597 wmi_peer_tx_fail_cnt_thr_event_id, 4598 wmi_peer_estimated_linkspeed_event_id, 4599 wmi_peer_state_event_id, 4600 wmi_offload_bcn_tx_status_event_id, 4601 wmi_offload_prob_resp_tx_status_event_id, 4602 wmi_mgmt_tx_completion_event_id, 4603 wmi_tx_delba_complete_event_id, 4604 wmi_tx_addba_complete_event_id, 4605 wmi_ba_rsp_ssn_event_id, 4606 wmi_aggr_state_trig_event_id, 4607 wmi_roam_synch_event_id, 4608 wmi_roam_synch_frame_event_id, 4609 wmi_p2p_disc_event_id, 4610 wmi_p2p_noa_event_id, 4611 wmi_p2p_lo_stop_event_id, 4612 wmi_vdev_add_macaddr_rx_filter_event_id, 4613 wmi_pdev_resume_event_id, 4614 wmi_d0_wow_disable_ack_event_id, 4615 wmi_wow_initial_wakeup_event_id, 4616 wmi_stats_ext_event_id, 4617 wmi_iface_link_stats_event_id, 4618 wmi_peer_link_stats_event_id, 4619 wmi_radio_link_stats_link, 4620 wmi_update_fw_mem_dump_event_id, 4621 wmi_diag_event_id_log_supported_event_id, 4622 wmi_nlo_match_event_id, 4623 wmi_nlo_scan_complete_event_id, 4624 wmi_apfind_event_id, 4625 wmi_passpoint_match_event_id, 4626 wmi_chatter_pc_query_event_id, 4627 wmi_pdev_ftm_intg_event_id, 4628 wmi_wlan_freq_avoid_event_id, 4629 wmi_thermal_mgmt_event_id, 4630 wmi_diag_container_event_id, 4631 wmi_host_auto_shutdown_event_id, 4632 wmi_update_whal_mib_stats_event_id, 4633 wmi_update_vdev_rate_stats_event_id, 4634 wmi_diag_event_id, 4635 wmi_unit_test_event_id, 4636 wmi_ocb_set_sched_event_id, 4637 wmi_dbg_mesg_flush_complete_event_id, 4638 wmi_rssi_breach_event_id, 4639 wmi_uploadh_event_id, 4640 wmi_captureh_event_id, 4641 wmi_rfkill_state_change_event_id, 4642 wmi_tdls_peer_event_id, 4643 wmi_batch_scan_enabled_event_id, 4644 wmi_batch_scan_result_event_id, 4645 wmi_lpi_result_event_id, 4646 wmi_lpi_status_event_id, 4647 wmi_lpi_handoff_event_id, 4648 wmi_extscan_start_stop_event_id, 4649 wmi_extscan_operation_event_id, 4650 wmi_extscan_table_usage_event_id, 4651 wmi_extscan_cached_results_event_id, 4652 wmi_extscan_wlan_change_results_event_id, 4653 wmi_extscan_hotlist_match_event_id, 4654 wmi_extscan_capabilities_event_id, 4655 wmi_extscan_hotlist_ssid_match_event_id, 4656 wmi_mdns_stats_event_id, 4657 wmi_sap_ofl_add_sta_event_id, 4658 wmi_sap_ofl_del_sta_event_id, 4659 wmi_ocb_set_config_resp_event_id, 4660 wmi_ocb_get_tsf_timer_resp_event_id, 4661 wmi_dcc_get_stats_resp_event_id, 4662 wmi_dcc_update_ndl_resp_event_id, 4663 wmi_dcc_stats_event_id, 4664 wmi_soc_set_hw_mode_resp_event_id, 4665 wmi_soc_hw_mode_transition_event_id, 4666 wmi_soc_set_dual_mac_config_resp_event_id, 4667 wmi_tx_data_traffic_ctrl_event_id, 4668 wmi_peer_tx_mu_txmit_count_event_id, 4669 wmi_peer_gid_userpos_list_event_id, 4670 wmi_pdev_check_cal_version_event_id, 4671 wmi_atf_peer_stats_event_id, 4672 wmi_peer_delete_response_event_id, 4673 wmi_peer_delete_all_response_event_id, 4674 wmi_pdev_csa_switch_count_status_event_id, 4675 wmi_reg_chan_list_cc_event_id, 4676 wmi_offchan_data_tx_completion_event, 4677 wmi_dfs_cac_complete_id, 4678 wmi_dfs_radar_detection_event_id, 4679 wmi_ext_tbttoffset_update_event_id, 4680 wmi_11d_new_country_event_id, 4681 wmi_get_arp_stats_req_id, 4682 wmi_service_available_event_id, 4683 wmi_update_rcpi_event_id, 4684 wmi_pdev_wds_entry_list_event_id, 4685 wmi_ndp_initiator_rsp_event_id, 4686 wmi_ndp_indication_event_id, 4687 wmi_ndp_confirm_event_id, 4688 wmi_ndp_responder_rsp_event_id, 4689 wmi_ndp_end_indication_event_id, 4690 wmi_ndp_end_rsp_event_id, 4691 wmi_nan_dmesg_event_id, 4692 wmi_ndl_schedule_update_event_id, 4693 wmi_ndp_event_id, 4694 wmi_oem_response_event_id, 4695 wmi_peer_stats_info_event_id, 4696 wmi_pdev_chip_power_stats_event_id, 4697 wmi_ap_ps_egap_info_event_id, 4698 wmi_peer_assoc_conf_event_id, 4699 wmi_vdev_delete_resp_event_id, 4700 wmi_apf_capability_info_event_id, 4701 wmi_vdev_encrypt_decrypt_data_rsp_event_id, 4702 wmi_report_rx_aggr_failure_event_id, 4703 wmi_pdev_chip_pwr_save_failure_detect_event_id, 4704 wmi_peer_antdiv_info_event_id, 4705 wmi_pdev_set_hw_mode_rsp_event_id, 4706 wmi_pdev_hw_mode_transition_event_id, 4707 wmi_pdev_set_mac_config_resp_event_id, 4708 wmi_coex_bt_activity_event_id, 4709 wmi_mgmt_tx_bundle_completion_event_id, 4710 wmi_radio_tx_power_level_stats_event_id, 4711 wmi_report_stats_event_id, 4712 wmi_dma_buf_release_event_id, 4713 wmi_sap_obss_detection_report_event_id, 4714 wmi_obss_color_collision_report_event_id, 4715 wmi_host_swfda_event_id, 4716 wmi_sar_get_limits_event_id, 4717 wmi_pdev_div_rssi_antid_event_id, 4718 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 4719 wmi_host_dfs_status_check_event_id, 4720 #endif 4721 #ifdef WLAN_SUPPORT_TWT 4722 wmi_twt_enable_complete_event_id, 4723 wmi_twt_disable_complete_event_id, 4724 wmi_twt_add_dialog_complete_event_id, 4725 wmi_twt_del_dialog_complete_event_id, 4726 wmi_twt_pause_dialog_complete_event_id, 4727 wmi_twt_resume_dialog_complete_event_id, 4728 wmi_twt_session_stats_event_id, 4729 #endif 4730 wmi_apf_get_vdev_work_memory_resp_event_id, 4731 wmi_roam_scan_stats_event_id, 4732 wmi_vdev_ocac_complete_event_id, 4733 4734 #ifdef OL_ATH_SMART_LOGGING 4735 wmi_debug_fatal_condition_eventid, 4736 #endif /* OL_ATH_SMART_LOGGING */ 4737 wmi_wlan_sar2_result_event_id, 4738 wmi_esp_estimate_event_id, 4739 wmi_pdev_ctl_failsafe_check_event_id, 4740 wmi_vdev_bcn_reception_stats_event_id, 4741 wmi_roam_blacklist_event_id, 4742 wmi_wlm_stats_event_id, 4743 wmi_peer_cfr_capture_event_id, 4744 wmi_pdev_cold_boot_cal_event_id, 4745 wmi_vdev_get_mws_coex_state_eventid, 4746 wmi_vdev_get_mws_coex_dpwb_state_eventid, 4747 wmi_vdev_get_mws_coex_tdm_state_eventid, 4748 wmi_vdev_get_mws_coex_idrx_state_eventid, 4749 wmi_vdev_get_mws_coex_antenna_sharing_state_eventid, 4750 #ifdef WLAN_FEATURE_INTEROP_ISSUES_AP 4751 wmi_pdev_interop_issues_ap_event_id, 4752 #endif 4753 wmi_coex_report_antenna_isolation_event_id, 4754 wmi_chan_rf_characterization_info_event_id, 4755 wmi_roam_auth_offload_event_id, 4756 wmi_service_ready_ext2_event_id, 4757 wmi_get_elna_bypass_event_id, 4758 wmi_motion_det_host_eventid, 4759 wmi_motion_det_base_line_host_eventid, 4760 wmi_get_ani_level_event_id, 4761 wmi_peer_tx_pn_response_event_id, 4762 wmi_roam_stats_event_id, 4763 wmi_oem_data_event_id, 4764 wmi_mgmt_offload_data_event_id, 4765 wmi_pdev_multi_vdev_restart_response_event_id, 4766 wmi_roam_pmkid_request_event_id, 4767 #ifdef FEATURE_WLAN_TIME_SYNC_FTM 4768 wmi_wlan_time_sync_ftm_start_stop_event_id, 4769 wmi_wlan_time_sync_q_master_slave_offset_eventid, 4770 #endif 4771 wmi_roam_scan_chan_list_id, 4772 wmi_muedca_params_config_eventid, 4773 wmi_pdev_sscan_fw_param_eventid, 4774 wmi_roam_cap_report_event_id, 4775 wmi_vdev_bcn_latency_event_id, 4776 wmi_vdev_disconnect_event_id, 4777 wmi_peer_create_conf_event_id, 4778 wmi_pdev_cp_fwstats_eventid, 4779 wmi_events_max, 4780 } wmi_conv_event_id; 4781 4782 #define WMI_UNAVAILABLE_PARAM 0 4783 /** 4784 * Host based ENUM IDs for PDEV params to abstract target enums 4785 */ 4786 typedef enum { 4787 wmi_pdev_param_tx_chain_mask = 0, 4788 wmi_pdev_param_rx_chain_mask, 4789 wmi_pdev_param_txpower_limit2g, 4790 wmi_pdev_param_txpower_limit5g, 4791 wmi_pdev_param_txpower_scale, 4792 wmi_pdev_param_beacon_gen_mode, 4793 wmi_pdev_param_beacon_tx_mode, 4794 wmi_pdev_param_resmgr_offchan_mode, 4795 wmi_pdev_param_protection_mode, 4796 wmi_pdev_param_dynamic_bw, 4797 wmi_pdev_param_non_agg_sw_retry_th, 4798 wmi_pdev_param_agg_sw_retry_th, 4799 wmi_pdev_param_sta_kickout_th, 4800 wmi_pdev_param_ac_aggrsize_scaling, 4801 wmi_pdev_param_ltr_enable, 4802 wmi_pdev_param_ltr_ac_latency_be, 4803 wmi_pdev_param_ltr_ac_latency_bk, 4804 wmi_pdev_param_ltr_ac_latency_vi, 4805 wmi_pdev_param_ltr_ac_latency_vo, 4806 wmi_pdev_param_ltr_ac_latency_timeout, 4807 wmi_pdev_param_ltr_sleep_override, 4808 wmi_pdev_param_ltr_rx_override, 4809 wmi_pdev_param_ltr_tx_activity_timeout, 4810 wmi_pdev_param_l1ss_enable, 4811 wmi_pdev_param_dsleep_enable, 4812 wmi_pdev_param_pcielp_txbuf_flush, 4813 wmi_pdev_param_pcielp_txbuf_watermark, 4814 wmi_pdev_param_pcielp_txbuf_tmo_en, 4815 wmi_pdev_param_pcielp_txbuf_tmo_value, 4816 wmi_pdev_param_pdev_stats_update_period, 4817 wmi_pdev_param_vdev_stats_update_period, 4818 wmi_pdev_param_peer_stats_update_period, 4819 wmi_pdev_param_bcnflt_stats_update_period, 4820 wmi_pdev_param_pmf_qos, 4821 wmi_pdev_param_arp_ac_override, 4822 wmi_pdev_param_dcs, 4823 wmi_pdev_param_ani_enable, 4824 wmi_pdev_param_ani_poll_period, 4825 wmi_pdev_param_ani_listen_period, 4826 wmi_pdev_param_ani_ofdm_level, 4827 wmi_pdev_param_ani_cck_level, 4828 wmi_pdev_param_dyntxchain, 4829 wmi_pdev_param_proxy_sta, 4830 wmi_pdev_param_idle_ps_config, 4831 wmi_pdev_param_power_gating_sleep, 4832 wmi_pdev_param_aggr_burst, 4833 wmi_pdev_param_rx_decap_mode, 4834 wmi_pdev_param_fast_channel_reset, 4835 wmi_pdev_param_burst_dur, 4836 wmi_pdev_param_burst_enable, 4837 wmi_pdev_param_smart_antenna_default_antenna, 4838 wmi_pdev_param_igmpmld_override, 4839 wmi_pdev_param_igmpmld_tid, 4840 wmi_pdev_param_antenna_gain, 4841 wmi_pdev_param_rx_filter, 4842 wmi_pdev_set_mcast_to_ucast_tid, 4843 wmi_pdev_param_proxy_sta_mode, 4844 wmi_pdev_param_set_mcast2ucast_mode, 4845 wmi_pdev_param_set_mcast2ucast_buffer, 4846 wmi_pdev_param_remove_mcast2ucast_buffer, 4847 wmi_pdev_peer_sta_ps_statechg_enable, 4848 wmi_pdev_param_block_interbss, 4849 wmi_pdev_param_set_disable_reset_cmdid, 4850 wmi_pdev_param_set_msdu_ttl_cmdid, 4851 wmi_pdev_param_set_ppdu_duration_cmdid, 4852 wmi_pdev_param_txbf_sound_period_cmdid, 4853 wmi_pdev_param_set_promisc_mode_cmdid, 4854 wmi_pdev_param_set_burst_mode_cmdid, 4855 wmi_pdev_param_en_stats, 4856 wmi_pdev_param_mu_group_policy, 4857 wmi_pdev_param_noise_detection, 4858 wmi_pdev_param_noise_threshold, 4859 wmi_pdev_param_dpd_enable, 4860 wmi_pdev_param_set_mcast_bcast_echo, 4861 wmi_pdev_param_atf_strict_sch, 4862 wmi_pdev_param_atf_sched_duration, 4863 wmi_pdev_param_ant_plzn, 4864 wmi_pdev_param_mgmt_retry_limit, 4865 wmi_pdev_param_sensitivity_level, 4866 wmi_pdev_param_signed_txpower_2g, 4867 wmi_pdev_param_signed_txpower_5g, 4868 wmi_pdev_param_enable_per_tid_amsdu, 4869 wmi_pdev_param_enable_per_tid_ampdu, 4870 wmi_pdev_param_cca_threshold, 4871 wmi_pdev_param_rts_fixed_rate, 4872 wmi_pdev_param_cal_period, 4873 wmi_pdev_param_pdev_reset, 4874 wmi_pdev_param_wapi_mbssid_offset, 4875 wmi_pdev_param_arp_srcaddr, 4876 wmi_pdev_param_arp_dstaddr, 4877 wmi_pdev_param_txpower_decr_db, 4878 wmi_pdev_param_rx_batchmode, 4879 wmi_pdev_param_packet_aggr_delay, 4880 wmi_pdev_param_atf_obss_noise_sch, 4881 wmi_pdev_param_atf_obss_noise_scaling_factor, 4882 wmi_pdev_param_cust_txpower_scale, 4883 wmi_pdev_param_atf_dynamic_enable, 4884 wmi_pdev_param_atf_ssid_group_policy, 4885 wmi_pdev_param_rfkill_enable, 4886 wmi_pdev_param_hw_rfkill_config, 4887 wmi_pdev_param_low_power_rf_enable, 4888 wmi_pdev_param_l1ss_track, 4889 wmi_pdev_param_hyst_en, 4890 wmi_pdev_param_power_collapse_enable, 4891 wmi_pdev_param_led_sys_state, 4892 wmi_pdev_param_led_enable, 4893 wmi_pdev_param_audio_over_wlan_latency, 4894 wmi_pdev_param_audio_over_wlan_enable, 4895 wmi_pdev_param_whal_mib_stats_update_enable, 4896 wmi_pdev_param_vdev_rate_stats_update_period, 4897 wmi_pdev_param_cts_cbw, 4898 wmi_pdev_param_wnts_config, 4899 wmi_pdev_param_adaptive_early_rx_enable, 4900 wmi_pdev_param_adaptive_early_rx_min_sleep_slop, 4901 wmi_pdev_param_adaptive_early_rx_inc_dec_step, 4902 wmi_pdev_param_early_rx_fix_sleep_slop, 4903 wmi_pdev_param_bmiss_based_adaptive_bto_enable, 4904 wmi_pdev_param_bmiss_bto_min_bcn_timeout, 4905 wmi_pdev_param_bmiss_bto_inc_dec_step, 4906 wmi_pdev_param_bto_fix_bcn_timeout, 4907 wmi_pdev_param_ce_based_adaptive_bto_enable, 4908 wmi_pdev_param_ce_bto_combo_ce_value, 4909 wmi_pdev_param_tx_chain_mask_2g, 4910 wmi_pdev_param_rx_chain_mask_2g, 4911 wmi_pdev_param_tx_chain_mask_5g, 4912 wmi_pdev_param_rx_chain_mask_5g, 4913 wmi_pdev_param_tx_chain_mask_cck, 4914 wmi_pdev_param_tx_chain_mask_1ss, 4915 wmi_pdev_param_enable_btcoex, 4916 wmi_pdev_param_atf_peer_stats, 4917 wmi_pdev_param_btcoex_cfg, 4918 wmi_pdev_param_mesh_mcast_enable, 4919 wmi_pdev_param_tx_ack_timeout, 4920 wmi_pdev_param_soft_tx_chain_mask, 4921 wmi_pdev_param_cck_tx_enable, 4922 wmi_pdev_param_esp_indication_period, 4923 wmi_pdev_param_antenna_gain_half_db, 4924 wmi_pdev_param_ru26_allowed, 4925 wmi_pdev_param_esp_ba_window, 4926 wmi_pdev_param_esp_airtime_fraction, 4927 wmi_pdev_param_esp_ppdu_duration, 4928 wmi_pdev_param_use_nol, 4929 wmi_pdev_param_enable_peer_retry_stats, 4930 wmi_pdev_param_ul_trig_int, 4931 wmi_pdev_param_sub_channel_marking, 4932 wmi_pdev_param_ul_ppdu_duration, 4933 wmi_pdev_param_equal_ru_allocation_enable, 4934 wmi_pdev_param_per_peer_prd_cfr_enable, 4935 wmi_pdev_param_nav_override_config, 4936 wmi_pdev_param_set_mgmt_ttl, 4937 wmi_pdev_param_set_prb_rsp_ttl, 4938 wmi_pdev_param_set_mu_ppdu_duration, 4939 wmi_pdev_param_set_tbtt_ctrl, 4940 wmi_pdev_param_set_cmd_obss_pd_threshold, 4941 wmi_pdev_param_set_cmd_obss_pd_per_ac, 4942 wmi_pdev_param_set_cong_ctrl_max_msdus, 4943 wmi_pdev_param_enable_fw_dynamic_he_edca, 4944 wmi_pdev_param_enable_srp, 4945 wmi_pdev_param_enable_sr_prohibit, 4946 wmi_pdev_param_sr_trigger_margin, 4947 wmi_pdev_param_pream_punct_bw, 4948 wmi_pdev_param_enable_mbssid_ctrl_frame, 4949 wmi_pdev_param_max, 4950 } wmi_conv_pdev_params_id; 4951 4952 4953 /** 4954 * Host based ENUM IDs for VDEV params to abstract target enums 4955 */ 4956 typedef enum { 4957 wmi_vdev_param_rts_threshold = 0, 4958 wmi_vdev_param_fragmentation_threshold, 4959 wmi_vdev_param_beacon_interval, 4960 wmi_vdev_param_listen_interval, 4961 wmi_vdev_param_multicast_rate, 4962 wmi_vdev_param_mgmt_tx_rate, 4963 wmi_vdev_param_slot_time, 4964 wmi_vdev_param_preamble, 4965 wmi_vdev_param_swba_time, 4966 wmi_vdev_stats_update_period, 4967 wmi_vdev_pwrsave_ageout_time, 4968 wmi_vdev_host_swba_interval, 4969 wmi_vdev_param_dtim_period, 4970 wmi_vdev_oc_scheduler_air_time_limit, 4971 wmi_vdev_param_wds, 4972 wmi_vdev_param_atim_window, 4973 wmi_vdev_param_bmiss_count_max, 4974 wmi_vdev_param_bmiss_first_bcnt, 4975 wmi_vdev_param_bmiss_final_bcnt, 4976 wmi_vdev_param_feature_wmm, 4977 wmi_vdev_param_chwidth, 4978 wmi_vdev_param_chextoffset, 4979 wmi_vdev_param_disable_htprotection, 4980 wmi_vdev_param_sta_quickkickout, 4981 wmi_vdev_param_mgmt_rate, 4982 wmi_vdev_param_protection_mode, 4983 wmi_vdev_param_fixed_rate, 4984 wmi_vdev_param_sgi, 4985 wmi_vdev_param_ldpc, 4986 wmi_vdev_param_tx_stbc, 4987 wmi_vdev_param_rx_stbc, 4988 wmi_vdev_param_intra_bss_fwd, 4989 wmi_vdev_param_def_keyid, 4990 wmi_vdev_param_nss, 4991 wmi_vdev_param_bcast_data_rate, 4992 wmi_vdev_param_mcast_data_rate, 4993 wmi_vdev_param_mcast_indicate, 4994 wmi_vdev_param_dhcp_indicate, 4995 wmi_vdev_param_unknown_dest_indicate, 4996 wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs, 4997 wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs, 4998 wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs, 4999 wmi_vdev_param_ap_enable_nawds, 5000 wmi_vdev_param_mcast2ucast_set, 5001 wmi_vdev_param_enable_rtscts, 5002 wmi_vdev_param_rc_num_retries, 5003 wmi_vdev_param_txbf, 5004 wmi_vdev_param_packet_powersave, 5005 wmi_vdev_param_drop_unencry, 5006 wmi_vdev_param_tx_encap_type, 5007 wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs, 5008 wmi_vdev_param_cabq_maxdur, 5009 wmi_vdev_param_mfptest_set, 5010 wmi_vdev_param_rts_fixed_rate, 5011 wmi_vdev_param_vht_sgimask, 5012 wmi_vdev_param_vht80_ratemask, 5013 wmi_vdev_param_early_rx_adjust_enable, 5014 wmi_vdev_param_early_rx_tgt_bmiss_num, 5015 wmi_vdev_param_early_rx_bmiss_sample_cycle, 5016 wmi_vdev_param_early_rx_slop_step, 5017 wmi_vdev_param_early_rx_init_slop, 5018 wmi_vdev_param_early_rx_adjust_pause, 5019 wmi_vdev_param_proxy_sta, 5020 wmi_vdev_param_meru_vc, 5021 wmi_vdev_param_rx_decap_type, 5022 wmi_vdev_param_bw_nss_ratemask, 5023 wmi_vdev_param_sensor_ap, 5024 wmi_vdev_param_beacon_rate, 5025 wmi_vdev_param_dtim_enable_cts, 5026 wmi_vdev_param_sta_kickout, 5027 wmi_vdev_param_tx_pwrlimit, 5028 wmi_vdev_param_snr_num_for_cal, 5029 wmi_vdev_param_roam_fw_offload, 5030 wmi_vdev_param_enable_rmc, 5031 wmi_vdev_param_ibss_max_bcn_lost_ms, 5032 wmi_vdev_param_max_rate, 5033 wmi_vdev_param_early_rx_drift_sample, 5034 wmi_vdev_param_set_ibss_tx_fail_cnt_thr, 5035 wmi_vdev_param_ebt_resync_timeout, 5036 wmi_vdev_param_aggr_trig_event_enable, 5037 wmi_vdev_param_is_ibss_power_save_allowed, 5038 wmi_vdev_param_is_power_collapse_allowed, 5039 wmi_vdev_param_is_awake_on_txrx_enabled, 5040 wmi_vdev_param_inactivity_cnt, 5041 wmi_vdev_param_txsp_end_inactivity_time_ms, 5042 wmi_vdev_param_dtim_policy, 5043 wmi_vdev_param_ibss_ps_warmup_time_secs, 5044 wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable, 5045 wmi_vdev_param_rx_leak_window, 5046 wmi_vdev_param_stats_avg_factor, 5047 wmi_vdev_param_disconnect_th, 5048 wmi_vdev_param_rtscts_rate, 5049 wmi_vdev_param_mcc_rtscts_protection_enable, 5050 wmi_vdev_param_mcc_broadcast_probe_enable, 5051 wmi_vdev_param_capabilities, 5052 wmi_vdev_param_mgmt_tx_power, 5053 wmi_vdev_param_atf_ssid_sched_policy, 5054 wmi_vdev_param_disable_dyn_bw_rts, 5055 wmi_vdev_param_ampdu_subframe_size_per_ac, 5056 wmi_vdev_param_he_dcm_enable, 5057 wmi_vdev_param_he_bss_color, 5058 wmi_vdev_param_he_range_ext_enable, 5059 wmi_vdev_param_set_hemu_mode, 5060 wmi_vdev_param_set_he_ltf, 5061 wmi_vdev_param_set_heop, 5062 wmi_vdev_param_disable_cabq, 5063 wmi_vdev_param_rate_dropdown_bmap, 5064 wmi_vdev_param_tx_power, 5065 wmi_vdev_param_set_ba_mode, 5066 wmi_vdev_param_autorate_misc_cfg, 5067 wmi_vdev_param_amsdu_subframe_size_per_ac, 5068 wmi_vdev_param_set_he_sounding_mode, 5069 wmi_vdev_param_sifs_trigger_rate, 5070 wmi_vdev_param_ul_shortgi, 5071 wmi_vdev_param_ul_he_ltf, 5072 wmi_vdev_param_ul_nss, 5073 wmi_vdev_param_ul_ppdu_bw, 5074 wmi_vdev_param_ul_ldpc, 5075 wmi_vdev_param_ul_stbc, 5076 wmi_vdev_param_ul_fixed_rate, 5077 wmi_vdev_param_rawmode_open_war, 5078 wmi_vdev_param_max_mtu_size, 5079 wmi_vdev_param_mcast_rc_stale_period, 5080 wmi_vdev_param_enable_multi_group_key, 5081 wmi_vdev_param_max_group_keys, 5082 wmi_vdev_param_enable_mcast_rc, 5083 wmi_vdev_param_6ghz_params, 5084 wmi_vdev_param_enable_disable_roam_reason_vsie, 5085 wmi_vdev_param_set_cmd_obss_pd_threshold, 5086 wmi_vdev_param_set_cmd_obss_pd_per_ac, 5087 wmi_vdev_param_enable_srp, 5088 wmi_vdev_param_nan_config_features, 5089 } wmi_conv_vdev_param_id; 5090 5091 /** 5092 * Host based ENUM IDs for service bits to abstract target enums 5093 */ 5094 typedef enum { 5095 wmi_service_beacon_offload = 0, 5096 wmi_service_scan_offload, 5097 wmi_service_roam_offload, 5098 wmi_service_bcn_miss_offload, 5099 wmi_service_sta_pwrsave, 5100 wmi_service_sta_advanced_pwrsave, 5101 wmi_service_ap_uapsd, 5102 wmi_service_ap_dfs, 5103 wmi_service_11ac, 5104 wmi_service_blockack, 5105 wmi_service_phyerr, 5106 wmi_service_bcn_filter, 5107 wmi_service_rtt, 5108 wmi_service_ratectrl, 5109 wmi_service_wow, 5110 wmi_service_ratectrl_cache, 5111 wmi_service_iram_tids, 5112 wmi_service_burst, 5113 wmi_service_smart_antenna_sw_support, 5114 wmi_service_gtk_offload, 5115 wmi_service_scan_sch, 5116 wmi_service_csa_offload, 5117 wmi_service_chatter, 5118 wmi_service_coex_freqavoid, 5119 wmi_service_packet_power_save, 5120 wmi_service_force_fw_hang, 5121 wmi_service_smart_antenna_hw_support, 5122 wmi_service_gpio, 5123 wmi_sta_uapsd_basic_auto_trig, 5124 wmi_sta_uapsd_var_auto_trig, 5125 wmi_service_sta_keep_alive, 5126 wmi_service_tx_encap, 5127 wmi_service_ap_ps_detect_out_of_sync, 5128 wmi_service_early_rx, 5129 wmi_service_enhanced_proxy_sta, 5130 wmi_service_tt, 5131 wmi_service_atf, 5132 wmi_service_peer_caching, 5133 wmi_service_coex_gpio, 5134 wmi_service_aux_spectral_intf, 5135 wmi_service_aux_chan_load_intf, 5136 wmi_service_bss_channel_info_64, 5137 wmi_service_ext_res_cfg_support, 5138 wmi_service_mesh, 5139 wmi_service_restrt_chnl_support, 5140 wmi_service_roam_scan_offload, 5141 wmi_service_arpns_offload, 5142 wmi_service_nlo, 5143 wmi_service_sta_dtim_ps_modulated_dtim, 5144 wmi_service_sta_smps, 5145 wmi_service_fwtest, 5146 wmi_service_sta_wmmac, 5147 wmi_service_tdls, 5148 wmi_service_mcc_bcn_interval_change, 5149 wmi_service_adaptive_ocs, 5150 wmi_service_ba_ssn_support, 5151 wmi_service_filter_ipsec_natkeepalive, 5152 wmi_service_wlan_hb, 5153 wmi_service_lte_ant_share_support, 5154 wmi_service_batch_scan, 5155 wmi_service_qpower, 5156 wmi_service_plmreq, 5157 wmi_service_thermal_mgmt, 5158 wmi_service_rmc, 5159 wmi_service_mhf_offload, 5160 wmi_service_coex_sar, 5161 wmi_service_bcn_txrate_override, 5162 wmi_service_nan, 5163 wmi_service_l1ss_stat, 5164 wmi_service_estimate_linkspeed, 5165 wmi_service_obss_scan, 5166 wmi_service_tdls_offchan, 5167 wmi_service_tdls_uapsd_buffer_sta, 5168 wmi_service_tdls_uapsd_sleep_sta, 5169 wmi_service_ibss_pwrsave, 5170 wmi_service_lpass, 5171 wmi_service_extscan, 5172 wmi_service_d0wow, 5173 wmi_service_hsoffload, 5174 wmi_service_roam_ho_offload, 5175 wmi_service_rx_full_reorder, 5176 wmi_service_dhcp_offload, 5177 wmi_service_sta_rx_ipa_offload_support, 5178 wmi_service_mdns_offload, 5179 wmi_service_sap_auth_offload, 5180 wmi_service_dual_band_simultaneous_support, 5181 wmi_service_ocb, 5182 wmi_service_ap_arpns_offload, 5183 wmi_service_per_band_chainmask_support, 5184 wmi_service_packet_filter_offload, 5185 wmi_service_mgmt_tx_htt, 5186 wmi_service_mgmt_tx_wmi, 5187 wmi_service_ext_msg, 5188 wmi_service_mawc, 5189 5190 wmi_service_peer_stats, 5191 wmi_service_mesh_11s, 5192 wmi_service_periodic_chan_stat_support, 5193 wmi_service_tx_mode_push_only, 5194 wmi_service_tx_mode_push_pull, 5195 wmi_service_tx_mode_dynamic, 5196 wmi_service_check_cal_version, 5197 wmi_service_btcoex_duty_cycle, 5198 wmi_service_4_wire_coex_support, 5199 wmi_service_multiple_vdev_restart, 5200 wmi_service_peer_assoc_conf, 5201 wmi_service_egap, 5202 wmi_service_sta_pmf_offload, 5203 wmi_service_unified_wow_capability, 5204 wmi_service_enterprise_mesh, 5205 wmi_service_apf_offload, 5206 wmi_service_sync_delete_cmds, 5207 wmi_service_ratectrl_limit_max_min_rates, 5208 wmi_service_nan_data, 5209 wmi_service_nan_rtt, 5210 wmi_service_11ax, 5211 wmi_service_deprecated_replace, 5212 wmi_service_tdls_conn_tracker_in_host_mode, 5213 wmi_service_enhanced_mcast_filter, 5214 wmi_service_half_rate_quarter_rate_support, 5215 wmi_service_vdev_rx_filter, 5216 wmi_service_p2p_listen_offload_support, 5217 wmi_service_mark_first_wakeup_packet, 5218 wmi_service_multiple_mcast_filter_set, 5219 wmi_service_host_managed_rx_reorder, 5220 wmi_service_flash_rdwr_support, 5221 wmi_service_wlan_stats_report, 5222 wmi_service_tx_msdu_id_new_partition_support, 5223 wmi_service_dfs_phyerr_offload, 5224 wmi_service_rcpi_support, 5225 wmi_service_fw_mem_dump_support, 5226 wmi_service_peer_stats_info, 5227 wmi_service_regulatory_db, 5228 wmi_service_11d_offload, 5229 wmi_service_hw_data_filtering, 5230 wmi_service_pkt_routing, 5231 wmi_service_offchan_tx_wmi, 5232 wmi_service_chan_load_info, 5233 wmi_service_extended_nss_support, 5234 wmi_service_ack_timeout, 5235 wmi_service_widebw_scan, 5236 wmi_service_bcn_offload_start_stop_support, 5237 wmi_service_offchan_data_tid_support, 5238 wmi_service_support_dma, 5239 wmi_service_8ss_tx_bfee, 5240 wmi_service_fils_support, 5241 wmi_service_mawc_support, 5242 wmi_service_wow_wakeup_by_timer_pattern, 5243 wmi_service_11k_neighbour_report_support, 5244 wmi_service_ap_obss_detection_offload, 5245 wmi_service_bss_color_offload, 5246 wmi_service_gmac_offload_support, 5247 wmi_service_host_dfs_check_support, 5248 wmi_service_dual_beacon_on_single_mac_scc_support, 5249 wmi_service_dual_beacon_on_single_mac_mcc_support, 5250 wmi_service_twt_requestor, 5251 wmi_service_twt_responder, 5252 wmi_service_listen_interval_offload_support, 5253 5254 #ifdef OL_ATH_SMART_LOGGING 5255 wmi_service_smart_logging_support, 5256 #endif 5257 wmi_service_infra_mbssid, 5258 wmi_service_esp_support, 5259 wmi_service_obss_spatial_reuse, 5260 wmi_service_per_vdev_chain_support, 5261 wmi_service_new_htt_msg_format, 5262 wmi_service_peer_unmap_cnf_support, 5263 wmi_service_beacon_reception_stats, 5264 wmi_service_vdev_latency_config, 5265 wmi_service_nan_dbs_support, 5266 wmi_service_ndi_dbs_support, 5267 wmi_service_nan_sap_support, 5268 wmi_service_ndi_sap_support, 5269 wmi_service_nan_disable_support, 5270 wmi_service_sta_plus_sta_support, 5271 wmi_service_hw_db2dbm_support, 5272 wmi_service_wlm_stats_support, 5273 wmi_service_ul_ru26_allowed, 5274 wmi_service_cfr_capture_support, 5275 wmi_service_bcast_twt_support, 5276 wmi_service_wpa3_ft_sae_support, 5277 wmi_service_wpa3_ft_suite_b_support, 5278 wmi_service_ft_fils, 5279 wmi_service_adaptive_11r_support, 5280 wmi_service_data_stall_recovery_support, 5281 wmi_service_tx_compl_tsf64, 5282 wmi_service_vdev_delete_all_peer, 5283 wmi_service_three_way_coex_config_legacy, 5284 wmi_service_rx_fse_support, 5285 wmi_service_dynamic_hw_mode, 5286 wmi_service_sae_roam_support, 5287 wmi_service_owe_roam_support, 5288 wmi_service_ext2_msg, 5289 wmi_service_6ghz_support, 5290 wmi_service_bw_165mhz_support, 5291 wmi_service_bw_restricted_80p80_support, 5292 wmi_service_packet_capture_support, 5293 wmi_service_nan_vdev, 5294 wmi_service_multiple_vdev_restart_ext, 5295 wmi_service_peer_delete_no_peer_flush_tids_cmd, 5296 wmi_service_time_sync_ftm, 5297 wmi_service_nss_ratio_to_host_support, 5298 wmi_roam_scan_chan_list_to_host_support, 5299 wmi_beacon_protection_support, 5300 wmi_service_sta_nan_ndi_four_port, 5301 wmi_service_host_scan_stop_vdev_all, 5302 wmi_service_ema_ap_support, 5303 wmi_support_extend_address, 5304 wmi_service_srg_srp_spatial_reuse_support, 5305 wmi_service_suiteb_roam_support, 5306 wmi_service_no_interband_mcc_support, 5307 wmi_service_dual_sta_roam_support, 5308 wmi_service_peer_create_conf, 5309 wmi_service_configure_roam_trigger_param_support, 5310 wmi_service_5dot9_ghz_support, 5311 wmi_service_cfr_ta_ra_as_fp_support, 5312 wmi_service_cfr_capture_count_support, 5313 wmi_service_ll_stats_per_chan_rx_tx_time, 5314 wmi_service_thermal_multi_client_support, 5315 wmi_service_mbss_param_in_vdev_start_support, 5316 wmi_service_fse_cmem_alloc_support, 5317 #ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION 5318 wmi_service_get_station_in_ll_stats_req, 5319 #endif 5320 wmi_service_scan_conf_per_ch_support, 5321 wmi_service_csa_beacon_template, 5322 wmi_services_max, 5323 } wmi_conv_service_ids; 5324 #define WMI_SERVICE_UNAVAILABLE 0xFFFF 5325 5326 /** 5327 * enum WMI_DBG_PARAM - Debug params 5328 * @WMI_DBGLOG_LOG_LEVEL: Set the loglevel 5329 * @WMI_DBGLOG_VAP_ENABLE: Enable VAP level debug 5330 * @WMI_DBGLOG_VAP_DISABLE: Disable VAP level debug 5331 * @WMI_DBGLOG_MODULE_ENABLE: Enable MODULE level debug 5332 * @WMI_DBGLOG_MODULE_DISABLE: Disable MODULE level debug 5333 * @WMI_DBGLOG_MOD_LOG_LEVEL: Enable MODULE level debug 5334 * @WMI_DBGLOG_TYPE: set type of the debug output 5335 * @WMI_DBGLOG_REPORT_ENABLE: Enable Disable debug 5336 * @WMI_DBGLOG_MOD_WOW_LOG_LEVEL: set the WOW MODULE debug loglevel 5337 */ 5338 typedef enum { 5339 WMI_DBGLOG_LOG_LEVEL = 0x1, 5340 WMI_DBGLOG_VAP_ENABLE, 5341 WMI_DBGLOG_VAP_DISABLE, 5342 WMI_DBGLOG_MODULE_ENABLE, 5343 WMI_DBGLOG_MODULE_DISABLE, 5344 WMI_DBGLOG_MOD_LOG_LEVEL, 5345 WMI_DBGLOG_TYPE, 5346 WMI_DBGLOG_REPORT_ENABLE, 5347 WMI_DBGLOG_MOD_WOW_LOG_LEVEL 5348 } WMI_DBG_PARAM; 5349 5350 /** 5351 * struct wmi_host_fw_ver - FW version in non-tlv target 5352 * @sw_version: Versin info 5353 * @sw_version_1: Second dword of version 5354 */ 5355 struct wmi_host_fw_ver { 5356 uint32_t sw_version; 5357 uint32_t sw_version_1; 5358 }; 5359 5360 /** 5361 * struct wmi_host_fw_abi_ver - FW version in non-tlv target 5362 * @sw_version: Versin info 5363 * @abi_version: ABI version 5364 */ 5365 struct wmi_host_fw_abi_ver { 5366 uint32_t sw_version; 5367 uint32_t abi_version; 5368 }; 5369 5370 /** 5371 * struct target_resource_config - Resource config sent from host to target 5372 * abstracted out to include union of both configs 5373 * @num_vdevs: Number vdevs configured 5374 * @num_peers: Number of peers 5375 * @num_active_peers: Number of active peers for peer cache 5376 * @num_offload_peers: Number of offload peers 5377 * @num_offload_reorder_buffs: number of offload reorder buffs 5378 * @num_peer_keys: number of peer keys 5379 * @num_tids: number of tids 5380 * @ast_skid_limit: AST skid limit 5381 * @tx_chain_mask: TX chain mask 5382 * @rx_chain_mask: RX chain mask 5383 * @rx_timeout_pri: RX reorder timeout per AC 5384 * @rx_decap_mode: RX decap mode 5385 * @scan_max_pending_req: Scan mac pending req 5386 * @bmiss_offload_max_vdev: Beacom miss offload max vdevs 5387 * @roam_offload_max_vdev: Roam offload max vdevs 5388 * @roam_offload_max_ap_profiles: roam offload max ap profiles 5389 * @num_mcast_groups: num mcast groups 5390 * @num_mcast_table_elems: number of macst table elems 5391 * @mcast2ucast_mode: mcast enhance mode 5392 * @tx_dbg_log_size: DBG log buf size 5393 * @num_wds_entries: number of WDS entries 5394 * @dma_burst_size: DMA burst size. 5395 * @mac_aggr_delim: Mac aggr delim 5396 * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host? 5397 * @vow_config: vow configuration 5398 * @gtk_offload_max_vdev: Max vdevs for GTK offload 5399 * @num_msdu_desc: Number of msdu desc 5400 * @max_frag_entries: Max frag entries 5401 * @agile_capability: Target Agile Capability 5402 * End common 5403 * @max_peer_ext_stats: Max peer EXT stats 5404 * @smart_ant_cap: Smart antenna capabilities 5405 * @BK_Minfree: BIN configuration for BK traffic 5406 * @BE_Minfree: BIN configuration for BE traffic 5407 * @VI_Minfree: BIN configuration for VI traffic 5408 * @VO_Minfree: BIN configuration for VO traffic 5409 * @rx_batchmode: RX batch mode 5410 * @tt_support: Thermal throttling support 5411 * @atf_config: ATF config 5412 * @mgmt_comp_evt_bundle_support: bundle support required for mgmt complete evt 5413 * @tx_msdu_new_partition_id_support: new partiition id support for tx msdu 5414 * @peer_unmap_conf_support: peer unmap conf support in fw 5415 * @iphdr_pad_config: ipheader pad config 5416 * @qwrap_config: Qwrap configuration 5417 * @alloc_frag_desc_for_data_pkt: Frag desc for data 5418 * Added in MCL 5419 * @num_tdls_vdevs: 5420 * @num_tdls_conn_table_entries: 5421 * @beacon_tx_offload_max_vdev: 5422 * @num_multicast_filter_entries: 5423 * @num_wow_filters: 5424 * @num_keep_alive_pattern: 5425 * @keep_alive_pattern_size: 5426 * @max_tdls_concurrent_sleep_sta: 5427 * @max_tdls_concurrent_buffer_sta: 5428 * @wmi_send_separate: 5429 * @num_ocb_vdevs: 5430 * @num_ocb_channels: 5431 * @num_ocb_schedules: 5432 * @num_packet_filters: maximum number of packet filter rules to support 5433 * @num_max_sta_vdevs: maximum number of concurrent station vdevs to support 5434 * @num_ns_ext_tuples_cfg: 5435 * @apf_instruction_size: 5436 * @max_bssid_rx_filters: 5437 * @use_pdev_id: 5438 * @max_num_dbs_scan_duty_cycle: max dbs can duty cycle value 5439 * @cce_disable: disable cce component 5440 * @peer_map_unmap_v2: enable peer map/unmap version 2 messaging 5441 * @twt_ap_pdev_count: Number of MAC on which AP TWT feature is supported 5442 * @twt_ap_sta_count: Max no of STA with which TWT sessions can be formed 5443 * by the AP 5444 * @max_bssid_indicator: max number of MBSS VAPs 5445 * @three_way_coex_config_legacy_en: enable three way coex legacy feature 5446 * @max_num_group_keys: max number of group keys supported for VLAN 5447 * @re_ul_resp: enable 11ax UL response feature (UL-OFDMA) for repeater 5448 * @ipa_disable: disable IPA feature 5449 * @ast_1_valid_mask_enable: mask to enable ast index 1 5450 * @ast_2_valid_mask_enable: mask to enable ast index 2 5451 * @ast_3_valid_mask_enable: mask to enable ast index 3 5452 * @ast_0_flow_mask_enable: mask to enable flow support for ast index 0 5453 * @ast_1_flow_mask_enable: mask to enable flow support for ast index 1 5454 * @ast_2_flow_mask_enable: mask to enable flow support for ast index 2 5455 * @ast_3_flow_mask_enable: mask to enable flow support for ast index 3 5456 * @ast_tid_high_mask_enable: enable tid valid mask for high priority flow 5457 * @ast_tid_low_mask_enable: enable tid valid mask for low priority flow 5458 * @nan_separate_iface_support: Separate iface creation for NAN 5459 * @time_sync_ftm: enable ftm based time sync 5460 * @max_rnr_neighbours: Max supported RNR neighbors in multisoc APs 5461 * @ema_max_vap_cnt: Number of maximum EMA tx-vaps at any instance of time 5462 * @ema_max_profile_period: Maximum EMA profile periodicity on any pdev 5463 * @max_ndp_sessions: Max ndp sessions support 5464 * @max_ndi: max number of ndi host supports 5465 * @carrier_vow_optmization: configure vow-optimization for carrier-usecase 5466 */ 5467 typedef struct { 5468 uint32_t num_vdevs; 5469 uint32_t num_peers; 5470 uint32_t num_active_peers; 5471 uint32_t num_offload_peers; 5472 uint32_t num_offload_reorder_buffs; 5473 uint32_t num_peer_keys; 5474 uint32_t num_tids; 5475 uint32_t ast_skid_limit; 5476 uint32_t tx_chain_mask; 5477 uint32_t rx_chain_mask; 5478 uint32_t rx_timeout_pri[4]; 5479 uint32_t rx_decap_mode; 5480 uint32_t scan_max_pending_req; 5481 uint32_t bmiss_offload_max_vdev; 5482 uint32_t roam_offload_max_vdev; 5483 uint32_t roam_offload_max_ap_profiles; 5484 uint32_t num_mcast_groups; 5485 uint32_t num_mcast_table_elems; 5486 uint32_t mcast2ucast_mode; 5487 uint32_t tx_dbg_log_size; 5488 uint32_t num_wds_entries; 5489 uint32_t dma_burst_size; 5490 uint32_t mac_aggr_delim; 5491 uint32_t rx_skip_defrag_timeout_dup_detection_check; 5492 uint32_t vow_config; 5493 uint32_t gtk_offload_max_vdev; 5494 uint32_t num_msdu_desc; /* Number of msdu desc */ 5495 uint32_t max_frag_entries; 5496 uint32_t scheduler_params; 5497 uint32_t agile_capability; 5498 /* End common */ 5499 5500 /* Added for Beeliner */ 5501 uint32_t max_peer_ext_stats; 5502 uint32_t smart_ant_cap; 5503 uint32_t BK_Minfree; 5504 uint32_t BE_Minfree; 5505 uint32_t VI_Minfree; 5506 uint32_t VO_Minfree; 5507 uint32_t rx_batchmode; 5508 uint32_t tt_support; 5509 uint32_t atf_config:1, 5510 mgmt_comp_evt_bundle_support:1, 5511 tx_msdu_new_partition_id_support:1, 5512 new_htt_msg_format:1, 5513 peer_unmap_conf_support:1, 5514 pktcapture_support:1; 5515 uint32_t iphdr_pad_config; 5516 uint32_t 5517 qwrap_config:16, 5518 alloc_frag_desc_for_data_pkt:16; 5519 5520 /* Added in MCL */ 5521 uint32_t num_tdls_vdevs; 5522 uint32_t num_tdls_conn_table_entries; 5523 uint32_t beacon_tx_offload_max_vdev; 5524 uint32_t num_multicast_filter_entries; 5525 uint32_t num_wow_filters; 5526 uint32_t num_keep_alive_pattern; 5527 uint32_t keep_alive_pattern_size; 5528 uint32_t max_tdls_concurrent_sleep_sta; 5529 uint32_t max_tdls_concurrent_buffer_sta; 5530 uint32_t wmi_send_separate; 5531 uint32_t num_ocb_vdevs; 5532 uint32_t num_ocb_channels; 5533 uint32_t num_ocb_schedules; 5534 uint32_t num_packet_filters; 5535 uint32_t num_max_sta_vdevs; 5536 uint32_t num_ns_ext_tuples_cfg; 5537 uint32_t apf_instruction_size; 5538 uint32_t max_bssid_rx_filters; 5539 uint32_t use_pdev_id; 5540 uint32_t max_num_dbs_scan_duty_cycle; 5541 bool cce_disable; 5542 bool peer_map_unmap_v2; 5543 uint32_t twt_ap_pdev_count; 5544 uint32_t twt_ap_sta_count; 5545 uint32_t max_bssid_indicator; 5546 uint32_t eapol_minrate_set:1, 5547 eapol_minrate_ac_set:2; 5548 bool tstamp64_en; 5549 bool three_way_coex_config_legacy_en; 5550 uint32_t max_num_group_keys; 5551 uint32_t re_ul_resp; 5552 bool ipa_disable; 5553 uint32_t ast_1_valid_mask_enable:1, 5554 ast_2_valid_mask_enable:1, 5555 ast_3_valid_mask_enable:1; 5556 uint32_t ast_0_flow_mask_enable:4, 5557 ast_1_flow_mask_enable:4, 5558 ast_2_flow_mask_enable:4, 5559 ast_3_flow_mask_enable:4, 5560 ast_tid_high_mask_enable:8, 5561 ast_tid_low_mask_enable:8; 5562 bool nan_separate_iface_support; 5563 bool time_sync_ftm; 5564 uint32_t max_rnr_neighbours; 5565 uint32_t ema_max_vap_cnt; 5566 uint32_t ema_max_profile_period; 5567 uint32_t max_ndp_sessions; 5568 uint32_t max_ndi; 5569 bool carrier_vow_optimization; 5570 } target_resource_config; 5571 5572 /** 5573 * struct wds_addr_event - WDS addr event structure 5574 * @event_type: event type add/delete 5575 * @peer_mac: peer mac 5576 * @dest_mac: destination mac address 5577 * @vdev_id: vdev id 5578 */ 5579 typedef struct { 5580 uint32_t event_type[4]; 5581 u_int8_t peer_mac[QDF_MAC_ADDR_SIZE]; 5582 u_int8_t dest_mac[QDF_MAC_ADDR_SIZE]; 5583 uint32_t vdev_id; 5584 } wds_addr_event_t; 5585 5586 /** 5587 * Enum replicated for host abstraction with FW 5588 */ 5589 typedef enum { 5590 /* Event respose of START CMD */ 5591 WMI_HOST_VDEV_START_RESP_EVENT = 0, 5592 /* Event respose of RESTART CMD */ 5593 WMI_HOST_VDEV_RESTART_RESP_EVENT, 5594 } WMI_HOST_START_EVENT_PARAM; 5595 5596 /** 5597 * struct wmi_host_roam_event - host roam event param 5598 * @vdev_id: vdev id 5599 * @reason: roam reason 5600 * @rssi: RSSI 5601 */ 5602 typedef struct { 5603 uint32_t vdev_id; 5604 uint32_t reason; 5605 uint32_t rssi; 5606 } wmi_host_roam_event; 5607 5608 /** 5609 * ENUM wmi_host_scan_event_type - Scan event type 5610 */ 5611 enum wmi_host_scan_event_type { 5612 WMI_HOST_SCAN_EVENT_STARTED = 0x1, 5613 WMI_HOST_SCAN_EVENT_COMPLETED = 0x2, 5614 WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4, 5615 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, 5616 WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10, 5617 WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20, 5618 WMI_HOST_SCAN_EVENT_START_FAILED = 0x40, 5619 WMI_HOST_SCAN_EVENT_RESTARTED = 0x80, 5620 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100, 5621 WMI_HOST_SCAN_EVENT_INVALID = 0x200, 5622 WMI_HOST_SCAN_EVENT_GPIO_TIMEOUT = 0x400, 5623 WMI_HOST_SCAN_EVENT_MAX = 0x8000 5624 }; 5625 5626 /** 5627 * ENUM wmi_host_scan_completion_reason - Scan completion event type 5628 */ 5629 enum wmi_host_scan_completion_reason { 5630 /** scan related events */ 5631 WMI_HOST_SCAN_REASON_NONE = 0xFF, 5632 WMI_HOST_SCAN_REASON_COMPLETED = 0, 5633 WMI_HOST_SCAN_REASON_CANCELLED = 1, 5634 WMI_HOST_SCAN_REASON_PREEMPTED = 2, 5635 WMI_HOST_SCAN_REASON_TIMEDOUT = 3, 5636 WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4, 5637 WMI_HOST_SCAN_REASON_MAX, 5638 }; 5639 5640 /** 5641 * struct wmi_host_scan_event - Scan event response from target 5642 * @event: event type 5643 * @reason: Reason for event 5644 * @channel_freq: channel frequency 5645 * @requestor: requestor id 5646 * @scan_id: scan id 5647 * @vdev_id: vdev id 5648 */ 5649 typedef struct { 5650 uint32_t event; 5651 uint32_t reason; 5652 uint32_t channel_freq; 5653 uint32_t requestor; 5654 uint32_t scan_id; 5655 uint32_t vdev_id; 5656 } wmi_host_scan_event; 5657 5658 /** 5659 * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry 5660 * @result: result 5661 */ 5662 typedef struct { 5663 uint32_t result; 5664 } wmi_host_pdev_reserve_ast_entry_event; 5665 5666 /** 5667 * struct wmi_host_mcast_ageout_entry - mcast aged-out entry 5668 * @grp_addr: IPv4/6 mcast group addr 5669 * @vdev_id: vdev id 5670 */ 5671 typedef struct { 5672 uint8_t grp_addr[16]; 5673 uint32_t vdev_id; 5674 } wmi_host_mcast_ageout_entry; 5675 5676 /** 5677 * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out 5678 * @num_entry: Number of mcast entries timed-out 5679 * @entry: List of wmi_host_mcast_ageout_entry 5680 */ 5681 typedef struct { 5682 uint32_t num_entry; 5683 wmi_host_mcast_ageout_entry entry[1]; 5684 } wmi_host_mcast_list_ageout_event; 5685 5686 /** 5687 * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data 5688 * @nfdbr: 5689 * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1, 5690 * NFCalPower_chain2, NFCalPower_chain3, 5691 * NFCalPower_chain4, NFCalPower_chain5, 5692 * NFCalPower_chain6, NFCalPower_chain7}, 5693 * @nfdbm: 5694 * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1, 5695 * NFCalPower_chain2, NFCalPower_chain3, 5696 * NFCalPower_chain4, NFCalPower_chain5, 5697 * NFCalPower_chain6, NFCalPower_chain7}, 5698 * @freqnum: 5699 * chan[0 ~ 7]: frequency number 5700 * @pdev_id: pdev_id 5701 * @num_freq: number of valid frequency in freqnum 5702 * @num_nfdbr_dbm: number of valid entries in dbr/dbm array 5703 * 5704 */ 5705 typedef struct { 5706 int8_t nfdbr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS]; 5707 int8_t nfdbm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS]; 5708 uint32_t freqnum[WMI_HOST_RXG_CAL_CHAN_MAX]; 5709 uint32_t pdev_id; 5710 uint16_t num_freq; 5711 uint16_t num_nfdbr_dbm; 5712 } wmi_host_pdev_nfcal_power_all_channels_event; 5713 5714 /** 5715 * enum wmi_host_pdev_tpc_event_offset: offsets of TPC events 5716 * @WMI_HOST_TX_POWER_MAX: offset of max tx power 5717 * @WMI_HOST_TX_POWER_MIN: offset of min tx power 5718 * @WMI_HOST_TX_POWER_LEN: size of tpc values 5719 */ 5720 enum wmi_host_pdev_tpc_event_offset { 5721 WMI_HOST_TX_POWER_MAX, 5722 WMI_HOST_TX_POWER_MIN, 5723 WMI_HOST_TX_POWER_LEN, 5724 }; 5725 5726 /** 5727 * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event 5728 * @pdev_id: pdev_id 5729 * @tpc: 5730 */ 5731 typedef struct { 5732 uint32_t pdev_id; 5733 int32_t tpc[WMI_HOST_TX_POWER_LEN]; 5734 } wmi_host_pdev_tpc_event; 5735 5736 /** 5737 * struct wmi_host_pdev_generic_buffer_event 5738 * @buf_type: Buffer type 5739 * @frag_id: Frag id 5740 * @more_frag: more frags pending 5741 * @buf_len: buffer length 5742 * @buf_info: variable length buffer 5743 */ 5744 typedef struct { 5745 uint32_t buf_type; 5746 uint32_t frag_id; 5747 uint32_t more_frag; 5748 uint32_t buf_len; 5749 uint32_t buf_info[1]; 5750 } wmi_host_pdev_generic_buffer_event; 5751 /** 5752 * Enum for host buffer event 5753 */ 5754 enum { 5755 WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE, 5756 WMI_HOST_BUFFER_TYPE_CTL_TABLE, 5757 }; 5758 5759 /** 5760 * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event 5761 * @pdev_id: pdev_id 5762 * @regDomain: 5763 * @chanFreq: 5764 * @phyMode: 5765 * @twiceAntennaReduction: 5766 * @twiceMaxRDPower: 5767 * @twiceAntennaGain: 5768 * @powerLimit: 5769 * @rateMax: 5770 * @numTxChain: 5771 * @ctl: 5772 * @flags: 5773 * @maxRegAllowedPower: 5774 * @maxRegAllowedPowerAGCDD: 5775 * @maxRegAllowedPowerAGSTBC: 5776 * @maxRegAllowedPowerAGTXBF: 5777 * @ratesArray: 5778 */ 5779 typedef struct { 5780 uint32_t pdev_id; 5781 uint32_t regDomain; 5782 uint32_t chanFreq; 5783 uint32_t phyMode; 5784 uint32_t twiceAntennaReduction; 5785 uint32_t twiceMaxRDPower; 5786 int32_t twiceAntennaGain; 5787 uint32_t powerLimit; 5788 uint32_t rateMax; 5789 uint32_t numTxChain; 5790 uint32_t ctl; 5791 uint32_t flags; 5792 int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN]; 5793 int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN]; 5794 int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN]; 5795 int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN]; 5796 uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX]; 5797 } wmi_host_pdev_tpc_config_event; 5798 /** 5799 * Enums for TPC event 5800 */ 5801 typedef enum { 5802 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, 5803 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, 5804 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, 5805 } WMI_HOST_TPC_CONFIG_EVENT_FLAG; 5806 5807 /** 5808 * Medium Utilization evaluation algorithms 5809 * These algorithms can be complementary rather than exclusive. 5810 */ 5811 typedef enum { 5812 WMI_HOST_MU_BASIC_ALGO = 0x1, 5813 WMI_HOST_MU_PER_BSSID_ALGO = 0x2, 5814 WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4, 5815 } WMI_HOST_MU_ALGO_TYPE; 5816 /* max MU alg combinations supported by target */ 5817 #define WMI_HOST_MU_MAX_ALGO_TYPE 3 5818 5819 /** 5820 * struct wmi_host_mu_db_entry 5821 * @event_type: 0=AP, 1=STA, 2=Small Cell(SC) 5822 * @bssid_mac_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC 5823 * @tx_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC 5824 * @avg_duration_us: Avg. duration for which node was transmitting 5825 * @avg_rssi: Avg. RSSI of all TX packets by node. Unit dBm 5826 * @mu_percent: % medium utilization by node 5827 */ 5828 typedef struct { 5829 uint32_t entry_type; 5830 wmi_host_mac_addr bssid_mac_addr; 5831 wmi_host_mac_addr tx_addr; 5832 uint32_t avg_duration_us; 5833 uint32_t avg_rssi; 5834 uint32_t mu_percent; 5835 } wmi_host_mu_db_entry; 5836 5837 /** 5838 * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID 5839 * @mu_request_id: request id 5840 * @status_reason: MU_STATUS_REASON 5841 * @total_mu: MU_ALG_TYPE combinations 5842 * @num_active_bssid: number of active bssid 5843 * @hidden_node_mu : hidden node algo MU per bin 5844 * @num_TA_entries : No. of entries found in MU db report 5845 */ 5846 typedef struct { 5847 uint32_t mu_request_id; 5848 uint32_t status_reason; 5849 uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE]; 5850 uint32_t num_active_bssid; 5851 uint32_t hidden_node_mu[LTEU_MAX_BINS]; 5852 uint32_t num_TA_entries; 5853 } wmi_host_mu_report_event; 5854 5855 /** 5856 * struct wmi_host_mgmt_tx_compl_event - TX completion event 5857 * @desc_id: from tx_send_cmd 5858 * @status: WMI_MGMT_TX_COMP_STATUS_TYPE 5859 * @pdev_id: pdev_id 5860 * @ppdu_id: ppdu_id 5861 * @retries_count: retries count 5862 * @tx_tsf: 64 bits completion timestamp 5863 */ 5864 typedef struct { 5865 uint32_t desc_id; 5866 uint32_t status; 5867 uint32_t pdev_id; 5868 uint32_t ppdu_id; 5869 uint32_t retries_count; 5870 uint64_t tx_tsf; 5871 } wmi_host_mgmt_tx_compl_event; 5872 5873 /** 5874 * struct wmi_host_offchan_data_tx_compl_event - TX completion event 5875 * @desc_id: from tx_send_cmd 5876 * @status: VWMI_MGMT_TX_COMP_STATUS_TYPE 5877 * @pdev_id: pdev_id 5878 */ 5879 struct wmi_host_offchan_data_tx_compl_event { 5880 uint32_t desc_id; 5881 uint32_t status; 5882 uint32_t pdev_id; 5883 }; 5884 5885 #define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17 5886 5887 /** 5888 * struct wmi_host_tim_info - TIM info in SWBA event 5889 * @tim_len: TIM length 5890 * @tim_mcast: 5891 * @tim_bitmap: TIM bitmap 5892 * @tim_changed: TIM changed 5893 * @tim_num_ps_pending: TIM num PS sta pending 5894 * @vdev_id: Vdev id 5895 */ 5896 typedef struct { 5897 uint32_t tim_len; 5898 uint32_t tim_mcast; 5899 uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE]; 5900 uint32_t tim_changed; 5901 uint32_t tim_num_ps_pending; 5902 uint32_t vdev_id; 5903 } wmi_host_tim_info; 5904 5905 /** 5906 * struct wmi_host_quiet_info - Quiet info in SWBA event 5907 * @vdev_id: vdev_id for quiet info structure 5908 * @tbttcount: quiet start tbtt count 5909 * @period: Beacon interval between quiets 5910 * @duration: TUs of each quiet 5911 * @offset: TUs from TBTT to quiet start 5912 */ 5913 typedef struct { 5914 uint32_t vdev_id; 5915 uint32_t tbttcount; 5916 uint32_t period; 5917 uint32_t duration; 5918 uint32_t offset; 5919 } wmi_host_quiet_info; 5920 5921 /** 5922 * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event 5923 * @type_count: Absence count 5924 * @duration: NoA duration 5925 * @interval: NoA interval 5926 * @start_time: start time 5927 */ 5928 typedef struct { 5929 uint32_t type_count; 5930 uint32_t duration; 5931 uint32_t interval; 5932 uint32_t start_time; 5933 } wmi_host_p2p_noa_descriptor; 5934 /* Maximum number of NOA Descriptors supported */ 5935 #define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4 5936 /** 5937 * struct wmi_host_p2p_noa_info - p2p noa information 5938 * @modified: NoA modified 5939 * @index: Index 5940 * @oppPS: Oppurtunstic ps 5941 * @ctwindow: CT window 5942 * @num_descriptors: number of descriptors 5943 * @noa_descriptors: noa descriptors 5944 * @vdev_id: Vdev id 5945 */ 5946 typedef struct { 5947 uint8_t modified; 5948 uint8_t index; 5949 uint8_t oppPS; 5950 uint8_t ctwindow; 5951 uint8_t num_descriptors; 5952 wmi_host_p2p_noa_descriptor 5953 noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS]; 5954 uint32_t vdev_id; 5955 } wmi_host_p2p_noa_info; 5956 5957 /** 5958 * struct wmi_host_peer_sta_kickout_event 5959 * @peer_macaddr: peer mac address 5960 * @reason: kickout reason 5961 * @rssi: rssi 5962 * @pdev_id: pdev_id 5963 */ 5964 typedef struct { 5965 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 5966 uint32_t reason; 5967 uint32_t rssi; 5968 } wmi_host_peer_sta_kickout_event; 5969 5970 /** 5971 * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event 5972 * @peer_macaddr: peer mac address 5973 * @peer_ps_stats: peer PS state 5974 * @pdev_id: pdev_id 5975 */ 5976 typedef struct { 5977 uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 5978 uint32_t peer_ps_state; 5979 } wmi_host_peer_sta_ps_statechange_event; 5980 5981 /* Maximum CCK, OFDM rates supported */ 5982 #define WMI_SA_MAX_CCK_OFDM_RATES 12 5983 /* Maximum MCS rates supported; 4 rates in each dword */ 5984 /* Maximum MCS ratecodes with 11ax */ 5985 #define WMI_SA_MAX_MCS_RATES 96 5986 #define WMI_SA_MAX_RATE_COUNTERS 4 5987 /* Maximum rate series used for transmission */ 5988 #define SA_MAX_RATE_SERIES 2 5989 5990 #define SA_MAX_LEGACY_RATE_DWORDS 3 5991 #define SA_MAX_HT_RATE_DWORDS 10 5992 #define SA_BYTES_IN_DWORD 4 5993 #define SA_MASK_BYTE 0xff 5994 #define SA_MASK_BYTE3 0xff0000 5995 5996 /* Support 11ax 11bit ratecode */ 5997 #define SA_MASK_RCODE 0x7ff 5998 #define SA_WORD_BITS_LEN 16 5999 #define SA_WORDS_IN_DWORD 2 6000 #define SA_MAX_LEGACY_RATE_WORDS 6 6001 #define SA_MAX_HT_RATE_WORDS 48 6002 6003 /* TODO: ratecode_160 needs to add for future chips */ 6004 /** 6005 * struct wmi_sa_rate_cap - smart antenna rat capabilities 6006 * @pdev_id: pdev_id 6007 * @ratecode_legacy: Rate code array for CCK OFDM 6008 * @ratecode_20: Rate code array for 20MHz BW 6009 * @ratecode_40: Rate code array for 40MHz BW 6010 * @ratecode_80: Rate code array for 80MHz BW 6011 * @ratecount: Max Rate count for each mode 6012 */ 6013 typedef struct { 6014 uint16_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES]; 6015 uint16_t ratecode_20[WMI_SA_MAX_MCS_RATES]; 6016 uint16_t ratecode_40[WMI_SA_MAX_MCS_RATES]; 6017 uint16_t ratecode_80[WMI_SA_MAX_MCS_RATES]; 6018 uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS]; 6019 } wmi_sa_rate_cap; 6020 6021 /** Preamble types to be used with VDEV fixed rate configuration */ 6022 typedef enum { 6023 WMI_HOST_RATE_PREAMBLE_OFDM, 6024 WMI_HOST_RATE_PREAMBLE_CCK, 6025 WMI_HOST_RATE_PREAMBLE_HT, 6026 WMI_HOST_RATE_PREAMBLE_VHT, 6027 WMI_HOST_RATE_PREAMBLE_HE, 6028 } WMI_HOST_RATE_PREAMBLE; 6029 6030 #define WMI_HOST_FIXED_RATE_NONE (0xff) 6031 6032 /** preablbe long */ 6033 #define WMI_HOST_VDEV_PREAMBLE_LONG 0x1 6034 /** preablbe short */ 6035 #define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2 6036 /** found a better AP */ 6037 #define WMI_HOST_ROAM_REASON_BETTER_AP 0x1 6038 /** beacon miss detected */ 6039 #define WMI_HOST_ROAM_REASON_BMISS 0x2 6040 /** deauth/disassoc received */ 6041 #define WMI_HOST_ROAM_REASON_DEAUTH 0x2 6042 /** connected AP's low rssi condition detected */ 6043 #define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3 6044 /** found another AP that matches SSID and Security profile in 6045 * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS 6046 */ 6047 #define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4 6048 /** LFR3.0 roaming failed, indicate the disconnection to host */ 6049 #define WMI_HOST_ROAM_REASON_HO_FAILED 0x5 6050 6051 /** values for vdev_type */ 6052 #define WMI_HOST_VDEV_TYPE_AP 0x1 6053 #define WMI_HOST_VDEV_TYPE_STA 0x2 6054 #define WMI_HOST_VDEV_TYPE_IBSS 0x3 6055 #define WMI_HOST_VDEV_TYPE_MONITOR 0x4 6056 6057 /** values for vdev_subtype */ 6058 #define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1 6059 #define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2 6060 #define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3 6061 #define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4 6062 #define WMI_HOST_VDEV_SUBTYPE_MESH 0x5 6063 6064 #define WMI_HOST_MGMT_TID 17 6065 /* Disable aging & learning */ 6066 #define WMI_HOST_WDS_FLAG_STATIC 0x1 6067 6068 /** 6069 * Peer param enum abstracted from target 6070 * @WMI_HOST_PEER_MIMO_PS_STATE: mimo powersave state 6071 * @WMI_HOST_PEER_AMPDU: enable/disable AMPDU . initial value (enabled) 6072 * @WMI_HOST_PEER_AUTHORIZE: authorize/unauthorize peer. 6073 * initial value is unauthorized (0) 6074 * @WMI_HOST_PEER_CHWIDTH: Peer channel bandwidth 6075 * @WMI_HOST_PEER_NSS: peer NSS 6076 * @WMI_HOST_PEER_USE_4ADDR: USE 4 ADDR 6077 * @WMI_HOST_PEER_EXT_STATS_ENABLE: Enable extended peer stats 6078 * @WMI_HOST_PEER_USE_FIXED_PWR: Use FIXED Pwr, 6079 * @WMI_HOST_PEER_PARAM_FIXED_RATE: Set peer fixed rate 6080 * @WMI_HOST_PEER_SET_MU_WHITELIST: Whitelist peer TIDs 6081 * @WMI_HOST_PEER_MEMBERSHIP: set group membership status 6082 * @WMI_HOST_PEER_USERPOS: User POS 6083 * @WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED: Critical Protocol Hint enabled 6084 * @WMI_HOST_PEER_TX_FAIL_CNT_THR: Tx Fail count threshold 6085 * @WMI_HOST_PEER_SET_HW_RETRY_CTS2S: Set hardware retry CTS to self 6086 * @WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH: IBSS ATIM window length 6087 * @WMI_HOST_PEER_PHYMODE: Peer Phymode 6088 * @WMI_HOST_PEER_SET_MAC_TX_RATE: Set MAC Tx rate 6089 * @WMI_HOST_PEER_SET_DEFAULT_ROUTING: Set default Rx routing 6090 * @WMI_HOST_PEER_SET_MIN_TX_RATE: Set Minimum T rate 6091 * @WMI_HOST_PEER_NSS_VHT160: peer NSS for 160Mhz 6092 * @WMI_HOST_PEER_NSS_VHT80_80: peer NSS for 80+80MHz 6093 * @WMI_HOST_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL: Set SU sounding interval 6094 * @WMI_HOST_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL: Set MU sounding interval 6095 * @WMI_HOST_PEER_PARAM_TXBF_SOUNDING_ENABLE: Enable sounding interval set 6096 * @WMI_HOST_PEER_PARAM_MU_ENABLE: Enable MU support 6097 * @WMI_HOST_PEER_PARAM_OFDMA_ENABLE: Enable OFDMA support 6098 * @WMI_HOST_PEER_PARAM_ENABLE_FT: Notify FT roam 6099 */ 6100 enum { 6101 WMI_HOST_PEER_MIMO_PS_STATE = 0x1, 6102 WMI_HOST_PEER_AMPDU, 6103 WMI_HOST_PEER_AUTHORIZE, 6104 WMI_HOST_PEER_CHWIDTH, 6105 WMI_HOST_PEER_NSS, 6106 WMI_HOST_PEER_USE_4ADDR, 6107 WMI_HOST_PEER_EXT_STATS_ENABLE, 6108 WMI_HOST_PEER_USE_FIXED_PWR, 6109 WMI_HOST_PEER_PARAM_FIXED_RATE, 6110 WMI_HOST_PEER_SET_MU_WHITELIST, 6111 WMI_HOST_PEER_MEMBERSHIP, 6112 WMI_HOST_PEER_USERPOS, 6113 WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED, 6114 WMI_HOST_PEER_TX_FAIL_CNT_THR, 6115 WMI_HOST_PEER_SET_HW_RETRY_CTS2S, 6116 WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH, 6117 WMI_HOST_PEER_PHYMODE, 6118 WMI_HOST_PEER_SET_MAC_TX_RATE, 6119 WMI_HOST_PEER_SET_DEFAULT_ROUTING, 6120 WMI_HOST_PEER_SET_MIN_TX_RATE, 6121 WMI_HOST_PEER_NSS_VHT160, 6122 WMI_HOST_PEER_NSS_VHT80_80, 6123 WMI_HOST_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL, 6124 WMI_HOST_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL, 6125 WMI_HOST_PEER_PARAM_TXBF_SOUNDING_ENABLE, 6126 WMI_HOST_PEER_PARAM_MU_ENABLE, 6127 WMI_HOST_PEER_PARAM_OFDMA_ENABLE, 6128 WMI_HOST_PEER_PARAM_ENABLE_FT, 6129 }; 6130 #define WMI_HOST_PEER_MIMO_PS_NONE 0x0 6131 #define WMI_HOST_PEER_MIMO_PS_STATIC 0x1 6132 #define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2 6133 typedef enum { 6134 HOST_PLATFORM_HIGH_PERF, 6135 HOST_PLATFORM_LOW_PERF, 6136 HOST_PLATFORM_LOW_PERF_NO_FETCH, 6137 } HOST_PLATFORM_TYPE; 6138 6139 enum wmi_host_sta_ps_mode { 6140 /** enable power save for the given STA VDEV */ 6141 WMI_HOST_STA_PS_MODE_DISABLED = 0, 6142 /** disable power save for a given STA VDEV */ 6143 WMI_HOST_STA_PS_MODE_ENABLED = 1, 6144 }; 6145 enum wmi_host_sta_powersave_param { 6146 /** 6147 * Controls how frames are retrievd from AP while STA is sleeping 6148 * 6149 * (see enum wmi_sta_ps_param_rx_wake_policy) 6150 */ 6151 WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0, 6152 6153 /** 6154 * The STA will go active after this many TX 6155 * 6156 * (see enum wmi_sta_ps_param_tx_wake_threshold) 6157 */ 6158 WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1, 6159 6160 /** 6161 * Number of PS-Poll to send before STA wakes up 6162 * 6163 * (see enum wmi_sta_ps_param_pspoll_count) 6164 * 6165 */ 6166 WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2, 6167 6168 /** 6169 * TX/RX inactivity time in msec before going to sleep. 6170 * 6171 * The power save SM will monitor tx/rx activity on the VDEV, if no 6172 * activity for the specified msec of the parameter 6173 * the Power save SM will go to sleep. 6174 */ 6175 WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3, 6176 6177 /** 6178 * Set uapsd configuration. 6179 * 6180 * (see enum wmi_sta_ps_param_uapsd) 6181 */ 6182 WMI_HOST_STA_PS_PARAM_UAPSD = 4, 6183 }; 6184 /* prefix used by scan requestor ids on the host 6185 * replicated here form wmi_unified.h*/ 6186 #define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000 6187 /* prefix used by scan request ids generated on the host */ 6188 /* host cycles through the lower 12 bits to generate ids */ 6189 #define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000 6190 6191 #define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */ 6192 #define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */ 6193 #define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */ 6194 #define WMI_HOST_RC_HT_FLAG 0x08 /* HT */ 6195 #define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */ 6196 #define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */ 6197 #define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */ 6198 #define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */ 6199 #define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */ 6200 #define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */ 6201 #define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */ 6202 6203 /** HT Capabilities*/ 6204 #define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ 6205 /* Short Guard Interval with HT20 */ 6206 #define WMI_HOST_HT_CAP_HT20_SGI 0x0002 6207 #define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */ 6208 #define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */ 6209 #define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3 6210 #define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */ 6211 #define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4 6212 #define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */ 6213 #define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */ 6214 #define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ 6215 #define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 6216 #define WMI_HOST_HT_CAP_HT40_SGI 0x0800 6217 #define WMI_HOST_HT_CAP_RX_LDPC 0x1000 6218 #define WMI_HOST_HT_CAP_TX_LDPC 0x2000 6219 #define WMI_HOST_HT_CAP_IBF_BFER 0x4000 6220 6221 /* These macros should be used when we wish to advertise STBC support for 6222 * only 1SS or 2SS or 3SS. */ 6223 #define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */ 6224 #define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */ 6225 #define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */ 6226 6227 6228 #define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \ 6229 WMI_HOST_HT_CAP_HT20_SGI | \ 6230 WMI_HOST_HT_CAP_HT40_SGI | \ 6231 WMI_HOST_HT_CAP_TX_STBC | \ 6232 WMI_HOST_HT_CAP_RX_STBC | \ 6233 WMI_HOST_HT_CAP_LDPC) 6234 6235 /* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information 6236 field. The fields not defined here are not supported, or reserved. 6237 Do not change these masks and if you have to add new one follow the 6238 bitmask as specified by 802.11ac draft. 6239 */ 6240 6241 #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003 6242 #define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010 6243 #define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020 6244 #define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040 6245 #define WMI_HOST_VHT_CAP_TX_STBC 0x00000080 6246 #define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300 6247 #define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8 6248 #define WMI_HOST_VHT_CAP_SU_BFER 0x00000800 6249 #define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000 6250 #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000 6251 #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13 6252 #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000 6253 #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16 6254 #define WMI_HOST_VHT_CAP_MU_BFER 0x00080000 6255 #define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000 6256 #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000 6257 #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23 6258 #define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000 6259 #define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000 6260 6261 #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002 6262 6263 /* These macros should be used when we wish to advertise STBC support for 6264 * only 1SS or 2SS or 3SS. */ 6265 #define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100 6266 #define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200 6267 #define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300 6268 6269 #define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \ 6270 WMI_HOST_VHT_CAP_SGI_80MHZ | \ 6271 WMI_HOST_VHT_CAP_TX_STBC | \ 6272 WMI_HOST_VHT_CAP_RX_STBC_MASK | \ 6273 WMI_HOST_VHT_CAP_RX_LDPC | \ 6274 WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \ 6275 WMI_HOST_VHT_CAP_RX_FIXED_ANT | \ 6276 WMI_HOST_VHT_CAP_TX_FIXED_ANT) 6277 6278 /* Interested readers refer to Rx/Tx MCS Map definition as defined in 6279 802.11ac 6280 */ 6281 #define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1)) 6282 #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 6283 #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 6284 6285 /** U-APSD configuration of peer station from (re)assoc request and TSPECs */ 6286 enum wmi_host_ap_ps_param_uapsd { 6287 WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), 6288 WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), 6289 WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), 6290 WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), 6291 WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), 6292 WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), 6293 WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), 6294 WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), 6295 }; 6296 /** U-APSD maximum service period of peer station */ 6297 enum wmi_host_ap_ps_peer_param_max_sp { 6298 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, 6299 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1, 6300 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2, 6301 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3, 6302 6303 /* keep last! */ 6304 MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP, 6305 }; 6306 6307 #define WMI_HOST_UAPSD_AC_TYPE_DELI 0 6308 #define WMI_HOST_UAPSD_AC_TYPE_TRIG 1 6309 6310 #define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \ 6311 ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\ 6312 (1<<((ac<<1)+1))) 6313 6314 enum wmi_host_ap_ps_peer_param_wnm_sleep { 6315 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE, 6316 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE, 6317 }; 6318 6319 enum wmi_host_ap_ps_peer_param { 6320 /** Set uapsd configuration for a given peer. 6321 * 6322 * This will include the delivery and trigger enabled state for every AC. 6323 * The host MLME needs to set this based on AP capability and stations 6324 * request Set in the association request received from the station. 6325 * 6326 * Lower 8 bits of the value specify the UAPSD configuration. 6327 * 6328 * (see enum wmi_ap_ps_param_uapsd) 6329 * The default value is 0. 6330 */ 6331 WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0, 6332 6333 /** 6334 * Set the service period for a UAPSD capable station 6335 * 6336 * The service period from wme ie in the (re)assoc request frame. 6337 * 6338 * (see enum wmi_ap_ps_peer_param_max_sp) 6339 */ 6340 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1, 6341 6342 /** Time in seconds for aging out buffered frames 6343 * for STA in power save */ 6344 WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, 6345 6346 /** Specify frame types that are considered SIFS 6347 * RESP trigger frame */ 6348 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3, 6349 6350 /** Specifies the trigger state of TID. 6351 * Valid only for UAPSD frame type */ 6352 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4, 6353 6354 /** Specifies the WNM sleep state of a STA */ 6355 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5, 6356 }; 6357 #define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */ 6358 #define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ 6359 #define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */ 6360 #define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */ 6361 6362 enum wmi_host_sta_ps_param_rx_wake_policy { 6363 /* Wake up when ever there is an RX activity on the VDEV. In this mode 6364 * the Power save SM(state machine) will come out of sleep by either 6365 * sending null frame (or) a data frame (with PS==0) in response to TIM 6366 * bit set in the received beacon frame from AP. 6367 */ 6368 WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0, 6369 6370 /* Here the power save state machine will not wakeup in response to TIM 6371 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD 6372 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all 6373 * access categories are delivery-enabled, the station will send a UAPSD 6374 * trigger frame, otherwise it will send a PS-Poll. 6375 */ 6376 WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1, 6377 }; 6378 enum wmi_host_sta_ps_param_pspoll_count { 6379 WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0, 6380 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW 6381 * will send before waking up. 6382 */ 6383 }; 6384 /** Number of tx frames/beacon that cause the power save SM to wake up. 6385 * 6386 * Value 1 causes the SM to wake up for every TX. Value 0 has a special 6387 * meaning, It will cause the SM to never wake up. This is useful if you want 6388 * to keep the system to sleep all the time for some kind of test mode . host 6389 * can change this parameter any time. It will affect at the next tx frame. 6390 */ 6391 enum wmi_host_sta_ps_param_tx_wake_threshold { 6392 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0, 6393 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1, 6394 6395 /* Values greater than one indicate that many TX attempts per beacon 6396 * interval before the STA will wake up 6397 */ 6398 }; 6399 /* 6400 * Transmit power scale factor. 6401 * 6402 */ 6403 typedef enum { 6404 WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */ 6405 WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */ 6406 WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */ 6407 WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */ 6408 WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */ 6409 WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */ 6410 } WMI_HOST_TP_SCALE; 6411 enum { 6412 WMI_HOST_RATEPWR_TABLE_OPS_SET, 6413 WMI_HOST_RATEPWR_TABLE_OPS_GET, 6414 }; 6415 /* reserved up through 0xF */ 6416 /** 6417 * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host 6418 * Below statistics are sent from target to host periodically. 6419 * These are collected at target as long as target is running 6420 * and target chip is not in sleep. 6421 * @listen_time: 6422 * @reg_tx_frame_cnt: 6423 * @reg_rx_frame_cnt: 6424 * @reg_rxclr_cnt: 6425 * @reg_cycle_cnt: delta cycle count 6426 * @reg_rxclr_ext_cnt: 6427 * @reg_ofdm_phyerr_cnt: 6428 * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register 6429 */ 6430 typedef struct _hp_dcs_mib_stats { 6431 int32_t listen_time; 6432 uint32_t reg_tx_frame_cnt; 6433 uint32_t reg_rx_frame_cnt; 6434 uint32_t reg_rxclr_cnt; 6435 uint32_t reg_cycle_cnt; 6436 uint32_t reg_rxclr_ext_cnt; 6437 uint32_t reg_ofdm_phyerr_cnt; 6438 uint32_t reg_cck_phyerr_cnt; 6439 } wmi_host_dcs_mib_stats_t; 6440 6441 /** 6442 * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats 6443 * @reg_tsf32: current running TSF from the TSF-1 6444 * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if 6445 * and at different ranges, this would not gaurantee that 6446 * this is the least rssi. 6447 * @tx_waste_time: Sum of all the failed durations in the last 6448 * one second interval. 6449 * @rx_time: count how many times the hal_rxerr_phy is marked, in this 6450 * time period 6451 * @phyerr_cnt: 6452 * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained 6453 * in mib structure 6454 * @chan_nf: Channel noise floor (Units are in dBm) 6455 * @my_bss_rx_cycle_count: BSS rx cycle count 6456 * @reg_rxclr_ext40_cnt: extension channel 40Mhz rxclear count 6457 * @reg_rxclr_ext80_cnt: extension channel 80Mhz rxclear count 6458 */ 6459 typedef struct _wmi_host_dcs_im_tgt_stats { 6460 uint32_t reg_tsf32; 6461 uint32_t last_ack_rssi; 6462 uint32_t tx_waste_time; 6463 uint32_t rx_time; 6464 uint32_t phyerr_cnt; 6465 wmi_host_dcs_mib_stats_t mib_stats; 6466 uint32_t chan_nf; 6467 uint32_t my_bss_rx_cycle_count; 6468 /* these fields are added here for backward compatibility instead of 6469 * wmi_host_dcs_mib_stats_t 6470 */ 6471 uint32_t reg_rxclr_ext40_cnt; 6472 uint32_t reg_rxclr_ext80_cnt; 6473 } wmi_host_dcs_im_tgt_stats_t; 6474 6475 #ifndef BIT 6476 #define BIT(n) (1 << (n)) 6477 #endif 6478 6479 /** 6480 * Enum for pktlog req 6481 */ 6482 enum { 6483 WMI_HOST_PKTLOG_EVENT_RX_BIT, 6484 WMI_HOST_PKTLOG_EVENT_TX_BIT, 6485 WMI_HOST_PKTLOG_EVENT_RCF_BIT, 6486 WMI_HOST_PKTLOG_EVENT_RCU_BIT, 6487 WMI_HOST_PKTLOG_EVENT_DBG_PRINT_BIT, 6488 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA_BIT, 6489 WMI_HOST_PKTLOG_EVENT_H_INFO_BIT, 6490 WMI_HOST_PKTLOG_EVENT_STEERING_BIT, 6491 WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT, 6492 WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT, 6493 }; 6494 6495 typedef enum { 6496 WMI_HOST_PKTLOG_EVENT_RX = BIT(WMI_HOST_PKTLOG_EVENT_RX_BIT), 6497 WMI_HOST_PKTLOG_EVENT_TX = BIT(WMI_HOST_PKTLOG_EVENT_TX_BIT), 6498 WMI_HOST_PKTLOG_EVENT_RCF = 6499 BIT(WMI_HOST_PKTLOG_EVENT_RCF_BIT), /* Rate Control Find */ 6500 WMI_HOST_PKTLOG_EVENT_RCU = 6501 BIT(WMI_HOST_PKTLOG_EVENT_RCU_BIT), /* Rate Control Update */ 6502 WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 6503 BIT(WMI_HOST_PKTLOG_EVENT_DBG_PRINT_BIT), /* DEBUG prints */ 6504 /* To support Smart Antenna */ 6505 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 6506 BIT(WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA_BIT), 6507 WMI_HOST_PKTLOG_EVENT_H_INFO = 6508 BIT(WMI_HOST_PKTLOG_EVENT_H_INFO_BIT), 6509 WMI_HOST_PKTLOG_EVENT_STEERING = 6510 BIT(WMI_HOST_PKTLOG_EVENT_STEERING_BIT), 6511 /* To support Tx data Capture */ 6512 WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE = 6513 BIT(WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT), 6514 /* To support PHY logging */ 6515 WMI_HOST_PKTLOG_EVENT_PHY_LOGGING = 6516 BIT(WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT), 6517 } WMI_HOST_PKTLOG_EVENT; 6518 6519 /** 6520 * wmi_host_phyerr 6521 * 6522 */ 6523 #define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26 6524 #define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24 6525 6526 #define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4 6527 #define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000 6528 6529 /** 6530 * struct wmi_host_perchain_rssi_info - per chain RSSI info 6531 * @rssi_pri20: RSSI on primary 20 6532 * @rssi_sec20: RSSI on secomdary 20 6533 * @rssi_sec40: RSSI secondary 40 6534 * @rssi_sec80: RSSI secondary 80 6535 */ 6536 typedef struct wmi_host_perchain_rssi_info { 6537 int8_t rssi_pri20; 6538 int8_t rssi_sec20; 6539 int8_t rssi_sec40; 6540 int8_t rssi_sec80; 6541 } wmi_host_perchain_rssi_info_t; 6542 6543 /** 6544 * struct _wmi_host_rf_info - RF measurement information 6545 * @rssi_comb: RSSI Information 6546 * @pc_rssi_info[4]: For now, we know we are getting information 6547 * for only 4 chains at max. For future extensions 6548 * use a define 6549 * @noise_floor: Noise floor information 6550 */ 6551 typedef struct _wmi_host_rf_info { 6552 int8_t rssi_comb; 6553 wmi_host_perchain_rssi_info_t pc_rssi_info[4]; 6554 int16_t noise_floor[4]; 6555 } wmi_host_rf_info_t; 6556 6557 /** 6558 * struct _wmi_host_chan_info 6559 * @center_freq1: center frequency 1 in MHz 6560 * @center_freq2: center frequency 2 in MHz -valid only for 6561 * 11ACVHT 80PLUS80 mode 6562 * @chan_width: channel width in MHz 6563 */ 6564 typedef struct _wmi_host_chan_info { 6565 u_int16_t center_freq1; 6566 u_int16_t center_freq2; 6567 u_int8_t chan_width; 6568 } wmi_host_chan_info_t; 6569 6570 /** 6571 * struct wmi_host_phyerr 6572 * @rf_info: 6573 * @chan_info: 6574 * @tsf64: 6575 * @phy_err_code: 6576 * @tsf_timestamp: 6577 * @bufp: 6578 * @buf_len: 6579 * @phy_err_mask0: 6580 * @phy_err_mask1: 6581 * @pdev_id: pdev_id 6582 */ 6583 typedef struct _wmi_host_phyerr { 6584 wmi_host_rf_info_t rf_info; 6585 wmi_host_chan_info_t chan_info; 6586 uint64_t tsf64; 6587 int32_t phy_err_code; 6588 uint32_t tsf_timestamp; 6589 uint8_t *bufp; 6590 uint32_t buf_len; 6591 uint32_t phy_err_mask0; 6592 uint32_t phy_err_mask1; 6593 uint32_t pdev_id; 6594 } wmi_host_phyerr_t; 6595 6596 /** 6597 * struct wmi_host_rtt_event_hdr 6598 * @req_id: request id 6599 * @status: status 6600 * @meas_done: measurement done flag 6601 * @meas_type: measurement type 6602 * @report_type: report type 6603 * @v3_status: v2 status 6604 * @v3_finish: 6605 * @v3_tm_start: 6606 * @num_ap: number of AP 6607 * @result: resuult 6608 * @dest_mac: destination mac 6609 */ 6610 typedef struct { 6611 uint16_t req_id; 6612 uint16_t status:1, 6613 meas_done:1, 6614 meas_type:3, 6615 report_type:3, 6616 v3_status:2, 6617 v3_finish:1, 6618 v3_tm_start:1, 6619 num_ap:4; 6620 uint16_t result; 6621 uint8_t dest_mac[QDF_MAC_ADDR_SIZE]; 6622 } wmi_host_rtt_event_hdr; 6623 6624 /** 6625 * struct wmi_host_rtt_meas_event - RTT measurement event 6626 * @chain_mask: 6627 * @bw: 6628 * @rsvd: 6629 * @txrxchain_mask: Bit:0-3:chain mask 6630 * Bit 4-5: band width info 6631 * 00 --Legacy 20, 01 --HT/VHT20 6632 * 10 --HT/VHT40, 11 -- VHT80 6633 * @tod: resolution of 0.1ns 6634 * @toa: resolution of 0.1ns 6635 * @t3: 6636 * @t4: 6637 * @rssi0: 6638 * @rssi1: 6639 * @rssi2: 6640 * @rssi3: 6641 */ 6642 typedef struct { 6643 uint32_t chain_mask:3, 6644 bw:2, 6645 rsvd:27; 6646 uint32_t txrxchain_mask; 6647 uint64_t tod; 6648 uint64_t toa; 6649 uint64_t t3; 6650 uint64_t t4; 6651 uint32_t rssi0; 6652 uint32_t rssi1; 6653 uint32_t rssi2; 6654 uint32_t rssi3; 6655 } wmi_host_rtt_meas_event; 6656 6657 /*----RTT Report event definition ----*/ 6658 typedef enum { 6659 /* rtt cmd header parsing error --terminate */ 6660 WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0, 6661 /* rtt body parsing error -- skip current STA REQ */ 6662 WMI_HOST_RTT_COMMAND_ERROR, 6663 /* rtt no resource -- terminate */ 6664 WMI_HOST_RTT_MODULE_BUSY, 6665 /* STA exceed the support limit -- only server the first n STA */ 6666 WMI_HOST_RTT_TOO_MANY_STA, 6667 /* any allocate failure */ 6668 WMI_HOST_RTT_NO_RESOURCE, 6669 /* can not find vdev with vdev ID - skip current STA REQ */ 6670 WMI_HOST_RTT_VDEV_ERROR, 6671 /* Tx failure -- continiue and measure number */ 6672 WMI_HOST_RTT_TRANSIMISSION_ERROR, 6673 /* wait for first TM timer expire-terminate current STA measurement */ 6674 WMI_HOST_RTT_TM_TIMER_EXPIRE, 6675 /* we do not support RTT measurement with this type of frame */ 6676 WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT, 6677 /* whole RTT measurement timer expire-terminate 6678 ** current STA measurement */ 6679 WMI_HOST_RTT_TIMER_EXPIRE, 6680 /* channel swicth failed */ 6681 WMI_HOST_RTT_CHAN_SWITCH_ERROR, 6682 /* TMR trans error, this dest peer will be skipped */ 6683 WMI_HOST_RTT_TMR_TRANS_ERROR, 6684 /* V3 only. If both CFR and Token mismatch, do not report */ 6685 WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN, 6686 /* For First TM, if CFR is bad, then do not report */ 6687 WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR, 6688 /* do not allow report type2 mix with type 0, 1 */ 6689 WMI_HOST_RTT_REPORT_TYPE2_MIX, 6690 /* LCI Configuration OK. - Responder only */ 6691 WMI_HOST_RTT_LCI_CFG_OK, 6692 /* LCR configuration OK. - Responder only */ 6693 WMI_HOST_RTT_LCR_CFG_OK, 6694 /* Bad configuration LCI (or) LCR request - Responder only */ 6695 WMI_HOST_RTT_CFG_ERROR, 6696 WMI_HOST_WMI_RTT_REJECT_MAX, 6697 } WMI_HOST_RTT_ERROR_INDICATOR; 6698 typedef struct { 6699 wmi_host_rtt_event_hdr hdr; 6700 WMI_HOST_RTT_ERROR_INDICATOR reject_reason; 6701 } wmi_host_rtt_error_report_event; 6702 6703 #if defined(AR9888) 6704 typedef enum { 6705 WMI_HOST_PROF_CPU_IDLE, 6706 WMI_HOST_PROF_PPDU_PROC, 6707 WMI_HOST_PROF_PPDU_POST, 6708 WMI_HOST_PROF_HTT_TX_INPUT, 6709 WMI_HOST_PROF_MSDU_ENQ, 6710 WMI_HOST_PROF_PPDU_POST_HAL, 6711 WMI_HOST_PROF_COMPUTE_TX_TIME, 6712 6713 /* Add new ID's above this. */ 6714 WMI_HOST_PROF_MAX_ID, 6715 } wmi_host_profile_id_t; 6716 #endif 6717 6718 #define WMI_HOST_WLAN_PROFILE_MAX_HIST 3 6719 #define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32 6720 6721 #if defined(AR9888) 6722 #define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID 6723 #else 6724 #define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 6725 #endif 6726 6727 /** 6728 * struct wmi_host_wlan_profile - Host profile param 6729 * @id: profile id 6730 * @cnt: Count 6731 * @tot: 6732 * @min: minimum 6733 * @max: Mac 6734 * @hist_intvl: history interval 6735 * @hist: profile data history 6736 */ 6737 typedef struct { 6738 uint32_t id; 6739 uint32_t cnt; 6740 uint32_t tot; 6741 uint32_t min; 6742 uint32_t max; 6743 uint32_t hist_intvl; 6744 uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST]; 6745 } wmi_host_wlan_profile_t; 6746 6747 /** 6748 * struct wmi_host_wlan_profile_ctx_t - profile context 6749 * @tot: time in us 6750 * @tx_msdu_cnt: MSDU TX count 6751 * @tx_mpdu_cnt: MPDU tx count 6752 * @tx_ppdu_cnt: PPDU tx count 6753 * @rx_msdu_cnt: MSDU RX count 6754 * @rx_mpdu_cnt: MPDU RXcount 6755 * @bin_count: Bin count 6756 */ 6757 typedef struct { 6758 uint32_t tot; 6759 uint32_t tx_msdu_cnt; 6760 uint32_t tx_mpdu_cnt; 6761 uint32_t tx_ppdu_cnt; 6762 uint32_t rx_msdu_cnt; 6763 uint32_t rx_mpdu_cnt; 6764 uint32_t bin_count; 6765 } wmi_host_wlan_profile_ctx_t; 6766 6767 /** 6768 * struct wmi_host_chan_info_event - Channel info WMI event 6769 * @pdev_id: pdev_id 6770 * @err_code: Error code 6771 * @freq: Channel freq 6772 * @cmd_flags: Read flags 6773 * @noise_floor: Noise Floor value 6774 * @rx_clear_count: rx clear count 6775 * @cycle_count: cycle count 6776 * @chan_tx_pwr_range: channel tx power per range 6777 * @chan_tx_pwr_tp: channel tx power per throughput 6778 * @rx_frame_count: rx frame count 6779 * @rx_11b_mode_data_duration: 11b mode data duration 6780 * @my_bss_rx_cycle_count: self BSS rx cycle count 6781 * @tx_frame_cnt: tx frame count 6782 * @mac_clk_mhz: mac clock 6783 * @vdev_id: unique id identifying the VDEV 6784 * @tx_frame_count: tx frame count 6785 * @rx_clear_ext20_count: ext20 frame count 6786 * @rx_clear_ext40_count: ext40 frame count 6787 * @rx_clear_ext80_count: ext80 frame count 6788 * @per_chain_noise_floor: Per chain NF value in dBm 6789 */ 6790 typedef struct { 6791 uint32_t pdev_id; 6792 uint32_t err_code; 6793 uint32_t freq; 6794 uint32_t cmd_flags; 6795 uint32_t noise_floor; 6796 uint32_t rx_clear_count; 6797 uint32_t cycle_count; 6798 uint32_t chan_tx_pwr_range; 6799 uint32_t chan_tx_pwr_tp; 6800 uint32_t rx_frame_count; 6801 uint32_t rx_11b_mode_data_duration; 6802 uint32_t my_bss_rx_cycle_count; 6803 uint32_t tx_frame_cnt; 6804 uint32_t mac_clk_mhz; 6805 uint32_t vdev_id; 6806 uint32_t tx_frame_count; 6807 uint32_t rx_clear_ext20_count; 6808 uint32_t rx_clear_ext40_count; 6809 uint32_t rx_clear_ext80_count; 6810 uint32_t per_chain_noise_floor[WMI_HOST_MAX_CHAINS]; 6811 } wmi_host_chan_info_event; 6812 6813 /** 6814 * struct wmi_host_pdev_channel_hopping_event 6815 * @pdev_id: pdev_id 6816 * @noise_floor_report_iter: Noise threshold iterations with high values 6817 * @noise_floor_total_iter: Total noise threshold iterations 6818 */ 6819 typedef struct { 6820 uint32_t pdev_id; 6821 uint32_t noise_floor_report_iter; 6822 uint32_t noise_floor_total_iter; 6823 } wmi_host_pdev_channel_hopping_event; 6824 6825 /** 6826 * struct wmi_host_pdev_bss_chan_info_event 6827 * @pdev_id: pdev_id 6828 * @freq: Units in MHz 6829 * @noise_floor: units are dBm 6830 * @rx_clear_count_low: 6831 * @rx_clear_count_high: 6832 * @cycle_count_low: 6833 * @cycle_count_high: 6834 * @tx_cycle_count_low: 6835 * @tx_cycle_count_high: 6836 * @rx_cycle_count_low: 6837 * @rx_cycle_count_high: 6838 * @rx_bss_cycle_count_low: 6839 * @rx_bss_cycle_count_high: 6840 * @reserved: 6841 */ 6842 typedef struct { 6843 uint32_t pdev_id; 6844 uint32_t freq; 6845 uint32_t noise_floor; 6846 uint32_t rx_clear_count_low; 6847 uint32_t rx_clear_count_high; 6848 uint32_t cycle_count_low; 6849 uint32_t cycle_count_high; 6850 uint32_t tx_cycle_count_low; 6851 uint32_t tx_cycle_count_high; 6852 uint32_t rx_cycle_count_low; 6853 uint32_t rx_cycle_count_high; 6854 uint32_t rx_bss_cycle_count_low; 6855 uint32_t rx_bss_cycle_count_high; 6856 uint32_t reserved; 6857 } wmi_host_pdev_bss_chan_info_event; 6858 6859 /** 6860 * struct wmi_host_pdev_ctl_failsafe_event 6861 * @ctl_failsafe_status: Indicate if Failsafe value is imposed on CTL 6862 */ 6863 struct wmi_host_pdev_ctl_failsafe_event { 6864 uint32_t ctl_failsafe_status; 6865 }; 6866 6867 #define WMI_HOST_INST_STATS_INVALID_RSSI 0 6868 /** 6869 * struct wmi_host_inst_stats_resp 6870 * @iRSSI: Instantaneous RSSI 6871 * @peer_macaddr: peer mac address 6872 * @pdev_id: pdev_id 6873 */ 6874 typedef struct { 6875 uint32_t iRSSI; 6876 wmi_host_mac_addr peer_macaddr; 6877 uint32_t pdev_id; 6878 } wmi_host_inst_stats_resp; 6879 6880 /* Event definition and new structure addition to send event 6881 * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id 6882 */ 6883 #define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff 6884 #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1 6885 #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2 6886 /** 6887 * struct wmi_host_tx_data_traffic_ctrl_event 6888 * @peer_ast_idx: For vdev based control, peer_ast_idx will be 6889 * WMI_INVALID_PEER_AST_INDEX 6890 * @vdev_id: only applies if peer_ast_idx == INVALID 6891 * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or 6892 * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK 6893 * @wmm_ac: Indicates AC to be blocked or unblocked 6894 * Bits 4-31 : Reserved (Shall be zero) 6895 * Bits 0-3 : WMM AC NO [ BE (1), BK (2), VI (3), VO (4)] 6896 * Started numbering from 1 to preserve backward compatibility 6897 */ 6898 typedef struct { 6899 uint32_t peer_ast_idx; 6900 uint32_t vdev_id; 6901 uint32_t ctrl_cmd; 6902 uint32_t wmm_ac; 6903 } wmi_host_tx_data_traffic_ctrl_event; 6904 6905 /** 6906 * struct wmi_host_ath_dcs_cw_int 6907 * @channel: either number or freq in mhz 6908 */ 6909 typedef struct { 6910 uint32_t channel; 6911 } wmi_host_ath_dcs_cw_int; 6912 6913 #define WMI_MAX_POWER_DBG_ARGS 8 6914 6915 /** 6916 * struct wmi_power_dbg_params - power debug command parameter 6917 * @pdev_id: subsystem identifier 6918 * @module_id: parameter id 6919 * @num_arg: no of arguments 6920 * @args: arguments 6921 */ 6922 struct wmi_power_dbg_params { 6923 uint32_t pdev_id; 6924 uint32_t module_id; 6925 uint32_t num_args; 6926 uint32_t args[WMI_MAX_POWER_DBG_ARGS]; 6927 }; 6928 6929 /** 6930 * struct wmi_fw_dump_seg_req - individual segment details 6931 * @seg_id - segment id. 6932 * @seg_start_addr_lo - lower address of the segment. 6933 * @seg_start_addr_hi - higher address of the segment. 6934 * @seg_length - length of the segment. 6935 * @dst_addr_lo - lower address of the destination buffer. 6936 * @dst_addr_hi - higher address of the destination buffer. 6937 * 6938 * This structure carries the information to firmware about the 6939 * individual segments. This structure is part of firmware memory 6940 * dump request. 6941 */ 6942 struct wmi_fw_dump_seg_req { 6943 uint8_t seg_id; 6944 uint32_t seg_start_addr_lo; 6945 uint32_t seg_start_addr_hi; 6946 uint32_t seg_length; 6947 uint32_t dst_addr_lo; 6948 uint32_t dst_addr_hi; 6949 }; 6950 6951 /** 6952 * enum wmi_userspace_log_level - Log level at userspace 6953 * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection 6954 * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log 6955 * level with minimal user impact. This is the default value. 6956 * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily 6957 * trying to reproduce a problem, wifi performances and power can be impacted 6958 * but device should not otherwise be significantly impacted 6959 * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to 6960 * actively debug a problem 6961 * 6962 * Various log levels defined in the userspace for logging applications 6963 */ 6964 enum wmi_userspace_log_level { 6965 WMI_LOG_LEVEL_NO_COLLECTION, 6966 WMI_LOG_LEVEL_NORMAL_COLLECT, 6967 WMI_LOG_LEVEL_ISSUE_REPRO, 6968 WMI_LOG_LEVEL_ACTIVE, 6969 }; 6970 6971 /** 6972 * HW mode config type replicated from FW header 6973 * @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active. 6974 * @WMI_HOST_HW_MODE_DBS: Both PHYs are active in different bands, 6975 * one in 2G and another in 5G. 6976 * @WMI_HOST_HW_MODE_SBS_PASSIVE: Both PHYs are in passive mode (only rx) in 6977 * same band; no tx allowed. 6978 * @WMI_HOST_HW_MODE_SBS: Both PHYs are active in the same band. 6979 * Support for both PHYs within one band is planned 6980 * for 5G only(as indicated in WMI_MAC_PHY_CAPABILITIES), 6981 * but could be extended to other bands in the future. 6982 * The separation of the band between the two PHYs needs 6983 * to be communicated separately. 6984 * @WMI_HOST_HW_MODE_DBS_SBS: 3 PHYs, with 2 on the same band doing SBS 6985 * as in WMI_HW_MODE_SBS, and 3rd on the other band 6986 * @WMI_HOST_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and 6987 * 5G. It can support SBS (5G + 5G) OR DBS (5G + 2G). 6988 * @WMI_HOST_HW_MODE_FW_INTERNAL: FW specific internal mode 6989 * @WMI_HOST_HW_MODE_2G_PHYB: Only one phy is active. 2G mode on PhyB. 6990 * @WMI_HOST_HW_MODE_MAX: Max hw_mode_id. Used to indicate invalid mode. 6991 * @WMI_HOST_HW_MODE_DETECT: Mode id used by host to choose mode from target 6992 * supported modes. 6993 */ 6994 enum wmi_host_hw_mode_config_type { 6995 WMI_HOST_HW_MODE_SINGLE = 0, 6996 WMI_HOST_HW_MODE_DBS = 1, 6997 WMI_HOST_HW_MODE_SBS_PASSIVE = 2, 6998 WMI_HOST_HW_MODE_SBS = 3, 6999 WMI_HOST_HW_MODE_DBS_SBS = 4, 7000 WMI_HOST_HW_MODE_DBS_OR_SBS = 5, 7001 WMI_HOST_HW_MODE_FW_INTERNAL = 6, 7002 WMI_HOST_HW_MODE_2G_PHYB = 7, 7003 WMI_HOST_HW_MODE_MAX, 7004 WMI_HOST_HW_MODE_DETECT, 7005 }; 7006 7007 /** 7008 * enum wmi_host_dynamic_hw_mode_config_type - Host defined enum for 7009 * dynamic mode switch 7010 * @WMI_HOST_DYNAMIC_HW_MODE_DISABLED: hw mode switch is disabled 7011 * @WMI_HOST_DYNAMIC_HW_MODE_SLOW: hw mode switch with interface down/up 7012 * @WMI_HOST_DYNAMIC_HW_MODE_FAST: hw mode switch without interface down/up 7013 * @WMI_HOST_DYNAMIC_HW_MODE_MAX: Max value to indicate invalid mode 7014 */ 7015 enum wmi_host_dynamic_hw_mode_config_type { 7016 WMI_HOST_DYNAMIC_HW_MODE_DISABLED = 0, 7017 WMI_HOST_DYNAMIC_HW_MODE_SLOW = 1, 7018 WMI_HOST_DYNAMIC_HW_MODE_FAST = 2, 7019 WMI_HOST_DYNAMIC_HW_MODE_MAX, 7020 }; 7021 7022 /* 7023 * struct wmi_host_peer_txmu_cnt_event 7024 * @tx_mu_transmitted - MU-MIMO tx count 7025 */ 7026 typedef struct { 7027 uint32_t tx_mu_transmitted; 7028 } wmi_host_peer_txmu_cnt_event; 7029 7030 /** 7031 * struct esp_estimation_event - esp airtime estimation event 7032 * @ac_airtime_percentage: Estimated Airtime 7033 * @pdev_id: PDEV_ID of Data 7034 */ 7035 struct esp_estimation_event { 7036 uint32_t ac_airtime_percentage; 7037 uint32_t pdev_id; 7038 }; 7039 7040 /* 7041 * struct wmi_peer_gid_userpos_list_event 7042 * @usr_list - User list 7043 */ 7044 #define GID_OVERLOAD_GROUP_COUNT 15 7045 typedef struct { 7046 uint32_t usr_list[GID_OVERLOAD_GROUP_COUNT]; 7047 } wmi_host_peer_gid_userpos_list_event; 7048 7049 /** 7050 * enum rcpi_measurement_type - for identifying type of rcpi measurement 7051 * @RCPI_MEASUREMENT_TYPE_AVG_MGMT: avg rcpi of mgmt frames 7052 * @RCPI_MEASUREMENT_TYPE_AVG_DATA: avg rcpi of data frames 7053 * @RCPI_MEASUREMENT_TYPE_LAST_MGMT: rcpi of last mgmt frame 7054 * @RCPI_MEASUREMENT_TYPE_LAST_DATA: rcpi of last data frame 7055 * @RCPI_MEASUREMENT_TYPE_INVALID: invalid rcpi measurement type 7056 */ 7057 enum rcpi_measurement_type { 7058 RCPI_MEASUREMENT_TYPE_AVG_MGMT = 0x1, 7059 RCPI_MEASUREMENT_TYPE_AVG_DATA = 0x2, 7060 RCPI_MEASUREMENT_TYPE_LAST_MGMT = 0x3, 7061 RCPI_MEASUREMENT_TYPE_LAST_DATA = 0x4, 7062 RCPI_MEASUREMENT_TYPE_INVALID = 0x5, 7063 }; 7064 7065 /** 7066 * struct rcpi_req - RCPI req parameter 7067 * @vdev_id: virtual device id 7068 * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type 7069 * @mac_addr: peer mac addr for which measurement is required 7070 */ 7071 struct rcpi_req { 7072 uint32_t vdev_id; 7073 enum rcpi_measurement_type measurement_type; 7074 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 7075 }; 7076 7077 /** 7078 * struct rcpi_res - RCPI response parameter 7079 * @vdev_id: virtual device id 7080 * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type 7081 * @mac_addr: peer mac addr for which measurement is required 7082 * @rcpi_value: value of RCPI computed by firmware 7083 */ 7084 struct rcpi_res { 7085 uint32_t vdev_id; 7086 enum rcpi_measurement_type measurement_type; 7087 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 7088 int32_t rcpi_value; 7089 }; 7090 7091 #define WMI_HOST_BOARD_MCN_STRING_MAX_SIZE 19 7092 #define WMI_HOST_BOARD_MCN_STRING_BUF_SIZE \ 7093 (WMI_HOST_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */ 7094 7095 typedef struct { 7096 uint32_t software_cal_version; 7097 uint32_t board_cal_version; 7098 /* board_mcn_detail: 7099 * Provide a calibration message string for the host to display. 7100 * Note: on a big-endian host, the 4 bytes within each uint32_t portion 7101 * of a WMI message will be automatically byteswapped by the copy engine 7102 * as the messages are transferred between host and target, to convert 7103 * between the target's little-endianness and the host's big-endianness. 7104 * Consequently, a big-endian host should manually unswap the bytes 7105 * within the board_mcn_detail string buffer to get the bytes back into 7106 * the desired natural order. 7107 */ 7108 uint8_t board_mcn_detail[WMI_HOST_BOARD_MCN_STRING_BUF_SIZE]; 7109 uint32_t cal_ok; /* filled with CALIBRATION_STATUS enum value */ 7110 } wmi_host_pdev_check_cal_version_event; 7111 7112 /** 7113 * enum WMI_HOST_CALIBRATION_STATUS - Host defined Enums for cal status 7114 * @WMI_HOST_NO_FEATURE: The board was calibrated with a meta 7115 * which did not have this feature 7116 * @WMI_HOST_CALIBRATION_OK: The calibration status is OK 7117 * @WMI_HOST_CALIBRATION_NOT_OK: The calibration status is NOT OK 7118 */ 7119 enum WMI_HOST_CALIBRATION_STATUS { 7120 WMI_HOST_NO_FEATURE = 0, 7121 WMI_HOST_CALIBRATION_OK, 7122 WMI_HOST_CALIBRATION_NOT_OK, 7123 }; 7124 7125 /** 7126 * struct wmi_host_pdev_utf_event - Host defined struct to hold utf event data 7127 * @data: Pointer to data 7128 * @datalen: Data length 7129 * @pdev_id: Pdev_id of data 7130 * 7131 */ 7132 struct wmi_host_pdev_utf_event { 7133 uint8_t *data; 7134 uint16_t datalen; 7135 uint32_t pdev_id; 7136 }; 7137 7138 /** 7139 * struct wmi_host_utf_seg_header_info - Host defined struct to map seg info in 7140 * UTF event 7141 * @len: segment length 7142 * @msgref: message reference 7143 * @segment_info: segment info 7144 * @pdev_id: pdev_id 7145 * 7146 */ 7147 struct wmi_host_utf_seg_header_info { 7148 uint32_t len; 7149 uint32_t msgref; 7150 uint32_t segment_info; 7151 uint32_t pdev_id; 7152 }; 7153 7154 /** 7155 * struct wmi_host_pdev_qvit_event - Host defined struct to hold qvit event data 7156 * @data: Pointer to data 7157 * @datalen: Data length 7158 * 7159 */ 7160 struct wmi_host_pdev_qvit_event { 7161 uint8_t *data; 7162 uint16_t datalen; 7163 uint32_t pdev_id; 7164 }; 7165 7166 /** 7167 * enum wmi_peer_create_status - Peer Create response status 7168 * @WMI_PEER_CREATE_SUCCESS: Peer creation successful at fw 7169 * @WMI_PEER_EXISTS: Peer with same mac exists at fw 7170 * @WMI_PEER_CREATE_FAILED: Peer creation failed at fw 7171 */ 7172 enum wmi_peer_create_status { 7173 WMI_PEER_CREATE_SUCCESS = 0, 7174 WMI_PEER_EXISTS = 1, 7175 WMI_PEER_CREATE_FAILED = 2, 7176 }; 7177 7178 /** 7179 * struct wmi_host_peer_create_response_event - Peer Create response event param 7180 * @vdev_id: vdev id 7181 * @mac_address: Peer Mac Address 7182 * @status: Peer create status 7183 * 7184 */ 7185 struct wmi_host_peer_create_response_event { 7186 uint32_t vdev_id; 7187 struct qdf_mac_addr mac_address; 7188 uint32_t status; 7189 }; 7190 7191 /** 7192 * struct wmi_host_peer_delete_response_event - Peer Delete response event param 7193 * @vdev_id: vdev id 7194 * @mac_address: Peer Mac Address 7195 * 7196 */ 7197 struct wmi_host_peer_delete_response_event { 7198 uint32_t vdev_id; 7199 struct qdf_mac_addr mac_address; 7200 }; 7201 7202 /** 7203 * @struct wmi_host_dcs_interference_param 7204 * @interference_type: Type of DCS Interference 7205 * @uint32_t pdev_id: pdev id 7206 */ 7207 struct wmi_host_dcs_interference_param { 7208 uint32_t interference_type; 7209 uint32_t pdev_id; 7210 }; 7211 7212 /** 7213 * struct wmi_host_rf_characterization_event_param - rf characterization table 7214 * @freq: center frequency of primary channel (in MHz) 7215 * @chan_metric: primary channel-specific metric 7216 * @bw: bandwidth of primary channel (in MHz) 7217 */ 7218 struct wmi_host_rf_characterization_event_param { 7219 uint16_t freq; 7220 uint8_t chan_metric; 7221 wmi_host_channel_width bw; 7222 }; 7223 7224 /* 7225 * struct wmi_host_fips_event_param: FIPS event param 7226 * @pdev_id: pdev id 7227 * @error_status: Error status: 0 (no err), 1, or OPER_TIMEOUR 7228 * @data_len: FIPS data length 7229 * @data: pointer to data 7230 */ 7231 struct wmi_host_fips_event_param { 7232 uint32_t pdev_id; 7233 uint32_t error_status; 7234 uint32_t data_len; 7235 uint32_t *data; 7236 }; 7237 7238 #ifdef WLAN_FEATURE_DISA_FIPS 7239 /** 7240 * struct disa_encrypt_decrypt_resp_params - disa encrypt response 7241 * @vdev_id: vdev id 7242 * @status: status 7243 * @data_length: data length 7244 * @data: data pointer 7245 */ 7246 struct disa_encrypt_decrypt_resp_params { 7247 uint32_t vdev_id; 7248 int32_t status; 7249 uint32_t data_len; 7250 uint8_t *data; 7251 }; 7252 #endif 7253 7254 /** 7255 * struct wmi_host_proxy_ast_reserve_param 7256 * @pdev_id: pdev id 7257 * @result: result 7258 */ 7259 struct wmi_host_proxy_ast_reserve_param { 7260 uint32_t pdev_id; 7261 uint32_t result; 7262 }; 7263 7264 /** 7265 * struct wmi_host_pdev_band_to_mac - freq range for mac 7266 * @pdev_id: PDEV ID to identifiy mac 7267 * @start_freq: start frequency value 7268 * @end_freq: end frequency value 7269 */ 7270 struct wmi_host_pdev_band_to_mac { 7271 uint32_t pdev_id; 7272 uint32_t start_freq; 7273 uint32_t end_freq; 7274 }; 7275 #define WMI_HOST_MAX_PDEV 3 7276 7277 #ifdef OL_ATH_SMART_LOGGING 7278 7279 #define WMI_HOST_SMART_LOG_SCENARIO_SET(flag, scenario) ((flag) |= (scenario)) 7280 #define WMI_HOST_SMART_LOG_SCENARIO_GET(flag, scenario) ((flag) & (scenario)) 7281 7282 /** 7283 * enum wmi_host_smart_log_scenario - Smart log scenarios to be enabled/disabled 7284 * @WMI_HOST_SMART_LOG_ALL: All smart logging features. 7285 * @WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW: CE with full detect by FW. 7286 * @WMI_HOST_SMART_LOG_TX_RX_TIMEOUT: Tx/Rx timeout. 7287 * @WMI_HOST_SMART_LOG_STA_KICKOUT: STA Kickout. 7288 * @WMI_HOST_SMART_LOG_BCN_CMD_FAILURE: Beacon command failure. 7289 * @WMI_HOST_SMART_LOG_P1_PING_FAILURE: P1 ping failure. Ping failure detection 7290 * is done by host entities. So, host should be able to control the 7291 * enable/disable of this feature. Yet, this is provided in case the 7292 * corresponding FW specific debugs alone have to be enabled/disabled. 7293 * @WMI_HOST_SMART_LOG_CONNECTION_FAILURE: Connection failure. Connection 7294 * failure detection is done by host entities. So, host should be able to 7295 * control the enable/disable of this feature. Yet, this is provided in case the 7296 * corresponding FW specific debugs alone have to be enabled/disabled. 7297 * @WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG: FW Initiated packetlog. 7298 * @WMI_HOST_SMART_LOG_EXTENSION_1: If WMI_HOST_SMART_LOG_EXTENSION_1 is set, 7299 * then the 'log_case_ext_1' field in 'wmi_smart_logging' is used; else 7300 * log_case_ext_1 is ignored. 7301 */ 7302 enum wmi_host_smart_log_scenario { 7303 WMI_HOST_SMART_LOG_ALL = 0x0, 7304 WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW = 0x1, 7305 WMI_HOST_SMART_LOG_TX_RX_TIMEOUT = 0x2, 7306 WMI_HOST_SMART_LOG_STA_KICKOUT = 0x4, 7307 WMI_HOST_SMART_LOG_BCN_CMD_FAILURE = 0x8, 7308 WMI_HOST_SMART_LOG_P1_PING_FAILURE = 0x10, 7309 WMI_HOST_SMART_LOG_CONNECTION_FAILURE = 0x20, 7310 WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG = 0x40, 7311 7312 /* New scenarios to be added here */ 7313 7314 WMI_HOST_SMART_LOG_EXTENSION_1 = 0x80000000, 7315 }; 7316 7317 /** 7318 * struct wmi_fatal_condition_event - Fatal condition event param 7319 * @type: Type of event 7320 * @subtype: Subtype of event 7321 * @type_subtype_specific_data: Data specific to combination of type and 7322 * subtype. This is held in a union with the original "reserved0" for backward 7323 * compatibility with any code that might refer to it. The previously-reserved 7324 * field now holds data under some conditions. The kind of data depends on the 7325 * above "type" and "subtype" fields. The interpretation of the 7326 * type_subtype_specific_data field based on different type + subtype values is 7327 * shown below: 7328 * 1. type == WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG + subtype 7329 * == WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START -> 7330 * type_subtype_specific_data = WMI_HOST_PKTLOG_EVENT 7331 * For any type+subtype combinations not listed above, the recipient is expected 7332 * to ignore the type_subtype_specific_data field. 7333 */ 7334 struct wmi_fatal_condition_event { 7335 uint32_t type; 7336 uint32_t subtype; 7337 union { 7338 uint32_t reserved0; 7339 uint32_t type_subtype_specific_data; 7340 }; 7341 }; 7342 7343 /*Currently the Max fatal events is 3 */ 7344 #define FATAL_EVENTS_MAX 3 7345 7346 /** 7347 * struct wmi_debug_fatal_events: Fatal events list 7348 * @num_events:Number of events 7349 * @event[FATAL_EVENTS_MAX]: Each event data 7350 */ 7351 struct wmi_debug_fatal_events { 7352 uint32_t num_events; 7353 struct wmi_fatal_condition_event event[FATAL_EVENTS_MAX]; 7354 }; 7355 7356 /** 7357 * enum wmi_host_fatal_condition_type - Values that 'type' can take in 7358 * wmi_fatal_condition_event 7359 * @WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION: Fatal condition event completion 7360 * @WMI_HOST_FATAL_CONDITION_CE_FAILURE: CE failure 7361 * @WMI_HOST_FATAL_CONDITION_TIMEOUTS: Communication timeouts 7362 * @WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE: Connection issue 7363 * @WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG: Configuration for FW initiated 7364 * packetlog 7365 */ 7366 enum wmi_host_fatal_condition_type { 7367 WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION, 7368 WMI_HOST_FATAL_CONDITION_CE_FAILURE, 7369 WMI_HOST_FATAL_CONDITION_TIMEOUTS, 7370 WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE, 7371 WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG, 7372 }; 7373 7374 /** 7375 * enum wmi_host_fatal_condition_subtype_timeouts - Possible subtypes for 7376 * WMI_HOST_FATAL_CONDITION_TIMEOUTS 7377 * @WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT: Tx timeout 7378 * @WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT: Rx timeout 7379 */ 7380 enum wmi_host_fatal_condition_subtype_timeouts { 7381 WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT, 7382 WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT, 7383 }; 7384 7385 /** 7386 * enum wmi_host_fatal_condition_subtype_connection_issue - Possible subtypes 7387 * for WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE 7388 * @WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT: STA Kickout 7389 * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG: Start debugging for P1 7390 * ping failure 7391 * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG: Stop debugging for P1 7392 * ping failure 7393 * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG: Start debugging for 7394 * connection failure 7395 * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG: Stop debugging for 7396 * connection failure 7397 */ 7398 enum wmi_host_fatal_condition_subtype_connection_issue { 7399 WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT, 7400 WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG, 7401 WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG, 7402 WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG, 7403 WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG, 7404 }; 7405 7406 /** 7407 * enum wmi_host_fatal_condition_subtype_packet_log_config - Possible subtypes 7408 * for WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG 7409 * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START: Start FW initiated packetlog 7410 * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP: Stop FW initiated packetlog 7411 */ 7412 enum wmi_host_fatal_condition_subtype_packet_log_config { 7413 WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START, 7414 WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP, 7415 }; 7416 7417 #endif /* OL_ATH_SMART_LOGGING */ 7418 7419 #define GET_PN_MAX_LEN 16 7420 7421 /** 7422 * struct wmi_host_get_pn_event - PN event params 7423 * @vdev_id: vdev id 7424 * @peer_macaddr: Peer mac address 7425 * @key_type: key type 7426 * @pn : pn value 7427 */ 7428 struct wmi_host_get_pn_event { 7429 uint32_t vdev_id; 7430 uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; 7431 uint32_t key_type; 7432 uint8_t pn[GET_PN_MAX_LEN]; 7433 }; 7434 7435 /** 7436 * struct wmi_init_cmd_param - INIT command params 7437 * @target_resource_config: pointer to resource config 7438 * @num_mem_chunks: number of memory chunks 7439 * @struct wmi_host_mem_chunk: pointer to memory chunks 7440 * @hw_mode_index: HW mode index chosen 7441 * @num_band_to_mac: Number of band to mac setting 7442 * @struct wmi_host_pdev_band_to_mac: band to mac setting 7443 */ 7444 struct wmi_init_cmd_param { 7445 target_resource_config *res_cfg; 7446 uint8_t num_mem_chunks; 7447 struct wmi_host_mem_chunk *mem_chunks; 7448 uint32_t hw_mode_id; 7449 uint32_t num_band_to_mac; 7450 struct wmi_host_pdev_band_to_mac band_to_mac[WMI_HOST_MAX_PDEV]; 7451 }; 7452 7453 /** 7454 * struct pdev_csa_switch_count_status - CSA switch count status event param 7455 * @pdev_id: Physical device identifier 7456 * @current_switch_count: Current CSA switch count 7457 * @num_vdevs: Number of vdevs that need restart 7458 * @vdev_ids: Array containing the vdev ids that need restart 7459 */ 7460 struct pdev_csa_switch_count_status { 7461 uint32_t pdev_id; 7462 uint32_t current_switch_count; 7463 uint32_t num_vdevs; 7464 uint32_t *vdev_ids; 7465 }; 7466 7467 /** 7468 * enum wmi_host_active-apf_mode - FW_ACTIVE_APF_MODE, replicated from FW header 7469 * @WMI_HOST_ACTIVE_APF_DISABLED: APF is disabled for all packets in active mode 7470 * @WMI_HOST_ACTIVE_APF_ENABLED: APF is enabled for all packets in active mode 7471 * @WMI_HOST_ACTIVE_APF_ADAPTIVE: APF is enabled for packets up to some 7472 * threshold in active mode 7473 */ 7474 enum wmi_host_active_apf_mode { 7475 WMI_HOST_ACTIVE_APF_DISABLED = (1 << 1), 7476 WMI_HOST_ACTIVE_APF_ENABLED = (1 << 2), 7477 WMI_HOST_ACTIVE_APF_ADAPTIVE = (1 << 3) 7478 }; 7479 7480 /** 7481 * struct coex_config_params - Coex config command params 7482 * @vdev_id: Virtual AP device identifier 7483 * @config_type: Configuration type - wmi_coex_config_type enum 7484 * @config_arg1: Configuration argument based on config type 7485 * @config_arg2: Configuration argument based on config type 7486 * @config_arg3: Configuration argument based on config type 7487 * @config_arg4: Configuration argument based on config type 7488 * @config_arg5: Configuration argument based on config type 7489 * @config_arg6: Configuration argument based on config type 7490 */ 7491 struct coex_config_params { 7492 uint32_t vdev_id; 7493 uint32_t config_type; 7494 uint32_t config_arg1; 7495 uint32_t config_arg2; 7496 uint32_t config_arg3; 7497 uint32_t config_arg4; 7498 uint32_t config_arg5; 7499 uint32_t config_arg6; 7500 }; 7501 7502 #define WMI_HOST_PDEV_ID_SOC 0xFF 7503 #define WMI_HOST_PDEV_ID_0 0 7504 #define WMI_HOST_PDEV_ID_1 1 7505 #define WMI_HOST_PDEV_ID_2 2 7506 #define WMI_HOST_PDEV_ID_INVALID 0xFFFFFFFF 7507 7508 /** 7509 * struct wmi_host_ready_ev_param - Data revieved in ready event 7510 * @status: FW init status. Success or Failure. 7511 * @num_dscp_table: Number of DSCP table supported in FW 7512 * @num_extra_mac_addr: Extra mac address present in ready event. Used 7513 * in DBDC mode to provide multiple mac per pdev. 7514 * @num_total_peer: Total number of peers FW could allocate. Zero means 7515 * FW could allocate num peers requested by host in init. 7516 * Otherwise, host need update it max_peer to this value. 7517 * @num_extra_peer: Number of extra peers created and used within FW. Host 7518 * should expect peer_id can be num_total_peer + num_extra_peer 7519 * but it can create only upto num_total_peer. 7520 * @agile_capability: Boolean specification of whether the target supports 7521 * agile DFS, by means of using one 80 MHz radio chain for 7522 * radar detection, concurrently with using another radio 7523 * chain for non-160 MHz regular operation. 7524 * @max_ast_index: Max number of AST entries that FW could allocate. 7525 * @pktlog_defs_checksum: checksum computed from the definitions of the enums 7526 * and structs used within pktlog traces. This is sent 7527 * from the FW as part of FW ready event and needs 7528 * to be embedded in the pktlog buffer header as version. 7529 */ 7530 struct wmi_host_ready_ev_param { 7531 uint32_t status; 7532 uint32_t num_dscp_table; 7533 uint32_t num_extra_mac_addr; 7534 uint32_t num_total_peer; 7535 uint32_t num_extra_peer; 7536 bool agile_capability; 7537 uint32_t max_ast_index; 7538 uint32_t pktlog_defs_checksum; 7539 }; 7540 7541 enum bcn_offload_control_param { 7542 BCN_OFFLD_CTRL_TX_DISABLE = 0, 7543 BCN_OFFLD_CTRL_TX_ENABLE, 7544 BCN_OFFLD_CTRL_SWBA_DISABLE, 7545 BCN_OFFLD_CTRL_SWBA_ENABLE, 7546 }; 7547 7548 /** 7549 * struct bcn_offload_control - Beacon offload control params 7550 * @vdev_id: vdev identifer of VAP to control beacon tx 7551 * @bcn_ctrl_op: values from enum bcn_offload_control_param 7552 */ 7553 struct bcn_offload_control { 7554 uint32_t vdev_id; 7555 enum bcn_offload_control_param bcn_ctrl_op; 7556 }; 7557 7558 #ifdef OBSS_PD 7559 /** 7560 * struct wmi_host_obss_spatial_reuse_set_param - OBSS_PD_SPATIAL Reuse 7561 * structure 7562 * @enable: Enable/Disable Spatial Reuse 7563 * @obss_min: Minimum OBSS level to use 7564 * @obss_max: Maximum OBSS level to use 7565 * @pdev_id: Pdev id 7566 */ 7567 struct wmi_host_obss_spatial_reuse_set_param { 7568 uint32_t enable; 7569 int32_t obss_min; 7570 int32_t obss_max; 7571 uint32_t vdev_id; 7572 }; 7573 7574 /** 7575 * struct wmi_host_obss_spatial_reuse_set_def_thresh - default obsspd offsets 7576 * @obss_min: Minimum OBSS level to use 7577 * @obss_max: Maximum OBSS level to use 7578 * @vdev_type: vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP 7579 */ 7580 struct wmi_host_obss_spatial_reuse_set_def_thresh { 7581 int32_t obss_min; 7582 int32_t obss_max; 7583 uint32_t vdev_type; 7584 }; 7585 #endif 7586 7587 /** 7588 * struct wmi_host_injector_frame_params - Injector frame configuration params 7589 * @vdev_id: vdev identifer of VAP 7590 * @enable: Enable/disable flag for the frame 7591 * @frame_type: Frame type to be enabled 7592 * @frame_inject_period: Periodicity of injector frame transmission in msecs 7593 * @frame_duration: Frame Duration field in usecs 7594 * @dstmac: Destination address to be used for the frame 7595 */ 7596 struct wmi_host_injector_frame_params { 7597 uint32_t vdev_id; 7598 uint32_t enable; 7599 uint32_t frame_type; 7600 uint32_t frame_inject_period; 7601 uint32_t frame_duration; 7602 uint8_t dstmac[QDF_MAC_ADDR_SIZE]; 7603 }; 7604 7605 /** 7606 * struct wds_entry - WDS entry structure 7607 * @peer_mac: peer mac 7608 * @wds_mac: wds mac address 7609 * @flags: flags 7610 */ 7611 struct wdsentry { 7612 u_int8_t peer_mac[QDF_MAC_ADDR_SIZE]; 7613 u_int8_t wds_mac[QDF_MAC_ADDR_SIZE]; 7614 uint32_t flags; 7615 }; 7616 7617 /** 7618 * struct wmi_obss_detection_cfg_param - obss detection cfg 7619 * @vdev_id: vdev id 7620 * @obss_detect_period_ms: detection period in ms 7621 * @obss_11b_ap_detect_mode: detect whether there is 11b ap/ibss 7622 * @obss_11b_sta_detect_mode: detect whether there is 11b sta 7623 * connected with other APs 7624 * @obss_11g_ap_detect_mode: detect whether there is 11g AP 7625 * @obss_11a_detect_mode: detect whether there is legacy 11a traffic 7626 * @obss_ht_legacy_detect_mode: detect whether there is ap which is 7627 * ht legacy mode 7628 * @obss_ht_mixed_detect_mode: detect whether there is ap which is ht mixed mode 7629 * @obss_ht_20mhz_detect_mode: detect whether there is ap which has 20M only 7630 * station 7631 */ 7632 struct wmi_obss_detection_cfg_param { 7633 uint32_t vdev_id; 7634 uint32_t obss_detect_period_ms; 7635 uint32_t obss_11b_ap_detect_mode; 7636 uint32_t obss_11b_sta_detect_mode; 7637 uint32_t obss_11g_ap_detect_mode; 7638 uint32_t obss_11a_detect_mode; 7639 uint32_t obss_ht_legacy_detect_mode; 7640 uint32_t obss_ht_mixed_detect_mode; 7641 uint32_t obss_ht_20mhz_detect_mode; 7642 }; 7643 7644 /** 7645 * enum wmi_obss_detection_reason - obss detection event reasons 7646 * @OBSS_OFFLOAD_DETECTION_DISABLED: OBSS detection disabled 7647 * @OBSS_OFFLOAD_DETECTION_PRESENT: OBSS present detection 7648 * @OBSS_OFFLOAD_DETECTION_ABSENT: OBSS absent detection 7649 * 7650 * Defines different types of reasons for obss detection event from firmware. 7651 */ 7652 enum wmi_obss_detection_reason { 7653 OBSS_OFFLOAD_DETECTION_DISABLED = 0, 7654 OBSS_OFFLOAD_DETECTION_PRESENT = 1, 7655 OBSS_OFFLOAD_DETECTION_ABSENT = 2, 7656 }; 7657 7658 /** 7659 * struct wmi_obss_detect_info - OBSS detection info from firmware 7660 * @vdev_id: ID of the vdev to which this info belongs. 7661 * @reason: Indicate if present or Absent detection, 7662 * also if not supported offload for this vdev. 7663 * @matched_detection_masks: Detection bit map. 7664 * @matched_bssid_addr: MAC address valid for only if info is present detection. 7665 */ 7666 struct wmi_obss_detect_info { 7667 uint32_t vdev_id; 7668 enum wmi_obss_detection_reason reason; 7669 uint32_t matched_detection_masks; 7670 uint8_t matched_bssid_addr[QDF_MAC_ADDR_SIZE]; 7671 }; 7672 7673 #ifdef QCA_SUPPORT_CP_STATS 7674 /** 7675 * struct wmi_host_congestion_stats - host definition of congestion stats 7676 * @vdev_id: ID of the vdev to which this info belongs. 7677 * @congestion: This field holds the congestion percentage = 7678 * (busy_time/total_time)*100 7679 * for the interval from when the vdev was started to the current time 7680 * (or the time at which the vdev was stopped). 7681 */ 7682 struct wmi_host_congestion_stats { 7683 uint32_t vdev_id; 7684 uint32_t congestion; 7685 }; 7686 #endif 7687 7688 #ifdef FEATURE_WLAN_APF 7689 /** 7690 * struct wmi_apf_write_memory_params - Android Packet Filter write memory 7691 * params 7692 * @vdev_id: VDEV on which APF memory is to be written 7693 * @apf_version: APF version number 7694 * @program_len: Length reserved for program in the APF work memory 7695 * @addr_offset: Relative address in APF work memory to start writing 7696 * @length: Size of the write 7697 * @buf: Pointer to the buffer 7698 */ 7699 struct wmi_apf_write_memory_params { 7700 uint8_t vdev_id; 7701 uint32_t apf_version; 7702 uint32_t program_len; 7703 uint32_t addr_offset; 7704 uint32_t length; 7705 uint8_t *buf; 7706 }; 7707 7708 /** 7709 * struct wmi_apf_read_memory_params - Android Packet Filter read memory params 7710 * @vdev_id: vdev id 7711 * @addr_offset: Relative address in APF work memory to read from 7712 * @length: Size of the memory fetch 7713 */ 7714 struct wmi_apf_read_memory_params { 7715 uint8_t vdev_id; 7716 uint32_t addr_offset; 7717 uint32_t length; 7718 }; 7719 7720 /** 7721 * struct wmi_apf_read_memory_resp_event_params - Event containing read Android 7722 * Packet Filter memory response 7723 * @vdev_id: vdev id 7724 * @offset: Read memory offset 7725 * @length: Read memory length 7726 * @more_data: Indicates more data to come 7727 * @data: Pointer to the data 7728 */ 7729 struct wmi_apf_read_memory_resp_event_params { 7730 uint32_t vdev_id; 7731 uint32_t offset; 7732 uint32_t length; 7733 bool more_data; 7734 uint8_t *data; 7735 }; 7736 #endif /* FEATURE_WLAN_APF */ 7737 7738 /* vdev control flags (per bits) */ 7739 #define WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP 0x00000001 7740 #define WMI_HOST_VDEV_FLAGS_TRANSMIT_AP 0x00000002 7741 #define WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 7742 7743 /* Begin of roam scan stats definitions */ 7744 7745 #define WMI_ROAM_SCAN_STATS_MAX 5 7746 #define WMI_ROAM_SCAN_STATS_CANDIDATES_MAX 4 7747 #define WMI_ROAM_SCAN_STATS_CHANNELS_MAX 50 7748 7749 /** 7750 * struct wmi_roam_scan_stats_req - Structure to hold roam scan stats request 7751 * @vdev_id: interface id 7752 */ 7753 struct wmi_roam_scan_stats_req { 7754 uint32_t vdev_id; 7755 }; 7756 7757 /** 7758 * struct wmi_roam_scan_cand - Roam scan candidates 7759 * @score: score of AP 7760 * @rssi: rssi of the AP 7761 * @freq: center frequency 7762 * @bssid: bssid of AP 7763 */ 7764 struct wmi_roam_scan_cand { 7765 uint32_t score; 7766 uint32_t rssi; 7767 uint32_t freq; 7768 uint8_t bssid[QDF_MAC_ADDR_SIZE]; 7769 }; 7770 7771 /** 7772 * struct wmi_roam_scan_stats_params - Roam scan details 7773 * @time_stamp: time at which this roam scan happened 7774 * @client_id: id of client which triggered this scan 7775 * @num_scan_chans: number of channels that were scanned as part of this scan 7776 * @scan_freqs: frequencies of the channels that were scanned 7777 * @is_roam_successful: whether a successful roaming happened after this scan 7778 * @old_bssid: bssid to which STA is connected just before this scan 7779 * @new_bssid: bssid to which STA is roamed to in case of successful roaming 7780 * @num_roam_candidates: no.of roam candidates that are being reported 7781 * @roam_candidate: roam scan candidate details 7782 * @trigger_id: reason for triggering this roam or roam scan 7783 * @trigger_value: threshold value related to trigger_id 7784 */ 7785 struct wmi_roam_scan_stats_params { 7786 uint64_t time_stamp; 7787 uint32_t client_id; 7788 uint32_t num_scan_chans; 7789 uint32_t scan_freqs[WMI_ROAM_SCAN_STATS_CHANNELS_MAX]; 7790 uint32_t is_roam_successful; 7791 7792 /* Bssid to which STA is connected when the roam scan is triggered */ 7793 uint8_t old_bssid[QDF_MAC_ADDR_SIZE]; 7794 7795 /* 7796 * Bssid to which STA is connected after roaming. Will be valid only 7797 * if is_roam_successful is true. 7798 */ 7799 uint8_t new_bssid[QDF_MAC_ADDR_SIZE]; 7800 7801 /* Number of roam candidates that are being reported in the stats */ 7802 uint32_t num_roam_candidates; 7803 struct wmi_roam_scan_cand cand[WMI_ROAM_SCAN_STATS_CANDIDATES_MAX]; 7804 uint32_t trigger_id; 7805 uint32_t trigger_value; 7806 }; 7807 7808 /** 7809 * struct wmi_roam_scan_stats_res - Roam scan stats response from firmware 7810 * @num_roam_scan: number of roam scans triggered 7811 * @roam_scan: place holder to indicate the array of 7812 * wmi_roam_scan_stats_params followed by this structure 7813 */ 7814 struct wmi_roam_scan_stats_res { 7815 uint32_t num_roam_scans; 7816 struct wmi_roam_scan_stats_params roam_scan[0]; 7817 }; 7818 7819 #define MAX_ROAM_CANDIDATE_AP 9 7820 #define MAX_ROAM_SCAN_CHAN 38 7821 #define MAX_ROAM_SCAN_STATS_TLV 5 7822 7823 /** 7824 * struct wmi_roam_btm_trigger_data - BTM roam trigger related information 7825 * @btm_request_mode: BTM request mode - solicited/unsolicited 7826 * @disassoc_timer: Number of TBTT before AP disassociates the STA in ms 7827 * @validity_interval: Preferred candidate list validity interval in ms 7828 * @candidate_list_count: Number of candidates in BTM request. 7829 * @btm_resp_status: Status code of the BTM response. 7830 * @btm_bss_termination_timeout: BTM BSS termination timeout value 7831 * in milli seconds 7832 * @btm_mbo_assoc_retry_timeout: BTM MBO assoc retry timeout value in 7833 * milli seconds 7834 */ 7835 struct wmi_roam_btm_trigger_data { 7836 uint32_t btm_request_mode; 7837 uint32_t disassoc_timer; 7838 uint32_t validity_interval; 7839 uint32_t candidate_list_count; 7840 uint32_t btm_resp_status; 7841 uint32_t btm_bss_termination_timeout; 7842 uint32_t btm_mbo_assoc_retry_timeout; 7843 }; 7844 7845 /** 7846 * struct wmi_roam_cu_trigger_data - BSS Load roam trigger parameters 7847 * @cu_load: Connected AP CU load percentage 7848 */ 7849 struct wmi_roam_cu_trigger_data { 7850 uint32_t cu_load; 7851 /* TODO: Add threshold value */ 7852 }; 7853 7854 /** 7855 * Struct wmi_roam_rssi_trigger_data - RSSI roam trigger related 7856 * parameters 7857 * @threshold: RSSI threshold value in dBm for LOW rssi roam trigger 7858 */ 7859 struct wmi_roam_rssi_trigger_data { 7860 uint32_t threshold; 7861 }; 7862 7863 /** 7864 * struct wmi_roam_deauth_trigger_data - Deauth roaming trigger related 7865 * parameters 7866 * @type: 1- Deauthentication 2- Disassociation 7867 * @reason: Status code of the Deauth/Disassoc received 7868 */ 7869 struct wmi_roam_deauth_trigger_data { 7870 uint32_t type; 7871 uint32_t reason; 7872 }; 7873 7874 /** 7875 * struct wmi_roam_wtc_btm_trigger_data - wtc btm roaming trigger related 7876 * parameters 7877 * @roaming_mode: Roaming Mode 7878 * @vsie_trigger_reason: Roam trigger reason present in btm request 7879 * @sub_code: Sub code present in btm request 7880 * @wtc_mode: WTC mode 7881 * @wtc_scan_mode: WTC scan mode 7882 * @wtc_rssi_th: Connected AP threshold 7883 * @wtc_candi_rssi_th: Candidate AP threshold 7884 */ 7885 struct wmi_roam_wtc_btm_trigger_data { 7886 uint32_t roaming_mode; 7887 uint32_t vsie_trigger_reason; 7888 uint32_t sub_code; 7889 uint32_t wtc_mode; 7890 uint32_t wtc_scan_mode; 7891 uint32_t wtc_rssi_th; 7892 uint32_t wtc_candi_rssi_th; 7893 }; 7894 7895 /** 7896 * struct wmi_roam_candidate_info - Roam scan candidate APs related info 7897 * @timestamp: Host timestamp in millisecs 7898 * @type: 0 - Candidate AP; 1 - Current connected AP. 7899 * @bssid: AP bssid. 7900 * @freq: Channel frquency 7901 * @cu_load: Channel utilization load of the AP. 7902 * @cu_score: Channel Utilization score. 7903 * @rssi: Candidate AP rssi 7904 * @rssi_score: AP RSSI score 7905 * @total_score: Total score of the candidate AP. 7906 * @etp: Estimated throughput value of the AP in Mbps 7907 * @bl_reason: Blacklist reason 7908 * @bl_source: Source of adding AP to BL 7909 * @bl_timestamp:This timestamp indicates the time when AP added 7910 * to blacklist. 7911 * @bl_original_timeout: Original timeout value in milli seconds 7912 * when AP added to BL 7913 */ 7914 struct wmi_roam_candidate_info { 7915 uint32_t timestamp; 7916 uint8_t type; 7917 struct qdf_mac_addr bssid; 7918 uint16_t freq; 7919 uint32_t cu_load; 7920 uint32_t cu_score; 7921 uint32_t rssi; 7922 uint32_t rssi_score; 7923 uint32_t total_score; 7924 uint32_t etp; 7925 uint32_t bl_reason; 7926 uint32_t bl_source; 7927 uint32_t bl_timestamp; 7928 uint32_t bl_original_timeout; 7929 }; 7930 7931 /** 7932 * struct wmi_roam_scan_data - Roam scan event details 7933 * @present: Flag to check if the roam scan tlv is present 7934 * @type: 0 - Partial roam scan; 1 - Full roam scan 7935 * @num_ap: Number of candidate APs. 7936 * @num_chan: Number of channels. 7937 * @next_rssi_threshold: Next roam can trigger rssi threshold 7938 * @chan_freq: List of frequencies scanned as part of roam scan 7939 * @ap: List of candidate AP info 7940 */ 7941 struct wmi_roam_scan_data { 7942 bool present; 7943 uint16_t type; 7944 uint16_t num_ap; 7945 uint16_t num_chan; 7946 uint32_t next_rssi_threshold; 7947 uint16_t chan_freq[MAX_ROAM_SCAN_CHAN]; 7948 struct wmi_roam_candidate_info ap[MAX_ROAM_CANDIDATE_AP]; 7949 }; 7950 7951 /** 7952 * struct wmi_roam_result - Roam result related info. 7953 * @present: Flag to check if the roam result tlv is present 7954 * @timestamp: Host timestamp in millisecs 7955 * @status: 0 - Roaming is success ; 1 - Roaming failed ; 7956 * 2 - No roam 7957 * @fail_reason: One of WMI_ROAM_FAIL_REASON_ID 7958 */ 7959 struct wmi_roam_result { 7960 bool present; 7961 uint32_t timestamp; 7962 uint32_t status; 7963 uint32_t fail_reason; 7964 }; 7965 7966 /** 7967 * struct wmi_neighbor_report_data - Neighbor report/BTM request related 7968 * data. 7969 * @present: Flag to check if the roam 11kv tlv is present 7970 * @timestamp: Host timestamp in millisecs 7971 * @req_type: 1 - BTM query ; 2 - 11K neighbor report request 7972 * @req_time: Request timestamp in ms 7973 * @resp_time: Response timestamp in ms 7974 * @freq: Channel frequency in Mhz 7975 */ 7976 struct wmi_neighbor_report_data { 7977 bool present; 7978 uint32_t timestamp; 7979 uint8_t req_type; 7980 uint32_t req_time; 7981 uint32_t resp_time; 7982 uint8_t num_freq; 7983 uint32_t freq[MAX_ROAM_SCAN_CHAN]; 7984 }; 7985 7986 /** 7987 * struct wmi_roam_trigger_info() - Roam trigger related details 7988 * @present: Flag to check if the roam_trigger_info tlv is present 7989 * @trigger_reason: Roam trigger reason(enum WMI_ROAM_TRIGGER_REASON_ID) 7990 * @trigger_sub_reason: Sub reason for roam trigger if multiple roam scans 7991 * @current_rssi: Connected AP RSSI 7992 * @timestamp: Host timestamp in millisecs when roam scan was triggered 7993 * @btm_trig_data: BTM roam trigger parameters. 7994 * @cu_trig_data: BSS Load roam trigger parameters. 7995 * @rssi_trig_data: RSSI trigger related info. 7996 * @deauth_trig_data: Deauth roam trigger related info 7997 * @wtc_btm_trig_data: WTC BTM roam trigger related info 7998 */ 7999 struct wmi_roam_trigger_info { 8000 bool present; 8001 uint32_t trigger_reason; 8002 uint32_t trigger_sub_reason; 8003 uint32_t current_rssi; 8004 uint32_t timestamp; 8005 union { 8006 struct wmi_roam_btm_trigger_data btm_trig_data; 8007 struct wmi_roam_cu_trigger_data cu_trig_data; 8008 struct wmi_roam_rssi_trigger_data rssi_trig_data; 8009 struct wmi_roam_deauth_trigger_data deauth_trig_data; 8010 struct wmi_roam_wtc_btm_trigger_data wtc_btm_trig_data; 8011 }; 8012 }; 8013 8014 /* End of roam scan stats definitions */ 8015 8016 /** 8017 * enum wmi_obss_color_collision_evt_type - bss color collision event type 8018 * @OBSS_COLOR_COLLISION_DETECTION_DISABLE: OBSS color detection disabled 8019 * @OBSS_COLOR_COLLISION_DETECTION: OBSS color collision detection 8020 * @OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY: OBSS free slot detection with 8021 * within expiry period 8022 * @OBSS_COLOR_FREE_SLOT_AVAILABLE: OBSS free slot detection 8023 * 8024 * Defines different types of type for obss color collision event type. 8025 */ 8026 enum wmi_obss_color_collision_evt_type { 8027 OBSS_COLOR_COLLISION_DETECTION_DISABLE = 0, 8028 OBSS_COLOR_COLLISION_DETECTION = 1, 8029 OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY = 2, 8030 OBSS_COLOR_FREE_SLOT_AVAILABLE = 3, 8031 }; 8032 8033 /** 8034 * struct wmi_obss_color_collision_cfg_param - obss color collision cfg 8035 * @vdev_id: vdev id 8036 * @flags: proposed for future use cases, currently not used. 8037 * @evt_type: bss color collision event. 8038 * @current_bss_color: current bss color. 8039 * @detection_period_ms: scan interval for both AP and STA mode. 8040 * @scan_period_ms: scan period for passive scan to detect collision. 8041 * @free_slot_expiry_time_ms: FW to notify host at timer expiry after 8042 * which Host will disable the bss color. 8043 */ 8044 struct wmi_obss_color_collision_cfg_param { 8045 uint32_t vdev_id; 8046 uint32_t flags; 8047 enum wmi_obss_color_collision_evt_type evt_type; 8048 uint32_t current_bss_color; 8049 uint32_t detection_period_ms; 8050 uint32_t scan_period_ms; 8051 uint32_t free_slot_expiry_time_ms; 8052 }; 8053 8054 /** 8055 * struct wmi_obss_color_collision_info - bss color detection info from firmware 8056 * @vdev_id: ID of the vdev to which this info belongs. 8057 * @evt_type: bss color collision event. 8058 * @obss_color_bitmap_bit0to31: Bit set indicating BSS color present. 8059 * @obss_color_bitmap_bit32to63: Bit set indicating BSS color present. 8060 */ 8061 struct wmi_obss_color_collision_info { 8062 uint32_t vdev_id; 8063 enum wmi_obss_color_collision_evt_type evt_type; 8064 uint32_t obss_color_bitmap_bit0to31; 8065 uint32_t obss_color_bitmap_bit32to63; 8066 }; 8067 8068 #ifdef WMI_AP_SUPPORT 8069 /** 8070 * struct vap_pcp_tid_map_params - PCP tid map params 8071 * @vdev_id: vdev id 8072 * @pcp_to_tid_map: pointer to arry of pcp to tid map table 8073 */ 8074 struct vap_pcp_tid_map_params { 8075 uint32_t vdev_id; 8076 uint32_t *pcp_to_tid_map; 8077 }; 8078 8079 /** 8080 * struct vap_tidmap_prec_params - tidmap precedence params 8081 * @vdev_id: vdev id 8082 * @map_precedence: precedence of tid mapping 8083 */ 8084 struct vap_tidmap_prec_params { 8085 uint32_t vdev_id; 8086 uint32_t map_precedence; 8087 }; 8088 8089 /** 8090 * struct peer_vlan_config_param - peer vlan config command 8091 * @tx_cmd: Tx command 8092 * @rx_cmd: Rx command 8093 * @tx_strip_insert: Strip or Insert vlan in Tx[0:Strip, 1: Insert] 8094 * @tx_strip_insert_inner: Enable tx_strip_insert operation for inner vlan tag. 8095 * @tx_strip_insert_outer: Enable tx_strip_insert operation for outer vlan tag. 8096 * @rx_strip_c_tag: Strip c_tag 8097 * @rx_strip_s_tag: Strip s_tag 8098 * @rx_insert_c_tag: Insert c_tag 8099 * @rx_insert_s_tag: Insert s_tag 8100 * 8101 * @insert_vlan_inner_tci: Vlan inner tci 8102 * @insert_vlan_inner_tci: Vlan outer tci 8103 * 8104 * @vdev_id: vdev id corresponding to peer. 8105 */ 8106 struct peer_vlan_config_param { 8107 uint16_t tx_cmd:1, 8108 rx_cmd:1, 8109 tx_strip_insert:1, 8110 tx_strip_insert_inner:1, 8111 tx_strip_insert_outer:1, 8112 rx_strip_c_tag:1, 8113 rx_strip_s_tag:1, 8114 rx_insert_c_tag:1, 8115 rx_insert_s_tag:1; 8116 uint16_t insert_vlan_inner_tci; 8117 uint16_t insert_vlan_outer_tci; 8118 uint8_t vdev_id; 8119 }; 8120 #endif 8121 8122 /** 8123 * struct wmi_cfr_peer_tx_event_param - CFR peer tx_event params 8124 * @capture_method: CFR data capture method 8125 * @vdev_id: ID of vdev to which this info belongs 8126 * @mac_addr: Peer MAC address. In AP mode, it is the address of connected 8127 * peer for which CFR capture is needed. In STA mode, this is the 8128 * address of AP it is connected to. 8129 * @primary_20mhz_chan: Primary 20 MHz channel frequency in MHz 8130 * @bandwidth: BW of measurement 8131 * 0 - 20MHz, 1 - 40MHz, 2 - 80MHz, 3 - 160MHz, 4 - 80+80MHz 8132 * @phy_mode: Phy mode of channel, type - WMI_HOST_WLAN_PHY_MODE 8133 * @band_center_freq1: Center frequency 1 in MHz 8134 * @band_center_freq2: Center frequency 2 in MHz 8135 * @spatial_streams: Number of spatial streams 8136 * @correlation_info_1: Address of data from wmi_dma_buf_release_entry [31:0] 8137 * @correlation_info_2: 8138 * Bits [3:0] - Address of data from wmi_dma_buf_release_entry [35:32] 8139 * Bits [15:4] - Reserved 8140 * Bits [31:16] - Hardware PPDU ID [15:0] 8141 * @status: 8142 * Bits [1:0] - TX status, if any. 0-OK, 1-XRETRY, 2-DROP, 3-FILTERED. 8143 * Bits [30:2] - Reserved 8144 * Bit [31] - Status of the CFR capture of the peer 8145 * 1 - Successful, 0 - Unsuccessful. 8146 * @timestamp_us: Timestamp in microseconds at which the CFR was captured 8147 * in the hardware. The clock used for this timestamp is private 8148 * to the target and not visible to the host. So, Host can 8149 * interpret only the relative timestamp deltas from one message 8150 * to the next, but can't interpret the absolute timestamp 8151 * from a single message 8152 * @counter: Count of the current CFR capture from FW. 8153 * This is helpful to identify any drops in FW 8154 * @chain_rssi: Per chain RSSI of the peer, for upto WMI_HOST_MAX_CHAINS. 8155 * Each chain's entry reports the RSSI for different bandwidths. 8156 * Bits [7:0] - Primary 20 MHz 8157 * Bits [15:8] - Secondary 20 MHz of 40 MHz channel (if applicable) 8158 * Bits [23:16] - Secondary 40 MHz of 80 MHz channel (if applicable) 8159 * Bits [31:24] - Secondary 80 MHz of 160 MHz channel (if applicable) 8160 * Each of these 8-bit RSSI reports is in dBm units. 0x80 means invalid. 8161 * Unused bytes within used chain_rssi indices will be 0x80. 8162 * Unused rssi_chain indices will be set to 0x80808080. 8163 * @chain_phase: Per chain phase of peer for upto WMI_HOST_MAX_CHAINS. 8164 */ 8165 typedef struct { 8166 uint32_t capture_method; 8167 uint32_t vdev_id; 8168 struct qdf_mac_addr peer_mac_addr; 8169 uint32_t primary_20mhz_chan; 8170 uint32_t bandwidth; 8171 uint32_t phy_mode; 8172 uint32_t band_center_freq1; 8173 uint32_t band_center_freq2; 8174 uint32_t spatial_streams; 8175 uint32_t correlation_info_1; 8176 uint32_t correlation_info_2; 8177 uint32_t status; 8178 uint32_t timestamp_us; 8179 uint32_t counter; 8180 uint32_t chain_rssi[WMI_HOST_MAX_CHAINS]; 8181 uint16_t chain_phase[WMI_HOST_MAX_CHAINS]; 8182 } wmi_cfr_peer_tx_event_param; 8183 8184 /** 8185 * struct wmi_host_oem_indirect_data - Indirect OEM data 8186 * @pdev_id: pdev id 8187 * @len: length of data in bytes 8188 * @addr: 36 bit address 8189 */ 8190 struct wmi_host_oem_indirect_data { 8191 uint32_t pdev_id; 8192 uint32_t len; 8193 uint64_t addr; 8194 }; 8195 8196 /** 8197 * struct wmi_oem_response_param - OEM response info 8198 * @num_data1: First data response length 8199 * @num_data2: Second data response length 8200 * @data_1: First data 8201 * @data_2: Second data 8202 * @indirect_data: Indirect data 8203 */ 8204 struct wmi_oem_response_param { 8205 uint32_t num_data1; 8206 uint32_t num_data2; 8207 uint8_t *data_1; 8208 uint8_t *data_2; 8209 struct wmi_host_oem_indirect_data indirect_data; 8210 }; 8211 8212 /** 8213 * struct mws_coex_state - Modem Wireless Subsystem(MWS) coex info 8214 * @vdev_id : vdev id 8215 * @coex_scheme_bitmap: LTE-WLAN coexistence scheme bitmap 8216 * Indicates the final schemes applied for the currrent Coex scenario. 8217 * Bit 0 - TDM policy 8218 * Bit 1 - Forced TDM policy 8219 * Bit 2 - Dynamic Power Back-off policy 8220 * Bit 3 - Channel Avoidance policy 8221 * Bit 4 - Static Power Back-off policy. 8222 * @active_conflict_count : active conflict count 8223 * @potential_conflict_count: Potential conflict count 8224 * @chavd_group0_bitmap : Indicates the WLAN channels to be avoided in 8225 * b/w WLAN CH-1 and WLAN CH-14 8226 * @chavd_group1_bitmap : Indicates the WLAN channels to be avoided in 8227 * WLAN CH-36 and WLAN CH-64 8228 * @chavd_group2_bitmap : Indicates the WLAN channels to be avoided in 8229 * b/w WLAN CH-100 and WLAN CH-140 8230 * @chavd_group2_bitmap : Indicates the WLAN channels to be avoided in 8231 * b/w WLAN CH-149 and WLAN CH-165 8232 */ 8233 struct mws_coex_state { 8234 uint32_t vdev_id; 8235 uint32_t coex_scheme_bitmap; 8236 uint32_t active_conflict_count; 8237 uint32_t potential_conflict_count; 8238 uint32_t chavd_group0_bitmap; 8239 uint32_t chavd_group1_bitmap; 8240 uint32_t chavd_group2_bitmap; 8241 uint32_t chavd_group3_bitmap; 8242 }; 8243 8244 /** 8245 * struct hdd_mws_coex_dpwb_state - Modem Wireless Subsystem(MWS) coex DPWB info 8246 * @vdev_id : vdev id 8247 * @current_dpwb_state: Current state of the Dynamic Power Back-off SM 8248 * @pnp1_value: Tx power to be applied in next Dynamic Power Back-off cycle 8249 * @lte_dutycycle: Indicates the duty cycle of current LTE frame 8250 * @sinr_wlan_on: LTE SINR value in dB, when WLAN is ON 8251 * @sinr_wlan_off: LTE SINR value in dB, when WLAN is OFF 8252 * @bler_count: LTE blocks with error for the current block err report. 8253 * @block_count: Number of LTE blocks considered for bler count report. 8254 * @wlan_rssi_level: WLAN RSSI level 8255 * @wlan_rssi: WLAN RSSI value in dBm considered in DP backoff algo 8256 * @is_tdm_running: Indicates whether any TDM policy triggered 8257 */ 8258 struct mws_coex_dpwb_state { 8259 uint32_t vdev_id; 8260 int32_t current_dpwb_state; 8261 int32_t pnp1_value; 8262 uint32_t lte_dutycycle; 8263 int32_t sinr_wlan_on; 8264 int32_t sinr_wlan_off; 8265 uint32_t bler_count; 8266 uint32_t block_count; 8267 uint32_t wlan_rssi_level; 8268 int32_t wlan_rssi; 8269 uint32_t is_tdm_running; 8270 }; 8271 8272 /** 8273 * struct mws_coex_tdm_state - Modem Wireless Subsystem(MWS) coex TDM state info 8274 * @vdev_id: vdev id 8275 * @tdm_policy_bitmap: Time Division Multiplexing (TDM) LTE-Coex Policy type. 8276 * @tdm_sf_bitmap: TDM LTE/WLAN sub-frame bitmap. 8277 */ 8278 struct mws_coex_tdm_state { 8279 uint32_t vdev_id; 8280 uint32_t tdm_policy_bitmap; 8281 uint32_t tdm_sf_bitmap; 8282 }; 8283 8284 /** 8285 * struct mws_coex_idrx_state - Modem Wireless Subsystem(MWS) coex IDRX state 8286 * @vdev_id: vdev id 8287 * @sub0_techid: SUB0 LTE-coex tech. 8288 * @sub0_policy: SUB0 mitigation policy. 8289 * @sub0_is_link_critical: Set if SUB0 is in link critical state. 8290 * @sub0_static_power: LTE SUB0 imposed static power applied 8291 * to WLAN due to LTE-WLAN coex. 8292 * @sub0_rssi: LTE SUB0 RSSI value in dBm. 8293 * @sub1_techid: SUB1 LTE-coex tech. 8294 * @sub1_policy: SUB1 mitigation policy. 8295 * @sub1_is_link_critical: Set if SUB1 is in link critical state. 8296 * @sub1_static_power: LTE SUB1 imposed static power applied 8297 * to WLAN due to LTE-WLAN coex. 8298 * @sub1_rssi: LTE SUB1 RSSI value in dBm. 8299 */ 8300 struct mws_coex_idrx_state { 8301 uint32_t vdev_id; 8302 uint32_t sub0_techid; 8303 uint32_t sub0_policy; 8304 uint32_t sub0_is_link_critical; 8305 int32_t sub0_static_power; 8306 int32_t sub0_rssi; 8307 uint32_t sub1_techid; 8308 uint32_t sub1_policy; 8309 uint32_t sub1_is_link_critical; 8310 int32_t sub1_static_power; 8311 int32_t sub1_rssi; 8312 }; 8313 8314 /** 8315 * struct mws_antenna_sharing_info - MWS Antenna sharing Info 8316 * @vdev_id: vdev id 8317 * @coex_flags: BDF values of Coex flags 8318 * @coex_config: BDF values of Coex Antenna sharing config 8319 * @tx_chain_mask: Tx Chain mask value 8320 * @rx_chain_mask: Rx Chain mask value 8321 * @rx_nss: Currently active Rx Spatial streams 8322 * @force_mrc: Forced MRC policy type 8323 * @rssi_type: RSSI value considered for MRC 8324 * @chain0_rssi: RSSI value measured at Chain-0 in dBm 8325 * @chain1_rssi: RSSI value measured at Chain-1 in dBm 8326 * @combined_rssi: RSSI value of two chains combined in dBm 8327 * @imbalance: Absolute imbalance between two Rx chains in dB 8328 * @mrc_threshold: RSSI threshold defined for the above imbalance value in dBm 8329 * @grant_duration: Antenna grant duration to WLAN, in milliseconds 8330 */ 8331 struct mws_antenna_sharing_info { 8332 uint32_t vdev_id; 8333 uint32_t coex_flags; 8334 uint32_t coex_config; 8335 uint32_t tx_chain_mask; 8336 uint32_t rx_chain_mask; 8337 uint32_t rx_nss; 8338 uint32_t force_mrc; 8339 uint32_t rssi_type; 8340 int32_t chain0_rssi; 8341 int32_t chain1_rssi; 8342 int32_t combined_rssi; 8343 uint32_t imbalance; 8344 int32_t mrc_threshold; 8345 uint32_t grant_duration; 8346 }; 8347 8348 #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG 8349 /** 8350 * enum wmi_pdev_pkt_routing_op_code_type - packet routing supported opcodes 8351 * @ADD_PKT_ROUTING: Add packet routing command 8352 * @DEL_PKT_ROUTING: Delete packet routing command 8353 * 8354 * Defines supported opcodes for packet routing/tagging 8355 */ 8356 enum wmi_pdev_pkt_routing_op_code_type { 8357 ADD_PKT_ROUTING, 8358 DEL_PKT_ROUTING, 8359 }; 8360 8361 /** 8362 * enum wmi_pdev_pkt_routing_pkt_type - supported packet types for 8363 * routing & tagging 8364 * @PDEV_PKT_TYPE_ARP_IPV4: Route/Tag for packet type ARP IPv4 (L3) 8365 * @PDEV_PKT_TYPE_NS_IPV6: Route/Tag for packet type NS IPv6 (L3) 8366 * @PDEV_PKT_TYPE_IGMP_IPV4: Route/Tag for packet type IGMP IPv4 (L3) 8367 * @PDEV_PKT_TYPE_MLD_IPV6: Route/Tag for packet type MLD IPv6 (L3) 8368 * @PDEV_PKT_TYPE_DHCP_IPV4: Route/Tag for packet type DHCP IPv4 (APP) 8369 * @PDEV_PKT_TYPE_DHCP_IPV6: Route/Tag for packet type DHCP IPv6 (APP) 8370 * @PDEV_PKT_TYPE_DNS_TCP_IPV4: Route/Tag for packet type TCP DNS IPv4 (APP) 8371 * @PDEV_PKT_TYPE_DNS_TCP_IPV6: Route/Tag for packet type TCP DNS IPv6 (APP) 8372 * @PDEV_PKT_TYPE_DNS_UDP_IPV4: Route/Tag for packet type UDP DNS IPv4 (APP) 8373 * @PDEV_PKT_TYPE_DNS_UDP_IPV6: Route/Tag for packet type UDP DNS IPv6 (APP) 8374 * @PDEV_PKT_TYPE_ICMP_IPV4: Route/Tag for packet type ICMP IPv4 (L3) 8375 * @PDEV_PKT_TYPE_ICMP_IPV6: Route/Tag for packet type ICMP IPv6 (L3) 8376 * @PDEV_PKT_TYPE_TCP_IPV4: Route/Tag for packet type TCP IPv4 (L4) 8377 * @PDEV_PKT_TYPE_TCP_IPV6: Route/Tag for packet type TCP IPv6 (L4) 8378 * @PDEV_PKT_TYPE_UDP_IPV4: Route/Tag for packet type UDP IPv4 (L4) 8379 * @PDEV_PKT_TYPE_UDP_IPV6: Route/Tag for packet type UDP IPv6 (L4) 8380 * @PDEV_PKT_TYPE_IPV4: Route/Tag for packet type IPv4 (L3) 8381 * @PDEV_PKT_TYPE_IPV6: Route/Tag for packet type IPv6 (L3) 8382 * @PDEV_PKT_TYPE_EAP: Route/Tag for packet type EAP (L2) 8383 * 8384 * Defines supported protocol types for routing/tagging 8385 */ 8386 enum wmi_pdev_pkt_routing_pkt_type { 8387 PDEV_PKT_TYPE_ARP_IPV4, 8388 PDEV_PKT_TYPE_NS_IPV6, 8389 PDEV_PKT_TYPE_IGMP_IPV4, 8390 PDEV_PKT_TYPE_MLD_IPV6, 8391 PDEV_PKT_TYPE_DHCP_IPV4, 8392 PDEV_PKT_TYPE_DHCP_IPV6, 8393 PDEV_PKT_TYPE_DNS_TCP_IPV4, 8394 PDEV_PKT_TYPE_DNS_TCP_IPV6, 8395 PDEV_PKT_TYPE_DNS_UDP_IPV4, 8396 PDEV_PKT_TYPE_DNS_UDP_IPV6, 8397 PDEV_PKT_TYPE_ICMP_IPV4, 8398 PDEV_PKT_TYPE_ICMP_IPV6, 8399 PDEV_PKT_TYPE_TCP_IPV4, 8400 PDEV_PKT_TYPE_TCP_IPV6, 8401 PDEV_PKT_TYPE_UDP_IPV4, 8402 PDEV_PKT_TYPE_UDP_IPV6, 8403 PDEV_PKT_TYPE_IPV4, 8404 PDEV_PKT_TYPE_IPV6, 8405 PDEV_PKT_TYPE_EAP, 8406 PDEV_PKT_TYPE_MAX 8407 }; 8408 8409 /** 8410 * enum wmi_pdev_dest_ring_handler_type - packet routing options post CCE 8411 * tagging 8412 * @PDEV_WIFIRXCCE_USE_CCE_E: Use REO destination ring from CCE 8413 * @PDEV_WIFIRXCCE_USE_ASPT_E: Use REO destination ring from ASPT 8414 * @PDEV_WIFIRXCCE_USE_FT_E: Use REO destination ring from FSE 8415 * @PDEV_WIFIRXCCE_USE_CCE2_E: Use REO destination ring from CCE2 8416 * 8417 * Defines various options for routing policy 8418 */ 8419 enum wmi_pdev_dest_ring_handler_type { 8420 PDEV_WIFIRXCCE_USE_CCE_E = 0, 8421 PDEV_WIFIRXCCE_USE_ASPT_E = 1, 8422 PDEV_WIFIRXCCE_USE_FT_E = 2, 8423 PDEV_WIFIRXCCE_USE_CCE2_E = 3, 8424 }; 8425 8426 /** 8427 * struct wmi_rx_pkt_protocol_routing_info - RX packet routing/tagging params 8428 * @pdev_id: pdev id 8429 * @op_code: Opcode option from wmi_pdev_pkt_routing_op_code_type enum 8430 * @routing_type_bitmap: Bitmap of protocol that is being configured. Only 8431 * one protocol can be configured in one command. Supported protocol list 8432 * from enum wmi_pdev_pkt_routing_pkt_type 8433 * @dest_ring_handler: Destination ring selection from enum 8434 * wmi_pdev_dest_ring_handler_type 8435 * @dest_ring: Destination ring number to use if dest ring handler is CCE 8436 * @meta_data: Metadata to tag with for given protocol 8437 */ 8438 struct wmi_rx_pkt_protocol_routing_info { 8439 uint32_t pdev_id; 8440 enum wmi_pdev_pkt_routing_op_code_type op_code; 8441 uint32_t routing_type_bitmap; 8442 uint32_t dest_ring_handler; 8443 uint32_t dest_ring; 8444 uint32_t meta_data; 8445 }; 8446 #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */ 8447 8448 #ifdef FEATURE_ANI_LEVEL_REQUEST 8449 /* Maximum number of freqs for which ANI level can be requested */ 8450 #define MAX_NUM_FREQS_FOR_ANI_LEVEL 20 8451 8452 /* A valid ANI level lies between 0 to 9 */ 8453 #define MAX_ANI_LEVEL 9 8454 8455 struct wmi_host_ani_level_event { 8456 uint32_t chan_freq; 8457 uint32_t ani_level; 8458 }; 8459 #endif /* FEATURE_ANI_LEVEL_REQUEST */ 8460 8461 #define WMI_HOST_TBTT_OFFSET_INVALID 0xffffffff 8462 #define MAX_SUPPORTED_NEIGHBORS 16 8463 8464 /* command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */ 8465 enum wmi_host_tbtt_offset_cmd_type { 8466 WMI_HOST_PDEV_GET_TBTT_OFFSET, 8467 WMI_HOST_PDEV_SET_TBTT_OFFSET, 8468 }; 8469 8470 /** 8471 * struct wmi_raw_event_buffer - fw event buffers 8472 * @evt_raw_buf: event raw buffer 8473 * @evt_processed_buf: event processed buffer 8474 */ 8475 struct wmi_raw_event_buffer { 8476 void *evt_raw_buf; 8477 void *evt_processed_buf; 8478 }; 8479 8480 /** 8481 * struct wmi_pdev_enable_tx_mode_selection - fw tx mode selection 8482 * @pdev_id: radio id 8483 * @enable_tx_mode_selection: flag to enable tx mode selection 8484 */ 8485 struct wmi_pdev_enable_tx_mode_selection { 8486 uint32_t pdev_id; 8487 uint32_t enable_tx_mode_selection; 8488 }; 8489 8490 #endif /* _WMI_UNIFIED_PARAM_H_ */ 8491