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