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