Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
| 29 | * This file contains the API definitions for the Unified Wireless Module |
| 30 | * Interface (WMI). |
| 31 | */ |
| 32 | |
| 33 | #ifndef _WMI_UNIFIED_PARAM_H_ |
| 34 | #define _WMI_UNIFIED_PARAM_H_ |
Padma, Santhosh Kumar | 7352405 | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 35 | |
| 36 | #define MAC_MAX_KEY_LENGTH 32 |
| 37 | #define MAC_PN_LENGTH 8 |
| 38 | #define MAX_MAC_HEADER_LEN 32 |
| 39 | #define MIN_MAC_HEADER_LEN 24 |
| 40 | #define QOS_CONTROL_LEN 2 |
| 41 | |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 42 | #define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */ |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 43 | #define WMI_MAC_MAX_SSID_LENGTH 32 |
| 44 | #define WMI_SCAN_MAX_NUM_SSID 0x0A |
| 45 | #define mgmt_tx_dl_frm_len 64 |
| 46 | #define WMI_SMPS_MASK_LOWER_16BITS 0xFF |
| 47 | #define WMI_SMPS_MASK_UPPER_3BITS 0x7 |
| 48 | #define WMI_SMPS_PARAM_VALUE_S 29 |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 49 | #define WMI_MAX_NUM_ARGS 8 |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 50 | /* The size of the utc time in bytes. */ |
| 51 | #define WMI_SIZE_UTC_TIME (10) |
| 52 | /* The size of the utc time error in bytes. */ |
| 53 | #define WMI_SIZE_UTC_TIME_ERROR (5) |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 54 | #define WMI_MCC_MIN_CHANNEL_QUOTA 20 |
| 55 | #define WMI_MCC_MAX_CHANNEL_QUOTA 80 |
| 56 | #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30 |
| 57 | #define WMI_BEACON_TX_BUFFER_SIZE (512) |
| 58 | #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3 |
| 59 | #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 |
| 60 | #define WMI_RSSI_THOLD_DEFAULT -300 |
| 61 | #define WMI_NLO_FREQ_THRESH 1000 |
| 62 | #define WMI_SEC_TO_MSEC(sec) (sec * 1000) |
| 63 | #define WMI_MSEC_TO_USEC(msec) (msec * 1000) |
| 64 | #define WMI_ETH_LEN 64 |
| 65 | #define WMI_QOS_NUM_TSPEC_MAX 2 |
| 66 | #define WMI_QOS_NUM_AC_MAX 4 |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 67 | #define WMI_IPV4_ADDR_LEN 4 |
| 68 | #define WMI_KEEP_ALIVE_NULL_PKT 1 |
| 69 | #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 |
Himanshu Agarwal | 9efd9bf | 2016-03-09 18:49:18 +0530 | [diff] [blame] | 70 | #define WMI_MAC_MAX_KEY_LENGTH 32 |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 71 | #define WMI_KRK_KEY_LEN 16 |
| 72 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 73 | #define WMI_BTK_KEY_LEN 32 |
| 74 | #define WMI_ROAM_R0KH_ID_MAX_LEN 48 |
| 75 | #define WMI_ROAM_SCAN_PSK_SIZE 32 |
| 76 | #endif |
| 77 | #define WMI_NOISE_FLOOR_DBM_DEFAULT (-96) |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 78 | #define WMI_MAC_IPV6_ADDR_LEN 16 |
Govind Singh | c7cd2d6 | 2016-06-21 14:33:26 +0530 | [diff] [blame] | 79 | #define WMI_OFFLOAD_DISABLE 0 |
| 80 | #define WMI_OFFLOAD_ENABLE 1 |
Govind Singh | fa201d9 | 2016-06-08 19:40:11 +0530 | [diff] [blame] | 81 | #ifdef WLAN_NS_OFFLOAD |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 82 | /* support only one IPv6 offload */ |
| 83 | #define WMI_MAC_NS_OFFLOAD_SIZE 1 |
| 84 | /* Number of target IP V6 addresses for NS offload */ |
| 85 | #define WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16 |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 86 | #define WMI_IPV6_ADDR_VALID 1 |
| 87 | #endif /* WLAN_NS_OFFLOAD */ |
| 88 | #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8 |
| 89 | #define WMI_ROAM_MAX_CHANNELS 80 |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 90 | #ifdef FEATURE_WLAN_EXTSCAN |
| 91 | #define WMI_MAX_EXTSCAN_MSG_SIZE 1536 |
| 92 | #define WMI_EXTSCAN_REST_TIME 100 |
| 93 | #define WMI_EXTSCAN_MAX_SCAN_TIME 50000 |
| 94 | #define WMI_EXTSCAN_BURST_DURATION 150 |
| 95 | #endif |
| 96 | #define WMI_SCAN_NPROBES_DEFAULT (2) |
| 97 | #define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */ |
| 98 | #define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */ |
| 99 | #define WMI_NLO_FREQ_THRESH 1000 /* in MHz */ |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 100 | |
| 101 | #define MAX_UTF_EVENT_LENGTH 2048 |
| 102 | #define MAX_WMI_UTF_LEN 252 |
| 103 | #define MAX_WMI_QVIT_LEN 252 |
| 104 | #define THERMAL_LEVELS 4 |
| 105 | #define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES 256 |
| 106 | #define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \ |
| 107 | (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32) |
| 108 | #define LTEU_MAX_BINS 10 |
| 109 | #define ATF_ACTIVED_MAX_CLIENTS 50 |
| 110 | #define ATF_ACTIVED_MAX_ATFGROUPS 8 |
| 111 | #define CTL_5G_SIZE 1536 |
| 112 | #define CTL_2G_SIZE 684 |
| 113 | #define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE) |
| 114 | #define IEEE80211_MICBUF_SIZE (8+8) |
| 115 | #define IEEE80211_TID_SIZE 17 |
| 116 | #define WME_NUM_AC 4 |
| 117 | #define SMART_ANT_MODE_SERIAL 0 |
| 118 | #define SMART_ANT_MODE_PARALLEL 1 |
| 119 | #define IEEE80211_WEP_NKID 4 /* number of key ids */ |
| 120 | #define WPI_IV_LEN 16 |
| 121 | #define WMI_SCAN_MAX_NUM_BSSID 10 |
| 122 | #define MAX_CHANS 1023 |
| 123 | #define TARGET_OEM_CONFIGURE_LCI 0x0A |
| 124 | #define RTT_LCI_ALTITUDE_MASK 0x3FFFFFFF |
| 125 | #define TARGET_OEM_CONFIGURE_LCR 0x09 |
| 126 | #define RTT_TIMEOUT_MS 180 |
| 127 | #define MAX_SUPPORTED_RATES 128 |
| 128 | #define WMI_HOST_MAX_BUFFER_SIZE 1712 |
Govind Singh | 41da315 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 129 | #define WMI_HAL_MAX_SANTENNA 4 |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 130 | |
Govind Singh | ec1401a | 2016-07-08 19:00:56 +0530 | [diff] [blame] | 131 | #ifdef CONFIG_WIN |
| 132 | #if ATH_SUPPORT_FIPS |
| 133 | #define FIPS_ALIGN 4 |
| 134 | #define FIPS_ALIGNTO(__addr, __to) ((((unsigned long int)(__addr)) + (__to) - 1) & ~((__to) - 1)) |
| 135 | #define FIPS_IS_ALIGNED(__addr, __to) (!(((unsigned long int)(__addr)) & ((__to)-1))) |
| 136 | #endif |
| 137 | #endif |
| 138 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 139 | #define WMI_HOST_F_MS(_v, _f) \ |
| 140 | (((_v) & (_f)) >> (_f##_S)) |
| 141 | |
| 142 | #define WMI_HOST_F_RMW(_var, _v, _f) \ |
| 143 | do { \ |
| 144 | (_var) &= ~(_f); \ |
| 145 | (_var) |= (((_v) << (_f##_S)) & (_f)); \ |
| 146 | } while (0) |
| 147 | |
| 148 | /* TXBF capabilities masks */ |
| 149 | #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0 |
| 150 | #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1 |
| 151 | #define WMI_HOST_TXBF_CONF_SU_TX_BFEE \ |
| 152 | (WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S) |
| 153 | #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \ |
| 154 | WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE) |
| 155 | #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \ |
| 156 | WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE) |
| 157 | |
| 158 | #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1 |
| 159 | #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1 |
| 160 | #define WMI_HOST_TXBF_CONF_MU_TX_BFEE \ |
| 161 | (WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S) |
| 162 | #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \ |
| 163 | WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE) |
| 164 | #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \ |
| 165 | WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE) |
| 166 | |
| 167 | #define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2 |
| 168 | #define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1 |
| 169 | #define WMI_HOST_TXBF_CONF_SU_TX_BFER \ |
| 170 | (WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S) |
| 171 | #define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \ |
| 172 | WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER) |
| 173 | #define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \ |
| 174 | WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER) |
| 175 | |
| 176 | #define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3 |
| 177 | #define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1 |
| 178 | #define WMI_HOST_TXBF_CONF_MU_TX_BFER \ |
| 179 | (WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S) |
| 180 | #define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \ |
| 181 | WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER) |
| 182 | #define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \ |
| 183 | WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER) |
| 184 | |
| 185 | #define WMI_HOST_TXBF_CONF_STS_CAP_S 4 |
| 186 | #define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7 |
| 187 | #define WMI_HOST_TXBF_CONF_STS_CAP \ |
| 188 | (WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S) |
| 189 | #define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \ |
| 190 | WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP); |
| 191 | #define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \ |
| 192 | WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP) |
| 193 | |
| 194 | #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7 |
| 195 | #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1 |
| 196 | #define WMI_HOST_TXBF_CONF_IMPLICIT_BF \ |
| 197 | (WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S) |
| 198 | #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \ |
| 199 | WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF) |
| 200 | #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \ |
| 201 | WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF) |
| 202 | |
| 203 | #define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8 |
| 204 | #define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7 |
| 205 | #define WMI_HOST_TXBF_CONF_BF_SND_DIM \ |
| 206 | (WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S) |
| 207 | #define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \ |
| 208 | WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM) |
| 209 | #define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \ |
| 210 | WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM) |
| 211 | |
| 212 | #define WMI_HOST_TPC_RATE_MAX 160 |
| 213 | #define WMI_HOST_TPC_TX_NUM_CHAIN 4 |
| 214 | #define WMI_HOST_RXG_CAL_CHAN_MAX 4 |
| 215 | #define WMI_HOST_MAX_NUM_CHAINS 4 |
Poddar, Siddarth | 794b996 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 216 | #define WMI_MAX_NUM_OF_RATE_THRESH 4 |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 217 | |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 218 | #include "qdf_atomic.h" |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 219 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 220 | #ifdef BIG_ENDIAN_HOST |
| 221 | /* This API is used in copying in elements to WMI message, |
| 222 | since WMI message uses multilpes of 4 bytes, This API |
| 223 | converts length into multiples of 4 bytes, and performs copy |
| 224 | */ |
| 225 | #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) do { \ |
| 226 | int j; \ |
| 227 | u_int32_t *src, *dest; \ |
| 228 | src = (u_int32_t *)srcp; \ |
| 229 | dest = (u_int32_t *)destp; \ |
| 230 | for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \ |
| 231 | *(dest+j) = qdf_le32_to_cpu(*(src+j)); \ |
| 232 | } \ |
| 233 | } while (0) |
| 234 | #else |
| 235 | |
| 236 | #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\ |
| 237 | srcp, len) |
| 238 | |
| 239 | #endif |
| 240 | |
| 241 | /** macro to convert MAC address from WMI word format to char array */ |
| 242 | #define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \ |
| 243 | (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \ |
| 244 | (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \ |
| 245 | (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \ |
| 246 | (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \ |
| 247 | (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \ |
| 248 | (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \ |
| 249 | } while (0) |
| 250 | |
| 251 | #define TARGET_INIT_STATUS_SUCCESS 0x0 |
| 252 | #define TARGET_INIT_STATUS_GEN_FAILED 0x1 |
| 253 | #define TARGET_GET_INIT_STATUS_REASON(status) ((status) & 0xffff) |
| 254 | #define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff) |
Selvaraj, Sridhar | 0a1427f | 2016-07-04 21:40:23 +0530 | [diff] [blame] | 255 | |
| 256 | #define MAX_ASSOC_IE_LENGTH 1024 |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 257 | typedef uint32_t TARGET_INIT_STATUS; |
| 258 | |
| 259 | typedef enum { |
| 260 | WMI_HOST_MODE_11A = 0, /* 11a Mode */ |
| 261 | WMI_HOST_MODE_11G = 1, /* 11b/g Mode */ |
| 262 | WMI_HOST_MODE_11B = 2, /* 11b Mode */ |
| 263 | WMI_HOST_MODE_11GONLY = 3, /* 11g only Mode */ |
| 264 | WMI_HOST_MODE_11NA_HT20 = 4, /* 11a HT20 mode */ |
| 265 | WMI_HOST_MODE_11NG_HT20 = 5, /* 11g HT20 mode */ |
| 266 | WMI_HOST_MODE_11NA_HT40 = 6, /* 11a HT40 mode */ |
| 267 | WMI_HOST_MODE_11NG_HT40 = 7, /* 11g HT40 mode */ |
| 268 | WMI_HOST_MODE_11AC_VHT20 = 8, |
| 269 | WMI_HOST_MODE_11AC_VHT40 = 9, |
| 270 | WMI_HOST_MODE_11AC_VHT80 = 10, |
| 271 | WMI_HOST_MODE_11AC_VHT20_2G = 11, |
| 272 | WMI_HOST_MODE_11AC_VHT40_2G = 12, |
| 273 | WMI_HOST_MODE_11AC_VHT80_2G = 13, |
| 274 | WMI_HOST_MODE_11AC_VHT80_80 = 14, |
| 275 | WMI_HOST_MODE_11AC_VHT160 = 15, |
| 276 | WMI_HOST_MODE_UNKNOWN = 16, |
| 277 | WMI_HOST_MODE_MAX = 16 |
| 278 | } WMI_HOST_WLAN_PHY_MODE; |
| 279 | |
| 280 | |
Gupta, Kapil | 7b76800 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 281 | /** |
| 282 | * enum wmi_dwelltime_adaptive_mode: dwelltime_mode |
| 283 | * @WMI_DWELL_MODE_DEFAULT: Use firmware default mode |
| 284 | * @WMI_DWELL_MODE_CONSERVATIVE: Conservative adaptive mode |
| 285 | * @WMI_DWELL_MODE_MODERATE: Moderate adaptive mode |
| 286 | * @WMI_DWELL_MODE_AGGRESSIVE: Aggressive adaptive mode |
| 287 | * @WMI_DWELL_MODE_STATIC: static adaptive mode |
| 288 | */ |
| 289 | enum wmi_dwelltime_adaptive_mode { |
| 290 | WMI_DWELL_MODE_DEFAULT = 0, |
| 291 | WMI_DWELL_MODE_CONSERVATIVE = 1, |
| 292 | WMI_DWELL_MODE_MODERATE = 2, |
| 293 | WMI_DWELL_MODE_AGGRESSIVE = 3, |
| 294 | WMI_DWELL_MODE_STATIC = 4 |
| 295 | }; |
| 296 | |
Manishekar Chandrasekaran | b8c5938 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 297 | #define MAX_NUM_CHAN 128 |
| 298 | |
Govind Singh | c7cd2d6 | 2016-06-21 14:33:26 +0530 | [diff] [blame] | 299 | /* WME stream classes */ |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 300 | #define WMI_HOST_AC_BE 0 /* best effort */ |
| 301 | #define WMI_HOST_AC_BK 1 /* background */ |
| 302 | #define WMI_HOST_AC_VI 2 /* video */ |
| 303 | #define WMI_HOST_AC_VO 3 /* voice */ |
Govind Singh | c7cd2d6 | 2016-06-21 14:33:26 +0530 | [diff] [blame] | 304 | #define WMI_TID_TO_AC(_tid) (\ |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 305 | (((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \ |
| 306 | (((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \ |
| 307 | (((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \ |
| 308 | WMI_HOST_AC_VO) |
Govind Singh | c7cd2d6 | 2016-06-21 14:33:26 +0530 | [diff] [blame] | 309 | |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 310 | /** |
| 311 | * struct vdev_create_params - vdev create cmd parameter |
| 312 | * @if_id: interface id |
| 313 | * @type: interface type |
| 314 | * @subtype: interface subtype |
| 315 | */ |
| 316 | struct vdev_create_params { |
| 317 | uint8_t if_id; |
| 318 | uint32_t type; |
| 319 | uint32_t subtype; |
Kiran Kumar Lokere | 0ae9fb9 | 2016-05-02 12:32:27 -0700 | [diff] [blame] | 320 | uint8_t nss_2g; |
| 321 | uint8_t nss_5g; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 322 | }; |
| 323 | |
| 324 | /** |
| 325 | * struct vdev_delete_params - vdev delete cmd parameter |
| 326 | * @if_id: interface id |
| 327 | */ |
| 328 | struct vdev_delete_params { |
| 329 | uint8_t if_id; |
| 330 | }; |
| 331 | |
| 332 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 333 | * struct channel_param - Channel paramters with all |
| 334 | * info required by target. |
| 335 | * @chan_id: channel id |
| 336 | * @pwr: channel power |
| 337 | * @mhz: channel frequency |
| 338 | * @half_rate: is half rate |
| 339 | * @quarter_rate: is quarter rate |
| 340 | * @dfs_set: is dfs channel |
| 341 | * @dfs_set_cfreq2: is secondary freq dfs channel |
| 342 | * @is_chan_passive: is this passive channel |
| 343 | * @allow_ht: HT allowed in chan |
| 344 | * @allow_vht: VHT allowed on chan |
| 345 | * @phy_mode: phymode (vht80 or ht40 or ...) |
| 346 | * @cfreq1: centre frequency on primary |
| 347 | * @cfreq2: centre frequency on secondary |
| 348 | * @maxpower: max power for channel |
| 349 | * @minpower: min power for channel |
| 350 | * @maxreqpower: Max regulatory power |
| 351 | * @antennamac: Max antenna |
| 352 | * @reg_class_id: Regulatory class id. |
| 353 | */ |
| 354 | |
| 355 | struct channel_param { |
| 356 | uint8_t chan_id; |
| 357 | uint8_t pwr; |
| 358 | uint32_t mhz; |
| 359 | uint32_t half_rate:1, |
| 360 | quarter_rate:1, |
| 361 | dfs_set:1, |
| 362 | dfs_set_cfreq2:1, |
| 363 | is_chan_passive:1, |
| 364 | allow_ht:1, |
| 365 | allow_vht:1; |
| 366 | uint32_t phy_mode; |
| 367 | uint32_t cfreq1; |
| 368 | uint32_t cfreq2; |
| 369 | int8_t maxpower; |
| 370 | int8_t minpower; |
| 371 | int8_t maxregpower; |
| 372 | uint8_t antennamax; |
| 373 | uint8_t reg_class_id; |
| 374 | }; |
| 375 | |
| 376 | /** |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 377 | * struct vdev_stop_params - vdev stop cmd parameter |
| 378 | * @vdev_id: vdev id |
| 379 | */ |
| 380 | struct vdev_stop_params { |
| 381 | uint8_t vdev_id; |
| 382 | }; |
| 383 | |
| 384 | /** |
| 385 | * struct vdev_up_params - vdev up cmd parameter |
| 386 | * @vdev_id: vdev id |
| 387 | * @assoc_id: association id |
| 388 | */ |
| 389 | struct vdev_up_params { |
| 390 | uint8_t vdev_id; |
| 391 | uint16_t assoc_id; |
| 392 | }; |
| 393 | |
| 394 | /** |
| 395 | * struct vdev_down_params - vdev down cmd parameter |
| 396 | * @vdev_id: vdev id |
| 397 | */ |
| 398 | struct vdev_down_params { |
| 399 | uint8_t vdev_id; |
| 400 | }; |
| 401 | |
| 402 | /** |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 403 | * struct mac_ssid - mac ssid structure |
| 404 | * @length: |
| 405 | * @mac_ssid[WMI_MAC_MAX_SSID_LENGTH]: |
| 406 | */ |
| 407 | struct mac_ssid { |
| 408 | uint8_t length; |
| 409 | uint8_t mac_ssid[WMI_MAC_MAX_SSID_LENGTH]; |
| 410 | } qdf_packed; |
| 411 | |
| 412 | /** |
| 413 | * struct vdev_start_params - vdev start cmd parameter |
| 414 | * @vdev_id: vdev id |
| 415 | * @chan_freq: channel frequency |
| 416 | * @chan_mode: channel mode |
| 417 | * @band_center_freq1: center freq 1 |
| 418 | * @band_center_freq2: center freq 2 |
| 419 | * @flags: flags to set like pmf_enabled etc. |
| 420 | * @is_dfs: flag to check if dfs enabled |
| 421 | * @beacon_intval: beacon interval |
| 422 | * @dtim_period: dtim period |
| 423 | * @max_txpow: max tx power |
| 424 | * @is_restart: flag to check if it is vdev |
| 425 | * @ssid: ssid and ssid length info |
| 426 | * @preferred_tx_streams: preferred tx streams |
| 427 | * @preferred_rx_streams: preferred rx streams |
| 428 | * @intr_update: flag to check if need to update |
| 429 | * required wma interface params |
| 430 | * @intr_ssid: pointer to wma interface ssid |
| 431 | * @intr_flags: poiter to wma interface flags |
| 432 | * @requestor_id: to update requestor id |
| 433 | * @disable_hw_ack: to update disable hw ack flag |
| 434 | * @info: to update channel info |
| 435 | * @reg_info_1: to update min power, max power, |
| 436 | * reg power and reg class id |
| 437 | * @reg_info_2: to update antennamax |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 438 | * @oper_mode: Operating mode |
| 439 | * @dfs_pri_multiplier: DFS primary multiplier |
| 440 | * allow pulse if they are within multiple of PRI for the radar type |
| 441 | * @dot11_mode: Phy mode (VHT20/VHT80...) |
| 442 | * @disable_hw_ack: Disable hw ack if chan is dfs channel for cac |
| 443 | * @channel_param: Channel params required by target. |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 444 | */ |
| 445 | struct vdev_start_params { |
| 446 | uint8_t vdev_id; |
| 447 | uint32_t chan_freq; |
| 448 | uint32_t chan_mode; |
| 449 | uint32_t band_center_freq1; |
| 450 | uint32_t band_center_freq2; |
| 451 | uint32_t flags; |
| 452 | bool is_dfs; |
| 453 | uint32_t beacon_intval; |
| 454 | uint32_t dtim_period; |
| 455 | int32_t max_txpow; |
| 456 | bool is_restart; |
Siddarth Poddar | 466963e | 2016-03-29 15:13:26 +0530 | [diff] [blame] | 457 | bool is_half_rate; |
| 458 | bool is_quarter_rate; |
| 459 | uint32_t dis_hw_ack; |
| 460 | uint32_t flag_dfs; |
| 461 | uint8_t hidden_ssid; |
| 462 | uint8_t pmf_enabled; |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 463 | struct mac_ssid ssid; |
Siddarth Poddar | 466963e | 2016-03-29 15:13:26 +0530 | [diff] [blame] | 464 | uint32_t num_noa_descriptors; |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 465 | uint32_t preferred_rx_streams; |
| 466 | uint32_t preferred_tx_streams; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 467 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 468 | uint8_t oper_mode; |
| 469 | int32_t dfs_pri_multiplier; |
| 470 | uint8_t dot11_mode; |
| 471 | uint8_t disable_hw_ack; |
| 472 | struct channel_param channel; |
| 473 | #endif |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 474 | }; |
| 475 | |
| 476 | /** |
| 477 | * struct hidden_ssid_vdev_restart_params - |
| 478 | * vdev restart cmd parameter |
| 479 | * @session_id: session id |
| 480 | * @ssid_len: ssid length |
| 481 | * @ssid: ssid |
| 482 | * @flags: flags |
| 483 | * @requestor_id: requestor id |
| 484 | * @disable_hw_ack: flag to disable hw ack feature |
| 485 | * @mhz: channel frequency |
| 486 | * @band_center_freq1: center freq 1 |
| 487 | * @band_center_freq2: center freq 2 |
| 488 | * @info: channel info |
| 489 | * @reg_info_1: contains min power, max power, |
| 490 | * reg power and reg class id |
| 491 | * @reg_info_2: contains antennamax |
| 492 | * @hidden_ssid_restart_in_progress: |
| 493 | * flag to check if restart is in progress |
| 494 | */ |
| 495 | struct hidden_ssid_vdev_restart_params { |
| 496 | uint8_t session_id; |
| 497 | uint32_t ssid_len; |
| 498 | uint32_t ssid[8]; |
| 499 | uint32_t flags; |
| 500 | uint32_t requestor_id; |
| 501 | uint32_t disable_hw_ack; |
| 502 | uint32_t mhz; |
| 503 | uint32_t band_center_freq1; |
| 504 | uint32_t band_center_freq2; |
| 505 | uint32_t info; |
| 506 | uint32_t reg_info_1; |
| 507 | uint32_t reg_info_2; |
| 508 | qdf_atomic_t hidden_ssid_restart_in_progress; |
| 509 | }; |
| 510 | |
| 511 | /** |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 512 | * struct vdev_set_params - vdev set cmd parameter |
| 513 | * @if_id: vdev id |
| 514 | * @param_id: parameter id |
| 515 | * @param_value: parameter value |
| 516 | */ |
| 517 | struct vdev_set_params { |
| 518 | uint32_t if_id; |
| 519 | uint32_t param_id; |
| 520 | uint32_t param_value; |
| 521 | }; |
| 522 | |
| 523 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 524 | * struct vdev_install_key_params - vdev key set cmd parameter |
| 525 | * @wk_keylen: key length |
| 526 | * @wk_flags: key flags |
| 527 | * @ic_cipher: cipher |
| 528 | * @if_id: vdev id |
| 529 | * @is_group_key: Group key |
| 530 | * @wk_keyix: key index |
| 531 | * @def_keyid: default key index |
| 532 | * @wk_keytsc: Key TSC |
| 533 | * @wk_keyrsc: key RSC |
| 534 | * @key_data: pounter to key data |
| 535 | * @force_none: force |
| 536 | * @is_host_based_crypt: Host based encrypt |
| 537 | * @is_xmit_or_recv_key: xmit or recieve key |
| 538 | * @wk_recviv: WAPI recv IV |
| 539 | * @wk_txiv: WAPI TX IV |
| 540 | */ |
| 541 | struct vdev_install_key_params { |
| 542 | uint8_t wk_keylen; |
| 543 | uint16_t wk_flags; |
| 544 | uint8_t ic_cipher; |
| 545 | uint8_t if_id; |
| 546 | bool is_group_key; |
| 547 | uint16_t wk_keyix; |
| 548 | uint8_t def_keyid; |
| 549 | uint64_t wk_keytsc; |
| 550 | uint64_t *wk_keyrsc; |
| 551 | uint8_t *key_data; |
| 552 | uint8_t force_none; |
| 553 | bool is_host_based_crypt; |
| 554 | bool is_xmit_or_recv_key; |
| 555 | #if ATH_SUPPORT_WAPI |
| 556 | uint8_t *wk_recviv; |
| 557 | uint32_t *wk_txiv; |
| 558 | #endif |
| 559 | }; |
| 560 | |
| 561 | /** |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 562 | * struct peer_delete_params - peer delete cmd parameter |
| 563 | * @vdev_id: vdev id |
| 564 | */ |
| 565 | struct peer_delete_params { |
| 566 | uint8_t vdev_id; |
| 567 | }; |
| 568 | |
| 569 | /** |
| 570 | * struct peer_flush_params - peer flush cmd parameter |
| 571 | * @peer_tid_bitmap: peer tid bitmap |
| 572 | * @vdev_id: vdev id |
| 573 | */ |
| 574 | struct peer_flush_params { |
| 575 | uint32_t peer_tid_bitmap; |
| 576 | uint8_t vdev_id; |
| 577 | }; |
| 578 | |
| 579 | /** |
| 580 | * struct peer_set_params - peer set cmd parameter |
| 581 | * @param_id: parameter id |
| 582 | * @param_value: parameter value |
| 583 | * @vdev_id: vdev id |
| 584 | */ |
| 585 | struct peer_set_params { |
| 586 | uint32_t param_id; |
| 587 | uint32_t param_value; |
| 588 | uint32_t vdev_id; |
| 589 | }; |
| 590 | |
| 591 | /** |
| 592 | * struct peer_create_params - peer create cmd parameter |
| 593 | * @peer_addr: peer mac addr |
| 594 | * @peer_type: peer type |
| 595 | * @vdev_id: vdev id |
| 596 | */ |
| 597 | struct peer_create_params { |
| 598 | const uint8_t *peer_addr; |
| 599 | uint32_t peer_type; |
| 600 | uint32_t vdev_id; |
| 601 | }; |
| 602 | |
| 603 | /** |
| 604 | * struct peer_remove_params - peer remove cmd parameter |
| 605 | * @bssid: bss id |
| 606 | * @vdev_id: vdev id |
| 607 | * @roam_synch_in_progress: flag to indicate if roaming is in progress |
| 608 | */ |
| 609 | struct peer_remove_params { |
| 610 | uint8_t *bssid; |
| 611 | uint8_t vdev_id; |
| 612 | bool roam_synch_in_progress; |
| 613 | }; |
| 614 | |
| 615 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 616 | * Stats ID enums defined in host |
| 617 | */ |
| 618 | typedef enum { |
| 619 | WMI_HOST_REQUEST_PEER_STAT = 0x01, |
| 620 | WMI_HOST_REQUEST_AP_STAT = 0x02, |
| 621 | WMI_HOST_REQUEST_PDEV_STAT = 0x04, |
| 622 | WMI_HOST_REQUEST_VDEV_STAT = 0x08, |
| 623 | WMI_HOST_REQUEST_BCNFLT_STAT = 0x10, |
| 624 | WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20, |
| 625 | WMI_HOST_REQUEST_INST_STAT = 0x40, |
| 626 | WMI_HOST_REQUEST_PEER_EXTD_STAT = 0x80, |
| 627 | WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100, |
| 628 | } wmi_host_stats_id; |
| 629 | |
| 630 | typedef struct { |
| 631 | uint16_t cfg_retry_count; |
| 632 | uint16_t retry_count; |
| 633 | } wmi_host_inst_rssi_args; |
| 634 | |
| 635 | /** |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 636 | * struct stats_request_params - stats_request cmd parameter |
| 637 | * @stats_id: statistics id |
| 638 | * @vdev_id: vdev id |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 639 | * @wmi_host_inst_rssi_args: Instantaneous rssi stats args |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 640 | */ |
| 641 | struct stats_request_params { |
| 642 | uint32_t stats_id; |
| 643 | uint32_t vdev_id; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 644 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 645 | wmi_host_inst_rssi_args rssi_args; |
| 646 | #endif |
| 647 | }; |
| 648 | |
| 649 | /** |
| 650 | * struct bss_chan_info_request_params - BSS chan info params |
| 651 | * @param: parameter value |
| 652 | */ |
| 653 | struct bss_chan_info_request_params { |
| 654 | uint32_t param; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 655 | }; |
| 656 | |
| 657 | /** |
| 658 | * struct green_ap_ps_params - green ap ps cmd parameter |
| 659 | * @value: parameter value |
| 660 | */ |
| 661 | struct green_ap_ps_params { |
| 662 | uint32_t value; |
| 663 | }; |
| 664 | |
| 665 | /** |
| 666 | * struct wow_cmd_params - wow cmd parameter |
| 667 | * @enable: wow enable or disable flag |
| 668 | * @can_suspend_link: flag to indicate if link can be suspended |
| 669 | * @pause_iface_config: interface config |
| 670 | */ |
| 671 | struct wow_cmd_params { |
| 672 | bool enable; |
| 673 | bool can_suspend_link; |
| 674 | uint8_t pause_iface_config; |
| 675 | }; |
| 676 | |
| 677 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 678 | * struct wow_add_wakeup_params - wow wakeup parameter |
| 679 | * @type: param type |
| 680 | */ |
| 681 | struct wow_add_wakeup_params { |
| 682 | uint32_t type; |
| 683 | }; |
| 684 | |
| 685 | /** |
| 686 | * struct wow_add_wakeup_pattern_params - Add WoW pattern params |
| 687 | * @pattern_bytes: pointer to pattern bytes |
| 688 | * @mask_bytes: pointer to mask bytes |
| 689 | * @pattern_len: pattern length |
| 690 | * @pattern_id: pattern id |
| 691 | */ |
| 692 | struct wow_add_wakeup_pattern_params { |
| 693 | uint8_t *pattern_bytes; |
| 694 | uint8_t *mask_bytes; |
| 695 | uint32_t pattern_len; |
| 696 | uint32_t pattern_id; |
| 697 | }; |
| 698 | |
| 699 | /** |
| 700 | * struct wow_remove_wakeup_pattern params - WoW remove pattern param |
| 701 | * @pattern_bytes: pointer to pattern bytes |
| 702 | * @mask_bytes: Mask bytes |
| 703 | * @pattern_id: pattern identifier |
| 704 | */ |
| 705 | struct wow_remove_wakeup_pattern_params { |
| 706 | uint32_t *pattern_bytes; |
| 707 | uint32_t *mask_bytes; |
| 708 | uint32_t pattern_id; |
| 709 | }; |
| 710 | |
| 711 | |
| 712 | /** |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 713 | * struct packet_enable_params - packet enable cmd parameter |
| 714 | * @vdev_id: vdev id |
| 715 | * @enable: flag to indicate if parameter can be enabled or disabled |
| 716 | */ |
| 717 | struct packet_enable_params { |
| 718 | uint8_t vdev_id; |
| 719 | bool enable; |
| 720 | }; |
| 721 | |
| 722 | /** |
| 723 | * struct suspend_params - suspend cmd parameter |
| 724 | * @disable_target_intr: disable target interrupt |
| 725 | */ |
| 726 | struct suspend_params { |
| 727 | uint8_t disable_target_intr; |
| 728 | }; |
| 729 | |
| 730 | /** |
| 731 | * struct pdev_params - pdev set cmd parameter |
| 732 | * @param_id: parameter id |
| 733 | * @param_value: parameter value |
| 734 | */ |
| 735 | struct pdev_params { |
| 736 | uint32_t param_id; |
| 737 | uint32_t param_value; |
| 738 | }; |
| 739 | |
| 740 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 741 | * struct beacon_tmpl_params - beacon template cmd parameter |
| 742 | * @vdev_id: vdev id |
| 743 | * @tim_ie_offset: tim ie offset |
| 744 | * @tmpl_len: beacon template length |
| 745 | * @tmpl_len_aligned: beacon template alignment |
| 746 | * @frm: beacon template parameter |
| 747 | */ |
| 748 | struct beacon_tmpl_params { |
| 749 | uint8_t vdev_id; |
| 750 | uint32_t tim_ie_offset; |
| 751 | uint32_t tmpl_len; |
| 752 | uint32_t tmpl_len_aligned; |
| 753 | uint8_t *frm; |
| 754 | }; |
| 755 | |
Govind Singh | fa201d9 | 2016-06-08 19:40:11 +0530 | [diff] [blame] | 756 | #ifdef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 757 | /** |
| 758 | * struct beacon_params - beacon cmd parameter |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 759 | * @vdev_id: vdev id |
| 760 | * @tim_ie_offset: tim ie offset |
| 761 | * @tmpl_len: beacon template length |
| 762 | * @tmpl_len_aligned: beacon template alignment |
| 763 | * @frm: beacon template parameter |
| 764 | */ |
| 765 | struct beacon_params { |
| 766 | uint8_t vdev_id; |
| 767 | uint32_t tim_ie_offset; |
| 768 | uint32_t tmpl_len; |
| 769 | uint32_t tmpl_len_aligned; |
| 770 | uint8_t *frm; |
| 771 | }; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 772 | #else |
| 773 | /** |
| 774 | * struct beacon_params - beacon cmd parameter |
| 775 | * @vdev_id: vdev id |
| 776 | * @beaconInterval: Beacon interval |
| 777 | * @wbuf: beacon buffer |
| 778 | * @frame_ctrl: frame control field |
| 779 | * @bcn_txant: beacon antenna |
| 780 | * @is_dtim_count_zero: is it dtim beacon |
| 781 | * @is_bitctl_reqd: is Bit control required |
| 782 | * @is_high_latency: Is this high latency target |
| 783 | */ |
| 784 | struct beacon_params { |
| 785 | uint8_t vdev_id; |
| 786 | uint16_t beaconInterval; |
| 787 | qdf_nbuf_t wbuf; |
| 788 | uint16_t frame_ctrl; |
| 789 | uint32_t bcn_txant; |
| 790 | bool is_dtim_count_zero; |
| 791 | bool is_bitctl_reqd; |
| 792 | bool is_high_latency; |
| 793 | }; |
| 794 | #endif |
| 795 | |
| 796 | /** |
| 797 | * struct bcn_prb_template_params - beacon probe template parameter |
| 798 | * @vdev_id: vdev id |
| 799 | * @buf_len: Template length |
| 800 | * @caps: capabilities field |
| 801 | * @erp: ERP field |
| 802 | */ |
| 803 | struct bcn_prb_template_params { |
| 804 | uint8_t vdev_id; |
| 805 | int buf_len; |
| 806 | uint16_t caps; |
| 807 | uint8_t erp; |
| 808 | }; |
| 809 | |
| 810 | #define WMI_MAX_SUPPORTED_RATES 128 |
| 811 | /** |
| 812 | * struct target_rate_set - Rate set bitmap |
| 813 | * @num_rate: number of rates in rates bitmap |
| 814 | * @rates: rates (each 8bit value) packed into a 32 bit word. |
| 815 | * the rates are filled from least significant byte to most |
| 816 | * significant byte. |
| 817 | */ |
| 818 | typedef struct { |
| 819 | uint32_t num_rates; |
| 820 | uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1]; |
| 821 | } target_rate_set; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 822 | |
| 823 | /** |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 824 | * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr |
| 825 | * @mac_addr31to0: upper 4 bytes of MAC address |
| 826 | * @mac_addr47to32: lower 2 bytes of MAC address |
| 827 | */ |
| 828 | typedef struct { |
| 829 | uint32_t mac_addr31to0; |
| 830 | uint32_t mac_addr47to32; |
| 831 | } wmi_host_mac_addr; |
| 832 | |
| 833 | /** |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 834 | * struct peer_assoc_params - peer assoc cmd parameter |
| 835 | * @peer_macaddr: peer mac address |
| 836 | * @vdev_id: vdev id |
| 837 | * @peer_new_assoc: peer association type |
| 838 | * @peer_associd: peer association id |
| 839 | * @peer_flags: peer flags |
| 840 | * @peer_caps: peer capabalities |
| 841 | * @peer_listen_intval: peer listen interval |
| 842 | * @peer_ht_caps: HT capabalities |
| 843 | * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k |
| 844 | * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4) |
| 845 | * @peer_rate_caps: peer rate capabalities |
| 846 | * @peer_nss: peer nss |
| 847 | * @peer_phymode: peer phymode |
| 848 | * @peer_ht_info: peer HT info |
| 849 | * @peer_legacy_rates: peer legacy rates |
| 850 | * @peer_ht_rates: peer ht rates |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 851 | * @rx_max_rate: max rx rates |
| 852 | * @rx_mcs_set: rx mcs |
| 853 | * @tx_max_rate: max tx rates |
| 854 | * @tx_mcs_set: tx mcs |
| 855 | * @vht_capable: VHT capabalities |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 856 | * @tx_max_mcs_nss: max tx MCS and NSS |
| 857 | * @peer_bw_rxnss_override: Peer BW RX NSS overriden or not. |
| 858 | * @is_pmf_enabled: PMF enabled |
| 859 | * @is_wme_set: WME enabled |
| 860 | * @qos_flag: QoS Flags |
| 861 | * @apsd_flag: APSD flags |
| 862 | * @ht_flag: HT flags |
| 863 | * @bw_40: 40 capabale |
| 864 | * @bw_80: 80 capabale |
| 865 | * @bw_160: 160 capabale |
| 866 | * @stbc_flag: STBC flag |
| 867 | * @ldpc_flag: LDPC flag |
| 868 | * @static_mimops_flag: statis MIMO PS flags |
| 869 | * @dynamic_mimops_flag: Dynamic MIMO PS flags |
| 870 | * @spatial_mux_flag: spatial MUX flags |
| 871 | * @vht_flag: VHT flags |
| 872 | * @vht_ng_flag: VHT on 11N/G flags |
| 873 | * @need_ptk_4_way: Needs 4 way handshake |
| 874 | * @need_gtk_2_way: Needs 2 way GTK |
| 875 | * @auth_flag: Is peer authenticated |
| 876 | * @safe_mode_enabled: Safe enabled for this peer |
| 877 | * @amsdu_disable: AMSDU disble |
| 878 | * @peer_mac: Peer mac address |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 879 | */ |
| 880 | struct peer_assoc_params { |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 881 | wmi_host_mac_addr peer_macaddr; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 882 | uint32_t vdev_id; |
| 883 | uint32_t peer_new_assoc; |
| 884 | uint32_t peer_associd; |
| 885 | uint32_t peer_flags; |
| 886 | uint32_t peer_caps; |
| 887 | uint32_t peer_listen_intval; |
| 888 | uint32_t peer_ht_caps; |
| 889 | uint32_t peer_max_mpdu; |
| 890 | uint32_t peer_mpdu_density; |
| 891 | uint32_t peer_rate_caps; |
| 892 | uint32_t peer_nss; |
| 893 | uint32_t peer_vht_caps; |
| 894 | uint32_t peer_phymode; |
| 895 | uint32_t peer_ht_info[2]; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 896 | target_rate_set peer_legacy_rates; |
| 897 | target_rate_set peer_ht_rates; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 898 | uint32_t rx_max_rate; |
| 899 | uint32_t rx_mcs_set; |
| 900 | uint32_t tx_max_rate; |
| 901 | uint32_t tx_mcs_set; |
| 902 | uint8_t vht_capable; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 903 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 904 | uint32_t tx_max_mcs_nss; |
| 905 | uint32_t peer_bw_rxnss_override; |
| 906 | bool is_pmf_enabled; |
| 907 | bool is_wme_set; |
| 908 | bool qos_flag; |
| 909 | bool apsd_flag; |
| 910 | bool ht_flag; |
| 911 | bool bw_40; |
| 912 | bool bw_80; |
| 913 | bool bw_160; |
| 914 | bool stbc_flag; |
| 915 | bool ldpc_flag; |
| 916 | bool static_mimops_flag; |
| 917 | bool dynamic_mimops_flag; |
| 918 | bool spatial_mux_flag; |
| 919 | bool vht_flag; |
| 920 | bool vht_ng_flag; |
| 921 | bool need_ptk_4_way; |
| 922 | bool need_gtk_2_way; |
| 923 | bool auth_flag; |
| 924 | bool safe_mode_enabled; |
| 925 | bool amsdu_disable; |
| 926 | /* Use common structure */ |
| 927 | uint8_t peer_mac[IEEE80211_ADDR_LEN]; |
| 928 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 929 | }; |
| 930 | |
| 931 | /** |
| 932 | * struct sta_ps_params - sta ps cmd parameter |
| 933 | * @vdev_id: vdev id |
| 934 | * @param: sta ps paramter |
| 935 | * @value: sta ps parameter value |
| 936 | */ |
| 937 | struct sta_ps_params { |
| 938 | uint32_t vdev_id; |
| 939 | uint32_t param; |
| 940 | uint32_t value; |
| 941 | }; |
| 942 | |
| 943 | /** |
| 944 | * struct ap_ps_params - ap ps cmd parameter |
| 945 | * @vdev_id: vdev id |
| 946 | * @param: ap ps paramter |
| 947 | * @value: ap ps paramter value |
| 948 | */ |
| 949 | struct ap_ps_params { |
| 950 | uint32_t vdev_id; |
| 951 | uint32_t param; |
| 952 | uint32_t value; |
| 953 | }; |
| 954 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 955 | #define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0 |
| 956 | #define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff |
| 957 | #define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16 |
| 958 | #define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff |
| 959 | |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 960 | /** |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 961 | * struct scan_start_params - start scan cmd parameter |
| 962 | * @scan_id: scan id |
| 963 | * @scan_req_id: requeted scan id |
| 964 | * @vdev_id: vdev id |
| 965 | * @scan_priority: scan priority |
| 966 | * @notify_scan_events: flag to indicate if scan to be notified |
| 967 | * @dwell_time_active: active dwell time |
| 968 | * @dwell_time_passive: passive dwell time |
| 969 | * @min_rest_time: min rest time |
| 970 | * @max_rest_time: max rest time |
| 971 | * @repeat_probe_time: repeat probe time |
| 972 | * @probe_spacing_time: probe spacing time |
| 973 | * @idle_time: idle time |
| 974 | * @max_scan_time: max scan time |
| 975 | * @probe_delay: probe delay |
| 976 | * @scan_ctrl_flags: scan control flag |
| 977 | * @burst_duration: burst duration |
| 978 | * @num_chan: no of channel |
| 979 | * @num_bssid: no of bssid |
| 980 | * @num_ssids: no of ssid |
| 981 | * @ie_len: ie length |
| 982 | * @n_probes: no of probe |
| 983 | * @chan_list: channel list |
| 984 | * @ie_len_with_pad: ie length with padding |
| 985 | * @num_ssid: no of ssid |
| 986 | * @sid: pointer to mac_ssid structure |
| 987 | * @uie_fieldOffset: ie field offset |
| 988 | * @mac_add_bytes: mac address bytes |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 989 | * @is_strict_pscan_en: Is this a strict passive scan |
| 990 | * @is_promiscous_mode: Is promiscous mode |
| 991 | * @is_phy_error: is Phy error |
| 992 | * @add_cck_rates: Add cck rates |
| 993 | * @chan_stat_enable: channel stats enabled |
| 994 | * @offchan_tx_mgmt: Offchan tx scan |
| 995 | * @offchan_tx_data: offchan tx data |
| 996 | * @add_bcast_probe_reqd: Add bcast probe request |
| 997 | * @bssid_list: Lisst of bssid to scan |
| 998 | * @ie_data: IE data buffer pointer |
| 999 | * @passive_flag: Is this passive scan |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1000 | */ |
| 1001 | struct scan_start_params { |
| 1002 | uint32_t scan_id; |
| 1003 | uint32_t scan_req_id; |
| 1004 | uint32_t vdev_id; |
| 1005 | uint32_t scan_priority; |
| 1006 | uint32_t notify_scan_events; |
| 1007 | uint32_t dwell_time_active; |
| 1008 | uint32_t dwell_time_passive; |
| 1009 | uint32_t min_rest_time; |
| 1010 | uint32_t max_rest_time; |
| 1011 | uint32_t repeat_probe_time; |
| 1012 | uint32_t probe_spacing_time; |
| 1013 | uint32_t idle_time; |
| 1014 | uint32_t max_scan_time; |
| 1015 | uint32_t probe_delay; |
| 1016 | uint32_t scan_ctrl_flags; |
| 1017 | uint32_t burst_duration; |
| 1018 | uint32_t num_chan; |
| 1019 | uint32_t num_bssid; |
| 1020 | uint32_t num_ssids; |
| 1021 | uint32_t ie_len; |
| 1022 | uint32_t n_probes; |
| 1023 | uint32_t *chan_list; |
| 1024 | uint32_t ie_len_with_pad; |
| 1025 | struct mac_ssid ssid[WMI_SCAN_MAX_NUM_SSID]; |
| 1026 | uint8_t *ie_base; |
| 1027 | uint16_t uie_fieldOffset; |
| 1028 | uint8_t mac_add_bytes[IEEE80211_ADDR_LEN]; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1029 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1030 | bool is_strict_pscan_en; |
| 1031 | bool is_promiscous_mode; |
| 1032 | bool is_phy_error; |
| 1033 | bool add_cck_rates; |
| 1034 | bool chan_stat_enable; |
| 1035 | bool offchan_tx_mgmt; |
| 1036 | bool offchan_tx_data; |
| 1037 | bool add_bcast_probe_reqd; |
| 1038 | uint8_t bssid_list[WMI_SCAN_MAX_NUM_BSSID][IEEE80211_ADDR_LEN]; |
| 1039 | uint8_t *ie_data; |
| 1040 | int passive_flag; |
| 1041 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1042 | }; |
| 1043 | |
| 1044 | /** |
| 1045 | * struct scan_stop_params - stop scan cmd parameter |
| 1046 | * @requestor: scan requestor |
| 1047 | * @scan_id: scan id |
| 1048 | * @req_type: scan request type |
| 1049 | * @vdev_id: vdev id |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1050 | * @all_scans: Stop all scans |
| 1051 | * @vap_scans: stop vap scans |
| 1052 | * @specific_scan: specific scan |
| 1053 | * @flags: scan flags |
| 1054 | * @ss_scan_id: ss scan id |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1055 | */ |
| 1056 | struct scan_stop_params { |
| 1057 | uint32_t requestor; |
| 1058 | uint32_t scan_id; |
| 1059 | uint32_t req_type; |
| 1060 | uint32_t vdev_id; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1061 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1062 | bool all_scans; |
| 1063 | bool vap_scans; |
| 1064 | bool specific_scan; |
| 1065 | uint32_t flags; |
| 1066 | uint32_t ss_scan_id; |
| 1067 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1068 | }; |
| 1069 | |
| 1070 | /** |
| 1071 | * struct scan_chan_list_params - scan channel list cmd parameter |
| 1072 | * @num_scan_chans: no of scan channels |
| 1073 | * @chan_info: pointer to wmi channel info |
| 1074 | */ |
Govind Singh | fa201d9 | 2016-06-08 19:40:11 +0530 | [diff] [blame] | 1075 | #ifdef CONFIG_MCL |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1076 | /* TODO: This needs clean-up based on how its processed. */ |
| 1077 | typedef struct { |
| 1078 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */ |
| 1079 | uint32_t tlv_header; |
| 1080 | /** primary 20 MHz channel frequency in mhz */ |
| 1081 | uint32_t mhz; |
| 1082 | /** Center frequency 1 in MHz*/ |
| 1083 | uint32_t band_center_freq1; |
| 1084 | /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/ |
| 1085 | uint32_t band_center_freq2; |
| 1086 | /** channel info described below */ |
| 1087 | uint32_t info; |
| 1088 | /** contains min power, max power, reg power and reg class id. */ |
| 1089 | uint32_t reg_info_1; |
| 1090 | /** contains antennamax */ |
| 1091 | uint32_t reg_info_2; |
| 1092 | } wmi_channel_param; |
| 1093 | |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1094 | struct scan_chan_list_params { |
| 1095 | uint8_t num_scan_chans; |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1096 | wmi_channel_param *chan_info; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1097 | }; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1098 | #else |
| 1099 | /** |
| 1100 | * struct scan_chan_list_params - scan channel list cmd parameter |
| 1101 | * @num_chan: no of scan channels |
| 1102 | * @nallchans: nall chans |
| 1103 | * @ch_param: pointer to channel_paramw |
| 1104 | */ |
| 1105 | struct scan_chan_list_params { |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1106 | uint16_t nallchans; |
| 1107 | struct channel_param ch_param[1]; |
| 1108 | }; |
| 1109 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1110 | |
| 1111 | /** |
| 1112 | * struct fw_hang_params - fw hang command parameters |
| 1113 | * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full |
| 1114 | * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) |
| 1115 | */ |
| 1116 | struct fw_hang_params { |
| 1117 | uint32_t type; |
| 1118 | uint32_t delay_time_ms; |
| 1119 | }; |
| 1120 | |
| 1121 | /** |
| 1122 | * struct pdev_utf_params - pdev utf command parameters |
| 1123 | * @utf_payload: |
| 1124 | * @len: |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1125 | * @is_ar900b: is it 900b target |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1126 | */ |
| 1127 | struct pdev_utf_params { |
| 1128 | uint8_t *utf_payload; |
| 1129 | uint32_t len; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1130 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1131 | bool is_ar900b; |
| 1132 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1133 | }; |
| 1134 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1135 | /*Adding this due to dependency on wmi_unified.h |
| 1136 | */ |
| 1137 | typedef struct { |
| 1138 | uint32_t len; |
| 1139 | uint32_t msgref; |
| 1140 | uint32_t segmentInfo; |
| 1141 | } QVIT_SEG_HDR_INFO_STRUCT; |
| 1142 | |
| 1143 | struct pdev_qvit_params { |
| 1144 | uint8_t *utf_payload; |
| 1145 | uint32_t len; |
| 1146 | }; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1147 | /** |
| 1148 | * struct crash_inject - crash inject command parameters |
| 1149 | * @type: crash inject type |
| 1150 | * @delay_time_ms: time in milliseconds for FW to delay the crash |
| 1151 | */ |
| 1152 | struct crash_inject { |
| 1153 | uint32_t type; |
| 1154 | uint32_t delay_time_ms; |
| 1155 | }; |
| 1156 | |
| 1157 | /** |
| 1158 | * struct dbglog_params - fw deboglog command parameters |
| 1159 | * @param: command parameter |
| 1160 | * @val: parameter value |
| 1161 | * @module_id_bitmap: fixed length module id bitmap |
| 1162 | * @bitmap_len: module id bitmap length |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1163 | * @cfgvalid: cfgvalid |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1164 | */ |
| 1165 | struct dbglog_params { |
| 1166 | uint32_t param; |
| 1167 | uint32_t val; |
| 1168 | uint32_t *module_id_bitmap; |
| 1169 | uint32_t bitmap_len; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1170 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1171 | uint32_t cfgvalid[2]; |
| 1172 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1173 | }; |
| 1174 | |
| 1175 | /** |
| 1176 | * struct seg_hdr_info - header info |
| 1177 | * @len: length |
| 1178 | * @msgref: message refrence |
| 1179 | * @segmentInfo: segment info |
| 1180 | * @pad: padding |
| 1181 | */ |
| 1182 | struct seg_hdr_info { |
| 1183 | uint32_t len; |
| 1184 | uint32_t msgref; |
| 1185 | uint32_t segmentInfo; |
| 1186 | uint32_t pad; |
| 1187 | }; |
| 1188 | |
| 1189 | /** |
| 1190 | * struct wmi_mgmt_params - wmi mgmt cmd paramters |
| 1191 | * @tx_frame: management tx frame |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1192 | * @frm_len: frame length |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1193 | * @vdev_id: vdev id |
| 1194 | * @tx_complete_cb: tx download callback handler |
| 1195 | * @tx_ota_post_proc_cb: OTA complition handler |
| 1196 | * @chanfreq: channel frequency |
| 1197 | * @pdata: frame data |
| 1198 | * @wmi_desc: command descriptor |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1199 | * @desc_id: descriptor id relyaed back by target |
| 1200 | * @macaddr - macaddr of peer |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1201 | */ |
| 1202 | struct wmi_mgmt_params { |
| 1203 | void *tx_frame; |
| 1204 | uint16_t frm_len; |
| 1205 | uint8_t vdev_id; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1206 | uint16_t chanfreq; |
| 1207 | void *pdata; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1208 | uint16_t desc_id; |
| 1209 | uint8_t *macaddr; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1210 | void *qdf_ctx; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1211 | }; |
Govind Singh | bffe4de | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 1212 | |
| 1213 | /** |
| 1214 | * struct p2p_ps_params - P2P powersave related params |
| 1215 | * @opp_ps: opportunistic power save |
| 1216 | * @ctwindow: CT window |
| 1217 | * @count: count |
| 1218 | * @duration: duration |
| 1219 | * @interval: interval |
| 1220 | * @single_noa_duration: single shot noa duration |
| 1221 | * @ps_selection: power save selection |
| 1222 | * @session_id: session id |
| 1223 | */ |
| 1224 | struct p2p_ps_params { |
| 1225 | uint8_t opp_ps; |
| 1226 | uint32_t ctwindow; |
| 1227 | uint8_t count; |
| 1228 | uint32_t duration; |
| 1229 | uint32_t interval; |
| 1230 | uint32_t single_noa_duration; |
| 1231 | uint8_t ps_selection; |
| 1232 | uint8_t session_id; |
| 1233 | }; |
| 1234 | |
| 1235 | |
| 1236 | /** |
| 1237 | * struct ta_uapsd_trig_params - uapsd trigger parameter |
| 1238 | * @vdevid: vdev id |
| 1239 | * @peer_addr: peer address |
| 1240 | * @auto_triggerparam: trigger parameters |
| 1241 | * @num_ac: no of access category |
| 1242 | */ |
| 1243 | struct sta_uapsd_trig_params { |
| 1244 | uint32_t vdevid; |
| 1245 | uint8_t peer_addr[IEEE80211_ADDR_LEN]; |
| 1246 | uint8_t *auto_triggerparam; |
| 1247 | uint32_t num_ac; |
| 1248 | }; |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1249 | |
| 1250 | /** |
| 1251 | * struct ocb_utc_param |
| 1252 | * @vdev_id: session id |
| 1253 | * @utc_time: number of nanoseconds from Jan 1st 1958 |
| 1254 | * @time_error: the error in the UTC time. All 1's for unknown |
| 1255 | */ |
| 1256 | struct ocb_utc_param { |
| 1257 | uint32_t vdev_id; |
| 1258 | uint8_t utc_time[WMI_SIZE_UTC_TIME]; |
| 1259 | uint8_t time_error[WMI_SIZE_UTC_TIME_ERROR]; |
| 1260 | }; |
| 1261 | |
| 1262 | /** |
| 1263 | * struct ocb_timing_advert_param |
| 1264 | * @vdev_id: session id |
| 1265 | * @chan_freq: frequency on which to advertise |
| 1266 | * @repeat_rate: the number of times it will send TA in 5 seconds |
| 1267 | * @timestamp_offset: offset of the timestamp field in the TA frame |
| 1268 | * @time_value_offset: offset of the time_value field in the TA frame |
| 1269 | * @template_length: size in bytes of the TA frame |
| 1270 | * @template_value: the TA frame |
| 1271 | */ |
| 1272 | struct ocb_timing_advert_param { |
| 1273 | uint32_t vdev_id; |
| 1274 | uint32_t chan_freq; |
| 1275 | uint32_t repeat_rate; |
| 1276 | uint32_t timestamp_offset; |
| 1277 | uint32_t time_value_offset; |
| 1278 | uint32_t template_length; |
| 1279 | uint8_t *template_value; |
| 1280 | }; |
| 1281 | |
| 1282 | /** |
| 1283 | * struct dcc_get_stats_param |
| 1284 | * @vdev_id: session id |
| 1285 | * @channel_count: number of dcc channels |
| 1286 | * @request_array_len: size in bytes of the request array |
| 1287 | * @request_array: the request array |
| 1288 | */ |
| 1289 | struct dcc_get_stats_param { |
| 1290 | uint32_t vdev_id; |
| 1291 | uint32_t channel_count; |
| 1292 | uint32_t request_array_len; |
| 1293 | void *request_array; |
| 1294 | }; |
| 1295 | |
| 1296 | /** |
| 1297 | * struct dcc_update_ndl_param |
| 1298 | * @vdev_id: session id |
| 1299 | * @channel_count: number of channels to be updated |
| 1300 | * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array |
| 1301 | * @dcc_ndl_chan_list: the ndl_chan array |
| 1302 | * @dcc_ndl_active_state_list_len: size in bytes of the active_state array |
| 1303 | * @dcc_ndl_active_state_list: the active state array |
| 1304 | */ |
| 1305 | struct dcc_update_ndl_param { |
| 1306 | uint32_t vdev_id; |
| 1307 | uint32_t channel_count; |
| 1308 | uint32_t dcc_ndl_chan_list_len; |
| 1309 | void *dcc_ndl_chan_list; |
| 1310 | uint32_t dcc_ndl_active_state_list_len; |
| 1311 | void *dcc_ndl_active_state_list; |
| 1312 | }; |
| 1313 | |
| 1314 | /** |
| 1315 | * struct ocb_config_sched |
| 1316 | * @chan_freq: frequency of the channel |
| 1317 | * @total_duration: duration of the schedule |
| 1318 | * @guard_interval: guard interval on the start of the schedule |
| 1319 | */ |
| 1320 | struct ocb_config_sched { |
| 1321 | uint32_t chan_freq; |
| 1322 | uint32_t total_duration; |
| 1323 | uint32_t guard_interval; |
| 1324 | }; |
| 1325 | |
| 1326 | /** |
| 1327 | * OCB structures |
| 1328 | */ |
| 1329 | |
| 1330 | #define WMI_NUM_AC (4) |
| 1331 | #define WMI_OCB_CHANNEL_MAX (5) |
| 1332 | #define WMI_MAX_NUM_AC 4 |
| 1333 | struct wmi_ocb_qos_params { |
| 1334 | uint8_t aifsn; |
| 1335 | uint8_t cwmin; |
| 1336 | uint8_t cwmax; |
| 1337 | }; |
| 1338 | /** |
| 1339 | * struct ocb_config_channel |
| 1340 | * @chan_freq: frequency of the channel |
| 1341 | * @bandwidth: bandwidth of the channel, either 10 or 20 MHz |
| 1342 | * @mac_address: MAC address assigned to this channel |
| 1343 | * @qos_params: QoS parameters |
| 1344 | * @max_pwr: maximum transmit power of the channel (dBm) |
| 1345 | * @min_pwr: minimum transmit power of the channel (dBm) |
| 1346 | * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm) |
| 1347 | * @antenna_max: maximum antenna gain specified by the regulatory domain (dB) |
| 1348 | */ |
| 1349 | struct ocb_config_channel { |
| 1350 | uint32_t chan_freq; |
| 1351 | uint32_t bandwidth; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1352 | struct qdf_mac_addr mac_address; |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1353 | struct wmi_ocb_qos_params qos_params[WMI_MAX_NUM_AC]; |
| 1354 | uint32_t max_pwr; |
| 1355 | uint32_t min_pwr; |
| 1356 | uint8_t reg_pwr; |
| 1357 | uint8_t antenna_max; |
| 1358 | uint16_t flags; |
| 1359 | }; |
| 1360 | |
| 1361 | /** |
| 1362 | * struct ocb_config_param |
| 1363 | * @session_id: session id |
| 1364 | * @channel_count: number of channels |
| 1365 | * @schedule_size: size of the channel schedule |
| 1366 | * @flags: reserved |
| 1367 | * @channels: array of OCB channels |
| 1368 | * @schedule: array of OCB schedule elements |
| 1369 | * @dcc_ndl_chan_list_len: size of the ndl_chan array |
| 1370 | * @dcc_ndl_chan_list: array of dcc channel info |
| 1371 | * @dcc_ndl_active_state_list_len: size of the active state array |
| 1372 | * @dcc_ndl_active_state_list: array of active states |
| 1373 | * @adapter: the OCB adapter |
| 1374 | * @dcc_stats_callback: callback for the response event |
| 1375 | */ |
| 1376 | struct ocb_config_param { |
| 1377 | uint8_t session_id; |
| 1378 | uint32_t channel_count; |
| 1379 | uint32_t schedule_size; |
| 1380 | uint32_t flags; |
| 1381 | struct ocb_config_channel *channels; |
| 1382 | struct ocb_config_sched *schedule; |
| 1383 | uint32_t dcc_ndl_chan_list_len; |
| 1384 | void *dcc_ndl_chan_list; |
| 1385 | uint32_t dcc_ndl_active_state_list_len; |
| 1386 | void *dcc_ndl_active_state_list; |
| 1387 | }; |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1388 | |
Poddar, Siddarth | 794b996 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 1389 | enum wmi_peer_rate_report_cond_phy_type { |
| 1390 | WMI_PEER_RATE_REPORT_COND_11B = 0, |
| 1391 | WMI_PEER_RATE_REPORT_COND_11A_G, |
| 1392 | WMI_PEER_RATE_REPORT_COND_11N, |
| 1393 | WMI_PEER_RATE_REPORT_COND_11AC, |
| 1394 | WMI_PEER_RATE_REPORT_COND_MAX_NUM |
| 1395 | }; |
| 1396 | |
| 1397 | /** |
| 1398 | * struct report_rate_delta - peer specific parameters |
| 1399 | * @percent: percentage |
| 1400 | * @delta_min: rate min delta |
| 1401 | */ |
| 1402 | struct report_rate_delta { |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1403 | uint32_t percent; /* in unit of 12.5% */ |
| 1404 | uint32_t delta_min; /* in unit of Mbps */ |
Poddar, Siddarth | 794b996 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 1405 | }; |
| 1406 | |
| 1407 | /** |
| 1408 | * struct report_rate_per_phy - per phy report parameters |
| 1409 | * @cond_flags: condition flag val |
| 1410 | * @delta: rate delta |
| 1411 | * @report_rate_threshold: rate threshold |
| 1412 | */ |
| 1413 | struct report_rate_per_phy { |
| 1414 | /* |
| 1415 | * PEER_RATE_REPORT_COND_FLAG_DELTA, |
| 1416 | * PEER_RATE_REPORT_COND_FLAG_THRESHOLD |
| 1417 | * Any of these two conditions or both of |
| 1418 | * them can be set. |
| 1419 | */ |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1420 | uint32_t cond_flags; |
Poddar, Siddarth | 794b996 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 1421 | struct report_rate_delta delta; |
| 1422 | /* |
| 1423 | * In unit of Mbps. There are at most 4 thresholds |
| 1424 | * If the threshold count is less than 4, set zero to |
| 1425 | * the one following the last threshold |
| 1426 | */ |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1427 | uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH]; |
Poddar, Siddarth | 794b996 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 1428 | }; |
| 1429 | |
| 1430 | /** |
| 1431 | * struct peer_rate_report_params - peer rate report parameters |
| 1432 | * @rate_report_enable: enable rate report param |
| 1433 | * @backoff_time: backoff time |
| 1434 | * @timer_period: timer |
| 1435 | * @report_per_phy: report per phy type |
| 1436 | */ |
| 1437 | struct wmi_peer_rate_report_params { |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1438 | uint32_t rate_report_enable; |
| 1439 | uint32_t backoff_time; /* in unit of msecond */ |
| 1440 | uint32_t timer_period; /* in unit of msecond */ |
Poddar, Siddarth | 794b996 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 1441 | /* |
| 1442 | *In the following field, the array index means the phy type, |
| 1443 | * please see enum wmi_peer_rate_report_cond_phy_type for detail |
| 1444 | */ |
| 1445 | struct report_rate_per_phy report_per_phy[ |
| 1446 | WMI_PEER_RATE_REPORT_COND_MAX_NUM]; |
| 1447 | |
| 1448 | }; |
| 1449 | |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1450 | /** |
| 1451 | * struct t_thermal_cmd_params - thermal command parameters |
| 1452 | * @min_temp: minimum temprature |
| 1453 | * @max_temp: maximum temprature |
| 1454 | * @thermal_enable: thermal enable |
| 1455 | */ |
| 1456 | struct thermal_cmd_params { |
| 1457 | uint16_t min_temp; |
| 1458 | uint16_t max_temp; |
| 1459 | uint8_t thermal_enable; |
| 1460 | }; |
| 1461 | |
| 1462 | #define WMI_LRO_IPV4_SEED_ARR_SZ 5 |
| 1463 | #define WMI_LRO_IPV6_SEED_ARR_SZ 11 |
| 1464 | |
| 1465 | /** |
| 1466 | * struct wmi_lro_config_cmd_t - set LRO init parameters |
| 1467 | * @lro_enable: indicates whether lro is enabled |
| 1468 | * @tcp_flag: If the TCP flags from the packet do not match |
| 1469 | * the values in this field after masking with TCP flags mask |
| 1470 | * below, packet is not LRO eligible |
| 1471 | * @tcp_flag_mask: field for comparing the TCP values provided |
| 1472 | * above with the TCP flags field in the received packet |
| 1473 | * @toeplitz_hash_ipv4: contains seed needed to compute the flow id |
| 1474 | * 5-tuple toeplitz hash for ipv4 packets |
| 1475 | * @toeplitz_hash_ipv6: contains seed needed to compute the flow id |
| 1476 | * 5-tuple toeplitz hash for ipv6 packets |
| 1477 | */ |
| 1478 | struct wmi_lro_config_cmd_t { |
| 1479 | uint32_t lro_enable; |
| 1480 | uint32_t tcp_flag:9, |
| 1481 | tcp_flag_mask:9; |
| 1482 | uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ]; |
| 1483 | uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ]; |
| 1484 | }; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1485 | |
| 1486 | /** |
| 1487 | * struct gtx_config_t - GTX config |
| 1488 | * @gtx_rt_mask: for HT and VHT rate masks |
| 1489 | * @gtx_usrcfg: host request for GTX mask |
| 1490 | * @gtx_threshold: PER Threshold (default: 10%) |
| 1491 | * @gtx_margin: PER margin (default: 2%) |
| 1492 | * @gtx_tcpstep: TCP step (default: 1) |
| 1493 | * @gtx_tpcMin: TCP min (default: 5) |
| 1494 | * @gtx_bwmask: BW mask (20/40/80/160 Mhz) |
| 1495 | */ |
| 1496 | struct wmi_gtx_config { |
| 1497 | uint32_t gtx_rt_mask[2]; |
| 1498 | uint32_t gtx_usrcfg; |
| 1499 | uint32_t gtx_threshold; |
| 1500 | uint32_t gtx_margin; |
| 1501 | uint32_t gtx_tpcstep; |
| 1502 | uint32_t gtx_tpcmin; |
| 1503 | uint32_t gtx_bwmask; |
| 1504 | }; |
| 1505 | |
| 1506 | /** |
| 1507 | * struct wmi_probe_resp_params - send probe response parameters |
| 1508 | * @bssId: BSSID |
| 1509 | * @pProbeRespTemplate: probe response template |
| 1510 | * @probeRespTemplateLen: probe response template length |
| 1511 | * @ucProxyProbeReqValidIEBmap: valid IE bitmap |
| 1512 | */ |
| 1513 | struct wmi_probe_resp_params { |
Govind Singh | 8675b86 | 2016-03-28 22:09:18 +0530 | [diff] [blame] | 1514 | uint8_t bssId[IEEE80211_ADDR_LEN]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1515 | uint8_t *pProbeRespTemplate; |
| 1516 | uint32_t probeRespTemplateLen; |
| 1517 | uint32_t ucProxyProbeReqValidIEBmap[8]; |
| 1518 | }; |
| 1519 | |
Himanshu Agarwal | 9efd9bf | 2016-03-09 18:49:18 +0530 | [diff] [blame] | 1520 | /* struct set_key_params: structure containing |
| 1521 | * installation key parameters |
| 1522 | * @vdev_id: vdev id |
| 1523 | * @key_len: key length |
| 1524 | * @key_idx: key index |
| 1525 | * @peer_mac: peer mac address |
| 1526 | * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key |
| 1527 | * @key_cipher: key cipher based on security mode |
| 1528 | * @key_txmic_len: tx mic length |
| 1529 | * @key_rxmic_len: rx mic length |
| 1530 | * @rx_iv: receive IV, applicable only in case of WAPI |
| 1531 | * @tx_iv: transmit IV, applicable only in case of WAPI |
| 1532 | * @key_data: key data |
| 1533 | */ |
| 1534 | struct set_key_params { |
| 1535 | uint8_t vdev_id; |
| 1536 | uint16_t key_len; |
| 1537 | uint32_t key_idx; |
| 1538 | uint8_t peer_mac[IEEE80211_ADDR_LEN]; |
| 1539 | uint32_t key_flags; |
| 1540 | uint32_t key_cipher; |
| 1541 | uint32_t key_txmic_len; |
| 1542 | uint32_t key_rxmic_len; |
| 1543 | #ifdef FEATURE_WLAN_WAPI |
| 1544 | uint8_t rx_iv[16]; |
| 1545 | uint8_t tx_iv[16]; |
| 1546 | #endif |
| 1547 | uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH]; |
| 1548 | }; |
| 1549 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1550 | /** |
| 1551 | * struct sta_params - sta keep alive parameters |
| 1552 | * @vdev_id: vdev id |
| 1553 | * @method: keep alive method |
| 1554 | * @timeperiod: time to keep alive |
| 1555 | * @hostv4addr: host ipv4 address |
| 1556 | * @destv4addr: destination ipv4 address |
| 1557 | * @destmac: destination mac address |
| 1558 | */ |
| 1559 | struct sta_params { |
| 1560 | uint8_t vdev_id; |
| 1561 | uint32_t method; |
| 1562 | uint32_t timeperiod; |
| 1563 | uint8_t *hostv4addr; |
| 1564 | uint8_t *destv4addr; |
| 1565 | uint8_t *destmac; |
| 1566 | }; |
| 1567 | |
| 1568 | /** |
| 1569 | * struct gateway_update_req_param - gateway parameter update request |
| 1570 | * @request_id: request id |
| 1571 | * @session_id: session id |
| 1572 | * @max_retries: Max ARP/NS retry attempts |
| 1573 | * @timeout: Retry interval |
| 1574 | * @ipv4_addr_type: on ipv4 network |
| 1575 | * @ipv6_addr_type: on ipv6 network |
| 1576 | * @gw_mac_addr: gateway mac addr |
| 1577 | * @ipv4_addr: ipv4 addr |
| 1578 | * @ipv6_addr: ipv6 addr |
| 1579 | */ |
| 1580 | struct gateway_update_req_param { |
| 1581 | uint32_t request_id; |
| 1582 | uint32_t session_id; |
| 1583 | uint32_t max_retries; |
| 1584 | uint32_t timeout; |
| 1585 | uint32_t ipv4_addr_type; |
| 1586 | uint32_t ipv6_addr_type; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1587 | struct qdf_mac_addr gw_mac_addr; |
| 1588 | uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE]; |
| 1589 | uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1590 | }; |
| 1591 | |
| 1592 | /** |
| 1593 | * struct rssi_monitor_param - rssi monitoring |
| 1594 | * @request_id: request id |
| 1595 | * @session_id: session id |
| 1596 | * @min_rssi: minimum rssi |
| 1597 | * @max_rssi: maximum rssi |
| 1598 | * @control: flag to indicate start or stop |
| 1599 | */ |
| 1600 | struct rssi_monitor_param { |
| 1601 | uint32_t request_id; |
| 1602 | uint32_t session_id; |
| 1603 | int8_t min_rssi; |
| 1604 | int8_t max_rssi; |
| 1605 | bool control; |
| 1606 | }; |
| 1607 | |
| 1608 | /** |
| 1609 | * struct scan_mac_oui - oui paramters |
| 1610 | * @oui: oui parameters |
| 1611 | */ |
| 1612 | struct scan_mac_oui { |
| 1613 | uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH]; |
| 1614 | }; |
| 1615 | |
| 1616 | #define WMI_PASSPOINT_REALM_LEN 256 |
| 1617 | #define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16 |
| 1618 | #define WMI_PASSPOINT_PLMN_LEN 3 |
| 1619 | /** |
| 1620 | * struct wifi_passpoint_network_param - passpoint network block |
| 1621 | * @id: identifier of this network block |
| 1622 | * @realm: null terminated UTF8 encoded realm, 0 if unspecified |
| 1623 | * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified |
| 1624 | * @plmn: mcc/mnc combination as per rules, 0s if unspecified |
| 1625 | */ |
| 1626 | struct wifi_passpoint_network_param { |
| 1627 | uint32_t id; |
| 1628 | uint8_t realm[WMI_PASSPOINT_REALM_LEN]; |
| 1629 | int64_t roaming_consortium_ids[WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM]; |
| 1630 | uint8_t plmn[WMI_PASSPOINT_PLMN_LEN]; |
| 1631 | }; |
| 1632 | |
| 1633 | /** |
| 1634 | * struct wifi_passpoint_req_param - passpoint request |
| 1635 | * @request_id: request identifier |
| 1636 | * @num_networks: number of networks |
| 1637 | * @networks: passpoint networks |
| 1638 | */ |
| 1639 | struct wifi_passpoint_req_param { |
| 1640 | uint32_t request_id; |
| 1641 | uint32_t session_id; |
| 1642 | uint32_t num_networks; |
| 1643 | struct wifi_passpoint_network_param networks[]; |
| 1644 | }; |
| 1645 | |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1646 | /* struct mobility_domain_info - structure containing |
| 1647 | * mobility domain info |
| 1648 | * @mdie_present: mobility domain present or not |
| 1649 | * @mobility_domain: mobility domain |
| 1650 | */ |
| 1651 | struct mobility_domain_info { |
| 1652 | uint8_t mdie_present; |
| 1653 | uint16_t mobility_domain; |
| 1654 | }; |
| 1655 | |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1656 | #define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16) |
| 1657 | |
| 1658 | /* This TLV will be filled only in case roam offload |
| 1659 | * for wpa2-psk/okc/ese/11r is enabled */ |
| 1660 | typedef struct { |
| 1661 | /* |
| 1662 | * TLV tag and len; tag equals |
| 1663 | * WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param |
| 1664 | */ |
| 1665 | uint32_t tlv_header; |
| 1666 | uint32_t rssi_cat_gap; /* gap for every category bucket */ |
| 1667 | uint32_t prefer_5g; /* prefer select 5G candidate */ |
| 1668 | uint32_t select_5g_margin; |
| 1669 | uint32_t reassoc_failure_timeout; /* reassoc failure timeout */ |
| 1670 | uint32_t capability; |
| 1671 | uint32_t ht_caps_info; |
| 1672 | uint32_t ampdu_param; |
| 1673 | uint32_t ht_ext_cap; |
| 1674 | uint32_t ht_txbf; |
| 1675 | uint32_t asel_cap; |
| 1676 | uint32_t qos_enabled; |
| 1677 | uint32_t qos_caps; |
| 1678 | uint32_t wmm_caps; |
| 1679 | /* since this is 4 byte aligned, we don't declare it as tlv array */ |
| 1680 | uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2]; |
| 1681 | } roam_offload_param; |
| 1682 | |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1683 | /* struct roam_offload_scan_params - structure |
| 1684 | * containing roaming offload scan parameters |
| 1685 | * @is_roam_req_valid: flag to tell whether roam req |
| 1686 | * is valid or NULL |
| 1687 | * @mode: stores flags for scan |
| 1688 | * @vdev_id: vdev id |
| 1689 | * @roam_offload_enabled: flag for offload enable |
| 1690 | * @psk_pmk: pre shared key/pairwise master key |
| 1691 | * @pmk_len: length of PMK |
| 1692 | * @prefer_5ghz: prefer select 5G candidate |
| 1693 | * @roam_rssi_cat_gap: gap for every category bucket |
| 1694 | * @select_5ghz_margin: select 5 Ghz margin |
| 1695 | * @krk: KRK |
| 1696 | * @btk: BTK |
| 1697 | * @reassoc_failure_timeout: reassoc failure timeout |
| 1698 | * @rokh_id_length: r0kh id length |
| 1699 | * @rokh_id: r0kh id |
| 1700 | * @roam_key_mgmt_offload_enabled: roam offload flag |
| 1701 | * @auth_mode: authentication mode |
Deepak Dhamdhere | 3ae33a3 | 2016-08-22 18:04:00 -0700 | [diff] [blame] | 1702 | * @okc_enabled: enable opportunistic key caching |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1703 | * @is_ese_assoc: flag to determine ese assoc |
| 1704 | * @mdid: mobility domain info |
| 1705 | * @roam_offload_params: roam offload tlv params |
| 1706 | */ |
| 1707 | struct roam_offload_scan_params { |
| 1708 | uint8_t is_roam_req_valid; |
| 1709 | uint32_t mode; |
| 1710 | uint32_t vdev_id; |
| 1711 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 1712 | uint8_t roam_offload_enabled; |
| 1713 | uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE]; |
| 1714 | uint32_t pmk_len; |
| 1715 | uint8_t prefer_5ghz; |
| 1716 | uint8_t roam_rssi_cat_gap; |
| 1717 | uint8_t select_5ghz_margin; |
| 1718 | uint8_t krk[WMI_KRK_KEY_LEN]; |
| 1719 | uint8_t btk[WMI_BTK_KEY_LEN]; |
| 1720 | uint32_t reassoc_failure_timeout; |
| 1721 | uint32_t rokh_id_length; |
| 1722 | uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN]; |
| 1723 | uint8_t roam_key_mgmt_offload_enabled; |
| 1724 | int auth_mode; |
Deepak Dhamdhere | 3ae33a3 | 2016-08-22 18:04:00 -0700 | [diff] [blame] | 1725 | bool okc_enabled; |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1726 | #endif |
| 1727 | bool is_ese_assoc; |
| 1728 | struct mobility_domain_info mdid; |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1729 | #ifdef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1730 | /* THis is not available in non tlv target. |
| 1731 | * please remove this and replace with a host based |
| 1732 | * structure */ |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 1733 | roam_offload_param roam_offload_params; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1734 | #endif |
Selvaraj, Sridhar | 0a1427f | 2016-07-04 21:40:23 +0530 | [diff] [blame] | 1735 | uint32_t assoc_ie_length; |
| 1736 | uint8_t assoc_ie[MAX_ASSOC_IE_LENGTH]; |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1737 | }; |
| 1738 | |
| 1739 | /* struct roam_offload_scan_rssi_params - structure containing |
| 1740 | * parameters for roam offload scan based on RSSI |
| 1741 | * @rssi_thresh: rssi threshold |
| 1742 | * @rssi_thresh_diff: difference in rssi threshold |
| 1743 | * @hi_rssi_scan_max_count: 5G scan max count |
| 1744 | * @hi_rssi_scan_rssi_delta: 5G scan rssi change threshold value |
| 1745 | * @hi_rssi_scan_rssi_ub: 5G scan upper bound |
| 1746 | * @raise_rssi_thresh_5g: flag to determine penalty and boost thresholds |
| 1747 | * @session_id: vdev id |
| 1748 | * @penalty_threshold_5g: RSSI threshold below which 5GHz RSSI is penalized |
| 1749 | * @boost_threshold_5g: RSSI threshold above which 5GHz RSSI is favored |
| 1750 | * @raise_factor_5g: factor by which 5GHz RSSI is boosted |
| 1751 | * @drop_factor_5g: factor by which 5GHz RSSI is penalized |
| 1752 | * @max_raise_rssi_5g: maximum boost that can be applied to a 5GHz RSSI |
| 1753 | * @max_drop_rssi_5g: maximum penalty that can be applied to a 5GHz RSSI |
| 1754 | * @good_rssi_threshold: RSSI below which roam is kicked in by background |
| 1755 | * scan although rssi is still good |
| 1756 | * @roam_earlystop_thres_min: Minimum RSSI threshold value for early stop, |
| 1757 | * unit is dB above NF |
| 1758 | * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop, |
| 1759 | * unit is dB above NF |
Gupta, Kapil | 1f4a4c3 | 2016-04-12 15:02:00 +0530 | [diff] [blame] | 1760 | * @dense_rssi_thresh_offset: dense roam RSSI threshold difference |
| 1761 | * @dense_min_aps_cnt: dense roam minimum APs |
| 1762 | * @initial_dense_status: dense status detected by host |
| 1763 | * @traffic_threshold: dense roam RSSI threshold |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1764 | */ |
| 1765 | struct roam_offload_scan_rssi_params { |
| 1766 | int8_t rssi_thresh; |
| 1767 | uint8_t rssi_thresh_diff; |
| 1768 | uint32_t hi_rssi_scan_max_count; |
| 1769 | uint32_t hi_rssi_scan_rssi_delta; |
| 1770 | int32_t hi_rssi_scan_rssi_ub; |
| 1771 | int raise_rssi_thresh_5g; |
| 1772 | uint8_t session_id; |
| 1773 | uint32_t penalty_threshold_5g; |
| 1774 | uint32_t boost_threshold_5g; |
| 1775 | uint8_t raise_factor_5g; |
| 1776 | uint8_t drop_factor_5g; |
| 1777 | int max_raise_rssi_5g; |
| 1778 | int max_drop_rssi_5g; |
| 1779 | uint32_t good_rssi_threshold; |
| 1780 | uint32_t roam_earlystop_thres_min; |
| 1781 | uint32_t roam_earlystop_thres_max; |
Gupta, Kapil | 1f4a4c3 | 2016-04-12 15:02:00 +0530 | [diff] [blame] | 1782 | int dense_rssi_thresh_offset; |
| 1783 | int dense_min_aps_cnt; |
| 1784 | int initial_dense_status; |
| 1785 | int traffic_threshold; |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1786 | }; |
| 1787 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1788 | /** |
| 1789 | * struct wifi_epno_network - enhanced pno network block |
| 1790 | * @ssid: ssid |
| 1791 | * @rssi_threshold: threshold for considering this SSID as found, required |
| 1792 | * granularity for this threshold is 4dBm to 8dBm |
| 1793 | * @flags: WIFI_PNO_FLAG_XXX |
| 1794 | * @auth_bit_field: auth bit field for matching WPA IE |
| 1795 | */ |
| 1796 | struct wifi_epno_network_params { |
| 1797 | struct mac_ssid ssid; |
| 1798 | int8_t rssi_threshold; |
| 1799 | uint8_t flags; |
| 1800 | uint8_t auth_bit_field; |
| 1801 | }; |
| 1802 | |
| 1803 | /** |
| 1804 | * struct wifi_enhanched_pno_params - enhanced pno network params |
Mukul Sharma | 90bc73b | 2016-10-03 15:04:20 +0530 | [diff] [blame] | 1805 | * @request_id: request id number |
| 1806 | * @session_id: session_id number |
| 1807 | * @min_5ghz_rssi: minimum 5GHz RSSI for a BSSID to be considered |
| 1808 | * @min_24ghz_rssi: minimum 2.4GHz RSSI for a BSSID to be considered |
| 1809 | * @initial_score_max: maximum score that a network can have before bonuses |
| 1810 | * @current_connection_bonus: only report when there is a network's score this |
| 1811 | * much higher than the current connection |
| 1812 | * @same_network_bonus: score bonus for all n/w with the same network flag |
| 1813 | * @secure_bonus: score bonus for networks that are not open |
| 1814 | * @band_5ghz_bonus: 5GHz RSSI score bonus (applied to all 5GHz networks) |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1815 | * @num_networks: number of ssids |
Mukul Sharma | 90bc73b | 2016-10-03 15:04:20 +0530 | [diff] [blame] | 1816 | * @networks: EPNO networks |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1817 | */ |
| 1818 | struct wifi_enhanched_pno_params { |
| 1819 | uint32_t request_id; |
| 1820 | uint32_t session_id; |
Mukul Sharma | 90bc73b | 2016-10-03 15:04:20 +0530 | [diff] [blame] | 1821 | uint32_t min_5ghz_rssi; |
| 1822 | uint32_t min_24ghz_rssi; |
| 1823 | uint32_t initial_score_max; |
| 1824 | uint32_t current_connection_bonus; |
| 1825 | uint32_t same_network_bonus; |
| 1826 | uint32_t secure_bonus; |
| 1827 | uint32_t band_5ghz_bonus; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1828 | uint32_t num_networks; |
| 1829 | struct wifi_epno_network_params networks[]; |
| 1830 | }; |
| 1831 | |
| 1832 | enum { |
| 1833 | WMI_AP_RX_DATA_OFFLOAD = 0x00, |
| 1834 | WMI_STA_RX_DATA_OFFLOAD = 0x01, |
| 1835 | }; |
| 1836 | |
| 1837 | /** |
Govind Singh | c7cd2d6 | 2016-06-21 14:33:26 +0530 | [diff] [blame] | 1838 | * enum extscan_configuration_flags - extscan config flags |
| 1839 | * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching |
| 1840 | */ |
| 1841 | enum wmi_extscan_configuration_flags { |
| 1842 | WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001, |
| 1843 | }; |
| 1844 | |
| 1845 | /** |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1846 | * enum extscan_report_events_type - extscan report events type |
| 1847 | * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full |
| 1848 | * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan |
| 1849 | * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results |
| 1850 | * (beacons/probe responses + IEs) |
| 1851 | * in real time to HAL, in addition to completion events. |
| 1852 | * Note: To keep backward compatibility, |
| 1853 | * fire completion events regardless of REPORT_EVENTS_EACH_SCAN. |
| 1854 | * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching, |
| 1855 | * 0 => batching, 1 => no batching |
| 1856 | */ |
| 1857 | enum wmi_extscan_report_events_type { |
| 1858 | WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00, |
| 1859 | WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01, |
| 1860 | WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02, |
| 1861 | WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04, |
| 1862 | }; |
| 1863 | |
| 1864 | /** |
| 1865 | * struct ipa_offload_control_params - ipa offload parameters |
| 1866 | * @offload_type: ipa offload type |
| 1867 | * @vdev_id: vdev id |
| 1868 | * @enable: ipa offload enable/disable |
| 1869 | */ |
| 1870 | struct ipa_offload_control_params { |
| 1871 | uint32_t offload_type; |
| 1872 | uint32_t vdev_id; |
| 1873 | uint32_t enable; |
| 1874 | }; |
| 1875 | |
| 1876 | /** |
| 1877 | * struct extscan_capabilities_params - ext scan capablities |
| 1878 | * @request_id: request_id |
| 1879 | * @session_id: session_id |
| 1880 | */ |
| 1881 | struct extscan_capabilities_params { |
| 1882 | uint32_t request_id; |
| 1883 | uint8_t session_id; |
| 1884 | }; |
| 1885 | |
| 1886 | /** |
| 1887 | * struct extscan_capabilities_reset_params - ext scan capablities reset parameter |
| 1888 | * @request_id: request_id |
| 1889 | * @session_id: session_id |
| 1890 | */ |
| 1891 | struct extscan_capabilities_reset_params { |
| 1892 | uint32_t request_id; |
| 1893 | uint8_t session_id; |
| 1894 | }; |
| 1895 | |
| 1896 | /** |
| 1897 | * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter |
| 1898 | * @request_id: request_id |
| 1899 | * @session_id: session_id |
| 1900 | */ |
| 1901 | struct extscan_bssid_hotlist_reset_params { |
| 1902 | uint32_t request_id; |
| 1903 | uint8_t session_id; |
| 1904 | }; |
| 1905 | |
| 1906 | /** |
| 1907 | * struct extscan_stop_req_params - ext scan stop parameter |
| 1908 | * @request_id: request_id |
| 1909 | * @session_id: session_id |
| 1910 | */ |
| 1911 | struct extscan_stop_req_params { |
| 1912 | uint32_t request_id; |
| 1913 | uint8_t session_id; |
| 1914 | }; |
| 1915 | |
| 1916 | /** |
| 1917 | * struct ap_threshold_params - ap threshold parameter |
| 1918 | * @bssid: mac address |
| 1919 | * @low: low threshold |
| 1920 | * @high: high threshold |
| 1921 | */ |
| 1922 | struct ap_threshold_params { |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1923 | struct qdf_mac_addr bssid; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1924 | int32_t low; |
| 1925 | int32_t high; |
| 1926 | }; |
| 1927 | |
| 1928 | /** |
| 1929 | * struct extscan_set_sig_changereq_params - ext scan channel parameter |
| 1930 | * @request_id: mac address |
| 1931 | * @session_id: low threshold |
| 1932 | * @rssi_sample_size: Number of samples for averaging RSSI |
| 1933 | * @lostap_sample_size: Number of missed samples to confirm AP loss |
| 1934 | * @min_breaching: Number of APs breaching threshold required for firmware |
| 1935 | * @num_ap: no of scanned ap |
| 1936 | * @ap: ap threshold parameter |
| 1937 | */ |
| 1938 | struct extscan_set_sig_changereq_params { |
| 1939 | uint32_t request_id; |
| 1940 | uint8_t session_id; |
| 1941 | uint32_t rssi_sample_size; |
| 1942 | uint32_t lostap_sample_size; |
| 1943 | uint32_t min_breaching; |
| 1944 | uint32_t num_ap; |
| 1945 | struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS]; |
| 1946 | }; |
| 1947 | |
| 1948 | /** |
| 1949 | * struct extscan_cached_result_params - ext scan cached parameter |
| 1950 | * @request_id: mac address |
| 1951 | * @session_id: low threshold |
| 1952 | * @flush: cached results flush |
| 1953 | */ |
| 1954 | struct extscan_cached_result_params { |
| 1955 | uint32_t request_id; |
| 1956 | uint8_t session_id; |
| 1957 | bool flush; |
| 1958 | }; |
| 1959 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1960 | /* Set PNO */ |
| 1961 | #define WMI_PNO_MAX_NETW_CHANNELS 26 |
| 1962 | #define WMI_PNO_MAX_NETW_CHANNELS_EX 60 |
| 1963 | #define WMI_PNO_MAX_SUPP_NETWORKS 16 |
| 1964 | |
| 1965 | /* |
| 1966 | * size based of dot11 declaration without extra IEs as we will not carry those |
| 1967 | * for PNO |
| 1968 | */ |
| 1969 | #define WMI_PNO_MAX_PB_REQ_SIZE 450 |
| 1970 | |
| 1971 | #define WMI_PNO_24G_DEFAULT_CH 1 |
| 1972 | #define WMI_PNO_5G_DEFAULT_CH 36 |
| 1973 | |
| 1974 | /** |
| 1975 | * enum pno_mode - pno mode types |
| 1976 | * @WMI_PNO_MODE_IMMEDIATE: immidiate mode |
| 1977 | * @WMI_PNO_MODE_ON_SUSPEND: suspend on mode |
| 1978 | * @WMI_PNO_MODE_ON_RESUME: resume on mode |
| 1979 | * @WMI_PNO_MODE_MAX: max range |
| 1980 | */ |
| 1981 | enum pno_mode { |
| 1982 | WMI_PNO_MODE_IMMEDIATE, |
| 1983 | WMI_PNO_MODE_ON_SUSPEND, |
| 1984 | WMI_PNO_MODE_ON_RESUME, |
| 1985 | WMI_PNO_MODE_MAX |
| 1986 | }; |
| 1987 | |
| 1988 | /** |
| 1989 | * struct pno_nw_type - pno nw type |
| 1990 | * @ssid: mac ssid |
| 1991 | * @authentication: authentication type |
| 1992 | * @encryption: encryption type |
| 1993 | * @bcastNetwType: broadcast nw type |
| 1994 | * @ucChannelCount: uc channel count |
| 1995 | * @aChannels: pno channel |
| 1996 | * @rssiThreshold: rssi threshold |
| 1997 | */ |
| 1998 | struct pno_nw_type { |
| 1999 | struct mac_ssid ssid; |
| 2000 | uint32_t authentication; |
| 2001 | uint32_t encryption; |
| 2002 | uint32_t bcastNetwType; |
| 2003 | uint8_t ucChannelCount; |
| 2004 | uint8_t aChannels[WMI_PNO_MAX_NETW_CHANNELS_EX]; |
| 2005 | int32_t rssiThreshold; |
| 2006 | }; |
| 2007 | |
| 2008 | /** |
| 2009 | * struct pno_scan_req_params - PNO Scan request structure |
| 2010 | * @enable: flag to enable or disable |
| 2011 | * @modePNO: PNO Mode |
| 2012 | * @ucNetworksCount: Number of networks |
| 2013 | * @aNetworks: Preferred network list |
| 2014 | * @sessionId: Session identifier |
| 2015 | * @fast_scan_period: Fast Scan period |
| 2016 | * @slow_scan_period: Slow scan period |
| 2017 | * @fast_scan_max_cycles: Fast scan max cycles |
| 2018 | * @us24GProbeTemplateLen: 2.4G probe template length |
| 2019 | * @p24GProbeTemplate: 2.4G probe template |
| 2020 | * @us5GProbeTemplateLen: 5G probe template length |
| 2021 | * @p5GProbeTemplate: 5G probe template |
Gupta, Kapil | 7b76800 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 2022 | * @pno_channel_prediction: PNO channel prediction feature status |
| 2023 | * @top_k_num_of_channels: top K number of channels are used for tanimoto |
| 2024 | * distance calculation. |
| 2025 | * @stationary_thresh: threshold value to determine that the STA is stationary. |
| 2026 | * @pnoscan_adaptive_dwell_mode: adaptive dwelltime mode for pno scan |
| 2027 | * @channel_prediction_full_scan: periodic timer upon which a full scan needs |
| 2028 | * to be triggered. |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2029 | */ |
| 2030 | struct pno_scan_req_params { |
| 2031 | uint8_t enable; |
| 2032 | enum pno_mode modePNO; |
| 2033 | uint8_t ucNetworksCount; |
| 2034 | struct pno_nw_type aNetworks[WMI_PNO_MAX_SUPP_NETWORKS]; |
| 2035 | uint8_t sessionId; |
| 2036 | uint32_t fast_scan_period; |
| 2037 | uint32_t slow_scan_period; |
| 2038 | uint8_t fast_scan_max_cycles; |
| 2039 | uint32_t active_min_time; |
| 2040 | uint32_t active_max_time; |
| 2041 | uint32_t passive_min_time; |
| 2042 | uint32_t passive_max_time; |
| 2043 | uint16_t us24GProbeTemplateLen; |
| 2044 | uint8_t p24GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE]; |
| 2045 | uint16_t us5GProbeTemplateLen; |
| 2046 | uint8_t p5GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE]; |
| 2047 | #ifdef FEATURE_WLAN_SCAN_PNO |
| 2048 | bool pno_channel_prediction; |
| 2049 | uint8_t top_k_num_of_channels; |
| 2050 | uint8_t stationary_thresh; |
Gupta, Kapil | 7b76800 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 2051 | enum wmi_dwelltime_adaptive_mode pnoscan_adaptive_dwell_mode; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2052 | uint32_t channel_prediction_full_scan; |
| 2053 | #endif |
| 2054 | }; |
| 2055 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2056 | |
| 2057 | #define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36 |
| 2058 | #define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16 |
| 2059 | #define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128 |
| 2060 | #define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64 |
| 2061 | #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8 |
| 2062 | |
| 2063 | /** |
| 2064 | * struct wifi_scan_channelspec_params - wifi scan channel parameter |
| 2065 | * @channel: Frequency in MHz |
| 2066 | * @dwellTimeMs: dwell time |
| 2067 | * @flush: cached results flush |
| 2068 | * @passive: passive scan |
| 2069 | * @chnlClass: channel class |
| 2070 | */ |
| 2071 | struct wifi_scan_channelspec_params { |
| 2072 | uint32_t channel; |
| 2073 | uint32_t dwellTimeMs; |
| 2074 | bool passive; |
| 2075 | uint8_t chnlClass; |
| 2076 | }; |
| 2077 | |
| 2078 | /** |
| 2079 | * enum wmi_wifi_band - wifi band |
| 2080 | * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band |
| 2081 | * @WMI_WIFI_BAND_BG: 2.4 GHz |
| 2082 | * @WMI_WIFI_BAND_A: 5 GHz without DFS |
| 2083 | * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS |
| 2084 | * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only |
| 2085 | * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS |
| 2086 | * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS |
| 2087 | * @WMI_WIFI_BAND_MAX: max range |
| 2088 | */ |
| 2089 | enum wmi_wifi_band { |
| 2090 | WMI_WIFI_BAND_UNSPECIFIED, |
| 2091 | WMI_WIFI_BAND_BG = 1, |
| 2092 | WMI_WIFI_BAND_A = 2, |
| 2093 | WMI_WIFI_BAND_ABG = 3, |
| 2094 | WMI_WIFI_BAND_A_DFS_ONLY = 4, |
| 2095 | /* 5 is reserved */ |
| 2096 | WMI_WIFI_BAND_A_WITH_DFS = 6, |
| 2097 | WMI_WIFI_BAND_ABG_WITH_DFS = 7, |
| 2098 | /* Keep it last */ |
| 2099 | WMI_WIFI_BAND_MAX |
| 2100 | }; |
| 2101 | |
| 2102 | /** |
| 2103 | * struct wifi_scan_bucket_params - wifi scan bucket spec |
| 2104 | * @bucket: bucket identifier |
| 2105 | * @band: wifi band |
| 2106 | * @period: Desired period, in millisecond; if this is too |
| 2107 | * low, the firmware should choose to generate results as fast as |
| 2108 | * it can instead of failing the command byte |
| 2109 | * for exponential backoff bucket this is the min_period |
| 2110 | * @reportEvents: 0 => normal reporting (reporting rssi history |
| 2111 | * only, when rssi history buffer is % full) |
| 2112 | * 1 => same as 0 + report a scan completion event after scanning |
| 2113 | * this bucket |
| 2114 | * 2 => same as 1 + forward scan results |
| 2115 | * (beacons/probe responses + IEs) in real time to HAL |
| 2116 | * @max_period: if max_period is non zero or different than period, |
| 2117 | * then this bucket is an exponential backoff bucket and |
| 2118 | * the scan period will grow exponentially as per formula: |
| 2119 | * actual_period(N) = period ^ (N/(step_count+1)) to a |
| 2120 | * maximum period of max_period |
| 2121 | * @exponent: for exponential back off bucket: multiplier: |
| 2122 | * new_period = old_period * exponent |
| 2123 | * @step_count: for exponential back off bucket, number of scans performed |
| 2124 | * at a given period and until the exponent is applied |
| 2125 | * @numChannels: channels to scan; these may include DFS channels |
| 2126 | * Note that a given channel may appear in multiple buckets |
| 2127 | * @min_dwell_time_active: per bucket minimum active dwell time |
| 2128 | * @max_dwell_time_active: per bucket maximum active dwell time |
| 2129 | * @min_dwell_time_passive: per bucket minimum passive dwell time |
| 2130 | * @max_dwell_time_passive: per bucket maximum passive dwell time |
| 2131 | * @channels: Channel list |
| 2132 | */ |
| 2133 | struct wifi_scan_bucket_params { |
| 2134 | uint8_t bucket; |
| 2135 | enum wmi_wifi_band band; |
| 2136 | uint32_t period; |
| 2137 | uint32_t reportEvents; |
| 2138 | uint32_t max_period; |
| 2139 | uint32_t exponent; |
| 2140 | uint32_t step_count; |
| 2141 | uint32_t numChannels; |
| 2142 | uint32_t min_dwell_time_active; |
| 2143 | uint32_t max_dwell_time_active; |
| 2144 | uint32_t min_dwell_time_passive; |
| 2145 | uint32_t max_dwell_time_passive; |
| 2146 | struct wifi_scan_channelspec_params channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS]; |
| 2147 | }; |
| 2148 | |
| 2149 | /** |
| 2150 | * struct wifi_scan_cmd_req_params - wifi scan command request params |
| 2151 | * @basePeriod: base timer period |
| 2152 | * @maxAPperScan: max ap per scan |
| 2153 | * @report_threshold_percent: report threshold |
| 2154 | * in %, when buffer is this much full, wake up host |
| 2155 | * @report_threshold_num_scans: report threshold number of scans |
| 2156 | * in number of scans, wake up host after these many scans |
| 2157 | * @requestId: request id |
| 2158 | * @sessionId: session id |
| 2159 | * @numBuckets: number of buckets |
| 2160 | * @min_dwell_time_active: per bucket minimum active dwell time |
| 2161 | * @max_dwell_time_active: per bucket maximum active dwell time |
| 2162 | * @min_dwell_time_passive: per bucket minimum passive dwell time |
| 2163 | * @max_dwell_time_passive: per bucket maximum passive dwell time |
| 2164 | * @configuration_flags: configuration flags |
Gupta, Kapil | 7b76800 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 2165 | * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2166 | * @buckets: buckets array |
| 2167 | */ |
| 2168 | struct wifi_scan_cmd_req_params { |
| 2169 | uint32_t basePeriod; |
| 2170 | uint32_t maxAPperScan; |
| 2171 | |
| 2172 | uint32_t report_threshold_percent; |
| 2173 | uint32_t report_threshold_num_scans; |
| 2174 | |
| 2175 | uint32_t requestId; |
| 2176 | uint8_t sessionId; |
| 2177 | uint32_t numBuckets; |
| 2178 | |
| 2179 | uint32_t min_dwell_time_active; |
| 2180 | uint32_t max_dwell_time_active; |
| 2181 | uint32_t min_dwell_time_passive; |
| 2182 | uint32_t max_dwell_time_passive; |
| 2183 | uint32_t configuration_flags; |
Gupta, Kapil | 7b76800 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 2184 | enum wmi_dwelltime_adaptive_mode extscan_adaptive_dwell_mode; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2185 | struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS]; |
| 2186 | }; |
| 2187 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2188 | #define WMI_CFG_VALID_CHANNEL_LIST_LEN 100 |
Govind Singh | c7cd2d6 | 2016-06-21 14:33:26 +0530 | [diff] [blame] | 2189 | /* Occupied channel list remains static */ |
| 2190 | #define WMI_CHANNEL_LIST_STATIC 1 |
| 2191 | /* Occupied channel list can be learnt after init */ |
| 2192 | #define WMI_CHANNEL_LIST_DYNAMIC_INIT 2 |
| 2193 | /* Occupied channel list can be learnt after flush */ |
| 2194 | #define WMI_CHANNEL_LIST_DYNAMIC_FLUSH 3 |
| 2195 | /* Occupied channel list can be learnt after update */ |
| 2196 | #define WMI_CHANNEL_LIST_DYNAMIC_UPDATE 4 |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2197 | |
| 2198 | /** |
| 2199 | * struct plm_req_params - plm req parameter |
| 2200 | * @diag_token: Dialog token |
| 2201 | * @meas_token: measurement token |
| 2202 | * @num_bursts: total number of bursts |
| 2203 | * @burst_int: burst interval in seconds |
| 2204 | * @meas_duration:in TU's,STA goes off-ch |
| 2205 | * @burst_len: no of times the STA should cycle through PLM ch list |
| 2206 | * @desired_tx_pwr: desired tx power |
| 2207 | * @mac_addr: MC dest addr |
| 2208 | * @plm_num_ch: channel numbers |
| 2209 | * @plm_ch_list: channel list |
| 2210 | * @session_id: session id |
| 2211 | * @enable: enable/disable |
| 2212 | */ |
| 2213 | struct plm_req_params { |
| 2214 | uint16_t diag_token; |
| 2215 | uint16_t meas_token; |
| 2216 | uint16_t num_bursts; |
| 2217 | uint16_t burst_int; |
| 2218 | uint16_t meas_duration; |
| 2219 | /* no of times the STA should cycle through PLM ch list */ |
| 2220 | uint8_t burst_len; |
| 2221 | int8_t desired_tx_pwr; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2222 | struct qdf_mac_addr mac_addr; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2223 | /* no of channels */ |
| 2224 | uint8_t plm_num_ch; |
| 2225 | /* channel numbers */ |
| 2226 | uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN]; |
| 2227 | uint8_t session_id; |
| 2228 | bool enable; |
| 2229 | }; |
Naveen Rawat | d5ffe15 | 2016-04-14 23:42:46 -0700 | [diff] [blame] | 2230 | |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 2231 | #define MAX_SSID_ALLOWED_LIST 4 |
| 2232 | #define MAX_BSSID_AVOID_LIST 16 |
| 2233 | #define MAX_BSSID_FAVORED 16 |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2234 | |
| 2235 | |
| 2236 | /** |
| 2237 | * struct mac_ts_info_tfc - mac ts info parameters |
| 2238 | * @burstSizeDefn: burst size |
| 2239 | * @reserved: reserved |
| 2240 | * @ackPolicy: ack policy |
| 2241 | * @psb: psb |
| 2242 | * @aggregation: aggregation |
| 2243 | * @accessPolicy: access policy |
| 2244 | * @direction: direction |
| 2245 | * @tsid: direction |
| 2246 | * @trafficType: traffic type |
| 2247 | */ |
| 2248 | struct mac_ts_info_tfc { |
| 2249 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 2250 | uint8_t burstSizeDefn:1; |
| 2251 | uint8_t reserved:7; |
| 2252 | #else |
| 2253 | uint8_t reserved:7; |
| 2254 | uint8_t burstSizeDefn:1; |
| 2255 | #endif |
| 2256 | |
| 2257 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 2258 | uint16_t ackPolicy:2; |
| 2259 | uint16_t userPrio:3; |
| 2260 | uint16_t psb:1; |
| 2261 | uint16_t aggregation:1; |
| 2262 | uint16_t accessPolicy:2; |
| 2263 | uint16_t direction:2; |
| 2264 | uint16_t tsid:4; |
| 2265 | uint16_t trafficType:1; |
| 2266 | #else |
| 2267 | uint16_t trafficType:1; |
| 2268 | uint16_t tsid:4; |
| 2269 | uint16_t direction:2; |
| 2270 | uint16_t accessPolicy:2; |
| 2271 | uint16_t aggregation:1; |
| 2272 | uint16_t psb:1; |
| 2273 | uint16_t userPrio:3; |
| 2274 | uint16_t ackPolicy:2; |
| 2275 | #endif |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2276 | } qdf_packed; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2277 | |
| 2278 | /** |
| 2279 | * struct mac_ts_info_sch - mac ts info schedule parameters |
| 2280 | * @rsvd: reserved |
| 2281 | * @schedule: schedule bit |
| 2282 | */ |
| 2283 | struct mac_ts_info_sch { |
| 2284 | #ifndef ANI_LITTLE_BIT_ENDIAN |
| 2285 | uint8_t rsvd:7; |
| 2286 | uint8_t schedule:1; |
| 2287 | #else |
| 2288 | uint8_t schedule:1; |
| 2289 | uint8_t rsvd:7; |
| 2290 | #endif |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2291 | } qdf_packed; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2292 | |
| 2293 | /** |
| 2294 | * struct mac_ts_info_sch - mac ts info schedule parameters |
| 2295 | * @traffic: mac tfc parameter |
| 2296 | * @schedule: mac schedule parameters |
| 2297 | */ |
| 2298 | struct mac_ts_info { |
| 2299 | struct mac_ts_info_tfc traffic; |
| 2300 | struct mac_ts_info_sch schedule; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2301 | } qdf_packed; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2302 | |
| 2303 | /** |
| 2304 | * struct mac_tspec_ie - mac ts spec |
| 2305 | * @type: type |
| 2306 | * @length: length |
| 2307 | * @tsinfo: tsinfo |
| 2308 | * @nomMsduSz: nomMsduSz |
| 2309 | * @maxMsduSz: maxMsduSz |
| 2310 | * @minSvcInterval: minSvcInterval |
| 2311 | * @maxSvcInterval: maxSvcInterval |
| 2312 | * @inactInterval: inactInterval |
| 2313 | * @suspendInterval: suspendInterval |
| 2314 | * @svcStartTime: svcStartTime |
| 2315 | * @minDataRate: minDataRate |
| 2316 | * @meanDataRate: meanDataRate |
| 2317 | * @peakDataRate: peakDataRate |
| 2318 | * @maxBurstSz: maxBurstSz |
| 2319 | * @delayBound: delayBound |
| 2320 | * @minPhyRate: minPhyRate |
| 2321 | * @surplusBw: surplusBw |
| 2322 | * @mediumTime: mediumTime |
| 2323 | */ |
| 2324 | struct mac_tspec_ie { |
| 2325 | uint8_t type; |
| 2326 | uint8_t length; |
| 2327 | struct mac_ts_info tsinfo; |
| 2328 | uint16_t nomMsduSz; |
| 2329 | uint16_t maxMsduSz; |
| 2330 | uint32_t minSvcInterval; |
| 2331 | uint32_t maxSvcInterval; |
| 2332 | uint32_t inactInterval; |
| 2333 | uint32_t suspendInterval; |
| 2334 | uint32_t svcStartTime; |
| 2335 | uint32_t minDataRate; |
| 2336 | uint32_t meanDataRate; |
| 2337 | uint32_t peakDataRate; |
| 2338 | uint32_t maxBurstSz; |
| 2339 | uint32_t delayBound; |
| 2340 | uint32_t minPhyRate; |
| 2341 | uint16_t surplusBw; |
| 2342 | uint16_t mediumTime; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2343 | } qdf_packed; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2344 | |
| 2345 | /** |
| 2346 | * struct add_ts_param - ADDTS related parameters |
| 2347 | * @staIdx: station index |
| 2348 | * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS |
| 2349 | * @tspec: tspec value |
| 2350 | * @status: CDF status |
| 2351 | * @sessionId: session id |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2352 | * @tsm_interval: TSM interval period passed from UMAC to WMI |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2353 | * @setRICparams: RIC parameters |
| 2354 | * @sme_session_id: sme session id |
| 2355 | */ |
| 2356 | struct add_ts_param { |
| 2357 | uint16_t staIdx; |
| 2358 | uint16_t tspecIdx; |
| 2359 | struct mac_tspec_ie tspec; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2360 | QDF_STATUS status; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2361 | uint8_t sessionId; |
| 2362 | #ifdef FEATURE_WLAN_ESE |
| 2363 | uint16_t tsm_interval; |
| 2364 | #endif /* FEATURE_WLAN_ESE */ |
| 2365 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 2366 | uint8_t setRICparams; |
| 2367 | #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ |
| 2368 | uint8_t sme_session_id; |
| 2369 | }; |
| 2370 | |
| 2371 | /** |
| 2372 | * struct delts_req_info - DELTS request parameter |
| 2373 | * @tsinfo: ts info |
| 2374 | * @tspec: ts spec |
| 2375 | * @wmeTspecPresent: wme ts spec flag |
| 2376 | * @wsmTspecPresent: wsm ts spec flag |
| 2377 | * @lleTspecPresent: lle ts spec flag |
| 2378 | */ |
| 2379 | struct delts_req_info { |
| 2380 | struct mac_ts_info tsinfo; |
| 2381 | struct mac_tspec_ie tspec; |
| 2382 | uint8_t wmeTspecPresent:1; |
| 2383 | uint8_t wsmTspecPresent:1; |
| 2384 | uint8_t lleTspecPresent:1; |
| 2385 | }; |
| 2386 | |
| 2387 | /** |
| 2388 | * struct del_ts_params - DELTS related parameters |
| 2389 | * @staIdx: station index |
| 2390 | * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS |
| 2391 | * @bssId: BSSID |
| 2392 | * @sessionId: session id |
| 2393 | * @userPrio: user priority |
| 2394 | * @delTsInfo: DELTS info |
| 2395 | * @setRICparams: RIC parameters |
| 2396 | */ |
| 2397 | struct del_ts_params { |
| 2398 | uint16_t staIdx; |
| 2399 | uint16_t tspecIdx; |
Govind Singh | 8675b86 | 2016-03-28 22:09:18 +0530 | [diff] [blame] | 2400 | uint8_t bssId[IEEE80211_ADDR_LEN]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2401 | uint8_t sessionId; |
| 2402 | uint8_t userPrio; |
| 2403 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 2404 | struct delts_req_info delTsInfo; |
| 2405 | uint8_t setRICparams; |
| 2406 | #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ |
| 2407 | }; |
| 2408 | |
| 2409 | /** |
| 2410 | * struct ll_stats_clear_params - ll stats clear parameter |
| 2411 | * @req_id: request id |
| 2412 | * @sta_id: sta id |
| 2413 | * @stats_clear_mask: stats clear mask |
| 2414 | * @stop_req: stop request |
| 2415 | */ |
| 2416 | struct ll_stats_clear_params { |
| 2417 | uint32_t req_id; |
| 2418 | uint8_t sta_id; |
| 2419 | uint32_t stats_clear_mask; |
| 2420 | uint8_t stop_req; |
| 2421 | }; |
| 2422 | |
| 2423 | /** |
| 2424 | * struct ll_stats_set_params - ll stats get parameter |
| 2425 | * @req_id: request id |
| 2426 | * @sta_id: sta id |
| 2427 | * @mpdu_size_threshold: mpdu sixe threshold |
| 2428 | * @aggressive_statistics_gathering: aggressive_statistics_gathering |
| 2429 | */ |
| 2430 | struct ll_stats_set_params { |
| 2431 | uint32_t req_id; |
| 2432 | uint8_t sta_id; |
| 2433 | uint32_t mpdu_size_threshold; |
| 2434 | uint32_t aggressive_statistics_gathering; |
| 2435 | }; |
| 2436 | |
| 2437 | /** |
| 2438 | * struct ll_stats_get_params - ll stats parameter |
| 2439 | * @req_id: request id |
| 2440 | * @sta_id: sta id |
| 2441 | * @param_id_mask: param is mask |
| 2442 | */ |
| 2443 | struct ll_stats_get_params { |
| 2444 | uint32_t req_id; |
| 2445 | uint8_t sta_id; |
| 2446 | uint32_t param_id_mask; |
| 2447 | }; |
| 2448 | |
| 2449 | /** |
| 2450 | * struct pe_stats_req - pe stats parameter |
| 2451 | * @msg_type: message type is same as the request type |
| 2452 | * @msg_len: length of the entire request |
| 2453 | * @sta_id: Per STA stats request must contain valid |
| 2454 | * @stats_mask: categories of stats requested |
| 2455 | * @session_id: wsm ts spec flag |
| 2456 | */ |
| 2457 | struct pe_stats_req { |
| 2458 | /* Common for all types are requests */ |
| 2459 | uint16_t msg_type; |
| 2460 | uint16_t msg_len; |
| 2461 | uint32_t sta_id; |
| 2462 | /* categories of stats requested. look at ePEStatsMask */ |
| 2463 | uint32_t stats_mask; |
| 2464 | uint8_t session_id; |
| 2465 | }; |
| 2466 | |
| 2467 | /** |
| 2468 | * struct link_status_params - link stats parameter |
| 2469 | * @msg_type: message type is same as the request type |
| 2470 | * @msg_len: length of the entire request |
| 2471 | * @link_status: wme ts spec flag |
| 2472 | * @session_id: wsm ts spec flag |
| 2473 | */ |
| 2474 | struct link_status_params { |
| 2475 | uint16_t msg_type; |
| 2476 | uint16_t msg_len; |
| 2477 | uint8_t link_status; |
| 2478 | uint8_t session_id; |
| 2479 | }; |
| 2480 | |
| 2481 | /** |
| 2482 | * struct dhcp_stop_ind_params - DHCP Stop indication message |
| 2483 | * @msgtype: message type is same as the request type |
| 2484 | * @msglen: length of the entire request |
| 2485 | * @device_mode: Mode of the device(ex:STA, AP) |
| 2486 | * @adapter_macaddr: MAC address of the adapter |
| 2487 | * @peer_macaddr: MAC address of the connected peer |
| 2488 | */ |
| 2489 | struct dhcp_stop_ind_params { |
| 2490 | uint16_t msgtype; |
| 2491 | uint16_t msglen; |
| 2492 | uint8_t device_mode; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2493 | struct qdf_mac_addr adapter_macaddr; |
| 2494 | struct qdf_mac_addr peer_macaddr; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2495 | }; |
| 2496 | |
| 2497 | /** |
| 2498 | * struct aggr_add_ts_param - ADDTS parameters |
| 2499 | * @staIdx: station index |
| 2500 | * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS |
| 2501 | * @tspec: tspec value |
| 2502 | * @status: CDF status |
| 2503 | * @sessionId: session id |
| 2504 | */ |
| 2505 | struct aggr_add_ts_param { |
| 2506 | uint16_t staIdx; |
| 2507 | uint16_t tspecIdx; |
| 2508 | struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX]; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2509 | QDF_STATUS status[WMI_QOS_NUM_AC_MAX]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2510 | uint8_t sessionId; |
| 2511 | }; |
| 2512 | |
| 2513 | #define WMI_MAX_FILTER_TEST_DATA_LEN 8 |
| 2514 | #define WMI_MAX_NUM_MULTICAST_ADDRESS 240 |
| 2515 | #define WMI_MAX_NUM_FILTERS 20 |
| 2516 | #define WMI_MAX_NUM_TESTS_PER_FILTER 10 |
| 2517 | |
| 2518 | /** |
| 2519 | * enum packet_filter_type - packet filter type |
| 2520 | * @WMI_RCV_FILTER_TYPE_INVALID: invalid type |
| 2521 | * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type |
| 2522 | * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type |
| 2523 | * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size |
| 2524 | */ |
| 2525 | enum packet_filter_type { |
| 2526 | WMI_RCV_FILTER_TYPE_INVALID, |
| 2527 | WMI_RCV_FILTER_TYPE_FILTER_PKT, |
| 2528 | WMI_RCV_FILTER_TYPE_BUFFER_PKT, |
| 2529 | WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE |
| 2530 | }; |
| 2531 | |
| 2532 | /** |
| 2533 | * enum packet_protocol_type - packet protocol type |
| 2534 | * @WMI_FILTER_HDR_TYPE_INVALID: invalid type |
| 2535 | * @WMI_FILTER_HDR_TYPE_MAC: mac type |
| 2536 | * @WMI_FILTER_HDR_TYPE_ARP: trp type |
| 2537 | * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type |
| 2538 | * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type |
| 2539 | * @WMI_FILTER_HDR_TYPE_UDP: udp type |
| 2540 | * @WMI_FILTER_HDR_TYPE_MAX: max type |
| 2541 | */ |
| 2542 | enum packet_protocol_type { |
| 2543 | WMI_FILTER_HDR_TYPE_INVALID, |
| 2544 | WMI_FILTER_HDR_TYPE_MAC, |
| 2545 | WMI_FILTER_HDR_TYPE_ARP, |
| 2546 | WMI_FILTER_HDR_TYPE_IPV4, |
| 2547 | WMI_FILTER_HDR_TYPE_IPV6, |
| 2548 | WMI_FILTER_HDR_TYPE_UDP, |
| 2549 | WMI_FILTER_HDR_TYPE_MAX |
| 2550 | }; |
| 2551 | |
| 2552 | /** |
| 2553 | * enum packet_filter_comp_type - packet filter comparison type |
| 2554 | * @WMI_FILTER_CMP_TYPE_INVALID: invalid type |
| 2555 | * @WMI_FILTER_CMP_TYPE_EQUAL: type equal |
| 2556 | * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal |
| 2557 | * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal |
| 2558 | * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal |
| 2559 | * @WMI_FILTER_CMP_TYPE_MAX: max type |
| 2560 | */ |
| 2561 | enum packet_filter_comp_type { |
| 2562 | WMI_FILTER_CMP_TYPE_INVALID, |
| 2563 | WMI_FILTER_CMP_TYPE_EQUAL, |
| 2564 | WMI_FILTER_CMP_TYPE_MASK_EQUAL, |
| 2565 | WMI_FILTER_CMP_TYPE_NOT_EQUAL, |
| 2566 | WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL, |
| 2567 | WMI_FILTER_CMP_TYPE_MAX |
| 2568 | }; |
| 2569 | |
| 2570 | /** |
| 2571 | * struct rcv_pkt_filter_params - recieve packet filter parameters |
| 2572 | * @protocolLayer - protocol layer |
| 2573 | * @cmpFlag - comparison flag |
| 2574 | * @dataLength - data length |
| 2575 | * @dataOffset - data offset |
| 2576 | * @reserved - resserved |
| 2577 | * @compareData - compare data |
| 2578 | * @dataMask - data mask |
| 2579 | */ |
| 2580 | struct rcv_pkt_filter_params { |
| 2581 | enum packet_protocol_type protocolLayer; |
| 2582 | enum packet_filter_comp_type cmpFlag; |
| 2583 | uint16_t dataLength; |
| 2584 | uint8_t dataOffset; |
| 2585 | uint8_t reserved; |
| 2586 | uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN]; |
| 2587 | uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN]; |
| 2588 | }; |
| 2589 | |
| 2590 | /** |
| 2591 | * struct rcv_pkt_filter_config - recieve packet filter info |
| 2592 | * @filterId - filter id |
| 2593 | * @filterType - filter type |
| 2594 | * @numFieldParams - no of fields |
| 2595 | * @coalesceTime - reserved parameter |
| 2596 | * @self_macaddr - self mac address |
| 2597 | * @bssid - Bssid of the connected AP |
| 2598 | * @paramsData - data parameter |
| 2599 | */ |
| 2600 | struct rcv_pkt_filter_config { |
| 2601 | uint8_t filterId; |
| 2602 | enum packet_filter_type filterType; |
| 2603 | uint32_t numFieldParams; |
| 2604 | uint32_t coalesceTime; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2605 | struct qdf_mac_addr self_macaddr; |
| 2606 | struct qdf_mac_addr bssid; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2607 | struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER]; |
| 2608 | }; |
| 2609 | |
| 2610 | /** |
| 2611 | * struct vdev_ie_info_param - IE info |
| 2612 | * @vdev_id - vdev for which the IE is being sent |
| 2613 | * @ie_id - ID of the IE |
| 2614 | * @length - length of the IE data |
| 2615 | * @data - IE data |
| 2616 | * |
| 2617 | * This structure is used to store the IE information. |
| 2618 | */ |
| 2619 | struct vdev_ie_info_param { |
| 2620 | uint32_t vdev_id; |
| 2621 | uint32_t ie_id; |
| 2622 | uint32_t length; |
Selvaraj, Sridhar | ce06429 | 2016-07-25 16:25:14 +0530 | [diff] [blame] | 2623 | uint32_t ie_source; |
Naveen Rawat | 7126888 | 2016-08-03 16:41:33 -0700 | [diff] [blame] | 2624 | uint32_t band; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2625 | uint8_t *data; |
| 2626 | }; |
| 2627 | |
| 2628 | #define WMI_MAX_NUM_FW_SEGMENTS 4 |
| 2629 | |
| 2630 | /** |
| 2631 | * struct fw_dump_seg_req_param - individual segment details |
| 2632 | * @seg_id - segment id. |
| 2633 | * @seg_start_addr_lo - lower address of the segment. |
| 2634 | * @seg_start_addr_hi - higher address of the segment. |
| 2635 | * @seg_length - length of the segment. |
| 2636 | * @dst_addr_lo - lower address of the destination buffer. |
| 2637 | * @dst_addr_hi - higher address of the destination buffer. |
| 2638 | * |
| 2639 | * This structure carries the information to firmware about the |
| 2640 | * individual segments. This structure is part of firmware memory |
| 2641 | * dump request. |
| 2642 | */ |
| 2643 | struct fw_dump_seg_req_param { |
| 2644 | uint8_t seg_id; |
| 2645 | uint32_t seg_start_addr_lo; |
| 2646 | uint32_t seg_start_addr_hi; |
| 2647 | uint32_t seg_length; |
| 2648 | uint32_t dst_addr_lo; |
| 2649 | uint32_t dst_addr_hi; |
| 2650 | }; |
| 2651 | |
| 2652 | /** |
| 2653 | * struct fw_dump_req_param - firmware memory dump request details. |
| 2654 | * @request_id - request id. |
| 2655 | * @num_seg - requested number of segments. |
| 2656 | * @fw_dump_seg_req - individual segment information. |
| 2657 | * |
| 2658 | * This structure carries information about the firmware |
| 2659 | * memory dump request. |
| 2660 | */ |
| 2661 | struct fw_dump_req_param { |
| 2662 | uint32_t request_id; |
| 2663 | uint32_t num_seg; |
| 2664 | struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS]; |
| 2665 | }; |
| 2666 | |
| 2667 | #define WMI_TDLS_MAX_SUPP_CHANNELS 128 |
| 2668 | #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 2669 | #define WMI_2_4_GHZ_MAX_FREQ 3000 |
| 2670 | |
| 2671 | /** |
| 2672 | * struct tdls_update_ch_params - channel parameters |
| 2673 | * @chanId: ID of the channel |
| 2674 | * @pwr: power level |
| 2675 | * @dfsSet: is dfs supported or not |
| 2676 | * @half_rate: is the channel operating at 10MHz |
| 2677 | * @quarter_rate: is the channel operating at 5MHz |
| 2678 | */ |
| 2679 | struct tdls_update_ch_params { |
| 2680 | uint8_t chanId; |
| 2681 | uint8_t pwr; |
| 2682 | bool dfsSet; |
| 2683 | bool half_rate; |
| 2684 | bool quarter_rate; |
| 2685 | }; |
| 2686 | |
| 2687 | /** |
| 2688 | * struct tdls_peer_cap_params - TDLS peer capablities parameters |
| 2689 | * @isPeerResponder: is peer responder or not |
| 2690 | * @peerUapsdQueue: peer uapsd queue |
| 2691 | * @peerMaxSp: peer max SP value |
| 2692 | * @peerBuffStaSupport: peer buffer sta supported or not |
| 2693 | * @peerOffChanSupport: peer offchannel support |
| 2694 | * @peerCurrOperClass: peer current operating class |
| 2695 | * @selfCurrOperClass: self current operating class |
| 2696 | * @peerChanLen: peer channel length |
| 2697 | * @peerChan: peer channel list |
| 2698 | * @peerOperClassLen: peer operating class length |
| 2699 | * @peerOperClass: peer operating class |
| 2700 | * @prefOffChanNum: peer offchannel number |
| 2701 | * @prefOffChanBandwidth: peer offchannel bandwidth |
| 2702 | * @opClassForPrefOffChan: operating class for offchannel |
| 2703 | */ |
| 2704 | struct tdls_peer_cap_params { |
| 2705 | uint8_t isPeerResponder; |
| 2706 | uint8_t peerUapsdQueue; |
| 2707 | uint8_t peerMaxSp; |
| 2708 | uint8_t peerBuffStaSupport; |
| 2709 | uint8_t peerOffChanSupport; |
| 2710 | uint8_t peerCurrOperClass; |
| 2711 | uint8_t selfCurrOperClass; |
| 2712 | uint8_t peerChanLen; |
| 2713 | struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS]; |
| 2714 | uint8_t peerOperClassLen; |
| 2715 | uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 2716 | uint8_t prefOffChanNum; |
| 2717 | uint8_t prefOffChanBandwidth; |
| 2718 | uint8_t opClassForPrefOffChan; |
| 2719 | }; |
| 2720 | |
| 2721 | /** |
| 2722 | * struct tdls_peer_state_params - TDLS peer state parameters |
| 2723 | * @vdevId: vdev id |
| 2724 | * @peerMacAddr: peer mac address |
| 2725 | * @peerCap: peer capabality |
| 2726 | */ |
| 2727 | struct tdls_peer_state_params { |
| 2728 | uint32_t vdevId; |
Govind Singh | 8675b86 | 2016-03-28 22:09:18 +0530 | [diff] [blame] | 2729 | uint8_t peerMacAddr[IEEE80211_ADDR_LEN]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2730 | uint32_t peerState; |
| 2731 | struct tdls_peer_cap_params peerCap; |
| 2732 | }; |
| 2733 | |
| 2734 | /** |
| 2735 | * struct wmi_tdls_params - TDLS parameters |
| 2736 | * @vdev_id: vdev id |
| 2737 | * @tdls_state: TDLS state |
| 2738 | * @notification_interval_ms: notification inerval |
| 2739 | * @tx_discovery_threshold: tx discovery threshold |
| 2740 | * @tx_teardown_threshold: tx teardown threashold |
| 2741 | * @rssi_teardown_threshold: RSSI teardown threshold |
| 2742 | * @rssi_delta: RSSI delta |
| 2743 | * @tdls_options: TDLS options |
| 2744 | * @peer_traffic_ind_window: raffic indication window |
| 2745 | * @peer_traffic_response_timeout: traffic response timeout |
| 2746 | * @puapsd_mask: uapsd mask |
| 2747 | * @puapsd_inactivity_time: uapsd inactivity time |
| 2748 | * @puapsd_rx_frame_threshold: uapsd rx frame threshold |
| 2749 | * @teardown_notification_ms: tdls teardown notification interval |
| 2750 | * @tdls_peer_kickout_threshold: tdls packet threshold for |
| 2751 | * peer kickout operation |
| 2752 | */ |
| 2753 | struct wmi_tdls_params { |
| 2754 | uint32_t vdev_id; |
| 2755 | uint32_t tdls_state; |
| 2756 | uint32_t notification_interval_ms; |
| 2757 | uint32_t tx_discovery_threshold; |
| 2758 | uint32_t tx_teardown_threshold; |
| 2759 | int32_t rssi_teardown_threshold; |
| 2760 | int32_t rssi_delta; |
| 2761 | uint32_t tdls_options; |
| 2762 | uint32_t peer_traffic_ind_window; |
| 2763 | uint32_t peer_traffic_response_timeout; |
| 2764 | uint32_t puapsd_mask; |
| 2765 | uint32_t puapsd_inactivity_time; |
| 2766 | uint32_t puapsd_rx_frame_threshold; |
| 2767 | uint32_t teardown_notification_ms; |
| 2768 | uint32_t tdls_peer_kickout_threshold; |
| 2769 | }; |
| 2770 | |
| 2771 | /** |
| 2772 | * struct tdls_chan_switch_params - channel switch parameter structure |
| 2773 | * @vdev_id: vdev ID |
| 2774 | * @peer_mac_addr: Peer mac address |
| 2775 | * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset |
| 2776 | * @tdls_off_ch: Target Off Channel |
| 2777 | * @oper_class: Operating class for target channel |
| 2778 | * @is_responder: Responder or initiator |
| 2779 | */ |
| 2780 | struct tdls_channel_switch_params { |
| 2781 | uint32_t vdev_id; |
Govind Singh | 8675b86 | 2016-03-28 22:09:18 +0530 | [diff] [blame] | 2782 | uint8_t peer_mac_addr[IEEE80211_ADDR_LEN]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2783 | uint16_t tdls_off_ch_bw_offset; |
| 2784 | uint8_t tdls_off_ch; |
| 2785 | uint8_t tdls_sw_mode; |
| 2786 | uint8_t oper_class; |
| 2787 | uint8_t is_responder; |
| 2788 | }; |
| 2789 | |
| 2790 | /** |
| 2791 | * struct dhcp_offload_info_params - dhcp offload parameters |
| 2792 | * @vdev_id: request data length |
| 2793 | * @dhcpSrvOffloadEnabled: dhcp offload enabled |
| 2794 | * @dhcpClientNum: dhcp client no |
| 2795 | * @dhcpSrvIP: dhcp server ip |
| 2796 | */ |
| 2797 | struct dhcp_offload_info_params { |
| 2798 | uint32_t vdev_id; |
| 2799 | uint32_t dhcpSrvOffloadEnabled; |
| 2800 | uint32_t dhcpClientNum; |
| 2801 | uint32_t dhcpSrvIP; |
| 2802 | }; |
| 2803 | |
| 2804 | /** |
| 2805 | * struct nan_req_params - NAN request params |
| 2806 | * @request_data_len: request data length |
| 2807 | * @request_data: request data |
| 2808 | */ |
| 2809 | struct nan_req_params { |
| 2810 | uint16_t request_data_len; |
| 2811 | uint8_t request_data[]; |
| 2812 | }; |
| 2813 | |
| 2814 | |
| 2815 | /** |
| 2816 | * struct app_type2_params - app type2parameter |
| 2817 | * @vdev_id: vdev id |
| 2818 | * @rc4_key: rc4 key |
| 2819 | * @rc4_key_len: rc4 key length |
| 2820 | * @ip_id: NC id |
| 2821 | * @ip_device_ip: NC IP addres |
| 2822 | * @ip_server_ip: Push server IP address |
| 2823 | * @tcp_src_port: NC TCP port |
| 2824 | * @tcp_dst_port: Push server TCP port |
| 2825 | * @tcp_seq: tcp sequence |
| 2826 | * @tcp_ack_seq: tcp ack sequence |
| 2827 | * @keepalive_init: Initial ping interval |
| 2828 | * @keepalive_min: Minimum ping interval |
| 2829 | * @keepalive_max: Maximum ping interval |
| 2830 | * @keepalive_inc: Increment of ping interval |
| 2831 | * @gateway_mac: gateway mac address |
| 2832 | * @tcp_tx_timeout_val: tcp tx timeout value |
| 2833 | * @tcp_rx_timeout_val: tcp rx timeout value |
| 2834 | */ |
| 2835 | struct app_type2_params { |
| 2836 | uint8_t vdev_id; |
| 2837 | uint8_t rc4_key[16]; |
| 2838 | uint32_t rc4_key_len; |
| 2839 | /** ip header parameter */ |
| 2840 | uint32_t ip_id; |
| 2841 | uint32_t ip_device_ip; |
| 2842 | uint32_t ip_server_ip; |
| 2843 | /** tcp header parameter */ |
| 2844 | uint16_t tcp_src_port; |
| 2845 | uint16_t tcp_dst_port; |
| 2846 | uint32_t tcp_seq; |
| 2847 | uint32_t tcp_ack_seq; |
| 2848 | uint32_t keepalive_init; |
| 2849 | uint32_t keepalive_min; |
| 2850 | uint32_t keepalive_max; |
| 2851 | uint32_t keepalive_inc; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2852 | struct qdf_mac_addr gateway_mac; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2853 | uint32_t tcp_tx_timeout_val; |
| 2854 | uint32_t tcp_rx_timeout_val; |
| 2855 | }; |
| 2856 | |
| 2857 | /** |
| 2858 | * struct app_type1_params - app type1 parameter |
| 2859 | * @vdev_id: vdev id |
| 2860 | * @wakee_mac_addr: mac address |
| 2861 | * @identification_id: identification id |
| 2862 | * @password: password |
| 2863 | * @id_length: id length |
| 2864 | * @pass_length: password length |
| 2865 | */ |
| 2866 | struct app_type1_params { |
| 2867 | uint8_t vdev_id; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2868 | struct qdf_mac_addr wakee_mac_addr; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2869 | uint8_t identification_id[8]; |
| 2870 | uint8_t password[16]; |
| 2871 | uint32_t id_length; |
| 2872 | uint32_t pass_length; |
| 2873 | }; |
| 2874 | |
| 2875 | /** |
| 2876 | * enum wmi_ext_wow_type - wow type |
| 2877 | * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1 |
| 2878 | * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2 |
| 2879 | * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2 |
| 2880 | */ |
| 2881 | enum wmi_ext_wow_type { |
| 2882 | WMI_EXT_WOW_TYPE_APP_TYPE1, |
| 2883 | WMI_EXT_WOW_TYPE_APP_TYPE2, |
| 2884 | WMI_EXT_WOW_TYPE_APP_TYPE1_2, |
| 2885 | }; |
| 2886 | |
| 2887 | /** |
| 2888 | * struct ext_wow_params - ext wow parameters |
| 2889 | * @vdev_id: vdev id |
| 2890 | * @type: wow type |
| 2891 | * @wakeup_pin_num: wake up gpio no |
| 2892 | */ |
| 2893 | struct ext_wow_params { |
| 2894 | uint8_t vdev_id; |
| 2895 | enum wmi_ext_wow_type type; |
| 2896 | uint32_t wakeup_pin_num; |
| 2897 | }; |
| 2898 | |
| 2899 | /** |
| 2900 | * struct stats_ext_params - ext stats request |
| 2901 | * @vdev_id: vdev id |
| 2902 | * @request_data_len: request data length |
| 2903 | * @request_data: request data |
| 2904 | */ |
| 2905 | struct stats_ext_params { |
| 2906 | uint32_t vdev_id; |
| 2907 | uint32_t request_data_len; |
| 2908 | uint8_t request_data[]; |
| 2909 | }; |
| 2910 | |
| 2911 | #define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536 |
| 2912 | /** |
| 2913 | * struct periodic_tx_pattern - periodic tx pattern |
| 2914 | * @mac_address: MAC Address for the adapter |
| 2915 | * @ucPtrnId: Pattern ID |
| 2916 | * @ucPtrnSize: Pattern size |
| 2917 | * @usPtrnIntervalMs: in ms |
| 2918 | * @ucPattern: Pattern buffer |
| 2919 | */ |
| 2920 | struct periodic_tx_pattern { |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2921 | struct qdf_mac_addr mac_address; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2922 | uint8_t ucPtrnId; |
| 2923 | uint16_t ucPtrnSize; |
| 2924 | uint32_t usPtrnIntervalMs; |
| 2925 | uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE]; |
| 2926 | }; |
| 2927 | |
| 2928 | #define WMI_GTK_OFFLOAD_KEK_BYTES 16 |
| 2929 | #define WMI_GTK_OFFLOAD_KCK_BYTES 16 |
Siddarth Poddar | d922154 | 2016-04-01 17:45:06 +0530 | [diff] [blame] | 2930 | #define WMI_GTK_OFFLOAD_ENABLE 0 |
| 2931 | #define WMI_GTK_OFFLOAD_DISABLE 1 |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2932 | |
| 2933 | /** |
| 2934 | * struct gtk_offload_params - gtk offload parameters |
| 2935 | * @ulFlags: optional flags |
| 2936 | * @aKCK: Key confirmation key |
| 2937 | * @aKEK: key encryption key |
| 2938 | * @ullKeyReplayCounter: replay counter |
| 2939 | * @bssid: bss id |
| 2940 | */ |
| 2941 | struct gtk_offload_params { |
| 2942 | uint32_t ulFlags; |
| 2943 | uint8_t aKCK[WMI_GTK_OFFLOAD_KCK_BYTES]; |
| 2944 | uint8_t aKEK[WMI_GTK_OFFLOAD_KEK_BYTES]; |
| 2945 | uint64_t ullKeyReplayCounter; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2946 | struct qdf_mac_addr bssid; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2947 | }; |
| 2948 | |
| 2949 | /** |
| 2950 | * struct flashing_req_params - led flashing parameter |
| 2951 | * @reqId: request id |
| 2952 | * @pattern_id: pattern identifier. 0: disconnected 1: connected |
| 2953 | * @led_x0: led flashing parameter0 |
| 2954 | * @led_x1: led flashing parameter1 |
| 2955 | */ |
| 2956 | struct flashing_req_params { |
| 2957 | uint32_t req_id; |
| 2958 | uint32_t pattern_id; |
| 2959 | uint32_t led_x0; |
| 2960 | uint32_t led_x1; |
| 2961 | }; |
| 2962 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2963 | #define MAX_MEM_CHUNKS 32 |
| 2964 | /** |
| 2965 | * struct wmi_host_mem_chunk - host memory chunk structure |
| 2966 | * @vaddr: Pointer to virtual address |
| 2967 | * @paddr: Physical address |
| 2968 | * @memctx: qdf memory context for mapped address. |
| 2969 | * @len: length of chunk |
| 2970 | * @req_id: request id from target |
| 2971 | */ |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2972 | struct wmi_host_mem_chunk { |
| 2973 | uint32_t *vaddr; |
| 2974 | uint32_t paddr; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2975 | qdf_dma_mem_context(memctx); |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2976 | uint32_t len; |
| 2977 | uint32_t req_id; |
| 2978 | }; |
| 2979 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2980 | /** |
| 2981 | * struct target_resource_config - Resource config given to target |
| 2982 | * This structure is union of wmi_resource_config defined |
| 2983 | * by both TLV and non-TLV target. |
| 2984 | */ |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 2985 | struct target_resource_config { |
| 2986 | uint32_t num_vdevs; |
| 2987 | uint32_t num_peers; |
| 2988 | uint32_t num_active_peers; |
| 2989 | uint32_t num_offload_peers; |
| 2990 | uint32_t num_offload_reorder_buffs; |
| 2991 | uint32_t num_peer_keys; |
| 2992 | uint32_t num_tids; |
| 2993 | uint32_t ast_skid_limit; |
| 2994 | uint32_t tx_chain_mask; |
| 2995 | uint32_t rx_chain_mask; |
| 2996 | uint32_t rx_timeout_pri[4]; |
| 2997 | uint32_t rx_decap_mode; |
| 2998 | uint32_t scan_max_pending_req; |
| 2999 | uint32_t bmiss_offload_max_vdev; |
| 3000 | uint32_t roam_offload_max_vdev; |
| 3001 | uint32_t roam_offload_max_ap_profiles; |
| 3002 | uint32_t num_mcast_groups; |
| 3003 | uint32_t num_mcast_table_elems; |
| 3004 | uint32_t mcast2ucast_mode; |
| 3005 | uint32_t tx_dbg_log_size; |
| 3006 | uint32_t num_wds_entries; |
| 3007 | uint32_t dma_burst_size; |
| 3008 | uint32_t mac_aggr_delim; |
| 3009 | uint32_t rx_skip_defrag_timeout_dup_detection_check; |
| 3010 | uint32_t vow_config; |
| 3011 | uint32_t gtk_offload_max_vdev; |
| 3012 | uint32_t num_msdu_desc; /* Number of msdu desc */ |
| 3013 | uint32_t max_frag_entries; |
| 3014 | /* End common */ |
| 3015 | |
| 3016 | /* Added in MCL */ |
| 3017 | uint32_t num_tdls_vdevs; |
| 3018 | uint32_t num_tdls_conn_table_entries; |
| 3019 | uint32_t beacon_tx_offload_max_vdev; |
| 3020 | uint32_t num_multicast_filter_entries; |
| 3021 | uint32_t num_wow_filters; |
| 3022 | uint32_t num_keep_alive_pattern; |
| 3023 | uint32_t keep_alive_pattern_size; |
| 3024 | uint32_t max_tdls_concurrent_sleep_sta; |
| 3025 | uint32_t max_tdls_concurrent_buffer_sta; |
| 3026 | uint32_t wmi_send_separate; |
| 3027 | uint32_t num_ocb_vdevs; |
| 3028 | uint32_t num_ocb_channels; |
| 3029 | uint32_t num_ocb_schedules; |
| 3030 | }; |
| 3031 | |
| 3032 | /** |
| 3033 | * struct wmi_wifi_start_log - Structure to store the params sent to start/ |
| 3034 | * stop logging |
| 3035 | * @name: Attribute which indicates the type of logging like per packet |
| 3036 | * statistics, connectivity etc. |
| 3037 | * @verbose_level: Verbose level which can be 0,1,2,3 |
| 3038 | * @flag: Flag field for future use |
| 3039 | */ |
| 3040 | struct wmi_wifi_start_log { |
| 3041 | uint32_t ring_id; |
| 3042 | uint32_t verbose_level; |
| 3043 | uint32_t flag; |
| 3044 | }; |
| 3045 | |
| 3046 | /** |
| 3047 | * struct wmi_pcl_list - Format of PCL |
| 3048 | * @pcl_list: List of preferred channels |
Manishekar Chandrasekaran | b8c5938 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 3049 | * @weight_list: Weights of the PCL |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3050 | * @pcl_len: Number of channels in the PCL |
| 3051 | */ |
| 3052 | struct wmi_pcl_list { |
| 3053 | uint8_t pcl_list[128]; |
Manishekar Chandrasekaran | b8c5938 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 3054 | uint8_t weight_list[128]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3055 | uint32_t pcl_len; |
| 3056 | }; |
| 3057 | |
| 3058 | /** |
Manishekar Chandrasekaran | b8c5938 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 3059 | * struct wmi_pcl_chan_weights - Params to get the valid weighed list |
| 3060 | * @pcl_list: Preferred channel list already sorted in the order of preference |
| 3061 | * @pcl_len: Length of the PCL |
| 3062 | * @saved_chan_list: Valid channel list updated as part of |
| 3063 | * WMA_UPDATE_CHAN_LIST_REQ |
| 3064 | * @saved_num_chan: Length of the valid channel list |
| 3065 | * @weighed_valid_list: Weights of the valid channel list. This will have one |
| 3066 | * to one mapping with valid_chan_list. FW expects channel order and size to be |
| 3067 | * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID. |
| 3068 | * @weight_list: Weights assigned by policy manager |
| 3069 | */ |
| 3070 | struct wmi_pcl_chan_weights { |
| 3071 | uint8_t pcl_list[MAX_NUM_CHAN]; |
| 3072 | uint32_t pcl_len; |
| 3073 | uint8_t saved_chan_list[MAX_NUM_CHAN]; |
| 3074 | uint32_t saved_num_chan; |
| 3075 | uint8_t weighed_valid_list[MAX_NUM_CHAN]; |
| 3076 | uint8_t weight_list[MAX_NUM_CHAN]; |
| 3077 | }; |
| 3078 | |
| 3079 | /** |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3080 | * struct wmi_hw_mode_params - HW mode params |
| 3081 | * @mac0_tx_ss: MAC0 Tx spatial stream |
| 3082 | * @mac0_rx_ss: MAC0 Rx spatial stream |
| 3083 | * @mac1_tx_ss: MAC1 Tx spatial stream |
| 3084 | * @mac1_rx_ss: MAC1 Rx spatial stream |
| 3085 | * @mac0_bw: MAC0 bandwidth |
| 3086 | * @mac1_bw: MAC1 bandwidth |
| 3087 | * @dbs_cap: DBS capabality |
| 3088 | * @agile_dfs_cap: Agile DFS capabality |
| 3089 | */ |
| 3090 | struct wmi_hw_mode_params { |
| 3091 | uint8_t mac0_tx_ss; |
| 3092 | uint8_t mac0_rx_ss; |
| 3093 | uint8_t mac1_tx_ss; |
| 3094 | uint8_t mac1_rx_ss; |
| 3095 | uint8_t mac0_bw; |
| 3096 | uint8_t mac1_bw; |
| 3097 | uint8_t dbs_cap; |
| 3098 | uint8_t agile_dfs_cap; |
| 3099 | }; |
| 3100 | |
| 3101 | /** |
| 3102 | * struct wmi_dual_mac_config - Dual MAC configuration |
| 3103 | * @scan_config: Scan configuration |
| 3104 | * @fw_mode_config: FW mode configuration |
| 3105 | * @set_dual_mac_cb: Callback function to be executed on response to the command |
| 3106 | */ |
| 3107 | struct wmi_dual_mac_config { |
| 3108 | uint32_t scan_config; |
| 3109 | uint32_t fw_mode_config; |
| 3110 | void *set_dual_mac_cb; |
| 3111 | }; |
| 3112 | |
| 3113 | #ifdef WLAN_NS_OFFLOAD |
| 3114 | /** |
| 3115 | * struct ns_offload_req_params - ns offload request paramter |
| 3116 | * @srcIPv6Addr: src ipv6 address |
| 3117 | * @selfIPv6Addr: self ipv6 address |
| 3118 | * @targetIPv6Addr: target ipv6 address |
| 3119 | * @self_macaddr: self mac address |
| 3120 | * @srcIPv6AddrValid: src ipv6 address valid flag |
| 3121 | * @targetIPv6AddrValid: target ipv6 address valid flag |
Sravan Kumar Kairam | 33b9549 | 2016-07-26 17:59:59 +0530 | [diff] [blame] | 3122 | * @target_ipv6_addr_ac_type: target ipv6 address type |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3123 | * @slotIdx: slot index |
| 3124 | */ |
| 3125 | struct ns_offload_req_params { |
| 3126 | uint8_t srcIPv6Addr[WMI_MAC_IPV6_ADDR_LEN]; |
| 3127 | uint8_t selfIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN]; |
| 3128 | uint8_t targetIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN]; |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3129 | struct qdf_mac_addr self_macaddr; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3130 | uint8_t srcIPv6AddrValid; |
| 3131 | uint8_t targetIPv6AddrValid[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]; |
Sravan Kumar Kairam | 33b9549 | 2016-07-26 17:59:59 +0530 | [diff] [blame] | 3132 | uint8_t target_ipv6_addr_ac_type[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA]; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3133 | uint8_t slotIdx; |
| 3134 | }; |
| 3135 | #endif /* WLAN_NS_OFFLOAD */ |
| 3136 | |
| 3137 | /** |
| 3138 | * struct host_offload_req_param - arp offload parameter |
| 3139 | * @offloadType: offload type |
| 3140 | * @enableOrDisable: enable or disable |
| 3141 | * @num_ns_offload_count: offload count |
| 3142 | */ |
| 3143 | struct host_offload_req_param { |
| 3144 | uint8_t offloadType; |
| 3145 | uint8_t enableOrDisable; |
| 3146 | uint32_t num_ns_offload_count; |
| 3147 | union { |
| 3148 | uint8_t hostIpv4Addr[WMI_IPV4_ADDR_LEN]; |
| 3149 | uint8_t hostIpv6Addr[WMI_MAC_IPV6_ADDR_LEN]; |
| 3150 | } params; |
| 3151 | #ifdef WLAN_NS_OFFLOAD |
| 3152 | struct ns_offload_req_params nsOffloadInfo; |
| 3153 | #endif /* WLAN_NS_OFFLOAD */ |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3154 | struct qdf_mac_addr bssid; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3155 | }; |
| 3156 | |
| 3157 | /** |
| 3158 | * struct ssid_hotlist_param - param for SSID Hotlist |
| 3159 | * @ssid: SSID which is being hotlisted |
| 3160 | * @band: Band in which the given SSID should be scanned |
| 3161 | * @rssi_low: Low bound on RSSI |
| 3162 | * @rssi_high: High bound on RSSI |
| 3163 | */ |
| 3164 | struct ssid_hotlist_param { |
| 3165 | struct mac_ssid ssid; |
| 3166 | uint8_t band; |
| 3167 | int32_t rssi_low; |
| 3168 | int32_t rssi_high; |
| 3169 | }; |
| 3170 | |
| 3171 | /** |
Himanshu Agarwal | 5f2d048 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 3172 | * struct roam_scan_filter_params - Structure holding roaming scan |
| 3173 | * parameters |
| 3174 | * @len: length |
| 3175 | * @op_bitmap: bitmap to determine reason of roaming |
| 3176 | * @session_id: vdev id |
| 3177 | * @num_bssid_black_list: The number of BSSID's that we should |
| 3178 | * avoid connecting to. It is like a |
| 3179 | * blacklist of BSSID's. |
| 3180 | * @num_ssid_white_list: The number of SSID profiles that are |
| 3181 | * in the Whitelist. When roaming, we |
| 3182 | * consider the BSSID's with this SSID |
| 3183 | * also for roaming apart from the connected one's |
| 3184 | * @num_bssid_preferred_list: Number of BSSID's which have a preference over |
| 3185 | * others |
| 3186 | * @bssid_avoid_list: Blacklist SSID's |
| 3187 | * @ssid_allowed_list: Whitelist SSID's |
| 3188 | * @bssid_favored: Favorable BSSID's |
| 3189 | * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it |
| 3190 | * |
| 3191 | * This structure holds all the key parameters related to |
| 3192 | * initial connection and roaming connections. |
| 3193 | */ |
| 3194 | |
| 3195 | struct roam_scan_filter_params { |
| 3196 | uint32_t len; |
| 3197 | uint32_t op_bitmap; |
| 3198 | uint8_t session_id; |
| 3199 | uint32_t num_bssid_black_list; |
| 3200 | uint32_t num_ssid_white_list; |
| 3201 | uint32_t num_bssid_preferred_list; |
| 3202 | struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST]; |
| 3203 | struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST]; |
| 3204 | struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED]; |
| 3205 | uint8_t bssid_favored_factor[MAX_BSSID_FAVORED]; |
| 3206 | }; |
| 3207 | |
| 3208 | /** |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3209 | * struct ssid_hotlist_request_params - set SSID hotlist request struct |
| 3210 | * @request_id: ID of the request |
| 3211 | * @session_id: ID of the session |
| 3212 | * @lost_ssid_sample_size: Number of consecutive scans in which the SSID |
| 3213 | * must not be seen in order to consider the SSID "lost" |
| 3214 | * @ssid_count: Number of valid entries in the @ssids array |
| 3215 | * @ssids: Array that defines the SSIDs that are in the hotlist |
| 3216 | */ |
| 3217 | struct ssid_hotlist_request_params { |
| 3218 | uint32_t request_id; |
| 3219 | uint8_t session_id; |
| 3220 | uint32_t lost_ssid_sample_size; |
| 3221 | uint32_t ssid_count; |
| 3222 | struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS]; |
| 3223 | }; |
| 3224 | |
| 3225 | /** |
| 3226 | * struct wmi_unit_test_cmd - unit test command parameters |
| 3227 | * @vdev_id: vdev id |
| 3228 | * @module_id: module id |
| 3229 | * @num_args: number of arguments |
| 3230 | * @args: arguments |
| 3231 | */ |
| 3232 | struct wmi_unit_test_cmd { |
| 3233 | uint32_t vdev_id; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3234 | uint32_t module_id; |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 3235 | uint32_t num_args; |
| 3236 | uint32_t args[WMI_MAX_NUM_ARGS]; |
| 3237 | }; |
| 3238 | |
| 3239 | /** |
| 3240 | * struct wmi_roam_invoke_cmd - roam invoke command |
| 3241 | * @vdev_id: vdev id |
| 3242 | * @bssid: mac address |
| 3243 | * @channel: channel |
| 3244 | */ |
| 3245 | struct wmi_roam_invoke_cmd { |
| 3246 | uint32_t vdev_id; |
| 3247 | uint8_t bssid[IEEE80211_ADDR_LEN]; |
| 3248 | uint32_t channel; |
| 3249 | }; |
| 3250 | |
| 3251 | /** |
| 3252 | * struct ext_scan_setbssi_hotlist_params - set hotlist request |
| 3253 | * @requestId: request identifier |
| 3254 | * @sessionId: session identifier |
| 3255 | * @lost_ap_sample_size: number of samples to confirm AP loss |
| 3256 | * @numAp: Number of hotlist APs |
| 3257 | * @ap: hotlist APs |
| 3258 | */ |
| 3259 | struct ext_scan_setbssi_hotlist_params { |
| 3260 | uint32_t requestId; |
| 3261 | uint8_t sessionId; |
| 3262 | |
| 3263 | uint32_t lost_ap_sample_size; |
| 3264 | uint32_t numAp; |
| 3265 | struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS]; |
| 3266 | }; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3267 | |
| 3268 | /** |
| 3269 | * struct TARGET_HAL_REG_CAPABILITIES - This is replication of REG table |
| 3270 | * structure defined by target. This is added here to remove dependency |
| 3271 | * on FW headers so that host can be agnostic to different defintions in |
| 3272 | * both the targets. |
| 3273 | */ |
| 3274 | typedef struct { |
| 3275 | uint32_t eeprom_rd; /* regdomain value specified in EEPROM */ |
| 3276 | uint32_t eeprom_rd_ext; /* regdomain */ |
| 3277 | uint32_t regcap1; /* CAP1 capabilities bit map */ |
| 3278 | uint32_t regcap2; /* REGDMN EEPROM CAP */ |
| 3279 | uint32_t wireless_modes; /* REGDMN MODE */ |
| 3280 | uint32_t low_2ghz_chan; |
| 3281 | uint32_t high_2ghz_chan; |
| 3282 | uint32_t low_5ghz_chan; |
| 3283 | uint32_t high_5ghz_chan; |
| 3284 | } TARGET_HAL_REG_CAPABILITIES; |
| 3285 | |
| 3286 | /** |
| 3287 | * struct host_mem_req - Host memory request paramseters request by target |
| 3288 | * @req_id: Request id to identify the request. |
| 3289 | * @unit_size: Size of single unit requested. |
| 3290 | * @num_unit_info: Memory chunk info |
| 3291 | * @num_units: number of units requested. |
| 3292 | */ |
| 3293 | typedef struct { |
| 3294 | uint32_t req_id; |
| 3295 | uint32_t unit_size; |
| 3296 | uint32_t num_unit_info; |
| 3297 | uint32_t num_units; |
| 3298 | } host_mem_req; |
| 3299 | |
| 3300 | #define WMI_HOST_DSCP_MAP_MAX (64) |
| 3301 | |
| 3302 | /** |
| 3303 | * struct wmi_host_ext_resource_config - Extended resource config |
| 3304 | * @host_platform_config: Host plaform configuration. |
| 3305 | * @fw_featuew_bitmap: FW feature requested bitmap. |
| 3306 | */ |
| 3307 | typedef struct { |
| 3308 | uint32_t host_platform_config; |
| 3309 | |
| 3310 | #define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001 |
| 3311 | #define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002 |
| 3312 | #define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004 |
| 3313 | #define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008 |
| 3314 | #define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010 |
| 3315 | #define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020 |
| 3316 | #define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040 |
| 3317 | /** |
| 3318 | * @brief fw_feature_bitmask - Enable/Disable features in FW |
| 3319 | * @details |
| 3320 | * The bits in fw_feature_bitmask are used as shown by the masks below: |
| 3321 | * 0x0001 - LTEU Config enable/disable |
| 3322 | * 0x0002 - COEX GPIO Config enable/disable |
| 3323 | * 0x0004 - Aux Radio enhancement for spectral scan enable/disable |
| 3324 | * 0x0008 - Aux Radio enhancement for chan load scan enable/disable |
| 3325 | * 0x0010 - BSS channel info stats enable/disable |
| 3326 | * The features in question are enabled by setting |
| 3327 | * the feature's bit to 1, |
| 3328 | * or disabled by setting the feature's bit to 0. |
| 3329 | */ |
| 3330 | uint32_t fw_feature_bitmap; |
| 3331 | |
| 3332 | /* add new members here */ |
| 3333 | } wmi_host_ext_resource_config; |
| 3334 | |
| 3335 | /** |
| 3336 | * struct set_neighbour_rx_params - Neighbour RX params |
| 3337 | * @vdev_id: vdev id |
| 3338 | * @idx: index of param |
| 3339 | * @action: action |
| 3340 | * @type: Type of param |
| 3341 | */ |
| 3342 | struct set_neighbour_rx_params { |
| 3343 | uint8_t vdev_id; |
| 3344 | uint32_t idx; |
| 3345 | uint32_t action; |
| 3346 | uint32_t type; |
| 3347 | }; |
| 3348 | |
| 3349 | /** |
| 3350 | * struct set_fwtest_params - FW test params |
| 3351 | * @arg: FW param id |
| 3352 | * @value: value |
| 3353 | */ |
| 3354 | struct set_fwtest_params { |
| 3355 | uint32_t arg; |
| 3356 | uint32_t value; |
| 3357 | }; |
| 3358 | |
| 3359 | /** |
| 3360 | * struct config_ratemask_params - ratemask config parameters |
| 3361 | * @vdev_id: vdev id |
| 3362 | * @type: Type |
| 3363 | * @lower32: Lower 32 bits |
| 3364 | * @higher32: Hogher 32 bits |
| 3365 | */ |
| 3366 | struct config_ratemask_params { |
| 3367 | uint8_t vdev_id; |
| 3368 | uint8_t type; |
| 3369 | uint32_t lower32; |
| 3370 | uint32_t higher32; |
| 3371 | }; |
| 3372 | |
| 3373 | /** |
| 3374 | * struct peer_add_wds_entry_params - WDS peer entry add params |
| 3375 | * @dest_addr: Pointer to destination macaddr |
| 3376 | * @peer_addr: Pointer to peer mac addr |
| 3377 | * @flags: flags |
| 3378 | */ |
| 3379 | struct peer_add_wds_entry_params { |
| 3380 | const uint8_t *dest_addr; |
| 3381 | uint8_t *peer_addr; |
| 3382 | uint32_t flags; |
| 3383 | }; |
| 3384 | |
| 3385 | /** |
| 3386 | * struct peer_del_wds_entry_params - WDS peer entry del params |
| 3387 | * @dest_addr: Pointer to destination macaddr |
| 3388 | */ |
| 3389 | struct peer_del_wds_entry_params { |
| 3390 | uint8_t *dest_addr; |
| 3391 | }; |
| 3392 | |
| 3393 | /** |
| 3394 | * struct peer_updatewds_entry_params - WDS peer entry update params |
| 3395 | * @wds_macaddr: Pointer to destination macaddr |
| 3396 | * @peer_add: Pointer to peer mac addr |
| 3397 | * @flags: flags |
| 3398 | */ |
| 3399 | struct peer_update_wds_entry_params { |
| 3400 | uint8_t *wds_macaddr; |
| 3401 | uint8_t *peer_macaddr; |
| 3402 | uint32_t flags; |
| 3403 | }; |
| 3404 | |
| 3405 | /** |
| 3406 | * struct set_ps_mode_params - PS mode params |
| 3407 | * @vdev_id: vdev id |
| 3408 | * @psmode: PS mode |
| 3409 | */ |
| 3410 | struct set_ps_mode_params { |
| 3411 | uint8_t vdev_id; |
| 3412 | uint8_t psmode; |
| 3413 | }; |
| 3414 | |
| 3415 | /** |
| 3416 | * @struct tt_level_config - Set Thermal throttlling config |
| 3417 | * @tmplwm: Temperature low water mark |
| 3418 | * @tmphwm: Temperature high water mark |
| 3419 | * @dcoffpercent: dc off percentage |
| 3420 | * @priority: priority |
| 3421 | */ |
| 3422 | typedef struct { |
| 3423 | uint32_t tmplwm; |
| 3424 | uint32_t tmphwm; |
| 3425 | uint32_t dcoffpercent; |
| 3426 | uint32_t priority; |
| 3427 | } tt_level_config; |
| 3428 | |
| 3429 | /** |
| 3430 | * struct thermal_mitigation_params - Thermal mitigation params |
| 3431 | * @enable: Enable/Disable Thermal mitigation |
| 3432 | * @dc: DC |
| 3433 | * @dc_per_event: DC per event |
| 3434 | * @tt_level_config: TT level config params |
| 3435 | */ |
| 3436 | struct thermal_mitigation_params { |
| 3437 | uint32_t enable; |
| 3438 | uint32_t dc; |
| 3439 | uint32_t dc_per_event; |
| 3440 | tt_level_config levelconf[THERMAL_LEVELS]; |
| 3441 | }; |
| 3442 | |
| 3443 | /** |
| 3444 | * struct smart_ant_enable_params - Smart antenna params |
| 3445 | * @enable: Enable/Disable |
| 3446 | * @mode: SA mode |
| 3447 | * @rx_antenna: RX antenna config |
Govind Singh | 41da315 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 3448 | * @gpio_pin : GPIO pin config |
| 3449 | * @gpio_func : GPIO function config |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3450 | */ |
| 3451 | struct smart_ant_enable_params { |
| 3452 | uint32_t enable; |
| 3453 | uint32_t mode; |
| 3454 | uint32_t rx_antenna; |
Govind Singh | 41da315 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 3455 | uint32_t gpio_pin[WMI_HAL_MAX_SANTENNA]; |
| 3456 | uint32_t gpio_func[WMI_HAL_MAX_SANTENNA]; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3457 | }; |
| 3458 | |
| 3459 | /** |
| 3460 | * struct smart_ant_rx_ant_params - RX antenna params |
| 3461 | * @antenna: RX antenna |
| 3462 | */ |
| 3463 | struct smart_ant_rx_ant_params { |
| 3464 | uint32_t antenna; |
| 3465 | }; |
| 3466 | |
| 3467 | /** |
| 3468 | * struct smart_ant_tx_ant_params - TX antenna param |
| 3469 | * @antenna_array: Antenna arry |
| 3470 | * @vdev_id: VDEV id |
| 3471 | */ |
| 3472 | struct smart_ant_tx_ant_params { |
| 3473 | uint32_t *antenna_array; |
| 3474 | uint8_t vdev_id; |
| 3475 | }; |
| 3476 | |
| 3477 | /** |
| 3478 | * struct smart_ant_training_info_params - SA training params |
| 3479 | * @vdev_id: VDEV id |
| 3480 | * @rate_array: Rates array |
| 3481 | * @antenna_array: Antenna array |
| 3482 | * @numpkts: num packets for training |
| 3483 | */ |
| 3484 | struct smart_ant_training_info_params { |
| 3485 | uint8_t vdev_id; |
| 3486 | uint32_t *rate_array; |
| 3487 | uint32_t *antenna_array; |
| 3488 | uint32_t numpkts; |
| 3489 | }; |
| 3490 | |
| 3491 | /** |
| 3492 | * struct smart_ant_node_config_params - SA node config params |
| 3493 | * @vdev_id: VDEV id |
| 3494 | * @cmd_id: Command id |
| 3495 | * @args_count: Arguments count |
| 3496 | */ |
| 3497 | struct smart_ant_node_config_params { |
| 3498 | uint8_t vdev_id; |
| 3499 | uint32_t cmd_id; |
| 3500 | uint16_t args_count; |
| 3501 | uint32_t *args_arr; |
| 3502 | }; |
| 3503 | /** |
| 3504 | * struct smart_ant_enable_tx_feedback_params - SA tx feeback params |
| 3505 | * @enable: Enable TX feedback for SA |
| 3506 | */ |
| 3507 | struct smart_ant_enable_tx_feedback_params { |
| 3508 | int enable; |
| 3509 | }; |
| 3510 | |
| 3511 | /** |
| 3512 | * struct vdev_spectral_configure_params - SPectral config params |
| 3513 | * @vdev_id: VDEV id |
| 3514 | * @count: count |
| 3515 | * @period: period |
| 3516 | * @spectral_pri: Spectral priority |
| 3517 | * @fft_size: FFT size |
| 3518 | * @gc_enable: GC enable |
| 3519 | * @restart_enable: restart enabled |
| 3520 | * @noise_floor_ref: Noise floor reference |
| 3521 | * @init_delay: Init delays |
| 3522 | * @nb_tone_thr: NB tone threshold |
| 3523 | * @str_bin_thr: STR BIN threshold |
| 3524 | * @wb_rpt_mode: WB BIN threshold |
| 3525 | * @rssi_rpt_mode: RSSI report mode |
| 3526 | * @rssi_thr: RSSI threshold |
| 3527 | * @pwr_format: Power format |
| 3528 | * @rpt_mode: Report mdoe |
| 3529 | * @bin_scale: BIN scale |
| 3530 | * @dBm_adj: DBM adjust |
| 3531 | * @chn_mask: chain mask |
| 3532 | */ |
| 3533 | struct vdev_spectral_configure_params { |
| 3534 | uint8_t vdev_id; |
| 3535 | uint16_t count; |
| 3536 | uint16_t period; |
| 3537 | uint16_t spectral_pri; |
| 3538 | uint16_t fft_size; |
| 3539 | uint16_t gc_enable; |
| 3540 | uint16_t restart_enable; |
| 3541 | uint16_t noise_floor_ref; |
| 3542 | uint16_t init_delay; |
| 3543 | uint16_t nb_tone_thr; |
| 3544 | uint16_t str_bin_thr; |
| 3545 | uint16_t wb_rpt_mode; |
| 3546 | uint16_t rssi_rpt_mode; |
| 3547 | uint16_t rssi_thr; |
| 3548 | uint16_t pwr_format; |
| 3549 | uint16_t rpt_mode; |
| 3550 | uint16_t bin_scale; |
| 3551 | uint16_t dBm_adj; |
| 3552 | uint16_t chn_mask; |
| 3553 | }; |
| 3554 | |
| 3555 | /** |
| 3556 | * struct vdev_spectral_enable_params - Spectral enabled params |
| 3557 | * @vdev_id: VDEV id |
| 3558 | * @active_valid: Active valid |
| 3559 | * @active: active |
| 3560 | * @enabled_valid: Enabled valid |
| 3561 | * @enabled: enabled |
| 3562 | */ |
| 3563 | struct vdev_spectral_enable_params { |
| 3564 | uint8_t vdev_id; |
| 3565 | uint8_t active_valid; |
| 3566 | uint8_t active; |
| 3567 | uint8_t enabled_valid; |
| 3568 | uint8_t enabled; |
| 3569 | }; |
| 3570 | |
| 3571 | /** |
| 3572 | * struct pdev_set_regdomain_params - PDEV set reg domain params |
| 3573 | * @currentRDinuse: Current Reg domain |
| 3574 | * @currentRD2G: Current Reg domain 2G |
| 3575 | * @currentRD5G: Current Reg domain 5G |
| 3576 | * @ctl_2G: CTL 2G |
| 3577 | * @ctl_5G: CTL 5G |
| 3578 | * @dfsDomain: DFS domain |
| 3579 | */ |
| 3580 | struct pdev_set_regdomain_params { |
| 3581 | uint16_t currentRDinuse; |
| 3582 | uint16_t currentRD2G; |
| 3583 | uint16_t currentRD5G; |
| 3584 | uint32_t ctl_2G; |
| 3585 | uint32_t ctl_5G; |
| 3586 | uint8_t dfsDomain; |
| 3587 | }; |
| 3588 | |
| 3589 | /** |
| 3590 | * struct set_quiet_mode_params - Set quiet mode params |
| 3591 | * @enabled: Enabled |
| 3592 | * @period: Quite period |
| 3593 | * @intval: Quite interval |
| 3594 | * @duration: Quite duration |
| 3595 | * @offset: offset |
| 3596 | */ |
| 3597 | struct set_quiet_mode_params { |
| 3598 | uint8_t enabled; |
| 3599 | uint8_t period; |
| 3600 | uint16_t intval; |
| 3601 | uint16_t duration; |
| 3602 | uint16_t offset; |
| 3603 | }; |
| 3604 | |
| 3605 | /** |
| 3606 | * struct set_beacon_filter_params - Set beacon filter params |
| 3607 | * @vdev_id: VDEV id |
| 3608 | * @ie: Pointer to IE fields |
| 3609 | */ |
| 3610 | struct set_beacon_filter_params { |
| 3611 | uint8_t vdev_id; |
| 3612 | uint32_t *ie; |
| 3613 | }; |
| 3614 | |
| 3615 | /** |
| 3616 | * struct remove_beacon_filter_params - Remove beacon filter params |
| 3617 | * @vdev_id: VDEV id |
| 3618 | */ |
| 3619 | struct remove_beacon_filter_params { |
| 3620 | uint8_t vdev_id; |
| 3621 | }; |
| 3622 | |
| 3623 | /** |
| 3624 | * struct mgmt_params - Mgmt params |
| 3625 | * @vdev_id: vdev id |
| 3626 | * @buf_len: lenght of frame buffer |
| 3627 | * @wbuf: frame buffer |
| 3628 | */ |
| 3629 | struct mgmt_params { |
| 3630 | int vdev_id; |
| 3631 | uint32_t buf_len; |
| 3632 | qdf_nbuf_t wbuf; |
| 3633 | }; |
| 3634 | |
| 3635 | /** |
| 3636 | * struct addba_clearresponse_params - Addba clear response params |
| 3637 | * @vdev_id: VDEV id |
| 3638 | */ |
| 3639 | struct addba_clearresponse_params { |
| 3640 | uint8_t vdev_id; |
| 3641 | }; |
| 3642 | |
| 3643 | /** |
| 3644 | * struct addba_send_params - ADDBA send params |
| 3645 | * @vdev_id: vdev id |
| 3646 | * @tidno: TID |
| 3647 | * @buffersize: buffer size |
| 3648 | */ |
| 3649 | struct addba_send_params { |
| 3650 | uint8_t vdev_id; |
| 3651 | uint8_t tidno; |
| 3652 | uint16_t buffersize; |
| 3653 | }; |
| 3654 | |
| 3655 | /** |
| 3656 | * struct delba_send_params - DELBA send params |
| 3657 | * @vdev_id: vdev id |
| 3658 | * @tidno: TID |
| 3659 | * @initiator: initiator |
| 3660 | * @reasoncode: reason code |
| 3661 | */ |
| 3662 | struct delba_send_params { |
| 3663 | uint8_t vdev_id; |
| 3664 | uint8_t tidno; |
| 3665 | uint8_t initiator; |
| 3666 | uint16_t reasoncode; |
| 3667 | }; |
| 3668 | /** |
| 3669 | * struct addba_setresponse_arams - Set ADDBA response params |
| 3670 | * @vdev_id: vdev id |
| 3671 | * @tidno: TID |
| 3672 | * @statuscode: status code in response |
| 3673 | */ |
| 3674 | struct addba_setresponse_params { |
| 3675 | uint8_t vdev_id; |
| 3676 | uint8_t tidno; |
| 3677 | uint16_t statuscode; |
| 3678 | }; |
| 3679 | |
| 3680 | /** |
| 3681 | * struct singleamsdu_params - Single AMSDU params |
| 3682 | * @vdev_id: vdev is |
| 3683 | * @tidno: TID |
| 3684 | */ |
| 3685 | struct singleamsdu_params { |
| 3686 | uint8_t vdev_id; |
| 3687 | uint8_t tidno; |
| 3688 | }; |
| 3689 | |
| 3690 | /** |
| 3691 | * struct set_qbosst_params - Set QBOOST params |
| 3692 | * @vdev_id: vdev id |
| 3693 | * @value: value |
| 3694 | */ |
| 3695 | struct set_qboost_params { |
| 3696 | uint8_t vdev_id; |
| 3697 | uint32_t value; |
| 3698 | }; |
| 3699 | |
| 3700 | /** |
| 3701 | * struct mu_scan_params - MU scan params |
| 3702 | * @id: id |
| 3703 | * @type: type |
| 3704 | * @duration: Duration |
| 3705 | * @lteu_tx_power: LTEU tx power |
| 3706 | */ |
| 3707 | struct mu_scan_params { |
| 3708 | uint8_t id; |
| 3709 | uint8_t type; |
| 3710 | uint32_t duration; |
| 3711 | uint32_t lteu_tx_power; |
| 3712 | }; |
| 3713 | |
| 3714 | /** |
| 3715 | * struct lteu_config_params - LTEU config params |
| 3716 | * @lteu_gpio_start: start MU/AP scan after GPIO toggle |
| 3717 | * @lteu_num_bins: no. of elements in the following arrays |
| 3718 | * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one |
| 3719 | * @lteu_weight: weights for MU algo |
| 3720 | * @lteu_thresh: thresholds for MU algo |
| 3721 | * @lteu_gamma: gamma's for MU algo |
| 3722 | * @lteu_scan_timeout: timeout in ms to gpio toggle |
| 3723 | * @alpha_num_ssid: alpha for num active bssid calculation |
| 3724 | * @wifi_tx_power: Wifi Tx power |
| 3725 | */ |
| 3726 | struct lteu_config_params { |
| 3727 | uint8_t lteu_gpio_start; |
| 3728 | uint8_t lteu_num_bins; |
| 3729 | uint8_t use_actual_nf; |
| 3730 | uint32_t lteu_weight[LTEU_MAX_BINS]; |
| 3731 | uint32_t lteu_thresh[LTEU_MAX_BINS]; |
| 3732 | uint32_t lteu_gamma[LTEU_MAX_BINS]; |
| 3733 | uint32_t lteu_scan_timeout; |
| 3734 | uint32_t alpha_num_bssid; |
| 3735 | uint32_t wifi_tx_power; |
| 3736 | }; |
| 3737 | |
| 3738 | struct wmi_macaddr_t { |
| 3739 | /** upper 4 bytes of MAC address */ |
| 3740 | uint32_t mac_addr31to0; |
| 3741 | /** lower 2 bytes of MAC address */ |
| 3742 | uint32_t mac_addr47to32; |
| 3743 | }; |
| 3744 | |
| 3745 | /** |
| 3746 | * struct atf_peer_info - ATF peer info params |
| 3747 | * @peer_macaddr: peer mac addr |
| 3748 | * @percentage_peer: percentage of air time for this peer |
| 3749 | */ |
| 3750 | typedef struct { |
| 3751 | struct wmi_macaddr_t peer_macaddr; |
| 3752 | uint32_t percentage_peer; |
| 3753 | } atf_peer_info; |
| 3754 | |
| 3755 | /** |
Sathish Kumar | 50232d7 | 2016-08-09 16:50:46 +0530 | [diff] [blame] | 3756 | * struct bwf_peer_info_t - BWF peer info params |
| 3757 | * @peer_macaddr: peer mac addr |
| 3758 | * @throughput: Throughput |
| 3759 | * @max_airtime: Max airtime |
| 3760 | * @priority: Priority level |
| 3761 | * @reserved: Reserved array |
| 3762 | */ |
| 3763 | typedef struct { |
| 3764 | struct wmi_macaddr_t peer_macaddr; |
| 3765 | uint32_t throughput; |
| 3766 | uint32_t max_airtime; |
| 3767 | uint32_t priority; |
| 3768 | uint32_t reserved[4]; |
| 3769 | } bwf_peer_info; |
| 3770 | |
| 3771 | /** |
| 3772 | * struct set_bwf_params - BWF params |
| 3773 | * @num_peers: number of peers |
| 3774 | * @atf_peer_info: BWF peer info |
| 3775 | */ |
| 3776 | struct set_bwf_params { |
| 3777 | uint32_t num_peers; |
| 3778 | bwf_peer_info peer_info[1]; |
| 3779 | }; |
| 3780 | |
| 3781 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3782 | * struct set_atf_params - ATF params |
| 3783 | * @num_peers: number of peers |
| 3784 | * @atf_peer_info: ATF peer info |
| 3785 | */ |
| 3786 | struct set_atf_params { |
| 3787 | uint32_t num_peers; |
| 3788 | atf_peer_info peer_info[ATF_ACTIVED_MAX_CLIENTS]; |
| 3789 | }; |
| 3790 | |
| 3791 | /** |
| 3792 | * struct atf_peer_ext_info - ATF peer ext info params |
| 3793 | * @peer_macaddr: peer mac address |
| 3794 | * @group_index: group index |
| 3795 | * @atf_index_reserved: ATF index rsvd |
| 3796 | */ |
| 3797 | typedef struct { |
| 3798 | struct wmi_macaddr_t peer_macaddr; |
| 3799 | uint32_t group_index; |
| 3800 | uint32_t atf_index_reserved; |
| 3801 | } atf_peer_ext_info; |
| 3802 | |
| 3803 | /** |
| 3804 | * struct atf_peer_request_params - ATF peer req params |
| 3805 | * @num_peers: number of peers |
| 3806 | * @atf_peer_ext_info: ATF peer ext info |
| 3807 | */ |
| 3808 | struct atf_peer_request_params { |
| 3809 | uint32_t num_peers; |
| 3810 | atf_peer_ext_info peer_ext_info[ATF_ACTIVED_MAX_CLIENTS]; |
| 3811 | }; |
| 3812 | |
| 3813 | /** |
| 3814 | * struct atf_group_info - ATF group info params |
| 3815 | * @percentage_group: Percentage AT for group |
| 3816 | * @atf_group_units_reserved: ATF group information |
| 3817 | */ |
| 3818 | typedef struct { |
| 3819 | uint32_t percentage_group; |
| 3820 | uint32_t atf_group_units_reserved; |
| 3821 | } atf_group_info; |
| 3822 | |
| 3823 | /** |
| 3824 | * struct atf_grouping_params - ATF grouping params |
| 3825 | * @num_groups: number of groups |
| 3826 | * @group_inf: Group informaition |
| 3827 | */ |
| 3828 | struct atf_grouping_params { |
| 3829 | uint32_t num_groups; |
| 3830 | atf_group_info group_info[ATF_ACTIVED_MAX_ATFGROUPS]; |
| 3831 | }; |
| 3832 | |
| 3833 | /** |
| 3834 | * struct wlan_profile_params - WLAN profile params |
| 3835 | * @param_id: param id |
| 3836 | * @profile_id: profile id |
| 3837 | * @enable: enable |
| 3838 | */ |
| 3839 | struct wlan_profile_params { |
| 3840 | uint32_t param_id; |
| 3841 | uint32_t profile_id; |
| 3842 | uint32_t enable; |
| 3843 | }; |
| 3844 | |
| 3845 | /* struct ht_ie_params - HT IE params |
| 3846 | * @ie_len: IE length |
| 3847 | * @ie_data: pointer to IE data |
| 3848 | */ |
| 3849 | struct ht_ie_params { |
| 3850 | uint32_t ie_len; |
| 3851 | uint8_t *ie_data; |
| 3852 | }; |
| 3853 | |
| 3854 | /* struct vht_ie_params - VHT IE params |
| 3855 | * @ie_len: IE length |
| 3856 | * @ie_data: pointer to IE data |
| 3857 | */ |
| 3858 | struct vht_ie_params { |
| 3859 | uint32_t ie_len; |
| 3860 | uint8_t *ie_data; |
| 3861 | }; |
| 3862 | |
| 3863 | /** |
| 3864 | * struct wmi_host_wmeParams - WME params |
| 3865 | * @wmep_acm: ACM paramete |
| 3866 | * @wmep_aifsn: AIFSN parameters |
| 3867 | * @wmep_logcwmin: cwmin in exponential form |
| 3868 | * @wmep_logcwmax: cwmax in exponential form |
| 3869 | * @wmep_txopLimit: txopLimit |
| 3870 | * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack |
| 3871 | */ |
| 3872 | struct wmi_host_wmeParams { |
| 3873 | u_int8_t wmep_acm; |
| 3874 | u_int8_t wmep_aifsn; |
| 3875 | u_int8_t wmep_logcwmin; |
| 3876 | u_int8_t wmep_logcwmax; |
| 3877 | u_int16_t wmep_txopLimit; |
| 3878 | u_int8_t wmep_noackPolicy; |
| 3879 | }; |
| 3880 | |
| 3881 | /** |
| 3882 | * struct wmm_update_params - WMM update params |
| 3883 | * @wmep_array: WME params for each AC |
| 3884 | */ |
| 3885 | struct wmm_update_params { |
| 3886 | struct wmi_host_wmeParams *wmep_array; |
| 3887 | }; |
| 3888 | |
| 3889 | /** |
| 3890 | * struct ant_switch_tbl_params - Antenna switch table params |
| 3891 | * @ant_ctrl_common1: ANtenna control common param 1 |
| 3892 | * @ant_ctrl_common2: Antenna control commn param 2 |
| 3893 | */ |
| 3894 | struct ant_switch_tbl_params { |
| 3895 | uint32_t ant_ctrl_common1; |
| 3896 | uint32_t ant_ctrl_common2; |
| 3897 | }; |
| 3898 | |
| 3899 | /** |
| 3900 | * struct ratepwr_table_params - Rate power table params |
| 3901 | * @ratepwr_tbl: pointer to rate power table |
| 3902 | * @ratepwr_len: rate power table len |
| 3903 | */ |
| 3904 | struct ratepwr_table_params { |
| 3905 | uint8_t *ratepwr_tbl; |
| 3906 | uint16_t ratepwr_len; |
| 3907 | }; |
| 3908 | |
| 3909 | /** |
| 3910 | * struct ctl_table_params - Ctl table params |
| 3911 | * @ctl_array: pointer to ctl array |
| 3912 | * @ctl_len: ctl length |
| 3913 | * @is_acfg_ctl: is acfg_ctl table |
| 3914 | */ |
| 3915 | struct ctl_table_params { |
| 3916 | uint8_t *ctl_array; |
| 3917 | uint16_t ctl_len; |
| 3918 | bool is_acfg_ctl; |
| 3919 | }; |
| 3920 | |
| 3921 | /** |
| 3922 | * struct mimogain_table_params - MIMO gain table params |
| 3923 | * @array_gain: pointer to array gain table |
| 3924 | * @tbl_len: table length |
| 3925 | * @multichain_gain_bypass: bypass multichain gain |
| 3926 | */ |
| 3927 | struct mimogain_table_params { |
| 3928 | uint8_t *array_gain; |
| 3929 | uint16_t tbl_len; |
| 3930 | bool multichain_gain_bypass; |
| 3931 | }; |
| 3932 | |
| 3933 | /** |
| 3934 | * struct ratepwr_chainmask_params - Rate power chainmask params |
| 3935 | * @ratepwr_chain_tbl: pointer to ratepwr chain table |
| 3936 | * @num_rate: number of rate in table |
| 3937 | * @pream_type: preamble type |
| 3938 | * @ops: ops |
| 3939 | */ |
| 3940 | struct ratepwr_chainmsk_params { |
| 3941 | uint32_t *ratepwr_chain_tbl; |
| 3942 | uint16_t num_rate; |
| 3943 | uint8_t pream_type; |
| 3944 | uint8_t ops; |
| 3945 | }; |
| 3946 | |
| 3947 | struct macaddr_params { |
| 3948 | uint8_t *macaddr; |
| 3949 | }; |
| 3950 | |
| 3951 | /** |
| 3952 | * struct acparams_params - acparams config structure |
| 3953 | * @ac: AC to configure |
| 3954 | * @use_rts: Use rts for this AC |
| 3955 | * @aggrsize_scaling: Aggregrate size scaling for the AC |
| 3956 | * @min_kbps: min kbps req |
| 3957 | */ |
| 3958 | struct acparams_params { |
| 3959 | uint8_t ac; |
| 3960 | uint8_t use_rts; |
| 3961 | uint8_t aggrsize_scaling; |
| 3962 | uint32_t min_kbps; |
| 3963 | }; |
| 3964 | |
| 3965 | /** |
| 3966 | * struct vap_dscp_tid_map_params - DSCP tid map params |
| 3967 | * @vdev_id: vdev id |
| 3968 | * @dscp_to_tid_map: pointer to arry of tid to dscp map table |
| 3969 | */ |
| 3970 | struct vap_dscp_tid_map_params { |
| 3971 | uint8_t vdev_id; |
| 3972 | uint32_t *dscp_to_tid_map; |
| 3973 | }; |
| 3974 | |
| 3975 | /** |
| 3976 | * struct proxy_ast_reserve_params - Proxy AST reserve params |
| 3977 | * @macaddr: macaddr for proxy ast entry |
| 3978 | */ |
| 3979 | struct proxy_ast_reserve_params { |
| 3980 | uint8_t *macaddr; |
| 3981 | }; |
| 3982 | |
| 3983 | /** |
| 3984 | * struct fips_params - FIPS params config |
| 3985 | * @key: pointer to key |
| 3986 | * @key_len: length of key |
| 3987 | * @data: pointer data buf |
| 3988 | * @data_len: lenght of sata buf |
| 3989 | * @mode: mode |
| 3990 | * @op: operation |
| 3991 | */ |
| 3992 | struct fips_params { |
| 3993 | uint8_t *key; |
| 3994 | uint32_t key_len; |
| 3995 | uint8_t *data; |
| 3996 | uint32_t data_len; |
| 3997 | uint32_t mode; |
| 3998 | uint32_t op; |
| 3999 | }; |
| 4000 | |
| 4001 | /** |
| 4002 | * struct mcast_group_update_param - Mcast group table update to target |
| 4003 | * @action: Addition/deletion |
| 4004 | * @wildcard: iwldcard table entry? |
| 4005 | * @mcast_ip_addr: mcast ip address to be updated |
| 4006 | * @mcast_ip_addr_bytes: mcast ip addr bytes |
| 4007 | * @ucast_mac_addr: ucast peer mac subscribed to mcast ip |
| 4008 | * @filter_mode: filter mode |
| 4009 | * @nsrcs: number of entries in source list |
| 4010 | * @srcs: source mac accpted |
| 4011 | * @mask: mask |
| 4012 | * @vap_id: vdev id |
| 4013 | * @is_action_delete: is delete |
| 4014 | * @is_filter_mode_snoop: |
| 4015 | * @is_mcast_addr_len: |
| 4016 | */ |
| 4017 | struct mcast_group_update_params { |
| 4018 | int action; |
| 4019 | int wildcard; |
| 4020 | uint8_t *mcast_ip_addr; |
| 4021 | int mcast_ip_addr_bytes; |
| 4022 | uint8_t *ucast_mac_addr; |
| 4023 | uint8_t filter_mode; |
| 4024 | uint8_t nsrcs; |
| 4025 | uint8_t *srcs; |
| 4026 | uint8_t *mask; |
| 4027 | uint8_t vap_id; |
| 4028 | bool is_action_delete; |
| 4029 | bool is_filter_mode_snoop; |
| 4030 | bool is_mcast_addr_len; |
| 4031 | }; |
| 4032 | |
| 4033 | /** |
| 4034 | * struct periodic_chan_stats_param - periodic channel stats req param |
| 4035 | * @stats_period: stats period update |
| 4036 | * @enable: enable/disable |
| 4037 | */ |
| 4038 | struct periodic_chan_stats_params { |
| 4039 | uint32_t stats_period; |
| 4040 | bool enable; |
| 4041 | }; |
| 4042 | |
| 4043 | /** |
| 4044 | * struct packet_power_info_params - packet power info params |
| 4045 | * @rate_flags: rate flags |
| 4046 | * @nss: number of spatial streams |
| 4047 | * @preamble: preamble |
| 4048 | * @hw_rate: |
| 4049 | */ |
| 4050 | struct packet_power_info_params { |
| 4051 | uint16_t rate_flags; |
| 4052 | uint16_t nss; |
| 4053 | uint16_t preamble; |
| 4054 | uint16_t hw_rate; |
| 4055 | }; |
| 4056 | |
| 4057 | /** |
| 4058 | * WMI_GPIO_CONFIG_CMDID |
| 4059 | */ |
| 4060 | enum { |
| 4061 | WMI_HOST_GPIO_PULL_NONE, |
| 4062 | WMI_HOST_GPIO_PULL_UP, |
| 4063 | WMI_HOST_GPIO_PULL_DOWN, |
| 4064 | }; |
| 4065 | |
| 4066 | /** |
| 4067 | * WMI_GPIO_INTTYPE |
| 4068 | */ |
| 4069 | enum { |
| 4070 | WMI_HOST_GPIO_INTTYPE_DISABLE, |
| 4071 | WMI_HOST_GPIO_INTTYPE_RISING_EDGE, |
| 4072 | WMI_HOST_GPIO_INTTYPE_FALLING_EDGE, |
| 4073 | WMI_HOST_GPIO_INTTYPE_BOTH_EDGE, |
| 4074 | WMI_HOST_GPIO_INTTYPE_LEVEL_LOW, |
| 4075 | WMI_HOST_GPIO_INTTYPE_LEVEL_HIGH |
| 4076 | }; |
| 4077 | |
| 4078 | /** |
| 4079 | * struct wmi_host_gpio_input_event - GPIO input event structure |
| 4080 | * @gpio_num: GPIO number which changed state |
| 4081 | */ |
| 4082 | typedef struct { |
| 4083 | uint32_t gpio_num; /* GPIO number which changed state */ |
| 4084 | } wmi_host_gpio_input_event; |
| 4085 | |
| 4086 | /** |
| 4087 | * struct gpio_config_params - GPIO config params |
| 4088 | * @gpio_num: GPIO number to config |
| 4089 | * @input: input/output |
| 4090 | * @pull_type: pull type |
| 4091 | * @intr_mode: int mode |
| 4092 | */ |
| 4093 | struct gpio_config_params { |
| 4094 | uint32_t gpio_num; |
| 4095 | uint32_t input; |
| 4096 | uint32_t pull_type; |
| 4097 | uint32_t intr_mode; |
| 4098 | }; |
| 4099 | |
| 4100 | /** |
| 4101 | * struct gpio_output_params - GPIO output params |
| 4102 | * @gpio_num: GPIO number to configure |
| 4103 | * @set: set/reset |
| 4104 | */ |
| 4105 | struct gpio_output_params { |
| 4106 | uint32_t gpio_num; |
| 4107 | uint32_t set; |
| 4108 | }; |
| 4109 | |
| 4110 | #define WMI_HOST_RTT_REPORT_CFR 0 |
| 4111 | #define WMI_HOST_RTT_NO_REPORT_CFR 1 |
| 4112 | #define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2 |
| 4113 | /** |
| 4114 | * struct rtt_meas_req_test_params |
| 4115 | * @peer: peer mac address |
| 4116 | * @req_frame_type: RTT request frame type |
| 4117 | * @req_bw: requested bandwidth |
| 4118 | * @req_preamble: Preamble |
| 4119 | * @req_num_req: num of requests |
| 4120 | * @req_report_type: report type |
| 4121 | * @num_measurements: number of measurements |
| 4122 | * @asap_mode: priority |
| 4123 | * @lci_requested: LCI requested |
| 4124 | * @loc_civ_requested: |
| 4125 | * @channel_param: channel param |
| 4126 | * @req_id: requested id |
| 4127 | */ |
| 4128 | struct rtt_meas_req_test_params { |
| 4129 | uint8_t peer[IEEE80211_ADDR_LEN]; |
| 4130 | int req_frame_type; |
| 4131 | int req_bw; |
| 4132 | int req_preamble; |
| 4133 | int req_num_req; |
| 4134 | int req_report_type; |
| 4135 | uint32_t num_measurements; |
| 4136 | uint32_t asap_mode; |
| 4137 | uint32_t lci_requested; |
| 4138 | uint32_t loc_civ_requested; |
| 4139 | struct channel_param channel; |
| 4140 | uint8_t req_id; |
| 4141 | }; |
| 4142 | |
| 4143 | /** |
| 4144 | * struct rtt_meas_req_params - RTT measurement request params |
| 4145 | * @req_id: Request id |
| 4146 | * @vdev_id: vdev id |
| 4147 | * @sta_mac_addr: pointer to station mac address |
| 4148 | * @spoof_mac_addr: pointer to spoof mac address |
| 4149 | * @is_mode_na: 11NA |
| 4150 | * @is_mode_ac: AC |
| 4151 | * @is_bw_20: 20 |
| 4152 | * @is_bw_40: 40 |
| 4153 | * @is_bw_80: 80 |
| 4154 | * @num_probe_rqst: number of probe request |
| 4155 | * @channel_param: channel param |
| 4156 | */ |
| 4157 | struct rtt_meas_req_params { |
| 4158 | uint8_t req_id; |
| 4159 | uint8_t vdev_id; |
| 4160 | uint8_t *sta_mac_addr; |
| 4161 | uint8_t *spoof_mac_addr; |
| 4162 | bool is_mode_na; |
| 4163 | bool is_mode_ac; |
| 4164 | bool is_bw_20; |
| 4165 | bool is_bw_40; |
| 4166 | bool is_bw_80; |
| 4167 | uint32_t num_probe_rqst; |
| 4168 | struct channel_param channel; |
| 4169 | }; |
| 4170 | |
| 4171 | /** |
| 4172 | * struct lci_set_params - LCI params |
| 4173 | * @lci_data: pointer to LCI data |
| 4174 | * @latitude_unc: latitude |
| 4175 | * @latitude_0_12: bits 0 to 1 of latitude |
| 4176 | * @latitude_2_33: bits 2 to 33 of latitude |
| 4177 | * @longitude_unc: longitude |
| 4178 | * @longitude_0_1: bits 0 to 1 of longitude |
| 4179 | * @longitude_2_33: bits 2 to 33 of longitude |
| 4180 | * @altitude_type: altitude type |
| 4181 | * @altitude_unc_0_3: altitude bits 0 - 3 |
| 4182 | * @altitude_unc_4_5: altitude bits 4 - 5 |
| 4183 | * @altitude: altitude |
| 4184 | * @datum: dataum |
| 4185 | * @reg_loc_agmt: |
| 4186 | * @reg_loc_dse: |
| 4187 | * @dep_sta: |
| 4188 | * @version: version |
| 4189 | */ |
| 4190 | struct lci_set_params { |
| 4191 | void *lci_data; |
| 4192 | uint8_t latitude_unc:6, |
| 4193 | latitude_0_1:2; |
| 4194 | uint32_t latitude_2_33; |
| 4195 | uint8_t longitude_unc:6, |
| 4196 | longitude_0_1:2; |
| 4197 | uint32_t longitude_2_33; |
| 4198 | uint8_t altitude_type:4, |
| 4199 | altitude_unc_0_3:4; |
| 4200 | uint32_t altitude_unc_4_5:2, |
| 4201 | altitude:30; |
| 4202 | uint8_t datum:3, |
| 4203 | reg_loc_agmt:1, |
| 4204 | reg_loc_dse:1, |
| 4205 | dep_sta:1, |
| 4206 | version:2; |
Sathish Kumar | 38bf0d8 | 2016-10-20 14:07:21 +0530 | [diff] [blame^] | 4207 | uint8_t *colocated_bss; |
| 4208 | int msg_len; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4209 | }; |
| 4210 | |
| 4211 | /** |
| 4212 | * struct lcr_set_params - LCR params |
| 4213 | * @lcr_data: pointer to lcr data |
| 4214 | */ |
| 4215 | struct lcr_set_params { |
| 4216 | void *lcr_data; |
Sathish Kumar | 38bf0d8 | 2016-10-20 14:07:21 +0530 | [diff] [blame^] | 4217 | int msg_len; |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4218 | }; |
| 4219 | |
| 4220 | /** |
| 4221 | * struct rtt_keepalive_req_params - RTT keepalive params |
| 4222 | * @macaddr: pointer to macaddress |
| 4223 | * @req_id: Request id |
| 4224 | * @vdev_id: vdev id |
| 4225 | * @stop: start/stop |
| 4226 | */ |
| 4227 | struct rtt_keepalive_req_params { |
| 4228 | uint8_t *macaddr; |
| 4229 | uint8_t req_id; |
| 4230 | uint8_t vdev_id; |
| 4231 | bool stop; |
| 4232 | }; |
| 4233 | |
| 4234 | /** |
| 4235 | * struct wmi_host_stats_event - Stats event params |
| 4236 | * @stats_id: stats id of type wmi_host_stats_event |
| 4237 | * @num_pdev_stats: number of pdev stats event structures 0 or 1 |
| 4238 | * @num_pdev_ext_stats: number of pdev ext stats event structures |
| 4239 | * @num_vdev_stats: number of vdev stats |
| 4240 | * @num_peer_stats: number of peer stats event structures 0 or max peers |
| 4241 | * @num_bcnflt_stats: number of beacon filter stats |
| 4242 | * @num_chan_stats: number of channel stats |
| 4243 | */ |
| 4244 | typedef struct { |
| 4245 | wmi_host_stats_id stats_id; |
| 4246 | uint32_t num_pdev_stats; |
| 4247 | uint32_t num_pdev_ext_stats; |
| 4248 | uint32_t num_vdev_stats; |
| 4249 | uint32_t num_peer_stats; |
| 4250 | uint32_t num_bcnflt_stats; |
| 4251 | uint32_t num_chan_stats; |
| 4252 | } wmi_host_stats_event; |
| 4253 | |
| 4254 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4255 | * struct wmi_host_peer_extd_stats - peer extd stats event structure |
| 4256 | * @peer_macaddr: Peer mac address |
| 4257 | * @inactive_time: inactive time in secs |
| 4258 | * @peer_chain_rssi: peer rssi |
| 4259 | * @rx_duration: RX duration |
| 4260 | * @peer_tx_bytes: TX bytes |
| 4261 | * @peer_rx_bytes: RX bytes |
| 4262 | * @last_tx_rate_code: Tx rate code of last frame |
| 4263 | * @last_tx_power: Tx power latest |
| 4264 | * @atf_tokens_allocated: atf tokens allocated |
| 4265 | * @atf_tokens_utilized: atf tokens utilized |
| 4266 | * @reserved: for future use |
| 4267 | */ |
| 4268 | typedef struct { |
| 4269 | wmi_host_mac_addr peer_macaddr; |
| 4270 | uint32_t inactive_time; |
| 4271 | uint32_t peer_chain_rssi; |
| 4272 | uint32_t rx_duration; |
| 4273 | uint32_t peer_tx_bytes; |
| 4274 | uint32_t peer_rx_bytes; |
| 4275 | uint32_t last_tx_rate_code; |
| 4276 | uint32_t last_tx_power; |
| 4277 | uint32_t atf_tokens_allocated; |
| 4278 | uint32_t atf_tokens_utilized; |
| 4279 | uint32_t reserved[4]; |
| 4280 | } wmi_host_peer_extd_stats; |
| 4281 | |
| 4282 | /** |
| 4283 | * struct wmi_host_pdev_ext_stats - peer ext stats structure |
| 4284 | * @rx_rssi_comb: RX rssi |
| 4285 | * @rx_rssi_chain0: RX rssi chain 0 |
| 4286 | * @rx_rssi_chain1: RX rssi chain 1 |
| 4287 | * @rx_rssi_chain2: RX rssi chain 2 |
| 4288 | * @rx_rssi_chain3: RX rssi chain 3 |
| 4289 | * @rx_mcs: RX MCS array |
| 4290 | * @tx_mcs: TX MCS array |
| 4291 | * @ack_rssi: Ack rssi |
| 4292 | */ |
| 4293 | typedef struct { |
| 4294 | uint32_t rx_rssi_comb; |
| 4295 | uint32_t rx_rssi_chain0; |
| 4296 | uint32_t rx_rssi_chain1; |
| 4297 | uint32_t rx_rssi_chain2; |
| 4298 | uint32_t rx_rssi_chain3; |
| 4299 | uint32_t rx_mcs[10]; |
| 4300 | uint32_t tx_mcs[10]; |
| 4301 | uint32_t ack_rssi; |
| 4302 | } wmi_host_pdev_ext_stats; |
| 4303 | |
| 4304 | /** |
| 4305 | * struct wmi_host_dbg_tx_stats - Debug stats |
| 4306 | * @comp_queued: Num HTT cookies queued to dispatch list |
| 4307 | * @comp_delivered: Num HTT cookies dispatched |
| 4308 | * @msdu_enqued: Num MSDU queued to WAL |
| 4309 | * @mpdu_enqued: Num MPDU queue to WAL |
| 4310 | * @wmm_drop: Num MSDUs dropped by WMM limit |
| 4311 | * @local_enqued: Num Local frames queued |
| 4312 | * @local_freed: Num Local frames done |
| 4313 | * @hw_queued: Num queued to HW |
| 4314 | * @hw_reaped: Num PPDU reaped from HW |
| 4315 | * @underrun: Num underruns |
| 4316 | * @hw_paused: HW Paused. |
| 4317 | * @tx_abort: Num PPDUs cleaned up in TX abort |
| 4318 | * @mpdus_requed: Num MPDUs requed by SW |
| 4319 | * @tx_ko: excessive retries |
| 4320 | * @tx_xretry: |
| 4321 | * @data_rc: data hw rate code |
| 4322 | * @self_triggers: Scheduler self triggers |
| 4323 | * @sw_retry_failure: frames dropped due to excessive sw retries |
| 4324 | * @illgl_rate_phy_err: illegal rate phy errors |
| 4325 | * @pdev_cont_xretry: wal pdev continous xretry |
| 4326 | * @pdev_tx_timeout: wal pdev continous xretry |
| 4327 | * @pdev_resets: wal pdev resets |
| 4328 | * @stateless_tid_alloc_failure: frames dropped due to non-availability of |
| 4329 | * stateless TIDs |
| 4330 | * @phy_underrun: PhY/BB underrun |
| 4331 | * @txop_ovf: MPDU is more than txop limit |
| 4332 | * @seq_posted: Number of Sequences posted |
| 4333 | * @seq_failed_queueing: Number of Sequences failed queueing |
| 4334 | * @seq_completed: Number of Sequences completed |
| 4335 | * @seq_restarted: Number of Sequences restarted |
| 4336 | * @mu_seq_posted: Number of MU Sequences posted |
| 4337 | * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT |
| 4338 | * (Reset,channel change) |
| 4339 | * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition |
| 4340 | * (TTL expired) |
| 4341 | * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT, |
| 4342 | * PPDU_duration based on rate, dyn_bw) |
| 4343 | * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA |
| 4344 | * @mpdus_expired: Num MPDUs that was dropped du to expiry. |
| 4345 | * @mc_dropr: Num mc drops |
| 4346 | */ |
| 4347 | typedef struct { |
| 4348 | int32_t comp_queued; |
| 4349 | int32_t comp_delivered; |
| 4350 | int32_t msdu_enqued; |
| 4351 | int32_t mpdu_enqued; |
| 4352 | int32_t wmm_drop; |
| 4353 | int32_t local_enqued; |
| 4354 | int32_t local_freed; |
| 4355 | int32_t hw_queued; |
| 4356 | int32_t hw_reaped; |
| 4357 | int32_t underrun; |
| 4358 | uint32_t hw_paused; |
| 4359 | int32_t tx_abort; |
| 4360 | int32_t mpdus_requed; |
| 4361 | uint32_t tx_ko; |
| 4362 | uint32_t tx_xretry; |
| 4363 | uint32_t data_rc; |
| 4364 | uint32_t self_triggers; |
| 4365 | uint32_t sw_retry_failure; |
| 4366 | uint32_t illgl_rate_phy_err; |
| 4367 | uint32_t pdev_cont_xretry; |
| 4368 | uint32_t pdev_tx_timeout; |
| 4369 | uint32_t pdev_resets; |
| 4370 | uint32_t stateless_tid_alloc_failure; |
| 4371 | uint32_t phy_underrun; |
| 4372 | uint32_t txop_ovf; |
| 4373 | uint32_t seq_posted; |
| 4374 | uint32_t seq_failed_queueing; |
| 4375 | uint32_t seq_completed; |
| 4376 | uint32_t seq_restarted; |
| 4377 | uint32_t mu_seq_posted; |
| 4378 | int32_t mpdus_sw_flush; |
| 4379 | int32_t mpdus_hw_filter; |
| 4380 | int32_t mpdus_truncated; |
| 4381 | int32_t mpdus_ack_failed; |
| 4382 | int32_t mpdus_expired; |
| 4383 | uint32_t mc_drop; |
| 4384 | } wmi_host_dbg_tx_stats; |
| 4385 | |
| 4386 | /** |
| 4387 | * struct wmi_host_dbg_rx_stats - RX Debug stats |
| 4388 | * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu |
| 4389 | * @status_rcvd: Total number of statuses processed |
| 4390 | * @r0_frags: Extra frags on rings 0 |
| 4391 | * @r1_frags: Extra frags on rings 1 |
| 4392 | * @r2_frags: Extra frags on rings 2 |
| 4393 | * @r3_frags: Extra frags on rings 3 |
| 4394 | * @htt_msdus: MSDUs delivered to HTT |
| 4395 | * @htt_mpdus: MPDUs delivered to HTT |
| 4396 | * @loc_msdus: MSDUs delivered to local stack |
| 4397 | * @loc_mpdus: MPDUS delivered to local stack |
| 4398 | * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size |
| 4399 | * @phy_errs: Number of PHY errors |
| 4400 | * @phy_err_drop: Number of PHY errors drops |
| 4401 | * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc. |
| 4402 | * @pdev_rx_timeout: Number of rx inactivity timeouts |
| 4403 | * @rx_ovfl_errs: Number of rx overflow errors. |
| 4404 | */ |
| 4405 | typedef struct { |
| 4406 | int32_t mid_ppdu_route_change; |
| 4407 | int32_t status_rcvd; |
| 4408 | int32_t r0_frags; |
| 4409 | int32_t r1_frags; |
| 4410 | int32_t r2_frags; |
| 4411 | int32_t r3_frags; |
| 4412 | int32_t htt_msdus; |
| 4413 | int32_t htt_mpdus; |
| 4414 | int32_t loc_msdus; |
| 4415 | int32_t loc_mpdus; |
| 4416 | int32_t oversize_amsdu; |
| 4417 | int32_t phy_errs; |
| 4418 | int32_t phy_err_drop; |
| 4419 | int32_t mpdu_errs; |
| 4420 | uint32_t pdev_rx_timeout; |
| 4421 | int32_t rx_ovfl_errs; |
| 4422 | } wmi_host_dbg_rx_stats; |
| 4423 | |
| 4424 | /** struct wmi_host_dbg_mem_stats - memory stats |
| 4425 | * @iram_free_size: IRAM free size on target |
| 4426 | * @dram_free_size: DRAM free size on target |
| 4427 | * @sram_free_size: SRAM free size on target |
| 4428 | */ |
| 4429 | typedef struct { |
| 4430 | uint32_t iram_free_size; |
| 4431 | uint32_t dram_free_size; |
| 4432 | /* Only Non-TLV */ |
| 4433 | uint32_t sram_free_size; |
| 4434 | } wmi_host_dbg_mem_stats; |
| 4435 | |
| 4436 | typedef struct { |
| 4437 | /* Only TLV */ |
| 4438 | int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ |
| 4439 | } wmi_host_dbg_peer_stats; |
| 4440 | |
| 4441 | /** |
| 4442 | * struct wmi_host_dbg_stats - host debug stats |
| 4443 | * @tx: TX stats of type wmi_host_dbg_tx_stats |
| 4444 | * @rx: RX stats of type wmi_host_dbg_rx_stats |
| 4445 | * @mem: Memory stats of type wmi_host_dbg_mem_stats |
| 4446 | * @peer: peer stats of type wmi_host_dbg_peer_stats |
| 4447 | */ |
| 4448 | typedef struct { |
| 4449 | wmi_host_dbg_tx_stats tx; |
| 4450 | wmi_host_dbg_rx_stats rx; |
| 4451 | wmi_host_dbg_mem_stats mem; |
| 4452 | wmi_host_dbg_peer_stats peer; |
| 4453 | } wmi_host_dbg_stats; |
| 4454 | |
| 4455 | /** |
| 4456 | * struct wmi_host_pdev_stats - PDEV stats |
| 4457 | * @chan_nf: Channel noise floor |
| 4458 | * @tx_frame_count: TX frame count |
| 4459 | * @rx_frame_count: RX frame count |
| 4460 | * @rx_clear_count: rx clear count |
| 4461 | * @cycle_count: cycle count |
| 4462 | * @phy_err_count: Phy error count |
| 4463 | * @chan_tx_pwr: Channel Tx Power |
| 4464 | * @pdev_stats: WAL dbg stats |
| 4465 | * @ackRcvBad: |
| 4466 | * @rtsBad: |
| 4467 | * @rtsGood: |
| 4468 | * @fcsBad: |
| 4469 | * @noBeacons: |
| 4470 | * @mib_int_count: |
| 4471 | */ |
| 4472 | typedef struct { |
| 4473 | int32_t chan_nf; |
| 4474 | uint32_t tx_frame_count; |
| 4475 | uint32_t rx_frame_count; |
| 4476 | uint32_t rx_clear_count; |
| 4477 | uint32_t cycle_count; |
| 4478 | uint32_t phy_err_count; |
| 4479 | uint32_t chan_tx_pwr; |
| 4480 | wmi_host_dbg_stats pdev_stats; |
| 4481 | uint32_t ackRcvBad; |
| 4482 | uint32_t rtsBad; |
| 4483 | uint32_t rtsGood; |
| 4484 | uint32_t fcsBad; |
| 4485 | uint32_t noBeacons; |
| 4486 | uint32_t mib_int_count; |
| 4487 | } wmi_host_pdev_stats; |
| 4488 | |
| 4489 | /** |
| 4490 | * struct wmi_host_snr_info - WMI host Signal to noise ration info |
| 4491 | * @bcn_snr: beacon SNR |
| 4492 | * @dat_snr: Data frames SNR |
| 4493 | */ |
| 4494 | typedef struct { |
| 4495 | int32_t bcn_snr; |
| 4496 | int32_t dat_snr; |
| 4497 | } wmi_host_snr_info; |
| 4498 | |
| 4499 | #define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */ |
| 4500 | #define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */ |
| 4501 | |
| 4502 | /* The WLAN_MAX_AC macro cannot be changed without breaking |
| 4503 | * * WMI compatibility. |
| 4504 | * * The maximum value of access category |
| 4505 | * */ |
| 4506 | #define WMI_HOST_WLAN_MAX_AC 4 |
| 4507 | |
| 4508 | /** |
| 4509 | * struct wmi_host_vdev_stats - vdev stats structure |
| 4510 | * @vdev_id: unique id identifying the VDEV, generated by the caller |
| 4511 | * Rest all Only TLV |
| 4512 | * @vdev_snr: wmi_host_snr_info |
| 4513 | * @tx_frm_cnt: Total number of packets(per AC) that were successfully |
| 4514 | * transmitted (with and without retries, |
| 4515 | * including multi-cast, broadcast) |
| 4516 | * @rx_frm_cnt: Total number of packets that were successfully received |
| 4517 | * (after appropriate filter rules including multi-cast, broadcast) |
| 4518 | * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC |
| 4519 | * that the 802.11 station successfully transmitted after |
| 4520 | * more than one retransmission attempt |
| 4521 | * @fail_cnt: Total number packets(per AC) failed to transmit |
| 4522 | * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission |
| 4523 | * of a packet |
| 4524 | * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission |
| 4525 | * of a packet |
| 4526 | * @rx_err_cnt: The receive error count. HAL will provide the |
| 4527 | * RxP FCS error global |
| 4528 | * @rx_discard_cnt: The sum of the receive error count and |
| 4529 | * dropped-receive-buffer error count (FCS error) |
| 4530 | * @ack_fail_cnt: Total number packets failed transmit because of no |
| 4531 | * ACK from the remote entity |
| 4532 | * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec |
| 4533 | * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss |
| 4534 | */ |
| 4535 | typedef struct { |
| 4536 | uint32_t vdev_id; |
| 4537 | /* Rest all Only TLV */ |
| 4538 | wmi_host_snr_info vdev_snr; |
| 4539 | uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC]; |
| 4540 | uint32_t rx_frm_cnt; |
| 4541 | uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC]; |
| 4542 | uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC]; |
| 4543 | uint32_t rts_fail_cnt; |
| 4544 | uint32_t rts_succ_cnt; |
| 4545 | uint32_t rx_err_cnt; |
| 4546 | uint32_t rx_discard_cnt; |
| 4547 | uint32_t ack_fail_cnt; |
| 4548 | uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES]; |
| 4549 | uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES]; |
| 4550 | } wmi_host_vdev_stats; |
| 4551 | |
| 4552 | /** |
| 4553 | * struct wmi_host_vdev_extd_stats - VDEV extended stats |
| 4554 | * @vdev_id: unique id identifying the VDEV, generated by the caller |
| 4555 | * @ppdu_aggr_cnt: No of Aggrs Queued to HW |
| 4556 | * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's |
| 4557 | * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates |
| 4558 | * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW |
| 4559 | * in Legacy NonAggregates |
| 4560 | * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes |
| 4561 | * both Aggr and NonAggr |
| 4562 | * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully |
| 4563 | * after Single/mul HW retry |
| 4564 | * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success |
| 4565 | * after Multiple HW retry |
| 4566 | * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission |
| 4567 | * after Multiple HW retry |
| 4568 | * @reserved[13]: for future extensions set to 0x0 |
| 4569 | */ |
| 4570 | typedef struct { |
| 4571 | uint32_t vdev_id; |
| 4572 | uint32_t ppdu_aggr_cnt; |
| 4573 | uint32_t ppdu_noack; |
| 4574 | uint32_t mpdu_queued; |
| 4575 | uint32_t ppdu_nonaggr_cnt; |
| 4576 | uint32_t mpdu_sw_requed; |
| 4577 | uint32_t mpdu_suc_retry; |
| 4578 | uint32_t mpdu_suc_multitry; |
| 4579 | uint32_t mpdu_fail_retry; |
| 4580 | uint32_t reserved[13]; |
| 4581 | } wmi_host_vdev_extd_stats; |
| 4582 | |
| 4583 | /** |
| 4584 | * struct wmi_host_peer_stats - peer stats |
| 4585 | * @peer_macaddr: peer MAC address |
| 4586 | * @peer_rssi: rssi |
| 4587 | * @peer_rssi_seq_num: rssi sequence number |
| 4588 | * @peer_tx_rate: last tx data rate used for peer |
| 4589 | * @peer_rx_rate: last rx data rate used for peer |
| 4590 | * @currentper: Current PER |
| 4591 | * @retries: Retries happend during transmission |
| 4592 | * @txratecount: Maximum Aggregation Size |
| 4593 | * @max4msframelen: Max4msframelen of tx rates used |
| 4594 | * @totalsubframes: Total no of subframes |
| 4595 | * @txbytes: No of bytes transmitted to the client |
| 4596 | * @nobuffs[4]: Packet Loss due to buffer overflows |
| 4597 | * @excretries[4]: Packet Loss due to excessive retries |
| 4598 | * @peer_rssi_changed: how many times peer's RSSI changed by a |
| 4599 | * non-negligible amount |
| 4600 | */ |
| 4601 | typedef struct { |
| 4602 | wmi_host_mac_addr peer_macaddr; |
| 4603 | uint32_t peer_rssi; |
| 4604 | uint32_t peer_rssi_seq_num; |
| 4605 | uint32_t peer_tx_rate; |
| 4606 | uint32_t peer_rx_rate; |
| 4607 | uint32_t currentper; |
| 4608 | uint32_t retries; |
| 4609 | uint32_t txratecount; |
| 4610 | uint32_t max4msframelen; |
| 4611 | uint32_t totalsubframes; |
| 4612 | uint32_t txbytes; |
| 4613 | uint32_t nobuffs[4]; |
| 4614 | uint32_t excretries[4]; |
| 4615 | uint32_t peer_rssi_changed; |
| 4616 | } wmi_host_peer_stats; |
| 4617 | |
| 4618 | typedef struct { |
| 4619 | uint32_t dummy; |
| 4620 | } wmi_host_bcnflt_stats; |
| 4621 | |
| 4622 | /** |
| 4623 | * struct wmi_host_chan_stats - WMI chan stats |
| 4624 | * @chan_mhz: Primary channel freq of the channel for which stats are sent |
| 4625 | * @sampling_period_us: Time spent on the channel |
| 4626 | * @rx_clear_count: Aggregate duration over a sampling period for |
| 4627 | * which channel activity was observed |
| 4628 | * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period |
| 4629 | * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period |
| 4630 | */ |
| 4631 | typedef struct { |
| 4632 | uint32_t chan_mhz; |
| 4633 | uint32_t sampling_period_us; |
| 4634 | uint32_t rx_clear_count; |
| 4635 | uint32_t tx_duration_us; |
| 4636 | uint32_t rx_duration_us; |
| 4637 | } wmi_host_chan_stats; |
| 4638 | |
| 4639 | #define WMI_EVENT_ID_INVALID 0 |
| 4640 | /** |
| 4641 | * Host based ENUM IDs for events to abstract target enums for event_id |
| 4642 | */ |
| 4643 | typedef enum { |
| 4644 | wmi_service_ready_event_id = 0, |
| 4645 | wmi_ready_event_id, |
| 4646 | wmi_dbg_msg_event_id, |
| 4647 | wmi_scan_event_id, |
| 4648 | wmi_echo_event_id, |
| 4649 | wmi_update_stats_event_id, |
| 4650 | wmi_inst_rssi_stats_event_id, |
| 4651 | wmi_vdev_start_resp_event_id, |
| 4652 | wmi_vdev_standby_req_event_id, |
| 4653 | wmi_vdev_resume_req_event_id, |
| 4654 | wmi_vdev_stopped_event_id, |
| 4655 | wmi_peer_sta_kickout_event_id, |
| 4656 | wmi_host_swba_event_id, |
| 4657 | wmi_tbttoffset_update_event_id, |
| 4658 | wmi_mgmt_rx_event_id, |
| 4659 | wmi_chan_info_event_id, |
| 4660 | wmi_phyerr_event_id, |
| 4661 | wmi_roam_event_id, |
| 4662 | wmi_profile_match, |
| 4663 | wmi_debug_print_event_id, |
| 4664 | wmi_pdev_qvit_event_id, |
| 4665 | wmi_wlan_profile_data_event_id, |
| 4666 | wmi_rtt_meas_report_event_id, |
| 4667 | wmi_tsf_meas_report_event_id, |
| 4668 | wmi_rtt_error_report_event_id, |
| 4669 | wmi_rtt_keepalive_event_id, |
| 4670 | wmi_oem_cap_event_id, |
| 4671 | wmi_oem_meas_report_event_id, |
| 4672 | wmi_oem_report_event_id, |
| 4673 | wmi_nan_event_id, |
| 4674 | wmi_wow_wakeup_host_event_id, |
| 4675 | wmi_gtk_offload_status_event_id, |
| 4676 | wmi_gtk_rekey_fail_event_id, |
| 4677 | wmi_dcs_interference_event_id, |
| 4678 | wmi_pdev_tpc_config_event_id, |
| 4679 | wmi_csa_handling_event_id, |
| 4680 | wmi_gpio_input_event_id, |
| 4681 | wmi_peer_ratecode_list_event_id, |
| 4682 | wmi_generic_buffer_event_id, |
| 4683 | wmi_mcast_buf_release_event_id, |
| 4684 | wmi_mcast_list_ageout_event_id, |
| 4685 | wmi_vdev_get_keepalive_event_id, |
| 4686 | wmi_wds_peer_event_id, |
| 4687 | wmi_peer_sta_ps_statechg_event_id, |
| 4688 | wmi_pdev_fips_event_id, |
| 4689 | wmi_tt_stats_event_id, |
| 4690 | wmi_pdev_channel_hopping_event_id, |
| 4691 | wmi_pdev_ani_cck_level_event_id, |
| 4692 | wmi_pdev_ani_ofdm_level_event_id, |
| 4693 | wmi_pdev_reserve_ast_entry_event_id, |
| 4694 | wmi_pdev_nfcal_power_event_id, |
| 4695 | wmi_pdev_tpc_event_id, |
| 4696 | wmi_pdev_get_ast_info_event_id, |
| 4697 | wmi_pdev_temperature_event_id, |
| 4698 | wmi_pdev_nfcal_power_all_channels_event_id, |
| 4699 | wmi_pdev_bss_chan_info_event_id, |
| 4700 | wmi_mu_report_event_id, |
| 4701 | wmi_pdev_utf_event_id, |
| 4702 | wmi_pdev_dump_event_id, |
| 4703 | wmi_tx_pause_event_id, |
| 4704 | wmi_dfs_radar_event_id, |
| 4705 | wmi_pdev_l1ss_track_event_id, |
| 4706 | wmi_service_ready_ext_event_id, |
| 4707 | wmi_vdev_install_key_complete_event_id, |
| 4708 | wmi_vdev_mcc_bcn_intvl_change_req_event_id, |
| 4709 | wmi_vdev_tsf_report_event_id, |
| 4710 | wmi_peer_info_event_id, |
| 4711 | wmi_peer_tx_fail_cnt_thr_event_id, |
| 4712 | wmi_peer_estimated_linkspeed_event_id, |
| 4713 | wmi_peer_state_event_id, |
| 4714 | wmi_offload_bcn_tx_status_event_id, |
| 4715 | wmi_offload_prob_resp_tx_status_event_id, |
| 4716 | wmi_mgmt_tx_completion_event_id, |
| 4717 | wmi_tx_delba_complete_event_id, |
| 4718 | wmi_tx_addba_complete_event_id, |
| 4719 | wmi_ba_rsp_ssn_event_id, |
| 4720 | wmi_aggr_state_trig_event_id, |
| 4721 | wmi_roam_synch_event_id, |
| 4722 | wmi_p2p_disc_event_id, |
| 4723 | wmi_p2p_noa_event_id, |
| 4724 | wmi_pdev_resume_event_id, |
| 4725 | wmi_do_wow_disable_ack_event_id, |
| 4726 | wmi_wow_initial_wakeup_event_id, |
| 4727 | wmi_stats_ext_event_id, |
| 4728 | wmi_iface_link_stats_event_id, |
| 4729 | wmi_peer_link_stats_event_id, |
| 4730 | wmi_radio_link_stats_link, |
| 4731 | wmi_update_fw_mem_dump_event_id, |
| 4732 | wmi_diag_event_id_log_supported_event_id, |
| 4733 | wmi_nlo_match_event_id, |
| 4734 | wmi_nlo_scan_complete_event_id, |
| 4735 | wmi_apfind_event_id, |
| 4736 | wmi_passpoint_match_event_id, |
| 4737 | wmi_chatter_pc_query_event_id, |
| 4738 | wmi_pdev_ftm_intg_event_id, |
| 4739 | wmi_wlan_freq_avoid_event_id, |
| 4740 | wmi_thermal_mgmt_event_id, |
| 4741 | wmi_diag_container_event_id, |
| 4742 | wmi_host_auto_shutdown_event_id, |
| 4743 | wmi_update_whal_mib_stats_event_id, |
| 4744 | wmi_update_vdev_rate_stats_event_id, |
| 4745 | wmi_diag_event_id, |
| 4746 | wmi_ocb_set_sched_event_id, |
| 4747 | wmi_dbg_mesg_flush_complete_event_id, |
| 4748 | wmi_rssi_breach_event_id, |
| 4749 | wmi_uploadh_event_id, |
| 4750 | wmi_captureh_event_id, |
| 4751 | wmi_rfkill_state_change_event_id, |
| 4752 | wmi_tdls_peer_event_id, |
| 4753 | wmi_batch_scan_enabled_event_id, |
| 4754 | wmi_batch_scan_result_event_id, |
| 4755 | wmi_lpi_result_event_id, |
| 4756 | wmi_lpi_status_event_id, |
| 4757 | wmi_lpi_handoff_event_id, |
| 4758 | wmi_extscan_start_stop_event_id, |
| 4759 | wmi_extscan_operation_event_id, |
| 4760 | wmi_extscan_table_usage_event_id, |
| 4761 | wmi_extscan_cached_results_event_id, |
| 4762 | wmi_extscan_wlan_change_results_event_id, |
| 4763 | wmi_extscan_hotlist_match_event_id, |
| 4764 | wmi_extscan_capabilities_event_id, |
| 4765 | wmi_extscan_hotlist_ssid_match_event_id, |
| 4766 | wmi_mdns_stats_event_id, |
| 4767 | wmi_sap_ofl_add_sta_event_id, |
| 4768 | wmi_sap_ofl_del_sta_event_id, |
| 4769 | wmi_ocb_set_config_resp_event_id, |
| 4770 | wmi_ocb_get_tsf_timer_resp_event_id, |
| 4771 | wmi_dcc_get_stats_resp_event_id, |
| 4772 | wmi_dcc_update_ndl_resp_event_id, |
| 4773 | wmi_dcc_stats_event_id, |
| 4774 | wmi_soc_set_hw_mode_resp_event_id, |
| 4775 | wmi_soc_hw_mode_transition_event_id, |
| 4776 | wmi_soc_set_dual_mac_config_resp_event_id, |
| 4777 | wmi_tx_data_traffic_ctrl_event_id, |
| 4778 | |
| 4779 | wmi_events_max, |
| 4780 | } wmi_conv_event_id; |
| 4781 | |
| 4782 | #define WMI_UNAVAILABLE_PARAM 0 |
| 4783 | /** |
| 4784 | * Host based ENUM IDs for PDEV params to abstract target enums |
| 4785 | */ |
| 4786 | typedef enum { |
| 4787 | wmi_pdev_param_tx_chain_mask = 0, |
| 4788 | wmi_pdev_param_rx_chain_mask, |
| 4789 | wmi_pdev_param_txpower_limit2g, |
| 4790 | wmi_pdev_param_txpower_limit5g, |
| 4791 | wmi_pdev_param_txpower_scale, |
| 4792 | wmi_pdev_param_beacon_gen_mode, |
| 4793 | wmi_pdev_param_beacon_tx_mode, |
| 4794 | wmi_pdev_param_resmgr_offchan_mode, |
| 4795 | wmi_pdev_param_protection_mode, |
| 4796 | wmi_pdev_param_dynamic_bw, |
| 4797 | wmi_pdev_param_non_agg_sw_retry_th, |
| 4798 | wmi_pdev_param_agg_sw_retry_th, |
| 4799 | wmi_pdev_param_sta_kickout_th, |
| 4800 | wmi_pdev_param_ac_aggrsize_scaling, |
| 4801 | wmi_pdev_param_ltr_enable, |
| 4802 | wmi_pdev_param_ltr_ac_latency_be, |
| 4803 | wmi_pdev_param_ltr_ac_latency_bk, |
| 4804 | wmi_pdev_param_ltr_ac_latency_vi, |
| 4805 | wmi_pdev_param_ltr_ac_latency_vo, |
| 4806 | wmi_pdev_param_ltr_ac_latency_timeout, |
| 4807 | wmi_pdev_param_ltr_sleep_override, |
| 4808 | wmi_pdev_param_ltr_rx_override, |
| 4809 | wmi_pdev_param_ltr_tx_activity_timeout, |
| 4810 | wmi_pdev_param_l1ss_enable, |
| 4811 | wmi_pdev_param_dsleep_enable, |
| 4812 | wmi_pdev_param_pcielp_txbuf_flush, |
| 4813 | wmi_pdev_param_pcielp_txbuf_watermark, |
| 4814 | wmi_pdev_param_pcielp_txbuf_tmo_en, |
| 4815 | wmi_pdev_param_pcielp_txbuf_tmo_value, |
| 4816 | wmi_pdev_param_pdev_stats_update_period, |
| 4817 | wmi_pdev_param_vdev_stats_update_period, |
| 4818 | wmi_pdev_param_peer_stats_update_period, |
| 4819 | wmi_pdev_param_bcnflt_stats_update_period, |
| 4820 | wmi_pdev_param_pmf_qos, |
| 4821 | wmi_pdev_param_arp_ac_override, |
| 4822 | wmi_pdev_param_dcs, |
| 4823 | wmi_pdev_param_ani_enable, |
| 4824 | wmi_pdev_param_ani_poll_period, |
| 4825 | wmi_pdev_param_ani_listen_period, |
| 4826 | wmi_pdev_param_ani_ofdm_level, |
| 4827 | wmi_pdev_param_ani_cck_level, |
| 4828 | wmi_pdev_param_dyntxchain, |
| 4829 | wmi_pdev_param_proxy_sta, |
| 4830 | wmi_pdev_param_idle_ps_config, |
| 4831 | wmi_pdev_param_power_gating_sleep, |
| 4832 | wmi_pdev_param_aggr_burst, |
| 4833 | wmi_pdev_param_rx_decap_mode, |
| 4834 | wmi_pdev_param_fast_channel_reset, |
| 4835 | wmi_pdev_param_burst_dur, |
| 4836 | wmi_pdev_param_burst_enable, |
| 4837 | wmi_pdev_param_smart_antenna_default_antenna, |
| 4838 | wmi_pdev_param_igmpmld_override, |
| 4839 | wmi_pdev_param_igmpmld_tid, |
| 4840 | wmi_pdev_param_antenna_gain, |
| 4841 | wmi_pdev_param_rx_filter, |
| 4842 | wmi_pdev_set_mcast_to_ucast_tid, |
| 4843 | wmi_pdev_param_proxy_sta_mode, |
| 4844 | wmi_pdev_param_set_mcast2ucast_mode, |
| 4845 | wmi_pdev_param_set_mcast2ucast_buffer, |
| 4846 | wmi_pdev_param_remove_mcast2ucast_buffer, |
| 4847 | wmi_pdev_peer_sta_ps_statechg_enable, |
| 4848 | wmi_pdev_param_igmpmld_ac_override, |
| 4849 | wmi_pdev_param_block_interbss, |
| 4850 | wmi_pdev_param_set_disable_reset_cmdid, |
| 4851 | wmi_pdev_param_set_msdu_ttl_cmdid, |
| 4852 | wmi_pdev_param_set_ppdu_duration_cmdid, |
| 4853 | wmi_pdev_param_txbf_sound_period_cmdid, |
| 4854 | wmi_pdev_param_set_promisc_mode_cmdid, |
| 4855 | wmi_pdev_param_set_burst_mode_cmdid, |
| 4856 | wmi_pdev_param_en_stats, |
| 4857 | wmi_pdev_param_mu_group_policy, |
| 4858 | wmi_pdev_param_noise_detection, |
| 4859 | wmi_pdev_param_noise_threshold, |
| 4860 | wmi_pdev_param_dpd_enable, |
| 4861 | wmi_pdev_param_set_mcast_bcast_echo, |
| 4862 | wmi_pdev_param_atf_strict_sch, |
| 4863 | wmi_pdev_param_atf_sched_duration, |
| 4864 | wmi_pdev_param_ant_plzn, |
| 4865 | wmi_pdev_param_mgmt_retry_limit, |
| 4866 | wmi_pdev_param_sensitivity_level, |
| 4867 | wmi_pdev_param_signed_txpower_2g, |
| 4868 | wmi_pdev_param_signed_txpower_5g, |
| 4869 | wmi_pdev_param_enable_per_tid_amsdu, |
| 4870 | wmi_pdev_param_enable_per_tid_ampdu, |
| 4871 | wmi_pdev_param_cca_threshold, |
| 4872 | wmi_pdev_param_rts_fixed_rate, |
| 4873 | wmi_pdev_param_cal_period, |
| 4874 | wmi_pdev_param_pdev_reset, |
| 4875 | wmi_pdev_param_wapi_mbssid_offset, |
| 4876 | wmi_pdev_param_arp_srcaddr, |
| 4877 | wmi_pdev_param_arp_dstaddr, |
| 4878 | wmi_pdev_param_txpower_decr_db, |
| 4879 | wmi_pdev_param_rx_batchmode, |
| 4880 | wmi_pdev_param_packet_aggr_delay, |
| 4881 | wmi_pdev_param_atf_obss_noise_sch, |
| 4882 | wmi_pdev_param_atf_obss_noise_scaling_factor, |
| 4883 | wmi_pdev_param_cust_txpower_scale, |
| 4884 | wmi_pdev_param_atf_dynamic_enable, |
| 4885 | wmi_pdev_param_atf_ssid_group_policy, |
| 4886 | wmi_pdev_param_rfkill_enable, |
| 4887 | wmi_pdev_param_hw_rfkill_config, |
| 4888 | wmi_pdev_param_low_power_rf_enable, |
| 4889 | wmi_pdev_param_l1ss_track, |
| 4890 | wmi_pdev_param_hyst_en, |
| 4891 | wmi_pdev_param_power_collapse_enable, |
| 4892 | wmi_pdev_param_led_sys_state, |
| 4893 | wmi_pdev_param_led_enable, |
| 4894 | wmi_pdev_param_audio_over_wlan_latency, |
| 4895 | wmi_pdev_param_audio_over_wlan_enable, |
| 4896 | wmi_pdev_param_whal_mib_stats_update_enable, |
| 4897 | wmi_pdev_param_vdev_rate_stats_update_period, |
| 4898 | wmi_pdev_param_cts_cbw, |
| 4899 | wmi_pdev_param_wnts_config, |
| 4900 | wmi_pdev_param_adaptive_early_rx_enable, |
| 4901 | wmi_pdev_param_adaptive_early_rx_min_sleep_slop, |
| 4902 | wmi_pdev_param_adaptive_early_rx_inc_dec_step, |
| 4903 | wmi_pdev_param_early_rx_fix_sleep_slop, |
| 4904 | wmi_pdev_param_bmiss_based_adaptive_bto_enable, |
| 4905 | wmi_pdev_param_bmiss_bto_min_bcn_timeout, |
| 4906 | wmi_pdev_param_bmiss_bto_inc_dec_step, |
| 4907 | wmi_pdev_param_bto_fix_bcn_timeout, |
| 4908 | wmi_pdev_param_ce_based_adaptive_bto_enable, |
| 4909 | wmi_pdev_param_ce_bto_combo_ce_value, |
| 4910 | wmi_pdev_param_tx_chain_mask_2g, |
| 4911 | wmi_pdev_param_rx_chain_mask_2g, |
| 4912 | wmi_pdev_param_tx_chain_mask_5g, |
| 4913 | wmi_pdev_param_rx_chain_mask_5g, |
| 4914 | wmi_pdev_param_tx_chain_mask_cck, |
| 4915 | wmi_pdev_param_tx_chain_mask_1ss, |
| 4916 | |
| 4917 | wmi_pdev_param_max, |
| 4918 | } wmi_conv_pdev_params_id; |
| 4919 | |
| 4920 | |
| 4921 | /** |
| 4922 | * Host based ENUM IDs for VDEV params to abstract target enums |
| 4923 | */ |
| 4924 | typedef enum { |
| 4925 | wmi_vdev_param_rts_threshold = 0, |
| 4926 | wmi_vdev_param_fragmentation_threshold, |
| 4927 | wmi_vdev_param_beacon_interval, |
| 4928 | wmi_vdev_param_listen_interval, |
| 4929 | wmi_vdev_param_multicast_rate, |
| 4930 | wmi_vdev_param_mgmt_tx_rate, |
| 4931 | wmi_vdev_param_slot_time, |
| 4932 | wmi_vdev_param_preamble, |
| 4933 | wmi_vdev_param_swba_time, |
| 4934 | wmi_vdev_stats_update_period, |
| 4935 | wmi_vdev_pwrsave_ageout_time, |
| 4936 | wmi_vdev_host_swba_interval, |
| 4937 | wmi_vdev_param_dtim_period, |
| 4938 | wmi_vdev_oc_scheduler_air_time_limit, |
| 4939 | wmi_vdev_param_wds, |
| 4940 | wmi_vdev_param_atim_window, |
| 4941 | wmi_vdev_param_bmiss_count_max, |
| 4942 | wmi_vdev_param_bmiss_first_bcnt, |
| 4943 | wmi_vdev_param_bmiss_final_bcnt, |
| 4944 | wmi_vdev_param_feature_wmm, |
| 4945 | wmi_vdev_param_chwidth, |
| 4946 | wmi_vdev_param_chextoffset, |
| 4947 | wmi_vdev_param_disable_htprotection, |
| 4948 | wmi_vdev_param_sta_quickkickout, |
| 4949 | wmi_vdev_param_mgmt_rate, |
| 4950 | wmi_vdev_param_protection_mode, |
| 4951 | wmi_vdev_param_fixed_rate, |
| 4952 | wmi_vdev_param_sgi, |
| 4953 | wmi_vdev_param_ldpc, |
| 4954 | wmi_vdev_param_tx_stbc, |
| 4955 | wmi_vdev_param_rx_stbc, |
| 4956 | wmi_vdev_param_intra_bss_fwd, |
| 4957 | wmi_vdev_param_def_keyid, |
| 4958 | wmi_vdev_param_nss, |
| 4959 | wmi_vdev_param_bcast_data_rate, |
| 4960 | wmi_vdev_param_mcast_data_rate, |
| 4961 | wmi_vdev_param_mcast_indicate, |
| 4962 | wmi_vdev_param_dhcp_indicate, |
| 4963 | wmi_vdev_param_unknown_dest_indicate, |
| 4964 | wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs, |
| 4965 | wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs, |
| 4966 | wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs, |
| 4967 | wmi_vdev_param_ap_enable_nawds, |
| 4968 | wmi_vdev_param_mcast2ucast_set, |
| 4969 | wmi_vdev_param_enable_rtscts, |
| 4970 | wmi_vdev_param_rc_num_retries, |
| 4971 | wmi_vdev_param_txbf, |
| 4972 | wmi_vdev_param_packet_powersave, |
| 4973 | wmi_vdev_param_drop_unencry, |
| 4974 | wmi_vdev_param_tx_encap_type, |
| 4975 | wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs, |
| 4976 | wmi_vdev_param_cabq_maxdur, |
| 4977 | wmi_vdev_param_mfptest_set, |
| 4978 | wmi_vdev_param_rts_fixed_rate, |
| 4979 | wmi_vdev_param_vht_sgimask, |
| 4980 | wmi_vdev_param_vht80_ratemask, |
| 4981 | wmi_vdev_param_early_rx_adjust_enable, |
| 4982 | wmi_vdev_param_early_rx_tgt_bmiss_num, |
| 4983 | wmi_vdev_param_early_rx_bmiss_sample_cycle, |
| 4984 | wmi_vdev_param_early_rx_slop_step, |
| 4985 | wmi_vdev_param_early_rx_init_slop, |
| 4986 | wmi_vdev_param_early_rx_adjust_pause, |
| 4987 | wmi_vdev_param_proxy_sta, |
| 4988 | wmi_vdev_param_meru_vc, |
| 4989 | wmi_vdev_param_rx_decap_type, |
| 4990 | wmi_vdev_param_bw_nss_ratemask, |
| 4991 | wmi_vdev_param_sensor_ap, |
| 4992 | wmi_vdev_param_beacon_rate, |
| 4993 | wmi_vdev_param_dtim_enable_cts, |
| 4994 | wmi_vdev_param_sta_kickout, |
| 4995 | wmi_vdev_param_tx_pwrlimit, |
| 4996 | wmi_vdev_param_snr_num_for_cal, |
| 4997 | wmi_vdev_param_roam_fw_offload, |
| 4998 | wmi_vdev_param_enable_rmc, |
| 4999 | wmi_vdev_param_ibss_max_bcn_lost_ms, |
| 5000 | wmi_vdev_param_max_rate, |
| 5001 | wmi_vdev_param_early_rx_drift_sample, |
| 5002 | wmi_vdev_param_set_ibss_tx_fail_cnt_thr, |
| 5003 | wmi_vdev_param_ebt_resync_timeout, |
| 5004 | wmi_vdev_param_aggr_trig_event_enable, |
| 5005 | wmi_vdev_param_is_ibss_power_save_allowed, |
| 5006 | wmi_vdev_param_is_power_collapse_allowed, |
| 5007 | wmi_vdev_param_is_awake_on_txrx_enabled, |
| 5008 | wmi_vdev_param_inactivity_cnt, |
| 5009 | wmi_vdev_param_txsp_end_inactivity_time_ms, |
| 5010 | wmi_vdev_param_dtim_policy, |
| 5011 | wmi_vdev_param_ibss_ps_warmup_time_secs, |
| 5012 | wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable, |
| 5013 | wmi_vdev_param_rx_leak_window, |
| 5014 | wmi_vdev_param_stats_avg_factor, |
| 5015 | wmi_vdev_param_disconnect_th, |
| 5016 | wmi_vdev_param_rtscts_rate, |
| 5017 | wmi_vdev_param_mcc_rtscts_protection_enable, |
| 5018 | wmi_vdev_param_mcc_broadcast_probe_enable, |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 5019 | wmi_vdev_param_capabilities, |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5020 | |
| 5021 | wmi_vdev_param_max, |
| 5022 | } wmi_conv_vdev_param_id; |
| 5023 | |
| 5024 | /** |
| 5025 | * Host based ENUM IDs for service bits to abstract target enums |
| 5026 | */ |
| 5027 | typedef enum { |
| 5028 | wmi_service_beacon_offload = 0, |
| 5029 | wmi_service_scan_offload, |
| 5030 | wmi_service_roam_offload, |
| 5031 | wmi_service_bcn_miss_offload, |
| 5032 | wmi_service_sta_pwrsave, |
| 5033 | wmi_service_sta_advanced_pwrsave, |
| 5034 | wmi_service_ap_uapsd, |
| 5035 | wmi_service_ap_dfs, |
| 5036 | wmi_service_11ac, |
| 5037 | wmi_service_blockack, |
| 5038 | wmi_service_phyerr, |
| 5039 | wmi_service_bcn_filter, |
| 5040 | wmi_service_rtt, |
| 5041 | wmi_service_ratectrl, |
| 5042 | wmi_service_wow, |
| 5043 | wmi_service_ratectrl_cache, |
| 5044 | wmi_service_iram_tids, |
| 5045 | wmi_service_burst, |
| 5046 | wmi_service_smart_antenna_sw_support, |
| 5047 | wmi_service_gtk_offload, |
| 5048 | wmi_service_scan_sch, |
| 5049 | wmi_service_csa_offload, |
| 5050 | wmi_service_chatter, |
| 5051 | wmi_service_coex_freqavoid, |
| 5052 | wmi_service_packet_power_save, |
| 5053 | wmi_service_force_fw_hang, |
| 5054 | wmi_service_smart_antenna_hw_support, |
| 5055 | wmi_service_gpio, |
| 5056 | wmi_sta_uapsd_basic_auto_trig, |
| 5057 | wmi_sta_uapsd_var_auto_trig, |
| 5058 | wmi_service_sta_keep_alive, |
| 5059 | wmi_service_tx_encap, |
| 5060 | wmi_service_ap_ps_detect_out_of_sync, |
| 5061 | wmi_service_early_rx, |
| 5062 | wmi_service_enhanced_proxy_sta, |
| 5063 | wmi_service_tt, |
| 5064 | wmi_service_atf, |
| 5065 | wmi_service_peer_caching, |
| 5066 | wmi_service_coex_gpio, |
| 5067 | wmi_service_aux_spectral_intf, |
| 5068 | wmi_service_aux_chan_load_intf, |
| 5069 | wmi_service_bss_channel_info_64, |
| 5070 | wmi_service_ext_res_cfg_support, |
| 5071 | wmi_service_mesh, |
| 5072 | wmi_service_restrt_chnl_support, |
| 5073 | wmi_service_roam_scan_offload, |
| 5074 | wmi_service_arpns_offload, |
| 5075 | wmi_service_nlo, |
| 5076 | wmi_service_sta_dtim_ps_modulated_dtim, |
| 5077 | wmi_service_sta_smps, |
| 5078 | wmi_service_fwtest, |
| 5079 | wmi_service_sta_wmmac, |
| 5080 | wmi_service_tdls, |
| 5081 | wmi_service_mcc_bcn_interval_change, |
| 5082 | wmi_service_adaptive_ocs, |
| 5083 | wmi_service_ba_ssn_support, |
| 5084 | wmi_service_filter_ipsec_natkeepalive, |
| 5085 | wmi_service_wlan_hb, |
| 5086 | wmi_service_lte_ant_share_support, |
| 5087 | wmi_service_batch_scan, |
| 5088 | wmi_service_qpower, |
| 5089 | wmi_service_plmreq, |
| 5090 | wmi_service_thermal_mgmt, |
| 5091 | wmi_service_rmc, |
| 5092 | wmi_service_mhf_offload, |
| 5093 | wmi_service_coex_sar, |
| 5094 | wmi_service_bcn_txrate_override, |
| 5095 | wmi_service_nan, |
| 5096 | wmi_service_l1ss_stat, |
| 5097 | wmi_service_estimate_linkspeed, |
| 5098 | wmi_service_obss_scan, |
| 5099 | wmi_service_tdls_offchan, |
| 5100 | wmi_service_tdls_uapsd_buffer_sta, |
| 5101 | wmi_service_tdls_uapsd_sleep_sta, |
| 5102 | wmi_service_ibss_pwrsave, |
| 5103 | wmi_service_lpass, |
| 5104 | wmi_service_extscan, |
| 5105 | wmi_service_d0wow, |
| 5106 | wmi_service_hsoffload, |
| 5107 | wmi_service_roam_ho_offload, |
| 5108 | wmi_service_rx_full_reorder, |
| 5109 | wmi_service_dhcp_offload, |
| 5110 | wmi_service_sta_rx_ipa_offload_support, |
| 5111 | wmi_service_mdns_offload, |
| 5112 | wmi_service_sap_auth_offload, |
| 5113 | wmi_service_dual_band_simultaneous_support, |
| 5114 | wmi_service_ocb, |
| 5115 | wmi_service_ap_arpns_offload, |
| 5116 | wmi_service_per_band_chainmask_support, |
| 5117 | wmi_service_packet_filter_offload, |
| 5118 | wmi_service_mgmt_tx_htt, |
| 5119 | wmi_service_mgmt_tx_wmi, |
| 5120 | wmi_service_ext_msg, |
| 5121 | wmi_service_mawc, |
| 5122 | |
| 5123 | wmi_service_peer_stats, |
| 5124 | wmi_service_mesh_11s, |
| 5125 | wmi_service_periodic_chan_stat_support, |
| 5126 | wmi_service_tx_mode_push_only, |
| 5127 | wmi_service_tx_mode_push_pull, |
| 5128 | wmi_service_tx_mode_dynamic, |
| 5129 | |
| 5130 | wmi_services_max, |
| 5131 | } wmi_conv_service_ids; |
| 5132 | #define WMI_SERVICE_UNAVAILABLE 0xFFFF |
| 5133 | |
| 5134 | /** |
| 5135 | * struct target_capability_info - Target capabilities in service ready |
| 5136 | * @phy_capability: PHY capabilities |
| 5137 | * @max_frag_entry: Maximum frag entries |
| 5138 | * @num_rf_chains: Number of RF chains supported |
| 5139 | * @ht_cap_info: HT cap info |
| 5140 | * @vht_cap_info: VHT cap info |
| 5141 | * @vht_supp_mcs: VHT Supported MCS |
| 5142 | * @hw_min_tx_power: HW minimum tx power |
| 5143 | * @hw_max_tx_power: HW maximum tx power |
| 5144 | * @sys_cap_info: sys capability info |
| 5145 | * @min_pkt_size_enable: Enterprise mode short pkt enable |
| 5146 | * @max_bcn_ie_size: Max beacon and probe rsp IE offload size |
| 5147 | * @max_num_scan_channels: Max scan channels |
| 5148 | * @max_supported_macs: max supported MCS |
| 5149 | * @wmi_fw_sub_feat_caps: FW sub feature capabilities |
| 5150 | * @txrx_chainmask: TXRX chain mask |
| 5151 | * @default_dbs_hw_mode_index: DBS hw mode index |
| 5152 | * @num_msdu_desc: number of msdu desc |
| 5153 | */ |
| 5154 | typedef struct { |
| 5155 | uint32_t phy_capability; |
| 5156 | uint32_t max_frag_entry; |
| 5157 | uint32_t num_rf_chains; |
| 5158 | uint32_t ht_cap_info; |
| 5159 | uint32_t vht_cap_info; |
| 5160 | uint32_t vht_supp_mcs; |
| 5161 | uint32_t hw_min_tx_power; |
| 5162 | uint32_t hw_max_tx_power; |
| 5163 | uint32_t sys_cap_info; |
| 5164 | uint32_t min_pkt_size_enable; |
| 5165 | uint32_t max_bcn_ie_size; |
| 5166 | uint32_t max_num_scan_channels; |
| 5167 | uint32_t max_supported_macs; |
| 5168 | uint32_t wmi_fw_sub_feat_caps; |
| 5169 | uint32_t txrx_chainmask; |
| 5170 | uint32_t default_dbs_hw_mode_index; |
| 5171 | uint32_t num_msdu_desc; |
| 5172 | } target_capability_info; |
| 5173 | |
| 5174 | /** |
| 5175 | * struct wmi_host_fw_ver - FW version in non-tlv target |
| 5176 | * @sw_version: Versin info |
| 5177 | * @sw_version_1: Second dword of version |
| 5178 | */ |
| 5179 | struct wmi_host_fw_ver { |
| 5180 | uint32_t sw_version; |
| 5181 | uint32_t sw_version_1; |
| 5182 | }; |
| 5183 | |
| 5184 | /** |
| 5185 | * struct wmi_host_fw_abi_ver - FW version in non-tlv target |
| 5186 | * @sw_version: Versin info |
| 5187 | * @abi_version: ABI version |
| 5188 | */ |
| 5189 | struct wmi_host_fw_abi_ver { |
| 5190 | uint32_t sw_version; |
| 5191 | uint32_t abi_version; |
| 5192 | }; |
| 5193 | |
| 5194 | /** |
| 5195 | * struct target_resource_config - Resource config sent from host to target |
| 5196 | * abstracted out to include union of both configs |
| 5197 | * @num_vdevs: Number vdevs configured |
| 5198 | * @num_peers: Number of peers |
| 5199 | * @num_active_peers: Number of active peers for peer cache |
| 5200 | * @num_offload_peers: Number of offload peers |
| 5201 | * @num_offload_reorder_buffs: number of offload reorder buffs |
| 5202 | * @num_peer_keys: number of peer keys |
| 5203 | * @num_tids: number of tids |
| 5204 | * @ast_skid_limit: AST skid limit |
| 5205 | * @tx_chain_mask: TX chain mask |
| 5206 | * @rx_chain_mask: RX chain mask |
| 5207 | * @rx_timeout_pri: RX reorder timeout per AC |
| 5208 | * @rx_decap_mode: RX decap mode |
| 5209 | * @scan_max_pending_req: Scan mac pending req |
| 5210 | * @bmiss_offload_max_vdev: Beacom miss offload max vdevs |
| 5211 | * @roam_offload_max_vdev: Roam offload max vdevs |
| 5212 | * @roam_offload_max_ap_profiles: roam offload max ap profiles |
| 5213 | * @num_mcast_groups: num mcast groups |
| 5214 | * @num_mcast_table_elems: number of macst table elems |
| 5215 | * @mcast2ucast_mode: mcast enhance mode |
| 5216 | * @tx_dbg_log_size: DBG log buf size |
| 5217 | * @num_wds_entries: number of WDS entries |
| 5218 | * @dma_burst_size: DMA burst size. |
| 5219 | * @mac_aggr_delim: Mac aggr delim |
| 5220 | * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host? |
| 5221 | * @vow_config: vow configuration |
| 5222 | * @gtk_offload_max_vdev: Max vdevs for GTK offload |
| 5223 | * @num_msdu_desc: Number of msdu desc |
| 5224 | * @max_frag_entries: Max frag entries |
| 5225 | * End common |
| 5226 | * @max_peer_ext_stats: Max peer EXT stats |
| 5227 | * @smart_ant_cap: Smart antenna capabilities |
| 5228 | * @BK_Minfree: BIN configuration for BK traffic |
| 5229 | * @BE_Minfree: BIN configuration for BE traffic |
| 5230 | * @VI_Minfree: BIN configuration for VI traffic |
| 5231 | * @VO_Minfree: BIN configuration for VO traffic |
| 5232 | * @rx_batchmode: RX batch mode |
| 5233 | * @tt_support: Thermal throttling support |
| 5234 | * @atf_config: ATF config |
| 5235 | * @iphdr_pad_config: ipheader pad config |
| 5236 | * @qwrap_config: Qwrap configuration |
| 5237 | * @alloc_frag_desc_for_data_pkt: Frag desc for data |
| 5238 | * Added in MCL |
| 5239 | * @num_tdls_vdevs: |
| 5240 | * @num_tdls_conn_table_entries: |
| 5241 | * @beacon_tx_offload_max_vdev: |
| 5242 | * @num_multicast_filter_entries: |
| 5243 | * @num_wow_filters: |
| 5244 | * @num_keep_alive_pattern: |
| 5245 | * @keep_alive_pattern_size: |
| 5246 | * @max_tdls_concurrent_sleep_sta: |
| 5247 | * @max_tdls_concurrent_buffer_sta: |
| 5248 | * @wmi_send_separate: |
| 5249 | * @num_ocb_vdevs: |
| 5250 | * @num_ocb_channels: |
| 5251 | * @num_ocb_schedules: |
| 5252 | */ |
| 5253 | typedef struct { |
| 5254 | uint32_t num_vdevs; |
| 5255 | uint32_t num_peers; |
| 5256 | uint32_t num_active_peers; |
| 5257 | uint32_t num_offload_peers; |
| 5258 | uint32_t num_offload_reorder_buffs; |
| 5259 | uint32_t num_peer_keys; |
| 5260 | uint32_t num_tids; |
| 5261 | uint32_t ast_skid_limit; |
| 5262 | uint32_t tx_chain_mask; |
| 5263 | uint32_t rx_chain_mask; |
| 5264 | uint32_t rx_timeout_pri[4]; |
| 5265 | uint32_t rx_decap_mode; |
| 5266 | uint32_t scan_max_pending_req; |
| 5267 | uint32_t bmiss_offload_max_vdev; |
| 5268 | uint32_t roam_offload_max_vdev; |
| 5269 | uint32_t roam_offload_max_ap_profiles; |
| 5270 | uint32_t num_mcast_groups; |
| 5271 | uint32_t num_mcast_table_elems; |
| 5272 | uint32_t mcast2ucast_mode; |
| 5273 | uint32_t tx_dbg_log_size; |
| 5274 | uint32_t num_wds_entries; |
| 5275 | uint32_t dma_burst_size; |
| 5276 | uint32_t mac_aggr_delim; |
| 5277 | uint32_t rx_skip_defrag_timeout_dup_detection_check; |
| 5278 | uint32_t vow_config; |
| 5279 | uint32_t gtk_offload_max_vdev; |
| 5280 | uint32_t num_msdu_desc; /* Number of msdu desc */ |
| 5281 | uint32_t max_frag_entries; |
| 5282 | /* End common */ |
| 5283 | |
| 5284 | /* Added for Beeliner */ |
| 5285 | uint32_t max_peer_ext_stats; |
| 5286 | uint32_t smart_ant_cap; |
| 5287 | uint32_t BK_Minfree; |
| 5288 | uint32_t BE_Minfree; |
| 5289 | uint32_t VI_Minfree; |
| 5290 | uint32_t VO_Minfree; |
| 5291 | uint32_t rx_batchmode; |
| 5292 | uint32_t tt_support; |
| 5293 | uint32_t atf_config; |
| 5294 | uint32_t iphdr_pad_config; |
| 5295 | uint32_t |
| 5296 | qwrap_config:16, |
| 5297 | alloc_frag_desc_for_data_pkt:16; |
| 5298 | |
| 5299 | /* Added in MCL */ |
| 5300 | uint32_t num_tdls_vdevs; |
| 5301 | uint32_t num_tdls_conn_table_entries; |
| 5302 | uint32_t beacon_tx_offload_max_vdev; |
| 5303 | uint32_t num_multicast_filter_entries; |
| 5304 | uint32_t num_wow_filters; |
| 5305 | uint32_t num_keep_alive_pattern; |
| 5306 | uint32_t keep_alive_pattern_size; |
| 5307 | uint32_t max_tdls_concurrent_sleep_sta; |
| 5308 | uint32_t max_tdls_concurrent_buffer_sta; |
| 5309 | uint32_t wmi_send_separate; |
| 5310 | uint32_t num_ocb_vdevs; |
| 5311 | uint32_t num_ocb_channels; |
| 5312 | uint32_t num_ocb_schedules; |
| 5313 | } target_resource_config; |
| 5314 | |
| 5315 | /** |
| 5316 | * struct wds_addr_event - WDS addr event structure |
| 5317 | * @event_type: event type add/delete |
| 5318 | * @peer_mac: peer mac |
| 5319 | * @dest_mac: destination mac address |
| 5320 | */ |
| 5321 | typedef struct { |
| 5322 | uint32_t event_type[4]; |
| 5323 | u_int8_t peer_mac[IEEE80211_ADDR_LEN]; |
| 5324 | u_int8_t dest_mac[IEEE80211_ADDR_LEN]; |
| 5325 | } wds_addr_event_t; |
| 5326 | /** |
| 5327 | * Enum replicated for host abstraction with FW |
| 5328 | */ |
| 5329 | typedef enum { |
| 5330 | /* Event respose of START CMD */ |
| 5331 | WMI_HOST_VDEV_START_RESP_EVENT = 0, |
| 5332 | /* Event respose of RESTART CMD */ |
| 5333 | WMI_HOST_VDEV_RESTART_RESP_EVENT, |
| 5334 | } WMI_HOST_START_EVENT_PARAM; |
| 5335 | |
| 5336 | /** |
| 5337 | * struct wmi_host_vdev_start_resp - VDEV start response |
| 5338 | * @vdev_id: vdev id |
| 5339 | * @requestor_id: requestor id that requested the VDEV start request |
| 5340 | * @resp_type: Respose of Event type START/RESTART |
| 5341 | * @status: status of the response |
| 5342 | * @chain_mask: Vdev chain mask |
| 5343 | * @smps_mode: Vdev mimo power save mode |
| 5344 | * @mac_id: mac_id field contains the MAC identifier that the |
| 5345 | * VDEV is bound to. The valid range is 0 to (num_macs-1). |
| 5346 | * @cfgd_tx_streams: Configured Transmit Streams |
| 5347 | * @cfgd_rx_streams: Configured Receive Streams |
| 5348 | */ |
| 5349 | typedef struct { |
| 5350 | uint32_t vdev_id; |
| 5351 | uint32_t requestor_id; |
| 5352 | WMI_HOST_START_EVENT_PARAM resp_type; |
| 5353 | uint32_t status; |
| 5354 | uint32_t chain_mask; |
| 5355 | uint32_t smps_mode; |
| 5356 | uint32_t mac_id; |
| 5357 | uint32_t cfgd_tx_streams; |
| 5358 | uint32_t cfgd_rx_streams; |
| 5359 | } wmi_host_vdev_start_resp; |
| 5360 | |
| 5361 | #define WMI_HOST_ATH_MAX_ANTENNA 4 |
| 5362 | /** |
| 5363 | * struct wmi_host_mgmt_rx_hdr - host mgmt header params |
| 5364 | * @channel: channel on which this frame is received |
| 5365 | * @snr: snr information used to cal rssi |
| 5366 | * @rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain. |
| 5367 | * @rate: Rate kbps |
| 5368 | * @phy_mode: rx phy mode WLAN_PHY_MODE |
| 5369 | * @buf_len: length of the frame |
| 5370 | * @status: rx status |
| 5371 | * @flags: information about the management frame e.g. can give a |
| 5372 | * scan source for a scan result mgmt frame |
| 5373 | * @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units) |
| 5374 | * @tsf_delta: |
| 5375 | */ |
| 5376 | typedef struct { |
| 5377 | uint32_t channel; |
| 5378 | uint32_t snr; |
| 5379 | uint8_t rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA]; |
| 5380 | uint32_t rate; |
| 5381 | uint32_t phy_mode; |
| 5382 | uint32_t buf_len; |
| 5383 | uint32_t status; |
| 5384 | uint32_t flags; |
| 5385 | int32_t rssi; |
| 5386 | uint32_t tsf_delta; |
| 5387 | } wmi_host_mgmt_rx_hdr; |
| 5388 | |
| 5389 | /** |
| 5390 | * struct wmi_host_roam_event - host roam event param |
| 5391 | * @vdev_id: vdev id |
| 5392 | * @reason: roam reason |
| 5393 | * @rssi: RSSI |
| 5394 | */ |
| 5395 | typedef struct { |
| 5396 | uint32_t vdev_id; |
| 5397 | uint32_t reason; |
| 5398 | uint32_t rssi; |
| 5399 | } wmi_host_roam_event; |
| 5400 | |
| 5401 | /** |
| 5402 | * ENUM wmi_host_scan_event_type - Scan event type |
| 5403 | */ |
| 5404 | enum wmi_host_scan_event_type { |
| 5405 | WMI_HOST_SCAN_EVENT_STARTED = 0x1, |
| 5406 | WMI_HOST_SCAN_EVENT_COMPLETED = 0x2, |
| 5407 | WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4, |
| 5408 | WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, |
| 5409 | WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10, |
| 5410 | WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20, |
| 5411 | WMI_HOST_SCAN_EVENT_START_FAILED = 0x40, |
| 5412 | WMI_HOST_SCAN_EVENT_RESTARTED = 0x80, |
| 5413 | WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100, |
| 5414 | WMI_HOST_SCAN_EVENT_INVALID = 0x200, |
| 5415 | WMI_HOST_SCAN_EVENT_MAX = 0x8000 |
| 5416 | }; |
| 5417 | |
| 5418 | /** |
| 5419 | * ENUM wmi_host_scan_completion_reason - Scan completion event type |
| 5420 | */ |
| 5421 | enum wmi_host_scan_completion_reason { |
| 5422 | /** scan related events */ |
| 5423 | WMI_HOST_SCAN_REASON_NONE = 0xFF, |
| 5424 | WMI_HOST_SCAN_REASON_COMPLETED = 0, |
| 5425 | WMI_HOST_SCAN_REASON_CANCELLED = 1, |
| 5426 | WMI_HOST_SCAN_REASON_PREEMPTED = 2, |
| 5427 | WMI_HOST_SCAN_REASON_TIMEDOUT = 3, |
| 5428 | WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4, |
| 5429 | WMI_HOST_SCAN_REASON_MAX, |
| 5430 | }; |
| 5431 | |
| 5432 | /** |
| 5433 | * struct wmi_host_scan_event - Scan event response from target |
| 5434 | * @event: event type |
| 5435 | * @reason: Reason for event |
| 5436 | * @channel_freq: channel frequency |
| 5437 | * @requestor: requestor id |
| 5438 | * @scan_id: scan id |
| 5439 | * @vdev_id: vdev id |
| 5440 | */ |
| 5441 | typedef struct { |
| 5442 | uint32_t event; |
| 5443 | uint32_t reason; |
| 5444 | uint32_t channel_freq; |
| 5445 | uint32_t requestor; |
| 5446 | uint32_t scan_id; |
| 5447 | uint32_t vdev_id; |
| 5448 | } wmi_host_scan_event; |
| 5449 | |
| 5450 | /** |
| 5451 | * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry |
| 5452 | * @result: result |
| 5453 | */ |
| 5454 | typedef struct { |
| 5455 | uint32_t result; |
| 5456 | } wmi_host_pdev_reserve_ast_entry_event; |
| 5457 | |
| 5458 | /** |
| 5459 | * struct wmi_host_mcast_ageout_entry - mcast aged-out entry |
| 5460 | * @grp_addr: IPv4/6 mcast group addr |
| 5461 | * @vdev_id: vdev id |
| 5462 | */ |
| 5463 | typedef struct { |
| 5464 | uint8_t grp_addr[16]; |
| 5465 | uint32_t vdev_id; |
| 5466 | } wmi_host_mcast_ageout_entry; |
| 5467 | |
| 5468 | /** |
| 5469 | * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out |
| 5470 | * @num_entry: Number of mcast entries timed-out |
| 5471 | * @entry: List of wmi_host_mcast_ageout_entry |
| 5472 | */ |
| 5473 | typedef struct { |
| 5474 | uint32_t num_entry; |
| 5475 | wmi_host_mcast_ageout_entry entry[1]; |
| 5476 | } wmi_host_mcast_list_ageout_event; |
| 5477 | |
| 5478 | /** |
| 5479 | * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data |
| 5480 | * @nfdBr: |
| 5481 | * chan0: {NFCalPower_chain0, NFCalPower_chain1, |
| 5482 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5483 | * chan1: {NFCalPower_chain0, NFCalPower_chain1, |
| 5484 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5485 | * chan2: {NFCalPower_chain0, NFCalPower_chain1, |
| 5486 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5487 | * chan3: {NFCalPower_chain0, NFCalPower_chain1, |
| 5488 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5489 | * @nfdBr: |
| 5490 | * chan0: {NFCalPower_chain0, NFCalPower_chain1, |
| 5491 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5492 | * chan1: {NFCalPower_chain0, NFCalPower_chain1, |
| 5493 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5494 | * chan2: {NFCalPower_chain0, NFCalPower_chain1, |
| 5495 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5496 | * chan3: {NFCalPower_chain0, NFCalPower_chain1, |
| 5497 | * NFCalPower_chain2, NFCalPower_chain3}, |
| 5498 | * @freqNum: frequency number |
| 5499 | */ |
| 5500 | typedef struct { |
| 5501 | int8_t nfdBr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS]; |
| 5502 | int8_t nfdBm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS]; |
| 5503 | uint32_t freqNum[WMI_HOST_RXG_CAL_CHAN_MAX]; |
| 5504 | } wmi_host_pdev_nfcal_power_all_channels_event; |
| 5505 | |
| 5506 | /** |
| 5507 | * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event |
| 5508 | * @tpc: |
| 5509 | */ |
| 5510 | typedef struct { |
| 5511 | uint32_t tpc[1]; |
| 5512 | } wmi_host_pdev_tpc_event; |
| 5513 | |
| 5514 | /** |
| 5515 | * struct wmi_host_pdev_generic_buffer_event |
| 5516 | * @buf_type: Buffer type |
| 5517 | * @frag_id: Frag id |
| 5518 | * @more_frag: more frags pending |
| 5519 | * @buf_len: buffer length |
| 5520 | * @buf_info: variable length buffer |
| 5521 | */ |
| 5522 | typedef struct { |
| 5523 | uint32_t buf_type; |
| 5524 | uint32_t frag_id; |
| 5525 | uint32_t more_frag; |
| 5526 | uint32_t buf_len; |
| 5527 | uint32_t buf_info[1]; |
| 5528 | } wmi_host_pdev_generic_buffer_event; |
| 5529 | /** |
| 5530 | * Enum for host buffer event |
| 5531 | */ |
| 5532 | enum { |
| 5533 | WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE, |
| 5534 | WMI_HOST_BUFFER_TYPE_CTL_TABLE, |
| 5535 | }; |
| 5536 | |
| 5537 | /** |
| 5538 | * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event |
| 5539 | * @regDomain: |
| 5540 | * @chanFreq: |
| 5541 | * @phyMode: |
| 5542 | * @twiceAntennaReduction: |
| 5543 | * @twiceMaxRDPower: |
| 5544 | * @twiceAntennaGain: |
| 5545 | * @powerLimit: |
| 5546 | * @rateMax: |
| 5547 | * @numTxChain: |
| 5548 | * @ctl: |
| 5549 | * @flags: |
| 5550 | * @maxRegAllowedPower: |
| 5551 | * @maxRegAllowedPowerAGCDD: |
| 5552 | * @maxRegAllowedPowerAGSTBC: |
| 5553 | * @maxRegAllowedPowerAGTXBF: |
| 5554 | * @ratesArray: |
| 5555 | */ |
| 5556 | typedef struct { |
| 5557 | uint32_t regDomain; |
| 5558 | uint32_t chanFreq; |
| 5559 | uint32_t phyMode; |
| 5560 | uint32_t twiceAntennaReduction; |
| 5561 | uint32_t twiceMaxRDPower; |
| 5562 | int32_t twiceAntennaGain; |
| 5563 | uint32_t powerLimit; |
| 5564 | uint32_t rateMax; |
| 5565 | uint32_t numTxChain; |
| 5566 | uint32_t ctl; |
| 5567 | uint32_t flags; |
| 5568 | int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN]; |
| 5569 | int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN]; |
| 5570 | int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN]; |
| 5571 | int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN]; |
| 5572 | uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX]; |
| 5573 | } wmi_host_pdev_tpc_config_event; |
| 5574 | /** |
| 5575 | * Enums for TPC event |
| 5576 | */ |
| 5577 | typedef enum { |
| 5578 | WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, |
| 5579 | WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, |
| 5580 | WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, |
| 5581 | } WMI_HOST_TPC_CONFIG_EVENT_FLAG; |
| 5582 | |
| 5583 | /** |
| 5584 | * Medium Utilization evaluation algorithms |
| 5585 | * These algorithms can be complementary rather than exclusive. |
| 5586 | */ |
| 5587 | typedef enum { |
| 5588 | WMI_HOST_MU_BASIC_ALGO = 0x1, |
| 5589 | WMI_HOST_MU_PER_BSSID_ALGO = 0x2, |
| 5590 | WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4, |
| 5591 | } WMI_HOST_MU_ALGO_TYPE; |
| 5592 | /* max MU alg combinations supported by target */ |
| 5593 | #define WMI_HOST_MU_MAX_ALGO_TYPE 3 |
| 5594 | |
| 5595 | /** |
| 5596 | * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID |
| 5597 | * @mu_request_id: request id |
| 5598 | * @status_reason: MU_STATUS_REASON |
| 5599 | * @total_mu: MU_ALG_TYPE combinations |
| 5600 | * @num_active_bssid: number of active bssid |
| 5601 | */ |
| 5602 | typedef struct { |
| 5603 | uint32_t mu_request_id; |
| 5604 | uint32_t status_reason; |
| 5605 | uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE]; |
| 5606 | uint32_t num_active_bssid; |
| 5607 | } wmi_host_mu_report_event; |
| 5608 | |
| 5609 | /** |
| 5610 | * struct wmi_host_mgmt_tx_compl_event - TX completion event |
| 5611 | * @desc_id: from tx_send_cmd |
| 5612 | * @status: WMI_MGMT_TX_COMP_STATUS_TYPE |
| 5613 | */ |
| 5614 | typedef struct { |
| 5615 | uint32_t desc_id; |
| 5616 | uint32_t status; |
| 5617 | } wmi_host_mgmt_tx_compl_event; |
| 5618 | |
| 5619 | #define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17 |
| 5620 | |
| 5621 | /** |
| 5622 | * struct wmi_host_tim_info - TIM info in SWBA event |
| 5623 | * @tim_len: TIM length |
| 5624 | * @tim_mcast: |
| 5625 | * @tim_bitmap: TIM bitmap |
| 5626 | * @tim_changed: TIM changed |
| 5627 | * @tim_num_ps_pending: TIM num PS sta pending |
| 5628 | */ |
| 5629 | typedef struct { |
| 5630 | uint32_t tim_len; |
| 5631 | uint32_t tim_mcast; |
| 5632 | uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE]; |
| 5633 | uint32_t tim_changed; |
| 5634 | uint32_t tim_num_ps_pending; |
| 5635 | } wmi_host_tim_info; |
| 5636 | |
| 5637 | /** |
| 5638 | * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event |
| 5639 | * @type_count: Absence count |
| 5640 | * @duration: NoA duration |
| 5641 | * @interval: NoA interval |
| 5642 | * @start_time: start time |
| 5643 | */ |
| 5644 | typedef struct { |
| 5645 | uint32_t type_count; |
| 5646 | uint32_t duration; |
| 5647 | uint32_t interval; |
| 5648 | uint32_t start_time; |
| 5649 | } wmi_host_p2p_noa_descriptor; |
| 5650 | /* Maximum number of NOA Descriptors supported */ |
| 5651 | #define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4 |
| 5652 | /** |
| 5653 | * struct wmi_host_p2p_noa_info - p2p noa information |
| 5654 | * @modified: NoA modified |
| 5655 | * @index: Index |
| 5656 | * @oppPS: Oppurtunstic ps |
| 5657 | * @ctwindow: CT window |
| 5658 | * @num_descriptors: number of descriptors |
| 5659 | * @noa_descriptors: noa descriptors |
| 5660 | */ |
| 5661 | typedef struct { |
| 5662 | uint8_t modified; |
| 5663 | uint8_t index; |
| 5664 | uint8_t oppPS; |
| 5665 | uint8_t ctwindow; |
| 5666 | uint8_t num_descriptors; |
| 5667 | wmi_host_p2p_noa_descriptor |
| 5668 | noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS]; |
| 5669 | } wmi_host_p2p_noa_info; |
| 5670 | |
| 5671 | /** |
| 5672 | * struct wmi_host_peer_sta_kickout_event |
| 5673 | * @peer_macaddr: peer mac address |
| 5674 | * @reason: kickout reason |
| 5675 | * @rssi: rssi |
| 5676 | */ |
| 5677 | typedef struct { |
| 5678 | uint8_t peer_macaddr[IEEE80211_ADDR_LEN]; |
| 5679 | uint32_t reason; |
| 5680 | uint32_t rssi; |
| 5681 | } wmi_host_peer_sta_kickout_event; |
| 5682 | |
| 5683 | /** |
| 5684 | * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event |
| 5685 | * @peer_macaddr: peer mac address |
| 5686 | * @peer_ps_stats: peer PS state |
| 5687 | */ |
| 5688 | typedef struct { |
| 5689 | uint8_t peer_macaddr[IEEE80211_ADDR_LEN]; |
| 5690 | uint32_t peer_ps_state; |
| 5691 | } wmi_host_peer_sta_ps_statechange_event; |
| 5692 | |
| 5693 | /* Maximum CCK, OFDM rates supported */ |
| 5694 | #define WMI_SA_MAX_CCK_OFDM_RATES 12 |
| 5695 | /* Maximum MCS rates supported; 4 rates in each dword */ |
| 5696 | #define WMI_SA_MAX_MCS_RATES 40 |
| 5697 | #define WMI_SA_MAX_RATE_COUNTERS 4 |
| 5698 | /* Maximum rate series used for transmission */ |
| 5699 | #define SA_MAX_RATE_SERIES 2 |
| 5700 | |
| 5701 | #define SA_MAX_LEGACY_RATE_DWORDS 3 |
| 5702 | #define SA_MAX_HT_RATE_DWORDS 10 |
| 5703 | #define SA_BYTES_IN_DWORD 4 |
| 5704 | #define SA_MASK_BYTE 0xff |
| 5705 | /* TODO: ratecode_160 needs to add for future chips */ |
| 5706 | /** |
| 5707 | * struct wmi_sa_rate_cap - smart antenna rat capabilities |
| 5708 | * @ratecode_legacy: Rate code array for CCK OFDM |
| 5709 | * @ratecode_20: Rate code array for 20MHz BW |
| 5710 | * @ratecode_40: Rate code array for 40MHz BW |
| 5711 | * @ratecode_80: Rate code array for 80MHz BW |
| 5712 | * @ratecount: Max Rate count for each mode |
| 5713 | */ |
| 5714 | typedef struct { |
| 5715 | uint8_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES]; |
| 5716 | uint8_t ratecode_20[WMI_SA_MAX_MCS_RATES]; |
| 5717 | uint8_t ratecode_40[WMI_SA_MAX_MCS_RATES]; |
| 5718 | uint8_t ratecode_80[WMI_SA_MAX_MCS_RATES]; |
| 5719 | uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS]; |
| 5720 | } wmi_sa_rate_cap; |
| 5721 | |
| 5722 | /** Preamble types to be used with VDEV fixed rate configuration */ |
| 5723 | typedef enum { |
| 5724 | WMI_HOST_RATE_PREAMBLE_OFDM, |
| 5725 | WMI_HOST_RATE_PREAMBLE_CCK, |
| 5726 | WMI_HOST_RATE_PREAMBLE_HT, |
| 5727 | WMI_HOST_RATE_PREAMBLE_VHT, |
| 5728 | } WMI_HOST_RATE_PREAMBLE; |
| 5729 | |
| 5730 | #define WMI_HOST_FIXED_RATE_NONE (0xff) |
| 5731 | |
| 5732 | /** slot time long */ |
| 5733 | #define WMI_HOST_VDEV_SLOT_TIME_LONG 0x1 |
| 5734 | /** slot time short */ |
| 5735 | #define WMI_HOST_VDEV_SLOT_TIME_SHORT 0x2 |
| 5736 | /** preablbe long */ |
| 5737 | #define WMI_HOST_VDEV_PREAMBLE_LONG 0x1 |
| 5738 | /** preablbe short */ |
| 5739 | #define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2 |
| 5740 | /** found a better AP */ |
| 5741 | #define WMI_HOST_ROAM_REASON_BETTER_AP 0x1 |
| 5742 | /** beacon miss detected */ |
| 5743 | #define WMI_HOST_ROAM_REASON_BMISS 0x2 |
| 5744 | /** deauth/disassoc received */ |
| 5745 | #define WMI_HOST_ROAM_REASON_DEAUTH 0x2 |
| 5746 | /** connected AP's low rssi condition detected */ |
| 5747 | #define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3 |
| 5748 | /** found another AP that matches SSID and Security profile in |
| 5749 | * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS |
| 5750 | */ |
| 5751 | #define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4 |
| 5752 | /** LFR3.0 roaming failed, indicate the disconnection to host */ |
| 5753 | #define WMI_HOST_ROAM_REASON_HO_FAILED 0x5 |
| 5754 | |
| 5755 | /** values for vdev_type */ |
| 5756 | #define WMI_HOST_VDEV_TYPE_AP 0x1 |
| 5757 | #define WMI_HOST_VDEV_TYPE_STA 0x2 |
| 5758 | #define WMI_HOST_VDEV_TYPE_IBSS 0x3 |
| 5759 | #define WMI_HOST_VDEV_TYPE_MONITOR 0x4 |
| 5760 | |
| 5761 | /** values for vdev_subtype */ |
| 5762 | #define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1 |
| 5763 | #define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2 |
| 5764 | #define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3 |
| 5765 | #define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4 |
| 5766 | #define WMI_HOST_VDEV_SUBTYPE_MESH 0x5 |
| 5767 | |
| 5768 | #define WMI_HOST_MGMT_TID 17 |
| 5769 | /* Disable aging & learning */ |
| 5770 | #define WMI_HOST_WDS_FLAG_STATIC 0x1 |
| 5771 | |
| 5772 | /** |
| 5773 | * Peer param enum abstracted from target |
| 5774 | */ |
| 5775 | typedef enum { |
| 5776 | /** mimo powersave state */ |
| 5777 | WMI_HOST_PEER_MIMO_PS_STATE = 0x1, |
| 5778 | /** enable/disable AMPDU . initial value (enabled) */ |
| 5779 | WMI_HOST_PEER_AMPDU = 0x2, |
| 5780 | /** authorize/unauthorize peer. initial value is unauthorized (0) */ |
| 5781 | WMI_HOST_PEER_AUTHORIZE = 0x3, |
| 5782 | /** peer channel bandwidth */ |
| 5783 | WMI_HOST_PEER_CHWIDTH = 0x4, |
| 5784 | /** peer NSS */ |
| 5785 | WMI_HOST_PEER_NSS = 0x5, |
| 5786 | /** USE 4 ADDR */ |
| 5787 | WMI_HOST_PEER_USE_4ADDR = 0x6, |
| 5788 | /** Enable extended peer stats */ |
| 5789 | WMI_HOST_PEER_EXT_STATS_ENABLE = 0x7, |
| 5790 | /*Use FIXED Pwr */ |
| 5791 | WMI_HOST_PEER_USE_FIXED_PWR = 0x8, |
| 5792 | /* Set peer fixed rate */ |
| 5793 | WMI_HOST_PEER_PARAM_FIXED_RATE = 0x9, |
| 5794 | /* Whitelist peer TIDs */ |
| 5795 | WMI_HOST_PEER_SET_MU_WHITELIST = 0xa, |
| 5796 | /* set group membership status */ |
| 5797 | WMI_HOST_PEER_MEMBERSHIP = 0xb, |
| 5798 | WMI_HOST_PEER_USERPOS = 0xc, |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 5799 | WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED = 0xd, |
| 5800 | WMI_HOST_PEER_TX_FAIL_CNT_THR = 0xe, |
| 5801 | WMI_HOST_PEER_SET_HW_RETRY_CTS2S = 0xf, |
| 5802 | WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH = 0x10, |
| 5803 | WMI_HOST_PEER_PHYMODE = 0x11, |
| 5804 | WMI_HOST_PEER_SET_MAC_TX_RATE = 0x12, |
| 5805 | /* Set default Rx routing */ |
| 5806 | WMI_HOST_PEER_SET_DEFAULT_ROUTING = 0x13, |
| 5807 | WMI_HOST_PEER_SET_MIN_TX_RATE = 0x14, |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5808 | } PEER_PARAM_ENUM; |
| 5809 | #define WMI_HOST_PEER_MIMO_PS_NONE 0x0 |
| 5810 | #define WMI_HOST_PEER_MIMO_PS_STATIC 0x1 |
| 5811 | #define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2 |
| 5812 | typedef enum { |
| 5813 | HOST_PLATFORM_HIGH_PERF, |
| 5814 | HOST_PLATFORM_LOW_PERF, |
Sathish Kumar | 41eca49 | 2016-09-16 16:55:35 +0530 | [diff] [blame] | 5815 | HOST_PLATFORM_LOW_PERF_NO_FETCH, |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5816 | } HOST_PLATFORM_TYPE; |
| 5817 | |
| 5818 | enum wmi_host_sta_ps_mode { |
| 5819 | /** enable power save for the given STA VDEV */ |
| 5820 | WMI_HOST_STA_PS_MODE_DISABLED = 0, |
| 5821 | /** disable power save for a given STA VDEV */ |
| 5822 | WMI_HOST_STA_PS_MODE_ENABLED = 1, |
| 5823 | }; |
| 5824 | enum wmi_host_sta_powersave_param { |
| 5825 | /** |
| 5826 | * Controls how frames are retrievd from AP while STA is sleeping |
| 5827 | * |
| 5828 | * (see enum wmi_sta_ps_param_rx_wake_policy) |
| 5829 | */ |
| 5830 | WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0, |
| 5831 | |
| 5832 | /** |
| 5833 | * The STA will go active after this many TX |
| 5834 | * |
| 5835 | * (see enum wmi_sta_ps_param_tx_wake_threshold) |
| 5836 | */ |
| 5837 | WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1, |
| 5838 | |
| 5839 | /** |
| 5840 | * Number of PS-Poll to send before STA wakes up |
| 5841 | * |
| 5842 | * (see enum wmi_sta_ps_param_pspoll_count) |
| 5843 | * |
| 5844 | */ |
| 5845 | WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2, |
| 5846 | |
| 5847 | /** |
| 5848 | * TX/RX inactivity time in msec before going to sleep. |
| 5849 | * |
| 5850 | * The power save SM will monitor tx/rx activity on the VDEV, if no |
| 5851 | * activity for the specified msec of the parameter |
| 5852 | * the Power save SM will go to sleep. |
| 5853 | */ |
| 5854 | WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3, |
| 5855 | |
| 5856 | /** |
| 5857 | * Set uapsd configuration. |
| 5858 | * |
| 5859 | * (see enum wmi_sta_ps_param_uapsd) |
| 5860 | */ |
| 5861 | WMI_HOST_STA_PS_PARAM_UAPSD = 4, |
| 5862 | }; |
| 5863 | /* prefix used by scan requestor ids on the host |
| 5864 | * replicated here form wmi_unified.h*/ |
| 5865 | #define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000 |
| 5866 | /* prefix used by scan request ids generated on the host */ |
| 5867 | /* host cycles through the lower 12 bits to generate ids */ |
| 5868 | #define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000 |
| 5869 | |
| 5870 | #define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */ |
| 5871 | #define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */ |
| 5872 | #define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */ |
| 5873 | #define WMI_HOST_RC_HT_FLAG 0x08 /* HT */ |
| 5874 | #define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */ |
| 5875 | #define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */ |
| 5876 | #define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */ |
| 5877 | #define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */ |
| 5878 | #define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */ |
| 5879 | #define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */ |
| 5880 | #define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */ |
| 5881 | |
| 5882 | /** HT Capabilities*/ |
| 5883 | #define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ |
| 5884 | /* Short Guard Interval with HT20 */ |
| 5885 | #define WMI_HOST_HT_CAP_HT20_SGI 0x0002 |
| 5886 | #define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */ |
| 5887 | #define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */ |
| 5888 | #define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3 |
| 5889 | #define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */ |
| 5890 | #define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4 |
| 5891 | #define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */ |
| 5892 | #define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */ |
| 5893 | #define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ |
| 5894 | #define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 |
| 5895 | #define WMI_HOST_HT_CAP_HT40_SGI 0x0800 |
| 5896 | #define WMI_HOST_HT_CAP_IBF_BFER 0x1000 |
| 5897 | |
| 5898 | /* These macros should be used when we wish to advertise STBC support for |
| 5899 | * only 1SS or 2SS or 3SS. */ |
| 5900 | #define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */ |
| 5901 | #define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */ |
| 5902 | #define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */ |
| 5903 | |
| 5904 | |
| 5905 | #define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \ |
| 5906 | WMI_HOST_HT_CAP_HT20_SGI | \ |
| 5907 | WMI_HOST_HT_CAP_HT40_SGI | \ |
| 5908 | WMI_HOST_HT_CAP_TX_STBC | \ |
| 5909 | WMI_HOST_HT_CAP_RX_STBC | \ |
| 5910 | WMI_HOST_HT_CAP_LDPC) |
| 5911 | |
| 5912 | /* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information |
| 5913 | field. The fields not defined here are not supported, or reserved. |
| 5914 | Do not change these masks and if you have to add new one follow the |
| 5915 | bitmask as specified by 802.11ac draft. |
| 5916 | */ |
| 5917 | |
| 5918 | #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003 |
| 5919 | #define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010 |
| 5920 | #define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020 |
| 5921 | #define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040 |
| 5922 | #define WMI_HOST_VHT_CAP_TX_STBC 0x00000080 |
| 5923 | #define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300 |
| 5924 | #define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8 |
| 5925 | #define WMI_HOST_VHT_CAP_SU_BFER 0x00000800 |
| 5926 | #define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000 |
| 5927 | #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000 |
| 5928 | #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13 |
| 5929 | #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000 |
| 5930 | #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16 |
| 5931 | #define WMI_HOST_VHT_CAP_MU_BFER 0x00080000 |
| 5932 | #define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000 |
| 5933 | #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000 |
| 5934 | #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23 |
| 5935 | #define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000 |
| 5936 | #define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000 |
| 5937 | |
| 5938 | #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002 |
| 5939 | |
| 5940 | /* These macros should be used when we wish to advertise STBC support for |
| 5941 | * only 1SS or 2SS or 3SS. */ |
| 5942 | #define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100 |
| 5943 | #define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200 |
| 5944 | #define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300 |
| 5945 | |
| 5946 | #define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \ |
| 5947 | WMI_HOST_VHT_CAP_SGI_80MHZ | \ |
| 5948 | WMI_HOST_VHT_CAP_TX_STBC | \ |
| 5949 | WMI_HOST_VHT_CAP_RX_STBC_MASK | \ |
| 5950 | WMI_HOST_VHT_CAP_RX_LDPC | \ |
| 5951 | WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \ |
| 5952 | WMI_HOST_VHT_CAP_RX_FIXED_ANT | \ |
| 5953 | WMI_HOST_VHT_CAP_TX_FIXED_ANT) |
| 5954 | |
| 5955 | /* Interested readers refer to Rx/Tx MCS Map definition as defined in |
| 5956 | 802.11ac |
| 5957 | */ |
| 5958 | #define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1)) |
| 5959 | #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 |
| 5960 | #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 |
| 5961 | |
| 5962 | /** U-APSD configuration of peer station from (re)assoc request and TSPECs */ |
| 5963 | enum wmi_host_ap_ps_param_uapsd { |
| 5964 | WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 5965 | WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 5966 | WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 5967 | WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 5968 | WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 5969 | WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 5970 | WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 5971 | WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 5972 | }; |
| 5973 | /** U-APSD maximum service period of peer station */ |
| 5974 | enum wmi_host_ap_ps_peer_param_max_sp { |
| 5975 | WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, |
| 5976 | WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1, |
| 5977 | WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2, |
| 5978 | WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3, |
| 5979 | |
| 5980 | /* keep last! */ |
| 5981 | MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP, |
| 5982 | }; |
| 5983 | |
| 5984 | #define WMI_HOST_UAPSD_AC_TYPE_DELI 0 |
| 5985 | #define WMI_HOST_UAPSD_AC_TYPE_TRIG 1 |
| 5986 | |
| 5987 | #define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \ |
| 5988 | ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\ |
| 5989 | (1<<((ac<<1)+1))) |
| 5990 | |
| 5991 | enum wmi_host_ap_ps_peer_param_wnm_sleep { |
| 5992 | WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE, |
| 5993 | WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE, |
| 5994 | }; |
| 5995 | |
| 5996 | enum wmi_host_ap_ps_peer_param { |
| 5997 | /** Set uapsd configuration for a given peer. |
| 5998 | * |
| 5999 | * This will include the delivery and trigger enabled state for every AC. |
| 6000 | * The host MLME needs to set this based on AP capability and stations |
| 6001 | * request Set in the association request received from the station. |
| 6002 | * |
| 6003 | * Lower 8 bits of the value specify the UAPSD configuration. |
| 6004 | * |
| 6005 | * (see enum wmi_ap_ps_param_uapsd) |
| 6006 | * The default value is 0. |
| 6007 | */ |
| 6008 | WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0, |
| 6009 | |
| 6010 | /** |
| 6011 | * Set the service period for a UAPSD capable station |
| 6012 | * |
| 6013 | * The service period from wme ie in the (re)assoc request frame. |
| 6014 | * |
| 6015 | * (see enum wmi_ap_ps_peer_param_max_sp) |
| 6016 | */ |
| 6017 | WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1, |
| 6018 | |
| 6019 | /** Time in seconds for aging out buffered frames |
| 6020 | * for STA in power save */ |
| 6021 | WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, |
| 6022 | |
| 6023 | /** Specify frame types that are considered SIFS |
| 6024 | * RESP trigger frame */ |
| 6025 | WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3, |
| 6026 | |
| 6027 | /** Specifies the trigger state of TID. |
| 6028 | * Valid only for UAPSD frame type */ |
| 6029 | WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4, |
| 6030 | |
| 6031 | /** Specifies the WNM sleep state of a STA */ |
| 6032 | WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5, |
| 6033 | }; |
| 6034 | #define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */ |
| 6035 | #define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ |
| 6036 | #define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */ |
| 6037 | #define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */ |
| 6038 | |
| 6039 | enum wmi_host_sta_ps_param_uapsd { |
| 6040 | WMI_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 6041 | WMI_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 6042 | WMI_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 6043 | WMI_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 6044 | WMI_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 6045 | WMI_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 6046 | WMI_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 6047 | WMI_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 6048 | }; |
| 6049 | |
| 6050 | enum wmi_host_sta_ps_param_rx_wake_policy { |
| 6051 | /* Wake up when ever there is an RX activity on the VDEV. In this mode |
| 6052 | * the Power save SM(state machine) will come out of sleep by either |
| 6053 | * sending null frame (or) a data frame (with PS==0) in response to TIM |
| 6054 | * bit set in the received beacon frame from AP. |
| 6055 | */ |
| 6056 | WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0, |
| 6057 | |
| 6058 | /* Here the power save state machine will not wakeup in response to TIM |
| 6059 | * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD |
| 6060 | * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all |
| 6061 | * access categories are delivery-enabled, the station will send a UAPSD |
| 6062 | * trigger frame, otherwise it will send a PS-Poll. |
| 6063 | */ |
| 6064 | WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1, |
| 6065 | }; |
| 6066 | enum wmi_host_sta_ps_param_pspoll_count { |
| 6067 | WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0, |
| 6068 | /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW |
| 6069 | * will send before waking up. |
| 6070 | */ |
| 6071 | }; |
| 6072 | /** Number of tx frames/beacon that cause the power save SM to wake up. |
| 6073 | * |
| 6074 | * Value 1 causes the SM to wake up for every TX. Value 0 has a special |
| 6075 | * meaning, It will cause the SM to never wake up. This is useful if you want |
| 6076 | * to keep the system to sleep all the time for some kind of test mode . host |
| 6077 | * can change this parameter any time. It will affect at the next tx frame. |
| 6078 | */ |
| 6079 | enum wmi_host_sta_ps_param_tx_wake_threshold { |
| 6080 | WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0, |
| 6081 | WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1, |
| 6082 | |
| 6083 | /* Values greater than one indicate that many TX attempts per beacon |
| 6084 | * interval before the STA will wake up |
| 6085 | */ |
| 6086 | }; |
| 6087 | /* |
| 6088 | * Transmit power scale factor. |
| 6089 | * |
| 6090 | */ |
| 6091 | typedef enum { |
| 6092 | WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */ |
| 6093 | WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */ |
| 6094 | WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */ |
| 6095 | WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */ |
| 6096 | WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */ |
| 6097 | WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */ |
| 6098 | } WMI_HOST_TP_SCALE; |
| 6099 | enum { |
| 6100 | WMI_HOST_RATEPWR_TABLE_OPS_SET, |
| 6101 | WMI_HOST_RATEPWR_TABLE_OPS_GET, |
| 6102 | }; |
| 6103 | /* reserved up through 0xF */ |
| 6104 | /** |
| 6105 | * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host |
| 6106 | * Below statistics are sent from target to host periodically. |
| 6107 | * These are collected at target as long as target is running |
| 6108 | * and target chip is not in sleep. |
| 6109 | * @listen_time: |
| 6110 | * @reg_tx_frame_cnt: |
| 6111 | * @reg_rx_frame_cnt: |
| 6112 | * @reg_rxclr_cnt: |
| 6113 | * @reg_cycle_cnt: delta cycle count |
| 6114 | * @reg_rxclr_ext_cnt: |
| 6115 | * @reg_ofdm_phyerr_cnt: |
| 6116 | * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register |
| 6117 | */ |
| 6118 | typedef struct _hp_dcs_mib_stats { |
| 6119 | int32_t listen_time; |
| 6120 | uint32_t reg_tx_frame_cnt; |
| 6121 | uint32_t reg_rx_frame_cnt; |
| 6122 | uint32_t reg_rxclr_cnt; |
| 6123 | uint32_t reg_cycle_cnt; |
| 6124 | uint32_t reg_rxclr_ext_cnt; |
| 6125 | uint32_t reg_ofdm_phyerr_cnt; |
| 6126 | uint32_t reg_cck_phyerr_cnt; |
| 6127 | } wmi_host_dcs_mib_stats_t; |
| 6128 | |
| 6129 | /** |
| 6130 | * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats |
| 6131 | * @reg_tsf32: current running TSF from the TSF-1 |
| 6132 | * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if |
| 6133 | * and at different ranges, this would not gaurantee that |
| 6134 | * this is the least rssi. |
| 6135 | * @tx_waste_time: Sum of all the failed durations in the last |
| 6136 | * one second interval. |
| 6137 | * @rx_time: count how many times the hal_rxerr_phy is marked, in this |
| 6138 | * time period |
| 6139 | * @phyerr_cnt: |
| 6140 | * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained |
| 6141 | * in mib structure |
| 6142 | */ |
| 6143 | typedef struct _wmi_host_dcs_im_tgt_stats { |
| 6144 | uint32_t reg_tsf32; |
| 6145 | uint32_t last_ack_rssi; |
| 6146 | uint32_t tx_waste_time; |
| 6147 | uint32_t rx_time; |
| 6148 | uint32_t phyerr_cnt; |
| 6149 | wmi_host_dcs_mib_stats_t mib_stats; |
| 6150 | } wmi_host_dcs_im_tgt_stats_t; |
| 6151 | |
| 6152 | /** |
| 6153 | * Enum for pktlog req |
| 6154 | */ |
| 6155 | typedef enum { |
| 6156 | WMI_HOST_PKTLOG_EVENT_RX = 0x1, |
| 6157 | WMI_HOST_PKTLOG_EVENT_TX = 0x2, |
| 6158 | WMI_HOST_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */ |
| 6159 | WMI_HOST_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */ |
| 6160 | WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 0x10, /* DEBUG prints */ |
| 6161 | /* To support Smart Antenna */ |
| 6162 | WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 0x20, |
| 6163 | WMI_HOST_PKTLOG_EVENT_H_INFO = 0x40, |
| 6164 | WMI_HOST_PKTLOG_EVENT_STEERING = 0x80, |
Sathish Kumar | 657402a | 2016-09-26 14:48:09 +0530 | [diff] [blame] | 6165 | /* To support Tx data Capture */ |
| 6166 | WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE = 0x100, |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6167 | } WMI_HOST_PKTLOG_EVENT; |
| 6168 | |
| 6169 | /** |
| 6170 | * wmi_host_phyerr |
| 6171 | * |
| 6172 | */ |
| 6173 | #define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26 |
| 6174 | #define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24 |
| 6175 | |
| 6176 | #define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4 |
| 6177 | #define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000 |
| 6178 | |
| 6179 | /** |
| 6180 | * struct wmi_host_perchain_rssi_info - per chain RSSI info |
| 6181 | * @rssi_pri20: RSSI on primary 20 |
| 6182 | * @rssi_sec20: RSSI on secomdary 20 |
| 6183 | * @rssi_sec40: RSSI secondary 40 |
| 6184 | * @rssi_sec80: RSSI secondary 80 |
| 6185 | */ |
| 6186 | typedef struct wmi_host_perchain_rssi_info { |
| 6187 | int8_t rssi_pri20; |
| 6188 | int8_t rssi_sec20; |
| 6189 | int8_t rssi_sec40; |
| 6190 | int8_t rssi_sec80; |
| 6191 | } wmi_host_perchain_rssi_info_t; |
| 6192 | |
| 6193 | /** |
| 6194 | * struct _wmi_host_rf_info - RF measurement information |
| 6195 | * @rssi_comb: RSSI Information |
| 6196 | * @pc_rssi_info[4]: For now, we know we are getting information |
| 6197 | * for only 4 chains at max. For future extensions |
| 6198 | * use a define |
| 6199 | * @noise_floor: Noise floor information |
| 6200 | */ |
| 6201 | typedef struct _wmi_host_rf_info { |
| 6202 | int8_t rssi_comb; |
| 6203 | wmi_host_perchain_rssi_info_t pc_rssi_info[4]; |
| 6204 | int16_t noise_floor[4]; |
| 6205 | } wmi_host_rf_info_t; |
| 6206 | |
| 6207 | /** |
| 6208 | * struct _wmi_host_chan_info |
| 6209 | * @center_freq1: center frequency 1 in MHz |
| 6210 | * @center_freq2: center frequency 2 in MHz -valid only for |
| 6211 | * 11ACVHT 80PLUS80 mode |
| 6212 | * @chan_width: channel width in MHz |
| 6213 | */ |
| 6214 | typedef struct _wmi_host_chan_info { |
| 6215 | u_int16_t center_freq1; |
| 6216 | u_int16_t center_freq2; |
| 6217 | u_int8_t chan_width; |
| 6218 | } wmi_host_chan_info_t; |
| 6219 | |
| 6220 | /** |
| 6221 | * struct wmi_host_phyerr |
| 6222 | * @rf_info: |
| 6223 | * @chan_info: |
| 6224 | * @tsf64: |
| 6225 | * @phy_err_code: |
| 6226 | * @tsf_timestamp: |
| 6227 | * @bufp: |
| 6228 | * @buf_len: |
| 6229 | * @phy_err_mask0: |
| 6230 | * @phy_err_mask1: |
| 6231 | */ |
| 6232 | typedef struct _wmi_host_phyerr { |
| 6233 | wmi_host_rf_info_t rf_info; |
| 6234 | wmi_host_chan_info_t chan_info; |
| 6235 | uint64_t tsf64; |
| 6236 | int32_t phy_err_code; |
| 6237 | uint32_t tsf_timestamp; |
| 6238 | uint8_t *bufp; |
| 6239 | uint32_t buf_len; |
| 6240 | uint32_t phy_err_mask0; |
| 6241 | uint32_t phy_err_mask1; |
| 6242 | } wmi_host_phyerr_t; |
| 6243 | |
| 6244 | /** |
| 6245 | * struct wmi_host_rtt_event_hdr |
| 6246 | * @req_id: request id |
| 6247 | * @status: status |
| 6248 | * @meas_done: measurement done flag |
| 6249 | * @meas_type: measurement type |
| 6250 | * @report_type: report type |
| 6251 | * @v3_status: v2 status |
| 6252 | * @v3_finish: |
| 6253 | * @v3_tm_start: |
| 6254 | * @num_ap: number of AP |
| 6255 | * @result: resuult |
| 6256 | * @dest_mac: destination mac |
| 6257 | */ |
| 6258 | typedef struct { |
| 6259 | uint16_t req_id; |
| 6260 | uint16_t status:1, |
| 6261 | meas_done:1, |
| 6262 | meas_type:3, |
| 6263 | report_type:3, |
| 6264 | v3_status:2, |
| 6265 | v3_finish:1, |
| 6266 | v3_tm_start:1, |
| 6267 | num_ap:4; |
| 6268 | uint16_t result; |
| 6269 | uint8_t dest_mac[IEEE80211_ADDR_LEN]; |
| 6270 | } wmi_host_rtt_event_hdr; |
| 6271 | |
| 6272 | /** |
| 6273 | * struct wmi_host_rtt_meas_event - RTT measurement event |
| 6274 | * @chain_mask: |
| 6275 | * @bw: |
| 6276 | * @rsvd: |
| 6277 | * @txrxchain_mask: Bit:0-3:chain mask |
| 6278 | * Bit 4-5: band width info |
| 6279 | * 00 --Legacy 20, 01 --HT/VHT20 |
| 6280 | * 10 --HT/VHT40, 11 -- VHT80 |
| 6281 | * @tod: resolution of 0.1ns |
| 6282 | * @toa: resolution of 0.1ns |
| 6283 | * @t3: |
| 6284 | * @t4: |
| 6285 | * @rssi0: |
| 6286 | * @rssi1: |
| 6287 | * @rssi2: |
| 6288 | * @rssi3: |
| 6289 | */ |
| 6290 | typedef struct { |
| 6291 | uint32_t chain_mask:3, |
| 6292 | bw:2, |
| 6293 | rsvd:27; |
| 6294 | uint32_t txrxchain_mask; |
| 6295 | uint64_t tod; |
| 6296 | uint64_t toa; |
| 6297 | uint64_t t3; |
| 6298 | uint64_t t4; |
| 6299 | uint32_t rssi0; |
| 6300 | uint32_t rssi1; |
| 6301 | uint32_t rssi2; |
| 6302 | uint32_t rssi3; |
| 6303 | } wmi_host_rtt_meas_event; |
| 6304 | |
| 6305 | /*----RTT Report event definition ----*/ |
| 6306 | typedef enum { |
| 6307 | /* rtt cmd header parsing error --terminate */ |
| 6308 | WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0, |
| 6309 | /* rtt body parsing error -- skip current STA REQ */ |
| 6310 | WMI_HOST_RTT_COMMAND_ERROR, |
| 6311 | /* rtt no resource -- terminate */ |
| 6312 | WMI_HOST_RTT_MODULE_BUSY, |
| 6313 | /* STA exceed the support limit -- only server the first n STA */ |
| 6314 | WMI_HOST_RTT_TOO_MANY_STA, |
| 6315 | /* any allocate failure */ |
| 6316 | WMI_HOST_RTT_NO_RESOURCE, |
| 6317 | /* can not find vdev with vdev ID - skip current STA REQ */ |
| 6318 | WMI_HOST_RTT_VDEV_ERROR, |
| 6319 | /* Tx failure -- continiue and measure number */ |
| 6320 | WMI_HOST_RTT_TRANSIMISSION_ERROR, |
| 6321 | /* wait for first TM timer expire-terminate current STA measurement */ |
| 6322 | WMI_HOST_RTT_TM_TIMER_EXPIRE, |
| 6323 | /* we do not support RTT measurement with this type of frame */ |
| 6324 | WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT, |
| 6325 | /* whole RTT measurement timer expire-terminate |
| 6326 | ** current STA measurement */ |
| 6327 | WMI_HOST_RTT_TIMER_EXPIRE, |
| 6328 | /* channel swicth failed */ |
| 6329 | WMI_HOST_RTT_CHAN_SWITCH_ERROR, |
| 6330 | /* TMR trans error, this dest peer will be skipped */ |
| 6331 | WMI_HOST_RTT_TMR_TRANS_ERROR, |
| 6332 | /* V3 only. If both CFR and Token mismatch, do not report */ |
| 6333 | WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN, |
| 6334 | /* For First TM, if CFR is bad, then do not report */ |
| 6335 | WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR, |
| 6336 | /* do not allow report type2 mix with type 0, 1 */ |
| 6337 | WMI_HOST_RTT_REPORT_TYPE2_MIX, |
| 6338 | /* LCI Configuration OK. - Responder only */ |
| 6339 | WMI_HOST_RTT_LCI_CFG_OK, |
| 6340 | /* LCR configuration OK. - Responder only */ |
| 6341 | WMI_HOST_RTT_LCR_CFG_OK, |
| 6342 | /* Bad configuration LCI (or) LCR request - Responder only */ |
| 6343 | WMI_HOST_RTT_CFG_ERROR, |
| 6344 | WMI_HOST_WMI_RTT_REJECT_MAX, |
| 6345 | } WMI_HOST_RTT_ERROR_INDICATOR; |
| 6346 | typedef struct { |
| 6347 | wmi_host_rtt_event_hdr hdr; |
| 6348 | WMI_HOST_RTT_ERROR_INDICATOR reject_reason; |
| 6349 | } wmi_host_rtt_error_report_event; |
| 6350 | |
| 6351 | #if defined(AR9888) |
| 6352 | typedef enum { |
| 6353 | WMI_HOST_PROF_CPU_IDLE, |
| 6354 | WMI_HOST_PROF_PPDU_PROC, |
| 6355 | WMI_HOST_PROF_PPDU_POST, |
| 6356 | WMI_HOST_PROF_HTT_TX_INPUT, |
| 6357 | WMI_HOST_PROF_MSDU_ENQ, |
| 6358 | WMI_HOST_PROF_PPDU_POST_HAL, |
| 6359 | WMI_HOST_PROF_COMPUTE_TX_TIME, |
| 6360 | |
| 6361 | /* Add new ID's above this. */ |
| 6362 | WMI_HOST_PROF_MAX_ID, |
| 6363 | } wmi_host_profile_id_t; |
| 6364 | #endif |
| 6365 | |
| 6366 | #define WMI_HOST_WLAN_PROFILE_MAX_HIST 3 |
| 6367 | #define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32 |
| 6368 | |
| 6369 | #if defined(AR9888) |
| 6370 | #define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID |
| 6371 | #else |
| 6372 | #define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT |
| 6373 | #endif |
| 6374 | |
| 6375 | /** |
| 6376 | * struct wmi_host_wlan_profile - Host profile param |
| 6377 | * @id: profile id |
| 6378 | * @cnt: Count |
| 6379 | * @tot: |
| 6380 | * @min: minimum |
| 6381 | * @max: Mac |
| 6382 | * @hist_intvl: history interval |
| 6383 | * @hist: profile data history |
| 6384 | */ |
| 6385 | typedef struct { |
| 6386 | uint32_t id; |
| 6387 | uint32_t cnt; |
| 6388 | uint32_t tot; |
| 6389 | uint32_t min; |
| 6390 | uint32_t max; |
| 6391 | uint32_t hist_intvl; |
| 6392 | uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST]; |
| 6393 | } wmi_host_wlan_profile_t; |
| 6394 | |
| 6395 | /** |
| 6396 | * struct wmi_host_wlan_profile_ctx_t - profile context |
| 6397 | * @tot: time in us |
| 6398 | * @tx_msdu_cnt: MSDU TX count |
| 6399 | * @tx_mpdu_cnt: MPDU tx count |
| 6400 | * @tx_ppdu_cnt: PPDU tx count |
| 6401 | * @rx_msdu_cnt: MSDU RX count |
| 6402 | * @rx_mpdu_cnt: MPDU RXcount |
| 6403 | * @bin_count: Bin count |
| 6404 | */ |
| 6405 | typedef struct { |
| 6406 | uint32_t tot; |
| 6407 | uint32_t tx_msdu_cnt; |
| 6408 | uint32_t tx_mpdu_cnt; |
| 6409 | uint32_t tx_ppdu_cnt; |
| 6410 | uint32_t rx_msdu_cnt; |
| 6411 | uint32_t rx_mpdu_cnt; |
| 6412 | uint32_t bin_count; |
| 6413 | } wmi_host_wlan_profile_ctx_t; |
| 6414 | |
| 6415 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6416 | * struct wmi_host_chan_info_event - Channel info WMI event |
| 6417 | * @err_code: Error code |
| 6418 | * @freq: Channel freq |
| 6419 | * @cmd_flags: Read flags |
| 6420 | * @noise_floor: Noise Floor value |
| 6421 | * @rx_clear_count: rx clear count |
| 6422 | * @cycle_count: cycle count |
| 6423 | * @chan_tx_pwr_range: channel tx power per range |
| 6424 | * @chan_tx_pwr_tp: channel tx power per throughput |
| 6425 | * @rx_frame_count: rx frame count |
| 6426 | * @rx_11b_mode_data_duration: 11b mode data duration |
| 6427 | */ |
| 6428 | typedef struct { |
| 6429 | uint32_t err_code; |
| 6430 | uint32_t freq; |
| 6431 | uint32_t cmd_flags; |
| 6432 | uint32_t noise_floor; |
| 6433 | uint32_t rx_clear_count; |
| 6434 | uint32_t cycle_count; |
| 6435 | uint32_t chan_tx_pwr_range; |
| 6436 | uint32_t chan_tx_pwr_tp; |
| 6437 | uint32_t rx_frame_count; |
| 6438 | uint32_t rx_11b_mode_data_duration; |
| 6439 | } wmi_host_chan_info_event; |
| 6440 | |
| 6441 | /** |
| 6442 | * struct wmi_host_pdev_channel_hopping_event |
| 6443 | * @noise_floor_report_iter: Noise threshold iterations with high values |
| 6444 | * @noise_floor_total_iter: Total noise threshold iterations |
| 6445 | */ |
| 6446 | typedef struct { |
| 6447 | uint32_t noise_floor_report_iter; |
| 6448 | uint32_t noise_floor_total_iter; |
| 6449 | } wmi_host_pdev_channel_hopping_event; |
| 6450 | |
| 6451 | /** |
| 6452 | * struct wmi_host_pdev_bss_chan_info_event |
| 6453 | * @freq: Units in MHz |
| 6454 | * @noise_floor: units are dBm |
| 6455 | * @rx_clear_count_low: |
| 6456 | * @rx_clear_count_high: |
| 6457 | * @cycle_count_low: |
| 6458 | * @cycle_count_high: |
| 6459 | * @tx_cycle_count_low: |
| 6460 | * @tx_cycle_count_high: |
| 6461 | * @rx_cycle_count_low: |
| 6462 | * @rx_cycle_count_high: |
| 6463 | * @rx_bss_cycle_count_low: |
| 6464 | * @rx_bss_cycle_count_high: |
| 6465 | * @reserved: |
| 6466 | */ |
| 6467 | typedef struct { |
| 6468 | uint32_t freq; |
| 6469 | uint32_t noise_floor; |
| 6470 | uint32_t rx_clear_count_low; |
| 6471 | uint32_t rx_clear_count_high; |
| 6472 | uint32_t cycle_count_low; |
| 6473 | uint32_t cycle_count_high; |
| 6474 | uint32_t tx_cycle_count_low; |
| 6475 | uint32_t tx_cycle_count_high; |
| 6476 | uint32_t rx_cycle_count_low; |
| 6477 | uint32_t rx_cycle_count_high; |
| 6478 | uint32_t rx_bss_cycle_count_low; |
| 6479 | uint32_t rx_bss_cycle_count_high; |
| 6480 | uint32_t reserved; |
| 6481 | } wmi_host_pdev_bss_chan_info_event; |
| 6482 | |
| 6483 | #define WMI_HOST_INST_STATS_INVALID_RSSI 0 |
| 6484 | /** |
| 6485 | * struct wmi_host_inst_stats_resp |
| 6486 | * @iRSSI: Instantaneous RSSI |
| 6487 | * @peer_macaddr: peer mac address |
| 6488 | */ |
| 6489 | typedef struct { |
| 6490 | uint32_t iRSSI; |
| 6491 | wmi_host_mac_addr peer_macaddr; |
| 6492 | } wmi_host_inst_stats_resp; |
| 6493 | |
| 6494 | /* Event definition and new structure addition to send event |
| 6495 | * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id |
| 6496 | */ |
| 6497 | #define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff |
| 6498 | #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1 |
| 6499 | #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2 |
| 6500 | /** |
| 6501 | * struct wmi_host_tx_data_traffic_ctrl_event |
| 6502 | * @peer_ast_idx: For vdev based control, peer_ast_idx will be |
| 6503 | * WMI_INVALID_PEER_AST_INDEX |
| 6504 | * @vdev_id: only applies if peer_ast_idx == INVALID |
| 6505 | * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or |
| 6506 | * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK |
| 6507 | */ |
| 6508 | typedef struct { |
| 6509 | uint32_t peer_ast_idx; |
| 6510 | uint32_t vdev_id; |
| 6511 | uint32_t ctrl_cmd; |
| 6512 | } wmi_host_tx_data_traffic_ctrl_event; |
| 6513 | |
| 6514 | /** |
| 6515 | * struct wmi_host_ath_dcs_cw_int |
| 6516 | * @channel: either number or freq in mhz |
| 6517 | */ |
| 6518 | typedef struct { |
| 6519 | uint32_t channel; |
| 6520 | } wmi_host_ath_dcs_cw_int; |
Govind Singh | c10bde8 | 2016-05-02 17:59:24 +0530 | [diff] [blame] | 6521 | |
| 6522 | #define WMI_MAX_POWER_DBG_ARGS 8 |
| 6523 | |
| 6524 | /** |
| 6525 | * struct wmi_power_dbg_params - power debug command parameter |
| 6526 | * @pdev_id: subsystem identifier |
| 6527 | * @module_id: parameter id |
| 6528 | * @num_arg: no of arguments |
| 6529 | * @args: arguments |
| 6530 | */ |
| 6531 | struct wmi_power_dbg_params { |
| 6532 | uint32_t pdev_id; |
| 6533 | uint32_t module_id; |
| 6534 | uint32_t num_args; |
| 6535 | uint32_t args[WMI_MAX_POWER_DBG_ARGS]; |
| 6536 | }; |
| 6537 | |
Gupta, Kapil | 7b76800 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 6538 | /** |
| 6539 | * struct wmi_adaptive_dwelltime_params - the adaptive dwelltime params |
| 6540 | * @vdev_id: vdev id |
| 6541 | * @is_enabled: Adaptive dwell time is enabled/disabled |
| 6542 | * @dwelltime_mode: global default adaptive dwell mode |
| 6543 | * @lpf_weight: weight to calculate the average low pass |
| 6544 | * filter for channel congestion |
| 6545 | * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec |
| 6546 | * @wifi_act_threshold: % of wifi activity used in passive scan 0-100 |
| 6547 | * |
| 6548 | */ |
| 6549 | struct wmi_adaptive_dwelltime_params { |
| 6550 | uint32_t vdev_id; |
| 6551 | bool is_enabled; |
| 6552 | enum wmi_dwelltime_adaptive_mode dwelltime_mode; |
| 6553 | uint8_t lpf_weight; |
| 6554 | uint8_t passive_mon_intval; |
| 6555 | uint8_t wifi_act_threshold; |
| 6556 | }; |
Govind Singh | c7cd2d6 | 2016-06-21 14:33:26 +0530 | [diff] [blame] | 6557 | |
| 6558 | /** |
| 6559 | * struct wmi_fw_dump_seg_req - individual segment details |
| 6560 | * @seg_id - segment id. |
| 6561 | * @seg_start_addr_lo - lower address of the segment. |
| 6562 | * @seg_start_addr_hi - higher address of the segment. |
| 6563 | * @seg_length - length of the segment. |
| 6564 | * @dst_addr_lo - lower address of the destination buffer. |
| 6565 | * @dst_addr_hi - higher address of the destination buffer. |
| 6566 | * |
| 6567 | * This structure carries the information to firmware about the |
| 6568 | * individual segments. This structure is part of firmware memory |
| 6569 | * dump request. |
| 6570 | */ |
| 6571 | struct wmi_fw_dump_seg_req { |
| 6572 | uint8_t seg_id; |
| 6573 | uint32_t seg_start_addr_lo; |
| 6574 | uint32_t seg_start_addr_hi; |
| 6575 | uint32_t seg_length; |
| 6576 | uint32_t dst_addr_lo; |
| 6577 | uint32_t dst_addr_hi; |
| 6578 | }; |
| 6579 | |
| 6580 | /** |
| 6581 | * enum wmi_userspace_log_level - Log level at userspace |
| 6582 | * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection |
| 6583 | * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log |
| 6584 | * level with minimal user impact. This is the default value. |
| 6585 | * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily |
| 6586 | * trying to reproduce a problem, wifi performances and power can be impacted |
| 6587 | * but device should not otherwise be significantly impacted |
| 6588 | * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to |
| 6589 | * actively debug a problem |
| 6590 | * |
| 6591 | * Various log levels defined in the userspace for logging applications |
| 6592 | */ |
| 6593 | enum wmi_userspace_log_level { |
| 6594 | WMI_LOG_LEVEL_NO_COLLECTION, |
| 6595 | WMI_LOG_LEVEL_NORMAL_COLLECT, |
| 6596 | WMI_LOG_LEVEL_ISSUE_REPRO, |
| 6597 | WMI_LOG_LEVEL_ACTIVE, |
| 6598 | }; |
| 6599 | |
Padma, Santhosh Kumar | 7352405 | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6600 | /** |
| 6601 | * struct encrypt_decrypt_req_params - encrypt/decrypt params |
| 6602 | * @vdev_id: virtual device id |
| 6603 | * @key_flag: This indicates firmware to encrypt/decrypt payload |
| 6604 | * see ENCRYPT_DECRYPT_FLAG |
| 6605 | * @key_idx: Index used in storing key |
| 6606 | * @key_cipher: cipher used for encryption/decryption |
| 6607 | * Eg: see WMI_CIPHER_AES_CCM for CCMP |
| 6608 | * @key_len: length of key data |
| 6609 | * @key_txmic_len: length of Tx MIC |
| 6610 | * @key_rxmic_len: length of Rx MIC |
| 6611 | * @key_data: Key |
| 6612 | * @pn: packet number |
| 6613 | * @mac_header: MAC header |
| 6614 | * @data_len: length of data |
| 6615 | * @data: pointer to payload |
| 6616 | */ |
| 6617 | struct encrypt_decrypt_req_params { |
| 6618 | uint32_t vdev_id; |
| 6619 | uint8_t key_flag; |
| 6620 | uint32_t key_idx; |
| 6621 | uint32_t key_cipher; |
| 6622 | uint32_t key_len; |
| 6623 | uint32_t key_txmic_len; |
| 6624 | uint32_t key_rxmic_len; |
| 6625 | uint8_t key_data[MAC_MAX_KEY_LENGTH]; |
| 6626 | uint8_t pn[MAC_PN_LENGTH]; |
| 6627 | uint8_t mac_header[MAX_MAC_HEADER_LEN]; |
| 6628 | uint32_t data_len; |
| 6629 | uint8_t *data; |
| 6630 | }; |
| 6631 | |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 6632 | #endif /* _WMI_UNIFIED_PARAM_H_ */ |
| 6633 | |