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