Srinivas Girigowda | ad874a8 | 2016-10-25 14:08:00 -0700 | [diff] [blame] | 1 | /* |
Jeff Johnson | d9f0860 | 2016-12-02 11:31:30 -0800 | [diff] [blame] | 2 | * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [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 | #ifndef WMA_H |
| 29 | #define WMA_H |
| 30 | |
| 31 | #include "a_types.h" |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 32 | #include "qdf_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 33 | #include "osapi_linux.h" |
| 34 | #include "htc_packet.h" |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 35 | #include "i_qdf_event.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 36 | #include "wmi_services.h" |
| 37 | #include "wmi_unified.h" |
| 38 | #include "wmi_version.h" |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 39 | #include "qdf_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 40 | #include "cfg_api.h" |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 41 | #include "qdf_status.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 42 | #include "cds_sched.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 43 | #include "sir_mac_prot_def.h" |
| 44 | #include "wma_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 45 | #include <linux/workqueue.h> |
| 46 | #include "utils_api.h" |
| 47 | #include "lim_types.h" |
| 48 | #include "wmi_unified_api.h" |
Dhanashri Atre | 12a0839 | 2016-02-17 13:10:34 -0800 | [diff] [blame] | 49 | #include "cdp_txrx_cmn.h" |
Govind Singh | 8c46db9 | 2016-05-10 14:17:16 +0530 | [diff] [blame] | 50 | #include "dbglog.h" |
Leo Chang | 9646490 | 2016-10-28 11:10:54 -0700 | [diff] [blame] | 51 | #include "cds_ieee80211_common.h" |
Selvaraj, Sridhar | 0672a12 | 2016-12-29 16:11:48 +0530 | [diff] [blame] | 52 | #include "wlan_objmgr_psoc_obj.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 53 | /* Platform specific configuration for max. no. of fragments */ |
| 54 | #define QCA_OL_11AC_TX_MAX_FRAGS 2 |
| 55 | |
| 56 | /* Private */ |
| 57 | |
Rajeev Kumar | daf1c61 | 2016-04-05 02:56:41 -0700 | [diff] [blame] | 58 | #define WMA_READY_EVENTID_TIMEOUT 6000 |
| 59 | #define WMA_SERVICE_READY_EXT_TIMEOUT 6000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 60 | #define WMA_TGT_SUSPEND_COMPLETE_TIMEOUT 6000 |
| 61 | #define WMA_WAKE_LOCK_TIMEOUT 1000 |
Yuanyuan Liu | c743203 | 2016-11-09 11:34:45 -0800 | [diff] [blame] | 62 | #define WMA_RESUME_TIMEOUT 25000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 63 | #define MAX_MEM_CHUNKS 32 |
| 64 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 65 | #define WMA_CRASH_INJECT_TIMEOUT 5000 |
| 66 | |
Govind Singh | efc5ccd | 2016-04-25 11:11:55 +0530 | [diff] [blame] | 67 | /* MAC ID to PDEV ID mapping is as given below |
| 68 | * MAC_ID PDEV_ID |
| 69 | * 0 1 |
| 70 | * 1 2 |
| 71 | * SOC Level WMI_PDEV_ID_SOC |
| 72 | */ |
| 73 | #define WMA_MAC_TO_PDEV_MAP(x) ((x) + (1)) |
| 74 | #define WMA_PDEV_TO_MAC_MAP(x) ((x) - (1)) |
| 75 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 76 | /* In prima 12 HW stations are supported including BCAST STA(staId 0) |
| 77 | * and SELF STA(staId 1) so total ASSOC stations which can connect to Prima |
| 78 | * SoftAP = 12 - 1(Self STa) - 1(Bcast Sta) = 10 Stations. |
| 79 | */ |
| 80 | |
| 81 | #ifdef WLAN_SOFTAP_VSTA_FEATURE |
| 82 | #define WMA_MAX_SUPPORTED_STAS 38 |
| 83 | #else |
| 84 | #define WMA_MAX_SUPPORTED_STAS 12 |
| 85 | #endif |
| 86 | #define WMA_MAX_SUPPORTED_BSS 5 |
| 87 | |
| 88 | #define FRAGMENT_SIZE 3072 |
| 89 | |
| 90 | #define WMA_INVALID_VDEV_ID 0xFF |
| 91 | #define MAX_MEM_CHUNKS 32 |
| 92 | #define WMA_MAX_VDEV_SIZE 20 |
| 93 | #define WMA_VDEV_TBL_ENTRY_ADD 1 |
| 94 | #define WMA_VDEV_TBL_ENTRY_DEL 0 |
| 95 | |
| 96 | /* 11A/G channel boundary */ |
| 97 | #define WMA_11A_CHANNEL_BEGIN 34 |
| 98 | #define WMA_11A_CHANNEL_END 165 |
| 99 | #define WMA_11G_CHANNEL_BEGIN 1 |
| 100 | #define WMA_11G_CHANNEL_END 14 |
| 101 | |
| 102 | #define WMA_11P_CHANNEL_BEGIN (170) |
| 103 | #define WMA_11P_CHANNEL_END (184) |
| 104 | |
| 105 | #define WMA_LOGD(args ...) \ |
Anurag Chouhan | b2dc16f | 2016-02-25 11:47:37 +0530 | [diff] [blame] | 106 | QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_DEBUG, ## args) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 107 | #define WMA_LOGI(args ...) \ |
Anurag Chouhan | b2dc16f | 2016-02-25 11:47:37 +0530 | [diff] [blame] | 108 | QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_INFO, ## args) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 109 | #define WMA_LOGW(args ...) \ |
Anurag Chouhan | b2dc16f | 2016-02-25 11:47:37 +0530 | [diff] [blame] | 110 | QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_WARN, ## args) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 111 | #define WMA_LOGE(args ...) \ |
Anurag Chouhan | b2dc16f | 2016-02-25 11:47:37 +0530 | [diff] [blame] | 112 | QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, ## args) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 113 | #define WMA_LOGP(args ...) \ |
Anurag Chouhan | b2dc16f | 2016-02-25 11:47:37 +0530 | [diff] [blame] | 114 | QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_FATAL, ## args) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 115 | |
| 116 | #define WMA_DEBUG_ALWAYS |
| 117 | |
| 118 | #ifdef WMA_DEBUG_ALWAYS |
| 119 | #define WMA_LOGA(args ...) \ |
Anurag Chouhan | b2dc16f | 2016-02-25 11:47:37 +0530 | [diff] [blame] | 120 | QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_FATAL, ## args) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 121 | #else |
| 122 | #define WMA_LOGA(args ...) |
| 123 | #endif |
| 124 | |
| 125 | #define ALIGNED_WORD_SIZE 4 |
| 126 | #define WLAN_HAL_MSG_TYPE_MAX_ENUM_SIZE 0x7FFF |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 127 | #define WMA_WILDCARD_PDEV_ID 0x0 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 128 | |
| 129 | /* Prefix used by scan req ids generated on the host */ |
| 130 | #define WMA_HOST_SCAN_REQID_PREFIX 0xA000 |
| 131 | /* Prefix used by roam scan req ids generated on the host */ |
| 132 | #define WMA_HOST_ROAM_SCAN_REQID_PREFIX 0xA800 |
| 133 | /* Prefix used by scan requestor id on host */ |
| 134 | #define WMA_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000 |
| 135 | |
| 136 | #define WMA_HW_DEF_SCAN_MAX_DURATION 30000 /* 30 secs */ |
| 137 | |
| 138 | /* Max offchannel duration */ |
| 139 | #define WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS (3) |
| 140 | #define WMA_SCAN_NPROBES_DEFAULT (2) |
| 141 | #define WMA_SCAN_IDLE_TIME_DEFAULT (25) |
| 142 | #define WMA_P2P_SCAN_MAX_BURST_DURATION (180) |
| 143 | #define WMA_CTS_DURATION_MS_MAX (32) |
| 144 | #define WMA_GO_MIN_ACTIVE_SCAN_BURST_DURATION (40) |
| 145 | #define WMA_GO_MAX_ACTIVE_SCAN_BURST_DURATION (120) |
| 146 | #define WMA_DWELL_TIME_PASSIVE_DEFAULT (110) |
| 147 | #define WMA_DWELL_TIME_PROBE_TIME_MAP_SIZE (11) |
| 148 | #define WMA_3PORT_CONC_SCAN_MAX_BURST_DURATION (25) |
| 149 | |
| 150 | #define WMA_SEC_TO_USEC (1000000) |
| 151 | |
| 152 | #define BEACON_TX_BUFFER_SIZE (512) |
| 153 | |
| 154 | /* WMA_ETHER_TYPE_OFFSET = sa(6) + da(6) */ |
| 155 | #define WMA_ETHER_TYPE_OFFSET (6 + 6) |
| 156 | /* WMA_ICMP_V6_HEADER_OFFSET = sa(6) + da(6) + eth_type(2) + icmp_v6_hdr(6)*/ |
| 157 | #define WMA_ICMP_V6_HEADER_OFFSET (6 + 6 + 2 + 6) |
| 158 | /* WMA_ICMP_V6_TYPE_OFFSET = sa(6) + da(6) + eth_type(2) + 40 */ |
| 159 | #define WMA_ICMP_V6_TYPE_OFFSET (6 + 6 + 2 + 40) |
Sreelakshmi Konamki | e1cd51f | 2016-08-19 16:58:24 +0530 | [diff] [blame] | 160 | /* WMA_IPV4_PROTOCOL = sa(6) + da(6) + eth_type(2) + 9 */ |
| 161 | #define WMA_IPV4_PROTOCOL (6 + 6 + 2 + 9) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 162 | #define WMA_ICMP_V6_HEADER_TYPE (0x3A) |
| 163 | #define WMA_ICMP_V6_RA_TYPE (0x86) |
| 164 | #define WMA_ICMP_V6_NS_TYPE (0x87) |
| 165 | #define WMA_ICMP_V6_NA_TYPE (0x88) |
| 166 | #define WMA_BCAST_MAC_ADDR (0xFF) |
| 167 | #define WMA_MCAST_IPV4_MAC_ADDR (0x01) |
| 168 | #define WMA_MCAST_IPV6_MAC_ADDR (0x33) |
Sreelakshmi Konamki | e1cd51f | 2016-08-19 16:58:24 +0530 | [diff] [blame] | 169 | #define WMA_ICMP_PROTOCOL (0x01) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 170 | |
Himanshu Agarwal | 82de904 | 2016-07-20 18:11:03 +0530 | [diff] [blame] | 171 | #define WMA_IS_EAPOL_GET_MIN_LEN 14 |
| 172 | #define WMA_EAPOL_SUBTYPE_GET_MIN_LEN 21 |
| 173 | #define WMA_EAPOL_INFO_GET_MIN_LEN 23 |
| 174 | #define WMA_IS_DHCP_GET_MIN_LEN 38 |
| 175 | #define WMA_DHCP_SUBTYPE_GET_MIN_LEN 0x11D |
| 176 | #define WMA_DHCP_INFO_GET_MIN_LEN 50 |
| 177 | #define WMA_IS_ARP_GET_MIN_LEN 14 |
| 178 | #define WMA_ARP_SUBTYPE_GET_MIN_LEN 22 |
| 179 | #define WMA_IPV4_PROTO_GET_MIN_LEN 24 |
| 180 | #define WMA_IPV4_PKT_INFO_GET_MIN_LEN 42 |
| 181 | #define WMA_ICMP_SUBTYPE_GET_MIN_LEN 35 |
| 182 | #define WMA_IPV6_PROTO_GET_MIN_LEN 21 |
| 183 | #define WMA_IPV6_PKT_INFO_GET_MIN_LEN 62 |
| 184 | #define WMA_ICMPV6_SUBTYPE_GET_MIN_LEN 55 |
Himanshu Agarwal | dd356df | 2016-07-20 19:04:39 +0530 | [diff] [blame] | 185 | /** |
| 186 | * ds_mode: distribution system mode |
| 187 | * @IEEE80211_NO_DS: NO DS at either side |
| 188 | * @IEEE80211_TO_DS: DS at receiver side |
| 189 | * @IEEE80211_FROM_DS: DS at sender side |
| 190 | * @IEEE80211_DS_TO_DS: DS at both sender and revceiver side |
| 191 | */ |
| 192 | enum ds_mode { |
| 193 | IEEE80211_NO_DS, |
| 194 | IEEE80211_TO_DS, |
| 195 | IEEE80211_FROM_DS, |
| 196 | IEEE80211_DS_TO_DS |
| 197 | }; |
| 198 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 199 | /* Roaming default values |
| 200 | * All time and period values are in milliseconds. |
| 201 | * All rssi values are in dB except for WMA_NOISE_FLOOR_DBM_DEFAULT. |
| 202 | */ |
| 203 | |
| 204 | #define WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME (4) |
| 205 | #define WMA_NOISE_FLOOR_DBM_DEFAULT (-96) |
| 206 | #define WMA_ROAM_RSSI_DIFF_DEFAULT (5) |
| 207 | #define WMA_ROAM_DWELL_TIME_ACTIVE_DEFAULT (100) |
| 208 | #define WMA_ROAM_DWELL_TIME_PASSIVE_DEFAULT (110) |
| 209 | #define WMA_ROAM_MIN_REST_TIME_DEFAULT (50) |
| 210 | #define WMA_ROAM_MAX_REST_TIME_DEFAULT (500) |
| 211 | #define WMA_ROAM_LOW_RSSI_TRIGGER_DEFAULT (20) |
| 212 | #define WMA_ROAM_LOW_RSSI_TRIGGER_VERYLOW (10) |
| 213 | #define WMA_ROAM_BEACON_WEIGHT_DEFAULT (14) |
| 214 | #define WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT (120000) |
| 215 | #define WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT (WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT * 5) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 216 | #define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT (10) |
| 217 | #define WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT (10) |
| 218 | #define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT_P2P (15) |
| 219 | #define WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT_P2P (45) |
| 220 | |
| 221 | #define WMA_INVALID_KEY_IDX 0xff |
| 222 | #define WMA_DFS_RADAR_FOUND 1 |
| 223 | |
| 224 | #define WMA_MAX_RF_CHAINS(x) ((1 << x) - 1) |
| 225 | #define WMA_MIN_RF_CHAINS (1) |
| 226 | |
| 227 | #ifdef FEATURE_WLAN_EXTSCAN |
| 228 | #define WMA_MAX_EXTSCAN_MSG_SIZE 1536 |
| 229 | #define WMA_EXTSCAN_REST_TIME 100 |
| 230 | #define WMA_EXTSCAN_MAX_SCAN_TIME 50000 |
| 231 | #define WMA_EXTSCAN_BURST_DURATION 150 |
| 232 | #endif |
| 233 | |
| 234 | #define WMA_BCN_BUF_MAX_SIZE 2500 |
| 235 | #define WMA_NOA_IE_SIZE(num_desc) (2 + (13 * (num_desc))) |
| 236 | #define WMA_MAX_NOA_DESCRIPTORS 4 |
| 237 | |
| 238 | #define WMA_TIM_SUPPORTED_PVB_LENGTH ((HAL_NUM_STA / 8) + 1) |
| 239 | |
| 240 | #define WMA_WOW_PTRN_MASK_VALID 0xFF |
| 241 | #define WMA_NUM_BITS_IN_BYTE 8 |
| 242 | |
| 243 | #define WMA_AP_WOW_DEFAULT_PTRN_MAX 4 |
Arun Khandavalli | d454d42 | 2016-08-17 12:47:05 +0530 | [diff] [blame] | 244 | #define WMA_STA_WOW_DEFAULT_PTRN_MAX 5 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 245 | |
| 246 | #define WMA_BSS_STATUS_STARTED 0x1 |
| 247 | #define WMA_BSS_STATUS_STOPPED 0x2 |
| 248 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 249 | #define WMA_TARGET_REQ_TYPE_VDEV_START 0x1 |
| 250 | #define WMA_TARGET_REQ_TYPE_VDEV_STOP 0x2 |
| 251 | #define WMA_TARGET_REQ_TYPE_VDEV_DEL 0x3 |
| 252 | |
| 253 | #define WMA_PEER_ASSOC_CNF_START 0x01 |
Sandeep Puligilla | afa5289 | 2016-10-26 19:03:16 -0700 | [diff] [blame] | 254 | #define WMA_PEER_ASSOC_TIMEOUT (6000) /* 6 seconds */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 255 | |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 256 | #define WMA_DELETE_STA_RSP_START 0x02 |
| 257 | #define WMA_DELETE_STA_TIMEOUT (6000) /* 6 seconds */ |
| 258 | |
| 259 | #define WMA_DEL_P2P_SELF_STA_RSP_START 0x03 |
| 260 | |
Sandeep Puligilla | afa5289 | 2016-10-26 19:03:16 -0700 | [diff] [blame] | 261 | #define WMA_VDEV_START_REQUEST_TIMEOUT (6000) /* 6 seconds */ |
| 262 | #define WMA_VDEV_STOP_REQUEST_TIMEOUT (6000) /* 6 seconds */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 263 | |
Varun Reddy Yeturu | 83ccb9b | 2016-06-29 11:55:41 -0700 | [diff] [blame] | 264 | #define WMA_TGT_INVALID_SNR 0x127 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 265 | |
| 266 | #define WMA_TX_Q_RECHECK_TIMER_WAIT 2 /* 2 ms */ |
| 267 | #define WMA_TX_Q_RECHECK_TIMER_MAX_WAIT 20 /* 20 ms */ |
| 268 | #define WMA_MAX_NUM_ARGS 8 |
| 269 | |
| 270 | #define WMA_SMPS_MASK_LOWER_16BITS 0xFF |
| 271 | #define WMA_SMPS_MASK_UPPER_3BITS 0x7 |
| 272 | #define WMA_SMPS_PARAM_VALUE_S 29 |
| 273 | |
| 274 | #define WMA_MAX_SCAN_ID 0x00FF |
| 275 | |
| 276 | /* |
| 277 | * Setting the Tx Comp Timeout to 1 secs. |
| 278 | * TODO: Need to Revist the Timing |
| 279 | */ |
| 280 | #define WMA_TX_FRAME_COMPLETE_TIMEOUT 1000 |
| 281 | #define WMA_TX_FRAME_BUFFER_NO_FREE 0 |
| 282 | #define WMA_TX_FRAME_BUFFER_FREE 1 |
| 283 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 284 | /* Default InActivity Time is 200 ms */ |
| 285 | #define POWERSAVE_DEFAULT_INACTIVITY_TIME 200 |
| 286 | |
| 287 | /* Default Listen Interval */ |
| 288 | #define POWERSAVE_DEFAULT_LISTEN_INTERVAL 1 |
| 289 | |
| 290 | /* |
| 291 | * TODO: Add WMI_CMD_ID_MAX as part of WMI_CMD_ID |
| 292 | * instead of assigning it to the last valid wmi |
| 293 | * cmd+1 to avoid updating this when a command is |
| 294 | * added/deleted. |
| 295 | */ |
| 296 | #define WMI_CMDID_MAX (WMI_TXBF_CMDID + 1) |
| 297 | |
| 298 | #define WMA_NLO_FREQ_THRESH 1000 /* in MHz */ |
| 299 | #define WMA_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */ |
| 300 | #define WMA_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */ |
| 301 | |
| 302 | /* Default rssi threshold defined in CFG80211 */ |
| 303 | #define WMA_RSSI_THOLD_DEFAULT -300 |
| 304 | |
| 305 | #ifdef FEATURE_WLAN_SCAN_PNO |
| 306 | #define WMA_PNO_MATCH_WAKE_LOCK_TIMEOUT (5 * 1000) /* in msec */ |
| 307 | #define WMA_PNO_SCAN_COMPLETE_WAKE_LOCK_TIMEOUT (2 * 1000) /* in msec */ |
| 308 | #endif |
| 309 | #define WMA_AUTH_REQ_RECV_WAKE_LOCK_TIMEOUT (5 * 1000) /* in msec */ |
| 310 | #define WMA_ASSOC_REQ_RECV_WAKE_LOCK_DURATION (5 * 1000) /* in msec */ |
| 311 | #define WMA_DEAUTH_RECV_WAKE_LOCK_DURATION (5 * 1000) /* in msec */ |
| 312 | #define WMA_DISASSOC_RECV_WAKE_LOCK_DURATION (5 * 1000) /* in msec */ |
| 313 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
| 314 | #define WMA_AUTO_SHUTDOWN_WAKE_LOCK_DURATION (5 * 1000) /* in msec */ |
| 315 | #endif |
| 316 | #define WMA_BMISS_EVENT_WAKE_LOCK_DURATION (4 * 1000) /* in msec */ |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 317 | #define WMA_FW_RSP_EVENT_WAKE_LOCK_DURATION (3 * 1000) /* in msec */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 318 | |
| 319 | #define WMA_TXMIC_LEN 8 |
| 320 | #define WMA_RXMIC_LEN 8 |
| 321 | |
| 322 | /* |
| 323 | * Length = (2 octets for Index and CTWin/Opp PS) and |
| 324 | * (13 octets for each NOA Descriptors) |
| 325 | */ |
| 326 | |
| 327 | #define WMA_P2P_NOA_IE_OPP_PS_SET (0x80) |
| 328 | #define WMA_P2P_NOA_IE_CTWIN_MASK (0x7F) |
| 329 | |
| 330 | #define WMA_P2P_IE_ID 0xdd |
| 331 | #define WMA_P2P_WFA_OUI { 0x50, 0x6f, 0x9a } |
| 332 | #define WMA_P2P_WFA_VER 0x09 /* ver 1.0 */ |
| 333 | #define WMA_WSC_OUI { 0x00, 0x50, 0xF2 } /* Microsoft WSC OUI byte */ |
| 334 | |
| 335 | /* P2P Sub element defintions (according to table 5 of Wifi's P2P spec) */ |
| 336 | #define WMA_P2P_SUB_ELEMENT_STATUS 0 |
| 337 | #define WMA_P2P_SUB_ELEMENT_MINOR_REASON 1 |
| 338 | #define WMA_P2P_SUB_ELEMENT_CAPABILITY 2 |
| 339 | #define WMA_P2P_SUB_ELEMENT_DEVICE_ID 3 |
| 340 | #define WMA_P2P_SUB_ELEMENT_GO_INTENT 4 |
| 341 | #define WMA_P2P_SUB_ELEMENT_CONFIGURATION_TIMEOUT 5 |
| 342 | #define WMA_P2P_SUB_ELEMENT_LISTEN_CHANNEL 6 |
| 343 | #define WMA_P2P_SUB_ELEMENT_GROUP_BSSID 7 |
| 344 | #define WMA_P2P_SUB_ELEMENT_EXTENDED_LISTEN_TIMING 8 |
| 345 | #define WMA_P2P_SUB_ELEMENT_INTENDED_INTERFACE_ADDR 9 |
| 346 | #define WMA_P2P_SUB_ELEMENT_MANAGEABILITY 10 |
| 347 | #define WMA_P2P_SUB_ELEMENT_CHANNEL_LIST 11 |
| 348 | #define WMA_P2P_SUB_ELEMENT_NOA 12 |
| 349 | #define WMA_P2P_SUB_ELEMENT_DEVICE_INFO 13 |
| 350 | #define WMA_P2P_SUB_ELEMENT_GROUP_INFO 14 |
| 351 | #define WMA_P2P_SUB_ELEMENT_GROUP_ID 15 |
| 352 | #define WMA_P2P_SUB_ELEMENT_INTERFACE 16 |
| 353 | #define WMA_P2P_SUB_ELEMENT_OP_CHANNEL 17 |
| 354 | #define WMA_P2P_SUB_ELEMENT_INVITATION_FLAGS 18 |
| 355 | #define WMA_P2P_SUB_ELEMENT_VENDOR 221 |
| 356 | |
| 357 | /* Macros for handling unaligned memory accesses */ |
| 358 | #define P2PIE_PUT_LE16(a, val) \ |
| 359 | do { \ |
| 360 | (a)[1] = ((u16) (val)) >> 8; \ |
| 361 | (a)[0] = ((u16) (val)) & 0xff; \ |
| 362 | } while (0) |
| 363 | |
| 364 | #define P2PIE_PUT_LE32(a, val) \ |
| 365 | do { \ |
| 366 | (a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff); \ |
| 367 | (a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff); \ |
| 368 | (a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \ |
| 369 | (a)[0] = (u8) (((u32) (val)) & 0xff); \ |
| 370 | } while (0) |
| 371 | |
| 372 | |
| 373 | #define WMA_DEFAULT_MAX_PSPOLL_BEFORE_WAKE 1 |
| 374 | |
| 375 | #define WMA_DEFAULT_QPOWER_MAX_PSPOLL_BEFORE_WAKE 1 |
| 376 | #define WMA_DEFAULT_QPOWER_TX_WAKE_THRESHOLD 2 |
| 377 | #define WMA_DEFAULT_SIFS_BURST_DURATION 8160 |
| 378 | |
| 379 | #define WMA_VHT_PPS_PAID_MATCH 1 |
| 380 | #define WMA_VHT_PPS_GID_MATCH 2 |
| 381 | #define WMA_VHT_PPS_DELIM_CRC_FAIL 3 |
| 382 | |
| 383 | #define WMA_DFS_MAX_20M_SUB_CH 8 |
Vishwajith Upendra | bf673e7 | 2016-01-19 16:05:40 -0800 | [diff] [blame] | 384 | #define WMA_80MHZ_START_CENTER_CH_DIFF 6 |
| 385 | #define WMA_160MHZ_START_CENTER_CH_DIFF 14 |
| 386 | #define WMA_NEXT_20MHZ_START_CH_DIFF 4 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 387 | |
| 388 | #define WMA_DEFAULT_HW_MODE_INDEX 0xFFFF |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 389 | #define TWO_THIRD (2/3) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 390 | |
| 391 | /** |
Nitesh Shah | 5b7bae0 | 2016-09-28 18:58:33 +0530 | [diff] [blame] | 392 | * WMA hardware mode list bit-mask definitions. |
| 393 | * Bits 4:0, 31:29 are unused. |
| 394 | * |
| 395 | * The below definitions are added corresponding to WMI DBS HW mode |
| 396 | * list to make it independent of firmware changes for WMI definitions. |
| 397 | * Currently these definitions have dependency with BIT positions of |
| 398 | * the existing WMI macros. Thus, if the BIT positions are changed for |
| 399 | * WMI macros, then these macros' BIT definitions are also need to be |
| 400 | * changed. |
| 401 | */ |
| 402 | #define WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS (28) |
| 403 | #define WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS (24) |
| 404 | #define WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS (20) |
| 405 | #define WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS (16) |
| 406 | #define WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS (12) |
| 407 | #define WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS (8) |
| 408 | #define WMA_HW_MODE_DBS_MODE_BITPOS (7) |
| 409 | #define WMA_HW_MODE_AGILE_DFS_MODE_BITPOS (6) |
| 410 | #define WMA_HW_MODE_SBS_MODE_BITPOS (5) |
| 411 | |
| 412 | #define WMA_HW_MODE_MAC0_TX_STREAMS_MASK \ |
| 413 | (0xf << WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 414 | #define WMA_HW_MODE_MAC0_RX_STREAMS_MASK \ |
| 415 | (0xf << WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 416 | #define WMA_HW_MODE_MAC1_TX_STREAMS_MASK \ |
| 417 | (0xf << WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 418 | #define WMA_HW_MODE_MAC1_RX_STREAMS_MASK \ |
| 419 | (0xf << WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 420 | #define WMA_HW_MODE_MAC0_BANDWIDTH_MASK \ |
| 421 | (0xf << WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 422 | #define WMA_HW_MODE_MAC1_BANDWIDTH_MASK \ |
| 423 | (0xf << WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 424 | #define WMA_HW_MODE_DBS_MODE_MASK \ |
| 425 | (0x1 << WMA_HW_MODE_DBS_MODE_BITPOS) |
| 426 | #define WMA_HW_MODE_AGILE_DFS_MODE_MASK \ |
| 427 | (0x1 << WMA_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 428 | #define WMA_HW_MODE_SBS_MODE_MASK \ |
| 429 | (0x1 << WMA_HW_MODE_SBS_MODE_BITPOS) |
| 430 | |
| 431 | #define WMA_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \ |
| 432 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value) |
| 433 | #define WMA_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \ |
| 434 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value) |
| 435 | #define WMA_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \ |
| 436 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value) |
| 437 | #define WMA_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \ |
| 438 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value) |
| 439 | #define WMA_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \ |
| 440 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value) |
| 441 | #define WMA_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \ |
| 442 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value) |
| 443 | #define WMA_HW_MODE_DBS_MODE_SET(hw_mode, value) \ |
| 444 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_DBS_MODE_BITPOS, 1, value) |
| 445 | #define WMA_HW_MODE_AGILE_DFS_SET(hw_mode, value) \ |
| 446 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value) |
| 447 | #define WMA_HW_MODE_SBS_MODE_SET(hw_mode, value) \ |
| 448 | WMI_SET_BITS(hw_mode, WMA_HW_MODE_SBS_MODE_BITPOS, 1, value) |
| 449 | |
| 450 | #define WMA_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \ |
| 451 | ((hw_mode & WMA_HW_MODE_MAC0_TX_STREAMS_MASK) >> \ |
| 452 | WMA_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 453 | #define WMA_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \ |
| 454 | ((hw_mode & WMA_HW_MODE_MAC0_RX_STREAMS_MASK) >> \ |
| 455 | WMA_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 456 | #define WMA_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \ |
| 457 | ((hw_mode & WMA_HW_MODE_MAC1_TX_STREAMS_MASK) >> \ |
| 458 | WMA_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 459 | #define WMA_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \ |
| 460 | ((hw_mode & WMA_HW_MODE_MAC1_RX_STREAMS_MASK) >> \ |
| 461 | WMA_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 462 | #define WMA_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \ |
| 463 | ((hw_mode & WMA_HW_MODE_MAC0_BANDWIDTH_MASK) >> \ |
| 464 | WMA_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 465 | #define WMA_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \ |
| 466 | ((hw_mode & WMA_HW_MODE_MAC1_BANDWIDTH_MASK) >> \ |
| 467 | WMA_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 468 | #define WMA_HW_MODE_DBS_MODE_GET(hw_mode) \ |
| 469 | ((hw_mode & WMA_HW_MODE_DBS_MODE_MASK) >> \ |
| 470 | WMA_HW_MODE_DBS_MODE_BITPOS) |
| 471 | #define WMA_HW_MODE_AGILE_DFS_GET(hw_mode) \ |
| 472 | ((hw_mode & WMA_HW_MODE_AGILE_DFS_MODE_MASK) >> \ |
| 473 | WMA_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 474 | #define WMA_HW_MODE_SBS_MODE_GET(hw_mode) \ |
| 475 | ((hw_mode & WMA_HW_MODE_SBS_MODE_MASK) >> \ |
| 476 | WMA_HW_MODE_SBS_MODE_BITPOS) |
| 477 | |
| 478 | |
Nitesh Shah | 0f3fce5 | 2016-10-13 22:01:41 +0530 | [diff] [blame] | 479 | #define WMA_SCAN_END_EVENT (WMI_SCAN_EVENT_COMPLETED | \ |
| 480 | WMI_SCAN_EVENT_DEQUEUED | \ |
| 481 | WMI_SCAN_EVENT_START_FAILED) |
| 482 | |
Nitesh Shah | 5b7bae0 | 2016-09-28 18:58:33 +0530 | [diff] [blame] | 483 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 484 | * struct probeTime_dwellTime - probe time, dwell time map |
| 485 | * @dwell_time: dwell time |
| 486 | * @probe_time: repeat probe time |
| 487 | */ |
| 488 | typedef struct probeTime_dwellTime { |
| 489 | uint8_t dwell_time; |
| 490 | uint8_t probe_time; |
| 491 | } t_probeTime_dwellTime; |
| 492 | |
| 493 | static const t_probeTime_dwellTime |
| 494 | probe_time_dwell_time_map[WMA_DWELL_TIME_PROBE_TIME_MAP_SIZE] = { |
Liangwei Dong | 271f92f | 2016-09-28 06:05:08 -0400 | [diff] [blame] | 495 | {28, 11}, /* 0 SSID */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 496 | {28, 20}, /* 1 SSID */ |
| 497 | {28, 20}, /* 2 SSID */ |
| 498 | {28, 20}, /* 3 SSID */ |
| 499 | {28, 20}, /* 4 SSID */ |
| 500 | {28, 20}, /* 5 SSID */ |
| 501 | {28, 20}, /* 6 SSID */ |
| 502 | {28, 11}, /* 7 SSID */ |
| 503 | {28, 11}, /* 8 SSID */ |
| 504 | {28, 11}, /* 9 SSID */ |
| 505 | {28, 8} /* 10 SSID */ |
| 506 | }; |
| 507 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 508 | typedef void (*txFailIndCallback)(uint8_t *peer_mac, uint8_t seqNo); |
Padma, Santhosh Kumar | d7cc079 | 2016-06-28 18:54:12 +0530 | [diff] [blame] | 509 | typedef void (*encrypt_decrypt_cb)(struct sir_encrypt_decrypt_rsp_params |
| 510 | *encrypt_decrypt_rsp_params); |
| 511 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 512 | |
Himanshu Agarwal | f65bd4c | 2016-12-05 17:21:12 +0530 | [diff] [blame] | 513 | typedef void (*tp_wma_packetdump_cb)(qdf_nbuf_t netbuf, |
| 514 | uint8_t status, uint8_t vdev_id, uint8_t type); |
| 515 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 516 | /** |
| 517 | * enum t_wma_drv_type - wma driver type |
| 518 | * @WMA_DRIVER_TYPE_PRODUCTION: production driver type |
| 519 | * @WMA_DRIVER_TYPE_MFG: manufacture driver type |
| 520 | * @WMA_DRIVER_TYPE_INVALID: invalid driver type |
| 521 | */ |
| 522 | typedef enum { |
| 523 | WMA_DRIVER_TYPE_PRODUCTION = 0, |
| 524 | WMA_DRIVER_TYPE_MFG = 1, |
| 525 | WMA_DRIVER_TYPE_INVALID = 0x7FFFFFFF |
| 526 | } t_wma_drv_type; |
| 527 | |
| 528 | #ifdef FEATURE_WLAN_TDLS |
| 529 | /** |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 530 | * enum t_wma_tdls_mode - TDLS mode |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 531 | * @WMA_TDLS_SUPPORT_NOT_ENABLED: tdls is disable |
| 532 | * @WMA_TDLS_SUPPORT_DISABLED: suppress implicit trigger and not respond to peer |
| 533 | * @WMA_TDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY: suppress implicit trigger, |
| 534 | * but respond to the peer |
| 535 | * @WMA_TDLS_SUPPORT_ENABLED: implicit trigger |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 536 | * @WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL: External control means |
| 537 | * implicit trigger but only to a peer mac configured by user space. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 538 | */ |
| 539 | typedef enum { |
| 540 | WMA_TDLS_SUPPORT_NOT_ENABLED = 0, |
| 541 | WMA_TDLS_SUPPORT_DISABLED, |
| 542 | WMA_TDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY, |
| 543 | WMA_TDLS_SUPPORT_ENABLED, |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 544 | WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 545 | } t_wma_tdls_mode; |
| 546 | |
| 547 | /** |
| 548 | * enum wma_tdls_peer_notification - TDLS events |
| 549 | * @WMA_TDLS_SHOULD_DISCOVER: tdls discovery recommended for peer (always based |
| 550 | * on tx bytes per second > tx_discover threshold |
| 551 | * NB: notification will be re-sent after |
| 552 | * discovery_request_interval_ms |
| 553 | * @WMA_TDLS_SHOULD_TEARDOWN: tdls link tear down recommended for peer |
| 554 | * due to tx bytes per second below |
| 555 | * tx_teardown_threshold |
| 556 | * NB: this notification sent once |
| 557 | * @WMA_TDLS_PEER_DISCONNECTED: tx peer TDLS link tear down complete |
| 558 | */ |
| 559 | enum wma_tdls_peer_notification { |
| 560 | WMA_TDLS_SHOULD_DISCOVER, |
| 561 | WMA_TDLS_SHOULD_TEARDOWN, |
| 562 | WMA_TDLS_PEER_DISCONNECTED, |
| 563 | }; |
| 564 | |
| 565 | /** |
| 566 | * enum wma_tdls_peer_reason - TDLS peer reason |
| 567 | * @WMA_TDLS_TEARDOWN_REASON_TX: tdls teardown recommended due to low transmits |
| 568 | * @WMA_TDLS_TEARDOWN_REASON_RATE: tdls tear down recommended due to |
| 569 | * packet rates < AP rates |
| 570 | * @WMA_TDLS_TEARDOWN_REASON_RSSI: tdls link tear down recommended |
| 571 | * due to poor RSSI |
| 572 | * @WMA_TDLS_TEARDOWN_REASON_SCAN: tdls link tear down recommended |
| 573 | * due to offchannel scan |
| 574 | * @WMA_TDLS_DISCONNECTED_REASON_PEER_DELETE: tdls peer disconnected |
| 575 | * due to peer deletion |
| 576 | */ |
| 577 | enum wma_tdls_peer_reason { |
| 578 | WMA_TDLS_TEARDOWN_REASON_TX, |
| 579 | WMA_TDLS_TEARDOWN_REASON_RATE, |
| 580 | WMA_TDLS_TEARDOWN_REASON_RSSI, |
| 581 | WMA_TDLS_TEARDOWN_REASON_SCAN, |
| 582 | WMA_TDLS_DISCONNECTED_REASON_PEER_DELETE, |
| 583 | }; |
| 584 | #endif /* FEATURE_WLAN_TDLS */ |
| 585 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 586 | /** |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 587 | * enum wma_rx_exec_ctx - wma rx execution context |
| 588 | * @WMA_RX_WORK_CTX: work queue context execution |
| 589 | * @WMA_RX_TASKLET_CTX: tasklet context execution |
| 590 | * @WMA_RX_SERIALIZER_CTX: MC thread context execution |
| 591 | * |
| 592 | */ |
| 593 | enum wma_rx_exec_ctx { |
| 594 | WMA_RX_WORK_CTX, |
| 595 | WMA_RX_TASKLET_CTX, |
| 596 | WMA_RX_SERIALIZER_CTX |
| 597 | }; |
Krunal Soni | 2e48d01 | 2016-05-02 16:55:26 -0700 | [diff] [blame] | 598 | |
| 599 | /** |
| 600 | * enum wma_phy_idx |
| 601 | * @PHY1: to notify caller that PHY1 specific param needed |
| 602 | * @PHY2: to notify caller that PHY2 specific param needed |
| 603 | * @PHY1_PHY2: to notify caller that both PHY's param needed |
| 604 | * Note: Firmware sends phy map in terms of bitmask, so enum |
| 605 | * also needs to be defined that way. |
| 606 | * |
| 607 | * For example, 0x3 = 0011 = BIT0 corresponds to one phy and |
| 608 | * BIT1 coresponds to another phy. There is no direct relation between |
| 609 | * each bit to particular PHY (ex. PHYA or PHYB). |
| 610 | * |
| 611 | * In simple terms, 3 means referring both PHYs & 1 or 2 means |
| 612 | * referring to either PHYA or PHYB. |
| 613 | */ |
| 614 | enum wma_phy_idx { |
| 615 | PHY1 = 0x1, /* 0x1 */ |
| 616 | PHY2, /* 0x2 */ |
| 617 | PHY1_PHY2, /* 0x3 */ |
| 618 | }; |
| 619 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 620 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 621 | * struct wma_mem_chunk - memory chunks |
| 622 | * @vaddr: virtual address |
| 623 | * @paddr: physical address |
| 624 | * @memctx: dma mapped memory |
| 625 | * @len: length of data |
| 626 | * @req_id: request id |
| 627 | * |
| 628 | * memory chunck allocated by Host to be managed by FW |
| 629 | * used only for low latency interfaces like pcie |
| 630 | */ |
| 631 | struct wma_mem_chunk { |
| 632 | uint32_t *vaddr; |
| 633 | uint32_t paddr; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 634 | qdf_dma_mem_context(memctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 635 | uint32_t len; |
| 636 | uint32_t req_id; |
| 637 | }; |
| 638 | |
| 639 | /** |
| 640 | * struct p2p_scan_param - p2p scan listen parameters |
| 641 | * @scan_id: scan id |
| 642 | * @p2p_scan_type: p2p scan type |
| 643 | */ |
| 644 | struct p2p_scan_param { |
| 645 | uint32_t scan_id; |
| 646 | tSirP2pScanType p2p_scan_type; |
| 647 | }; |
| 648 | |
| 649 | /** |
| 650 | * struct scan_param - scan parameters |
| 651 | * @scan_id: scan id |
| 652 | * @scan_requestor_id: scan requestor id |
| 653 | * @p2p_scan_type: p2p scan type |
| 654 | */ |
| 655 | struct scan_param { |
| 656 | uint32_t scan_id; |
| 657 | uint32_t scan_requestor_id; |
| 658 | tSirP2pScanType p2p_scan_type; |
Deepak Dhamdhere | d97bfb3 | 2015-10-11 15:16:18 -0700 | [diff] [blame] | 659 | uint32_t chan_freq; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 660 | }; |
| 661 | |
| 662 | /** |
| 663 | * struct beacon_info - structure to store beacon template |
| 664 | * @buf: skb ptr |
| 665 | * @len: length |
| 666 | * @dma_mapped: is it dma mapped or not |
| 667 | * @tim_ie_offset: TIM IE offset |
| 668 | * @dtim_count: DTIM count |
| 669 | * @seq_no: sequence no |
| 670 | * @noa_sub_ie: NOA sub IE |
| 671 | * @noa_sub_ie_len: NOA sub IE length |
| 672 | * @noa_ie: NOA IE |
| 673 | * @p2p_ie_offset: p2p IE offset |
| 674 | * @lock: lock |
| 675 | */ |
| 676 | struct beacon_info { |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 677 | qdf_nbuf_t buf; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 678 | uint32_t len; |
| 679 | uint8_t dma_mapped; |
| 680 | uint32_t tim_ie_offset; |
| 681 | uint8_t dtim_count; |
| 682 | uint16_t seq_no; |
| 683 | uint8_t noa_sub_ie[2 + WMA_NOA_IE_SIZE(WMA_MAX_NOA_DESCRIPTORS)]; |
| 684 | uint16_t noa_sub_ie_len; |
| 685 | uint8_t *noa_ie; |
| 686 | uint16_t p2p_ie_offset; |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 687 | qdf_spinlock_t lock; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 688 | }; |
| 689 | |
| 690 | /** |
| 691 | * struct beacon_tim_ie - structure to store TIM IE of beacon |
| 692 | * @tim_ie: tim ie |
| 693 | * @tim_len: tim ie length |
| 694 | * @dtim_count: dtim count |
| 695 | * @dtim_period: dtim period |
| 696 | * @tim_bitctl: tim bit control |
| 697 | * @tim_bitmap: tim bitmap |
| 698 | */ |
| 699 | struct beacon_tim_ie { |
| 700 | uint8_t tim_ie; |
| 701 | uint8_t tim_len; |
| 702 | uint8_t dtim_count; |
| 703 | uint8_t dtim_period; |
| 704 | uint8_t tim_bitctl; |
| 705 | uint8_t tim_bitmap[1]; |
| 706 | } __ATTRIB_PACK; |
| 707 | |
| 708 | /** |
| 709 | * struct pps - packet power save parameter |
| 710 | * @paid_match_enable: paid match enable |
| 711 | * @gid_match_enable: gid match enable |
| 712 | * @tim_clear: time clear |
| 713 | * @dtim_clear: dtim clear |
| 714 | * @eof_delim: eof delim |
| 715 | * @mac_match: mac match |
| 716 | * @delim_fail: delim fail |
| 717 | * @nsts_zero: nsts zero |
| 718 | * @rssi_chk: RSSI check |
| 719 | * @ebt_5g: ebt 5GHz |
| 720 | */ |
| 721 | struct pps { |
| 722 | bool paid_match_enable; |
| 723 | bool gid_match_enable; |
| 724 | bool tim_clear; |
| 725 | bool dtim_clear; |
| 726 | bool eof_delim; |
| 727 | bool mac_match; |
| 728 | bool delim_fail; |
| 729 | bool nsts_zero; |
| 730 | bool rssi_chk; |
| 731 | bool ebt_5g; |
| 732 | }; |
| 733 | |
| 734 | /** |
| 735 | * struct qpower_params - qpower related parameters |
| 736 | * @max_ps_poll_cnt: max ps poll count |
| 737 | * @max_tx_before_wake: max tx before wake |
| 738 | * @spec_ps_poll_wake_interval: ps poll wake interval |
| 739 | * @max_spec_nodata_ps_poll: no data ps poll |
| 740 | */ |
| 741 | struct qpower_params { |
| 742 | uint32_t max_ps_poll_cnt; |
| 743 | uint32_t max_tx_before_wake; |
| 744 | uint32_t spec_ps_poll_wake_interval; |
| 745 | uint32_t max_spec_nodata_ps_poll; |
| 746 | }; |
| 747 | |
| 748 | |
| 749 | /** |
| 750 | * struct gtx_config_t - GTX config |
| 751 | * @gtxRTMask: for HT and VHT rate masks |
| 752 | * @gtxUsrcfg: host request for GTX mask |
| 753 | * @gtxPERThreshold: PER Threshold (default: 10%) |
| 754 | * @gtxPERMargin: PER margin (default: 2%) |
| 755 | * @gtxTPCstep: TCP step (default: 1) |
| 756 | * @gtxTPCMin: TCP min (default: 5) |
| 757 | * @gtxBWMask: BW mask (20/40/80/160 Mhz) |
| 758 | */ |
| 759 | typedef struct { |
| 760 | uint32_t gtxRTMask[2]; |
| 761 | uint32_t gtxUsrcfg; |
| 762 | uint32_t gtxPERThreshold; |
| 763 | uint32_t gtxPERMargin; |
| 764 | uint32_t gtxTPCstep; |
| 765 | uint32_t gtxTPCMin; |
| 766 | uint32_t gtxBWMask; |
| 767 | } gtx_config_t; |
| 768 | |
| 769 | /** |
| 770 | * struct pdev_cli_config_t - store pdev parameters |
| 771 | * @ani_enable: ANI is enabled/disable on target |
| 772 | * @ani_poll_len: store ANI polling period |
| 773 | * @ani_listen_len: store ANI listening period |
| 774 | * @ani_ofdm_level: store ANI OFDM immunity level |
| 775 | * @ani_cck_level: store ANI CCK immunity level |
| 776 | * @cwmenable: Dynamic bw is enable/disable in fw |
| 777 | * @txchainmask: tx chain mask |
| 778 | * @rxchainmask: rx chain mask |
| 779 | * @txpow2g: tx power limit for 2GHz |
| 780 | * @txpow5g: tx power limit for 5GHz |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 781 | * @burst_enable: is burst enable/disable |
| 782 | * @burst_dur: burst duration |
| 783 | * |
| 784 | * This structure stores pdev parameters. |
| 785 | * Some of these parameters are set in fw and some |
| 786 | * parameters are only maintained in host. |
| 787 | */ |
| 788 | typedef struct { |
| 789 | uint32_t ani_enable; |
| 790 | uint32_t ani_poll_len; |
| 791 | uint32_t ani_listen_len; |
| 792 | uint32_t ani_ofdm_level; |
| 793 | uint32_t ani_cck_level; |
| 794 | uint32_t cwmenable; |
| 795 | uint32_t cts_cbw; |
| 796 | uint32_t txchainmask; |
| 797 | uint32_t rxchainmask; |
| 798 | uint32_t txpow2g; |
| 799 | uint32_t txpow5g; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 800 | uint32_t burst_enable; |
| 801 | uint32_t burst_dur; |
| 802 | } pdev_cli_config_t; |
| 803 | |
| 804 | /** |
| 805 | * struct vdev_cli_config_t - store vdev parameters |
| 806 | * @nss: nss width |
| 807 | * @ldpc: is ldpc is enable/disable |
| 808 | * @tx_stbc: TX STBC is enable/disable |
| 809 | * @rx_stbc: RX STBC is enable/disable |
| 810 | * @shortgi: short gi is enable/disable |
| 811 | * @rtscts_en: RTS/CTS is enable/disable |
| 812 | * @chwidth: channel width |
| 813 | * @tx_rate: tx rate |
| 814 | * @ampdu: ampdu size |
| 815 | * @amsdu: amsdu size |
| 816 | * @erx_adjust: enable/disable early rx enable |
| 817 | * @erx_bmiss_num: target bmiss number per sample |
| 818 | * @erx_bmiss_cycle: sample cycle |
| 819 | * @erx_slop_step: slop_step value |
| 820 | * @erx_init_slop: init slop |
| 821 | * @erx_adj_pause: pause adjust enable/disable |
| 822 | * @erx_dri_sample: enable/disable drift sample |
| 823 | * @pps_params: packet power save parameters |
| 824 | * @qpower_params: qpower parameters |
| 825 | * @gtx_info: GTX offload info |
| 826 | * |
| 827 | * This structure stores vdev parameters. |
| 828 | * Some of these parameters are set in fw and some |
| 829 | * parameters are only maintained in host. |
| 830 | */ |
| 831 | typedef struct { |
| 832 | uint32_t nss; |
| 833 | uint32_t ldpc; |
| 834 | uint32_t tx_stbc; |
| 835 | uint32_t rx_stbc; |
| 836 | uint32_t shortgi; |
| 837 | uint32_t rtscts_en; |
| 838 | uint32_t chwidth; |
| 839 | uint32_t tx_rate; |
| 840 | uint32_t ampdu; |
| 841 | uint32_t amsdu; |
| 842 | uint32_t erx_adjust; |
| 843 | uint32_t erx_bmiss_num; |
| 844 | uint32_t erx_bmiss_cycle; |
| 845 | uint32_t erx_slop_step; |
| 846 | uint32_t erx_init_slop; |
| 847 | uint32_t erx_adj_pause; |
| 848 | uint32_t erx_dri_sample; |
| 849 | struct pps pps_params; |
| 850 | struct qpower_params qpower_params; |
| 851 | gtx_config_t gtx_info; |
| 852 | } vdev_cli_config_t; |
| 853 | |
| 854 | /** |
Mukul Sharma | 5ff3c58 | 2016-09-12 15:23:35 +0530 | [diff] [blame] | 855 | * struct wma_version_info - Store wmi version info |
| 856 | * @major: wmi major version |
| 857 | * @minor: wmi minor version |
| 858 | * @revision: wmi revision number |
| 859 | */ |
| 860 | struct wma_version_info { |
| 861 | u_int32_t major; |
| 862 | u_int32_t minor; |
| 863 | u_int32_t revision; |
| 864 | }; |
| 865 | |
| 866 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 867 | * struct wma_wow - store wow patterns |
| 868 | * @magic_ptrn_enable: magic pattern enable/disable |
| 869 | * @wow_enable: wow enable/disable |
| 870 | * @wow_enable_cmd_sent: is wow enable command sent to fw |
| 871 | * @deauth_enable: is deauth wakeup enable/disable |
| 872 | * @disassoc_enable: is disassoc wakeup enable/disable |
| 873 | * @bmiss_enable: is bmiss wakeup enable/disable |
| 874 | * @gtk_pdev_enable: is GTK based wakeup enable/disable |
| 875 | * @gtk_err_enable: is GTK error wakeup enable/disable |
| 876 | * @lphb_cache: lphb cache |
| 877 | * |
| 878 | * This structure stores wow patterns and |
| 879 | * wow related parameters in host. |
| 880 | */ |
| 881 | struct wma_wow { |
| 882 | bool magic_ptrn_enable; |
| 883 | bool wow_enable; |
| 884 | bool wow_enable_cmd_sent; |
| 885 | bool deauth_enable; |
| 886 | bool disassoc_enable; |
| 887 | bool bmiss_enable; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 888 | bool gtk_err_enable[WMA_MAX_SUPPORTED_BSS]; |
| 889 | #ifdef FEATURE_WLAN_LPHB |
| 890 | /* currently supports only vdev 0. |
| 891 | * cache has two entries: one for TCP and one for UDP. |
| 892 | */ |
| 893 | tSirLPHBReq lphb_cache[2]; |
| 894 | #endif |
| 895 | }; |
| 896 | |
| 897 | #ifdef WLAN_FEATURE_11W |
| 898 | #define CMAC_IPN_LEN (6) |
| 899 | #define WMA_IGTK_KEY_INDEX_4 (4) |
| 900 | #define WMA_IGTK_KEY_INDEX_5 (5) |
| 901 | |
| 902 | /** |
| 903 | * struct wma_igtk_ipn_t - GTK IPN info |
| 904 | * @ipn: IPN info |
| 905 | */ |
| 906 | typedef struct { |
| 907 | uint8_t ipn[CMAC_IPN_LEN]; |
| 908 | } wma_igtk_ipn_t; |
| 909 | |
| 910 | /** |
| 911 | * struct wma_igtk_key_t - GTK key |
| 912 | * @key_length: key length |
| 913 | * @key: key |
| 914 | * @key_id: key id |
| 915 | */ |
| 916 | typedef struct { |
| 917 | uint16_t key_length; |
| 918 | uint8_t key[CSR_AES_KEY_LEN]; |
| 919 | |
| 920 | /* IPN is maintained per iGTK keyID |
| 921 | * 0th index for iGTK keyID = 4; |
| 922 | * 1st index for iGTK KeyID = 5 |
| 923 | */ |
| 924 | wma_igtk_ipn_t key_id[2]; |
| 925 | } wma_igtk_key_t; |
| 926 | #endif |
| 927 | |
| 928 | /** |
| 929 | * struct vdev_restart_params_t - vdev restart parameters |
| 930 | * @vdev_id: vdev id |
| 931 | * @ssid: ssid |
| 932 | * @flags: flags |
| 933 | * @requestor_id: requestor id |
| 934 | * @chan: channel |
| 935 | * @hidden_ssid_restart_in_progress: hidden ssid restart flag |
| 936 | * @ssidHidden: is ssid hidden or not |
| 937 | */ |
| 938 | typedef struct { |
| 939 | A_UINT32 vdev_id; |
| 940 | wmi_ssid ssid; |
| 941 | A_UINT32 flags; |
| 942 | A_UINT32 requestor_id; |
| 943 | A_UINT32 disable_hw_ack; |
| 944 | wmi_channel chan; |
Anurag Chouhan | 8e0ccd3 | 2016-02-19 15:30:20 +0530 | [diff] [blame] | 945 | qdf_atomic_t hidden_ssid_restart_in_progress; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 946 | uint8_t ssidHidden; |
| 947 | } vdev_restart_params_t; |
| 948 | |
| 949 | /** |
| 950 | * struct wma_txrx_node - txrx node |
| 951 | * @addr: mac address |
| 952 | * @bssid: bssid |
| 953 | * @handle: wma handle |
| 954 | * @beacon: beacon info |
| 955 | * @vdev_restart_params: vdev restart parameters |
| 956 | * @config: per vdev config parameters |
| 957 | * @scan_info: scan info |
| 958 | * @type: type |
| 959 | * @sub_type: sub type |
| 960 | * @nlo_match_evt_received: is nlo match event received or not |
| 961 | * @pno_in_progress: is pno in progress or not |
| 962 | * @plm_in_progress: is plm in progress or not |
| 963 | * @ptrn_match_enable: is pattern match is enable or not |
| 964 | * @num_wow_default_patterns: number of default wow patterns configured for vdev |
| 965 | * @num_wow_user_patterns: number of user wow patterns configured for vdev |
| 966 | * @conn_state: connection state |
| 967 | * @beaconInterval: beacon interval |
| 968 | * @llbCoexist: 11b coexist |
| 969 | * @shortSlotTimeSupported: is short slot time supported or not |
| 970 | * @dtimPeriod: DTIM period |
| 971 | * @chanmode: channel mode |
| 972 | * @vht_capable: VHT capablity flag |
| 973 | * @ht_capable: HT capablity flag |
| 974 | * @mhz: channel frequency in KHz |
Tushnim Bhattacharyya | 7624a18 | 2016-03-30 13:30:46 -0700 | [diff] [blame] | 975 | * @chan_width: channel bandwidth |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 976 | * @vdev_up: is vdev up or not |
| 977 | * @tsfadjust: TSF adjust |
| 978 | * @addBssStaContext: add bss context |
| 979 | * @aid: association id |
| 980 | * @rmfEnabled: Robust Management Frame (RMF) enabled/disabled |
| 981 | * @key: GTK key |
| 982 | * @uapsd_cached_val: uapsd cached value |
| 983 | * @stats_rsp: stats response |
| 984 | * @fw_stats_set: fw stats value |
| 985 | * @del_staself_req: delete sta self request |
| 986 | * @bss_status: bss status |
| 987 | * @rate_flags: rate flags |
| 988 | * @nss: nss value |
| 989 | * @is_channel_switch: is channel switch |
| 990 | * @pause_bitmap: pause bitmap |
| 991 | * @tx_power: tx power in dbm |
| 992 | * @max_tx_power: max tx power in dbm |
| 993 | * @nwType: network type (802.11a/b/g/n/ac) |
| 994 | * @staKeyParams: sta key parameters |
| 995 | * @ps_enabled: is powersave enable/disable |
| 996 | * @dtim_policy: DTIM policy |
| 997 | * @peer_count: peer count |
| 998 | * @roam_synch_in_progress: flag is in progress or not |
| 999 | * @plink_status_req: link status request |
| 1000 | * @psnr_req: snr request |
| 1001 | * @delay_before_vdev_stop: delay |
| 1002 | * @tx_streams: number of tx streams can be used by the vdev |
| 1003 | * @rx_streams: number of rx streams can be used by the vdev |
| 1004 | * @chain_mask: chain mask can be used by the vdev |
| 1005 | * @mac_id: the mac on which vdev is on |
Masti, Narayanraddi | ab712a7 | 2016-08-04 11:59:11 +0530 | [diff] [blame] | 1006 | * @wep_default_key_idx: wep default index for group key |
Mukul Sharma | 8d2d9ec | 2016-09-08 13:05:35 +0530 | [diff] [blame] | 1007 | * @arp_offload_req: cached arp offload request |
| 1008 | * @ns_offload_req: cached ns offload request |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1009 | * It stores parameters per vdev in wma. |
| 1010 | */ |
| 1011 | struct wma_txrx_node { |
| 1012 | uint8_t addr[IEEE80211_ADDR_LEN]; |
| 1013 | uint8_t bssid[IEEE80211_ADDR_LEN]; |
| 1014 | void *handle; |
| 1015 | struct beacon_info *beacon; |
| 1016 | vdev_restart_params_t vdev_restart_params; |
| 1017 | vdev_cli_config_t config; |
| 1018 | struct scan_param scan_info; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1019 | uint32_t type; |
| 1020 | uint32_t sub_type; |
| 1021 | #ifdef FEATURE_WLAN_SCAN_PNO |
| 1022 | bool nlo_match_evt_received; |
| 1023 | bool pno_in_progress; |
| 1024 | #endif |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 1025 | #ifdef FEATURE_WLAN_ESE |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1026 | bool plm_in_progress; |
| 1027 | #endif |
| 1028 | bool ptrn_match_enable; |
| 1029 | uint8_t num_wow_default_patterns; |
| 1030 | uint8_t num_wow_user_patterns; |
| 1031 | bool conn_state; |
| 1032 | tSirMacBeaconInterval beaconInterval; |
| 1033 | uint8_t llbCoexist; |
| 1034 | uint8_t shortSlotTimeSupported; |
| 1035 | uint8_t dtimPeriod; |
| 1036 | WLAN_PHY_MODE chanmode; |
| 1037 | uint8_t vht_capable; |
| 1038 | uint8_t ht_capable; |
| 1039 | A_UINT32 mhz; |
Tushnim Bhattacharyya | 7624a18 | 2016-03-30 13:30:46 -0700 | [diff] [blame] | 1040 | enum phy_ch_width chan_width; |
Selvaraj, Sridhar | 171e225 | 2016-06-22 22:33:26 +0530 | [diff] [blame] | 1041 | bool vdev_active; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1042 | bool vdev_up; |
| 1043 | uint64_t tsfadjust; |
| 1044 | void *addBssStaContext; |
| 1045 | uint8_t aid; |
| 1046 | uint8_t rmfEnabled; |
| 1047 | #ifdef WLAN_FEATURE_11W |
| 1048 | wma_igtk_key_t key; |
| 1049 | #endif /* WLAN_FEATURE_11W */ |
| 1050 | uint32_t uapsd_cached_val; |
| 1051 | tAniGetPEStatsRsp *stats_rsp; |
| 1052 | uint8_t fw_stats_set; |
| 1053 | void *del_staself_req; |
Anurag Chouhan | 8e0ccd3 | 2016-02-19 15:30:20 +0530 | [diff] [blame] | 1054 | qdf_atomic_t bss_status; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1055 | uint8_t rate_flags; |
| 1056 | uint8_t nss; |
| 1057 | bool is_channel_switch; |
| 1058 | uint16_t pause_bitmap; |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 1059 | int8_t tx_power; |
| 1060 | int8_t max_tx_power; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1061 | uint32_t nwType; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1062 | void *staKeyParams; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1063 | uint32_t dtim_policy; |
| 1064 | uint32_t peer_count; |
| 1065 | bool roam_synch_in_progress; |
| 1066 | void *plink_status_req; |
| 1067 | void *psnr_req; |
| 1068 | uint8_t delay_before_vdev_stop; |
| 1069 | #ifdef FEATURE_WLAN_EXTSCAN |
| 1070 | bool extscan_in_progress; |
| 1071 | #endif |
| 1072 | uint32_t alt_modulated_dtim; |
| 1073 | bool alt_modulated_dtim_enabled; |
| 1074 | uint32_t tx_streams; |
| 1075 | uint32_t rx_streams; |
| 1076 | uint32_t chain_mask; |
| 1077 | uint32_t mac_id; |
Varun Reddy Yeturu | 30bc42c | 2016-02-04 10:07:30 -0800 | [diff] [blame] | 1078 | bool roaming_in_progress; |
Varun Reddy Yeturu | 5ab4746 | 2016-05-08 18:08:11 -0700 | [diff] [blame] | 1079 | int32_t roam_synch_delay; |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 1080 | uint8_t nss_2g; |
| 1081 | uint8_t nss_5g; |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 1082 | bool p2p_lo_in_progress; |
Masti, Narayanraddi | ab712a7 | 2016-08-04 11:59:11 +0530 | [diff] [blame] | 1083 | uint8_t wep_default_key_idx; |
Mukul Sharma | 8d2d9ec | 2016-09-08 13:05:35 +0530 | [diff] [blame] | 1084 | tSirHostOffloadReq arp_offload_req; |
| 1085 | tSirHostOffloadReq ns_offload_req; |
Bhargav Shah | a89d3b4 | 2016-04-20 13:04:56 +0530 | [diff] [blame] | 1086 | bool is_vdev_valid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1087 | }; |
| 1088 | |
| 1089 | #if defined(QCA_WIFI_FTM) |
| 1090 | #define MAX_UTF_EVENT_LENGTH 2048 |
| 1091 | #define MAX_WMI_UTF_LEN 252 |
| 1092 | |
| 1093 | /** |
| 1094 | * struct SEG_HDR_INFO_STRUCT - header info |
| 1095 | * @len: length |
| 1096 | * @msgref: message refrence |
| 1097 | * @segmentInfo: segment info |
| 1098 | * @pad: padding |
| 1099 | */ |
| 1100 | typedef struct { |
| 1101 | A_UINT32 len; |
| 1102 | A_UINT32 msgref; |
| 1103 | A_UINT32 segmentInfo; |
| 1104 | A_UINT32 pad; |
| 1105 | } SEG_HDR_INFO_STRUCT; |
| 1106 | |
| 1107 | /** |
| 1108 | * struct utf_event_info - UTF event info |
| 1109 | * @data: data ptr |
| 1110 | * @length: length |
| 1111 | * @offset: offset |
| 1112 | * @currentSeq: curent squence |
| 1113 | * @expectedSeq: expected sequence |
| 1114 | */ |
| 1115 | struct utf_event_info { |
| 1116 | uint8_t *data; |
| 1117 | uint32_t length; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1118 | qdf_size_t offset; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1119 | uint8_t currentSeq; |
| 1120 | uint8_t expectedSeq; |
| 1121 | }; |
| 1122 | #endif |
| 1123 | |
| 1124 | /** |
| 1125 | * struct scan_timer_info - scan timer info |
| 1126 | * @vdev_id: vdev id |
| 1127 | * @scan_id: scan id |
| 1128 | */ |
| 1129 | typedef struct { |
| 1130 | uint8_t vdev_id; |
| 1131 | uint32_t scan_id; |
| 1132 | } scan_timer_info; |
| 1133 | |
| 1134 | /** |
| 1135 | * struct ibss_power_save_params - IBSS power save parameters |
| 1136 | * @atimWindowLength: ATIM window length |
| 1137 | * @isPowerSaveAllowed: is power save allowed |
| 1138 | * @isPowerCollapseAllowed: is power collapsed allowed |
| 1139 | * @isAwakeonTxRxEnabled: is awake on tx/rx enabled |
| 1140 | * @inactivityCount: inactivity count |
| 1141 | * @txSPEndInactivityTime: tx SP end inactivity time |
| 1142 | * @ibssPsWarmupTime: IBSS power save warm up time |
| 1143 | * @ibssPs1RxChainInAtimEnable: IBSS power save rx chain in ATIM enable |
| 1144 | */ |
| 1145 | typedef struct { |
| 1146 | uint32_t atimWindowLength; |
| 1147 | uint32_t isPowerSaveAllowed; |
| 1148 | uint32_t isPowerCollapseAllowed; |
| 1149 | uint32_t isAwakeonTxRxEnabled; |
| 1150 | uint32_t inactivityCount; |
| 1151 | uint32_t txSPEndInactivityTime; |
| 1152 | uint32_t ibssPsWarmupTime; |
| 1153 | uint32_t ibssPs1RxChainInAtimEnable; |
| 1154 | } ibss_power_save_params; |
| 1155 | |
| 1156 | /** |
| 1157 | * struct dbs_hw_mode_info - WLAN_DBS_HW_MODES_TLV Format |
| 1158 | * @tlv_header: TLV header, TLV tag and len; tag equals WMITLV_TAG_ARRAY_UINT32 |
| 1159 | * @hw_mode_list: WLAN_DBS_HW_MODE_LIST entries |
| 1160 | */ |
| 1161 | struct dbs_hw_mode_info { |
| 1162 | uint32_t tlv_header; |
| 1163 | uint32_t *hw_mode_list; |
| 1164 | }; |
| 1165 | |
Nitesh Shah | 877ad5d | 2016-09-22 19:27:58 +0530 | [diff] [blame] | 1166 | /** |
| 1167 | * struct mac_ss_bw_info - hw_mode_list PHY/MAC params for each MAC |
| 1168 | * @mac_tx_stream: Max TX stream |
| 1169 | * @mac_rx_stream: Max RX stream |
| 1170 | * @mac_bw: Max bandwidth |
| 1171 | */ |
| 1172 | struct mac_ss_bw_info { |
| 1173 | uint32_t mac_tx_stream; |
| 1174 | uint32_t mac_rx_stream; |
| 1175 | uint32_t mac_bw; |
| 1176 | }; |
| 1177 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1178 | /* Current HTC credit is 2, pool size of 50 is sufficient */ |
| 1179 | #define WMI_DESC_POOL_MAX 50 |
| 1180 | |
| 1181 | /** |
| 1182 | * struct wmi_desc_t - wmi management Tx descriptor. |
| 1183 | * @tx_cmpl_cb_func: completion callback function, when DL completion and |
| 1184 | * OTA done. |
| 1185 | * @ota_post_proc_func: Post process callback function registered. |
| 1186 | * @nbuf: Network buffer to be freed. |
| 1187 | * @desc_id: WMI descriptor. |
| 1188 | */ |
| 1189 | |
| 1190 | struct wmi_desc_t { |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame^] | 1191 | wma_tx_dwnld_comp_callback tx_cmpl_cb; |
| 1192 | wma_tx_ota_comp_callback ota_post_proc_cb; |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 1193 | qdf_nbuf_t nbuf; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1194 | uint32_t desc_id; |
Himanshu Agarwal | f65bd4c | 2016-12-05 17:21:12 +0530 | [diff] [blame] | 1195 | uint8_t vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1196 | }; |
| 1197 | |
| 1198 | /** |
| 1199 | * union wmi_desc_elem_t - linked list wmi desc pool. |
| 1200 | * @next: Pointer next descritor in the pool. |
| 1201 | * @wmi_desc: wmi descriptor element. |
| 1202 | */ |
| 1203 | union wmi_desc_elem_t { |
| 1204 | union wmi_desc_elem_t *next; |
| 1205 | struct wmi_desc_t wmi_desc; |
| 1206 | }; |
| 1207 | |
| 1208 | /** |
| 1209 | * struct dual_mac_config - Dual MAC configurations |
| 1210 | * @prev_scan_config: Previous scan configuration |
| 1211 | * @prev_fw_mode_config: Previous FW mode configuration |
| 1212 | * @cur_scan_config: Current scan configuration |
| 1213 | * @cur_fw_mode_config: Current FW mode configuration |
| 1214 | * @req_scan_config: Requested scan configuration |
| 1215 | * @req_fw_mode_config: Requested FW mode configuration |
| 1216 | */ |
| 1217 | struct dual_mac_config { |
| 1218 | uint32_t prev_scan_config; |
| 1219 | uint32_t prev_fw_mode_config; |
| 1220 | uint32_t cur_scan_config; |
| 1221 | uint32_t cur_fw_mode_config; |
| 1222 | uint32_t req_scan_config; |
| 1223 | uint32_t req_fw_mode_config; |
| 1224 | |
| 1225 | }; |
| 1226 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1227 | |
| 1228 | /** |
Komal Seelam | 02d0934 | 2016-02-23 18:03:19 +0530 | [diff] [blame] | 1229 | * struct wma_ini_config - Structure to hold wma ini configuration |
| 1230 | * @max_no_of_peers: Max Number of supported |
| 1231 | * |
| 1232 | * Placeholder for WMA ini parameters. |
| 1233 | */ |
| 1234 | struct wma_ini_config { |
| 1235 | uint8_t max_no_of_peers; |
| 1236 | }; |
| 1237 | |
| 1238 | /** |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 1239 | * struct wmi_valid_channels - Channel details part of WMI_SCAN_CHAN_LIST_CMDID |
| 1240 | * @num_channels: Number of channels |
| 1241 | * @channel_list: Channel list |
| 1242 | */ |
| 1243 | struct wma_valid_channels { |
| 1244 | uint8_t num_channels; |
| 1245 | uint8_t channel_list[MAX_NUM_CHAN]; |
| 1246 | }; |
| 1247 | |
Krunal Soni | 2e48d01 | 2016-05-02 16:55:26 -0700 | [diff] [blame] | 1248 | /** |
| 1249 | * struct hw_mode_idx_to_mac_cap_idx - map between hw_mode to capabilities |
| 1250 | * @num_of_macs: number of macs/PHYs for given hw_mode through hw_mode_id |
| 1251 | * @mac_cap_idx: index of the mac/PHY for given hw_mode through hw_mode_id |
| 1252 | * @hw_mode_id: given hw_mode id |
| 1253 | */ |
| 1254 | struct hw_mode_idx_to_mac_cap_idx { |
| 1255 | uint8_t num_of_macs; |
| 1256 | uint8_t mac_cap_idx; |
| 1257 | uint8_t hw_mode_id; |
| 1258 | }; |
| 1259 | |
| 1260 | /** |
| 1261 | * struct extended_caps - new extended caps given by firmware |
| 1262 | * @num_hw_modes: number of hardware modes for current SOC |
| 1263 | * @each_hw_mode_cap: hw mode id to phy id mapping |
| 1264 | * @each_phy_cap_per_hwmode: PHY's caps for each hw mode |
| 1265 | * @num_phy_for_hal_reg_cap: number of phy for hal reg cap |
| 1266 | * @hw_mode_to_mac_cap_map: map between hw_mode to capabilities |
| 1267 | */ |
| 1268 | struct extended_caps { |
| 1269 | WMI_SOC_MAC_PHY_HW_MODE_CAPS num_hw_modes; |
| 1270 | WMI_HW_MODE_CAPABILITIES *each_hw_mode_cap; |
| 1271 | WMI_MAC_PHY_CAPABILITIES *each_phy_cap_per_hwmode; |
| 1272 | WMI_SOC_HAL_REG_CAPABILITIES num_phy_for_hal_reg_cap; |
| 1273 | WMI_HAL_REG_CAPABILITIES_EXT *each_phy_hal_reg_cap; |
| 1274 | struct hw_mode_idx_to_mac_cap_idx *hw_mode_to_mac_cap_map; |
| 1275 | }; |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 1276 | |
| 1277 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1278 | * struct t_wma_handle - wma context |
| 1279 | * @wmi_handle: wmi handle |
| 1280 | * @htc_handle: htc handle |
| 1281 | * @cds_context: cds handle |
| 1282 | * @mac_context: mac context |
Selvaraj, Sridhar | 0672a12 | 2016-12-29 16:11:48 +0530 | [diff] [blame] | 1283 | * @psoc: psoc context |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1284 | * @wma_ready_event: wma rx ready event |
| 1285 | * @wma_resume_event: wma resume event |
| 1286 | * @target_suspend: target suspend event |
| 1287 | * @recovery_event: wma FW recovery event |
| 1288 | * @max_station: max stations |
| 1289 | * @max_bssid: max bssid |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1290 | * @driver_type: driver type |
| 1291 | * @myaddr: current mac address |
| 1292 | * @hwaddr: mac address from EEPROM |
| 1293 | * @target_abi_vers: target firmware version |
| 1294 | * @final_abi_vers: The final ABI version to be used for communicating |
| 1295 | * @target_fw_version: Target f/w build version |
Sandeep Puligilla | 3d6a8e2 | 2016-10-11 18:57:14 -0700 | [diff] [blame] | 1296 | * @target_fw_vers_ext: Target f/w build version sub id |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1297 | * @lpss_support: LPSS feature is supported in target or not |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 1298 | * @egap_support: Enhanced Green AP support flag |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1299 | * @wmi_ready: wmi status flag |
| 1300 | * @wlan_init_status: wlan init status |
Anurag Chouhan | f04e84f | 2016-03-03 10:12:12 +0530 | [diff] [blame] | 1301 | * @qdf_dev: qdf device |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1302 | * @phy_capability: PHY Capability from Target |
| 1303 | * @max_frag_entry: Max number of Fragment entry |
| 1304 | * @wmi_service_bitmap: wmi services bitmap received from Target |
| 1305 | * @wlan_resource_config: resource config |
| 1306 | * @frameTransRequired: frame transmission required |
| 1307 | * @wmaGlobalSystemRole: global system role |
| 1308 | * @tx_frm_download_comp_cb: Tx Frame Compl Cb registered by umac |
| 1309 | * @tx_frm_download_comp_event: Event to wait for tx download completion |
| 1310 | * @tx_queue_empty_event: wait for tx queue to get flushed |
| 1311 | * @umac_ota_ack_cb: Ack Complete Callback registered by umac |
| 1312 | * @umac_data_ota_ack_cb: ack complete callback |
| 1313 | * @last_umac_data_ota_timestamp: timestamp when OTA of last umac data was done |
| 1314 | * @last_umac_data_nbuf: cache nbuf ptr for the last umac data buf |
| 1315 | * @needShutdown: is shutdown needed or not |
| 1316 | * @num_mem_chunks: number of memory chunk |
| 1317 | * @mem_chunks: memory chunks |
| 1318 | * @tgt_cfg_update_cb: configuration update callback |
| 1319 | * @dfs_radar_indication_cb: Callback to indicate radar to HDD |
| 1320 | * @reg_cap: regulatory capablities |
| 1321 | * @scan_id: scan id |
| 1322 | * @interfaces: txrx nodes(per vdev) |
| 1323 | * @pdevconfig: pdev related configrations |
| 1324 | * @vdev_resp_queue: vdev response queue |
| 1325 | * @vdev_respq_lock: vdev response queue lock |
| 1326 | * @ht_cap_info: HT capablity info |
| 1327 | * @vht_cap_info: VHT capablity info |
| 1328 | * @vht_supp_mcs: VHT supported MCS |
| 1329 | * @num_rf_chains: number of RF chains |
| 1330 | * @utf_event_info: UTF event information |
| 1331 | * @is_fw_assert: is fw asserted |
| 1332 | * @wow: wow related patterns & parameters |
| 1333 | * @no_of_suspend_ind: number of suspend indications |
| 1334 | * @no_of_resume_ind: number of resume indications |
| 1335 | * @mArpInfo: arp info |
| 1336 | * @powersave_mode: power save mode |
| 1337 | * @ptrn_match_enable_all_vdev: is pattern match is enable/disable |
| 1338 | * @pGetRssiReq: get RSSI request |
| 1339 | * @thermal_mgmt_info: Thermal mitigation related info |
| 1340 | * @roam_offload_enabled: is roam offload enable/disable |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1341 | * @ol_ini_info: store ini status of arp offload, ns offload |
| 1342 | * @ssdp: ssdp flag |
Komal Seelam | 9764a84 | 2016-05-24 11:07:23 +0530 | [diff] [blame] | 1343 | * @enable_mc_list : To Check if Multicast list filtering is enabled in FW |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1344 | * @ibss_started: is IBSS started or not |
| 1345 | * @ibsskey_info: IBSS key info |
| 1346 | * @dfs_ic: DFS umac interface information |
| 1347 | * @hddTxFailCb: tx fail indication callback |
| 1348 | * @pno_wake_lock: PNO wake lock |
| 1349 | * @extscan_wake_lock: extscan wake lock |
| 1350 | * @wow_wake_lock: wow wake lock |
| 1351 | * @wow_nack: wow negative ack flag |
| 1352 | * @ap_client_cnt: ap client count |
| 1353 | * @is_wow_bus_suspended: is wow bus suspended flag |
| 1354 | * @wma_scan_comp_timer: scan completion timer |
| 1355 | * @dfs_phyerr_filter_offload: dfs phy error filter is offloaded or not |
| 1356 | * @suitable_ap_hb_failure: better ap found |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1357 | * @suitable_ap_hb_failure_rssi: record the RSSI when suitable_ap_hb_failure |
| 1358 | * for later usage to report RSSI at beacon miss scenario |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1359 | * @wma_ibss_power_save_params: IBSS Power Save config Parameters |
| 1360 | * @IsRArateLimitEnabled: RA rate limiti s enabled or not |
| 1361 | * @RArateLimitInterval: RA rate limit interval |
| 1362 | * @is_lpass_enabled: Flag to indicate if LPASS feature is enabled or not |
| 1363 | * @is_nan_enabled: Flag to indicate if NaN feature is enabled or not |
| 1364 | * @staMaxLIModDtim: station max listen interval |
| 1365 | * @staModDtim: station mode DTIM |
| 1366 | * @staDynamicDtim: station dynamic DTIM |
| 1367 | * @enable_mhf_offload: is MHF offload enable/disable |
| 1368 | * @last_mhf_entries_timestamp: timestamp when last entries where set |
| 1369 | * @dfs_pri_multiplier: DFS multiplier |
| 1370 | * @hw_bd_id: hardware board id |
| 1371 | * @hw_bd_info: hardware board info |
| 1372 | * @in_d0wow: D0WOW is enable/disable |
| 1373 | * @miracast_value: miracast value |
| 1374 | * @log_completion_timer: log completion timer |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1375 | * @num_dbs_hw_modes: Number of HW modes supported by the FW |
| 1376 | * @dbs_mode: DBS HW mode list |
| 1377 | * @old_hw_mode_index: Previous configured HW mode index |
| 1378 | * @new_hw_mode_index: Current configured HW mode index |
Krunal Soni | 2e48d01 | 2016-05-02 16:55:26 -0700 | [diff] [blame] | 1379 | * @extended_caps phy_caps: extended caps per hw mode |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1380 | * @peer_authorized_cb: peer authorized hdd callback |
| 1381 | * @ocb_callback: callback to OCB commands |
| 1382 | * @ocb_resp: response to OCB commands |
| 1383 | * @wow_pno_match_wake_up_count: PNO match wake up count |
| 1384 | * @wow_pno_complete_wake_up_count: PNO complete wake up count |
| 1385 | * @wow_gscan_wake_up_count: Gscan wake up count |
| 1386 | * @wow_low_rssi_wake_up_count: Low rssi wake up count |
| 1387 | * @wow_rssi_breach_wake_up_count: RSSI breach wake up count |
| 1388 | * @wow_ucast_wake_up_count: WoW unicast packet wake up count |
| 1389 | * @wow_bcast_wake_up_count: WoW brodcast packet wake up count |
| 1390 | * @wow_ipv4_mcast_wake_up_count: WoW IPV4 mcast packet wake up count |
| 1391 | * @wow_ipv6_mcast_wake_up_count: WoW IPV6 mcast packet wake up count |
| 1392 | * @wow_ipv6_mcast_ra_stats: WoW IPV6 mcast RA packet wake up count |
| 1393 | * @wow_ipv6_mcast_ns_stats: WoW IPV6 mcast NS packet wake up count |
| 1394 | * @wow_ipv6_mcast_na_stats: WoW IPV6 mcast NA packet wake up count |
Sreelakshmi Konamki | e1cd51f | 2016-08-19 16:58:24 +0530 | [diff] [blame] | 1395 | * @wow_icmpv4_count: WoW ipv4 icmp packet wake up count |
Himanshu Agarwal | 4574e28 | 2016-08-10 15:22:45 +0530 | [diff] [blame] | 1396 | * @wow_icmpv6_count: WoW ipv6 icmp packet wake up count |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1397 | * @dual_mac_cfg: Dual mac configuration params for scan and fw mode |
| 1398 | * |
| 1399 | * @max_scan: maximum scan requests than can be queued |
| 1400 | * This structure is global wma context |
| 1401 | * It contains global wma module parameters and |
| 1402 | * handle of other modules. |
| 1403 | * @saved_wmi_init_cmd: Saved WMI INIT command |
Anurag Chouhan | 04dbf6d | 2016-09-08 15:32:52 +0530 | [diff] [blame] | 1404 | * @bool bpf_packet_filter_enable: BPF filter enabled or not |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1405 | * @service_ready_ext_evt: Wait event for service ready ext |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 1406 | * @wmi_cmd_rsp_wake_lock: wmi command response wake lock |
| 1407 | * @wmi_cmd_rsp_runtime_lock: wmi command response bus lock |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 1408 | * @saved_chan: saved channel list sent as part of WMI_SCAN_CHAN_LIST_CMDID |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1409 | */ |
| 1410 | typedef struct { |
| 1411 | void *wmi_handle; |
| 1412 | void *htc_handle; |
| 1413 | void *cds_context; |
| 1414 | void *mac_context; |
Selvaraj, Sridhar | 0672a12 | 2016-12-29 16:11:48 +0530 | [diff] [blame] | 1415 | struct wlan_objmgr_psoc *psoc; |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 1416 | qdf_event_t wma_ready_event; |
| 1417 | qdf_event_t wma_resume_event; |
| 1418 | qdf_event_t target_suspend; |
| 1419 | qdf_event_t runtime_suspend; |
| 1420 | qdf_event_t recovery_event; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1421 | uint16_t max_station; |
| 1422 | uint16_t max_bssid; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1423 | t_wma_drv_type driver_type; |
| 1424 | uint8_t myaddr[IEEE80211_ADDR_LEN]; |
| 1425 | uint8_t hwaddr[IEEE80211_ADDR_LEN]; |
| 1426 | wmi_abi_version target_abi_vers; |
| 1427 | wmi_abi_version final_abi_vers; |
| 1428 | uint32_t target_fw_version; |
Sandeep Puligilla | 3d6a8e2 | 2016-10-11 18:57:14 -0700 | [diff] [blame] | 1429 | uint32_t target_fw_vers_ext; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1430 | #ifdef WLAN_FEATURE_LPSS |
| 1431 | uint8_t lpss_support; |
| 1432 | #endif |
| 1433 | uint8_t ap_arpns_support; |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 1434 | #ifdef FEATURE_GREEN_AP |
| 1435 | bool egap_support; |
| 1436 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1437 | bool wmi_ready; |
| 1438 | uint32_t wlan_init_status; |
Anurag Chouhan | df2b268 | 2016-02-29 14:15:27 +0530 | [diff] [blame] | 1439 | qdf_device_t qdf_dev; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1440 | uint32_t phy_capability; |
| 1441 | uint32_t max_frag_entry; |
| 1442 | uint32_t wmi_service_bitmap[WMI_SERVICE_BM_SIZE]; |
| 1443 | wmi_resource_config wlan_resource_config; |
| 1444 | uint32_t frameTransRequired; |
| 1445 | tBssSystemRole wmaGlobalSystemRole; |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame^] | 1446 | wma_tx_dwnld_comp_callback tx_frm_download_comp_cb; |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 1447 | qdf_event_t tx_frm_download_comp_event; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1448 | /* |
| 1449 | * Dummy event to wait for draining MSDUs left in hardware tx |
| 1450 | * queue and before requesting VDEV_STOP. Nobody will set this |
| 1451 | * and wait will timeout, and code will poll the pending tx |
| 1452 | * descriptors number to be zero. |
| 1453 | */ |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 1454 | qdf_event_t tx_queue_empty_event; |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame^] | 1455 | wma_tx_ota_comp_callback umac_ota_ack_cb[SIR_MAC_MGMT_RESERVED15]; |
| 1456 | wma_tx_ota_comp_callback umac_data_ota_ack_cb; |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1457 | unsigned long last_umac_data_ota_timestamp; |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 1458 | qdf_nbuf_t last_umac_data_nbuf; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1459 | bool needShutdown; |
| 1460 | uint32_t num_mem_chunks; |
Govind Singh | f25a0f1 | 2016-03-08 16:09:48 +0530 | [diff] [blame] | 1461 | struct wmi_host_mem_chunk mem_chunks[MAX_MEM_CHUNKS]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1462 | wma_tgt_cfg_cb tgt_cfg_update_cb; |
| 1463 | wma_dfs_radar_indication_cb dfs_radar_indication_cb; |
| 1464 | HAL_REG_CAPABILITIES reg_cap; |
| 1465 | uint32_t scan_id; |
| 1466 | struct wma_txrx_node *interfaces; |
| 1467 | pdev_cli_config_t pdevconfig; |
Anurag Chouhan | ffb2154 | 2016-02-17 14:33:03 +0530 | [diff] [blame] | 1468 | qdf_list_t vdev_resp_queue; |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 1469 | qdf_spinlock_t vdev_respq_lock; |
Anurag Chouhan | ffb2154 | 2016-02-17 14:33:03 +0530 | [diff] [blame] | 1470 | qdf_list_t wma_hold_req_queue; |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 1471 | qdf_spinlock_t wma_hold_req_q_lock; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1472 | uint32_t ht_cap_info; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1473 | uint32_t vht_cap_info; |
| 1474 | uint32_t vht_supp_mcs; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1475 | uint32_t num_rf_chains; |
| 1476 | #if defined(QCA_WIFI_FTM) |
| 1477 | struct utf_event_info utf_event_info; |
| 1478 | #endif |
| 1479 | uint8_t is_fw_assert; |
| 1480 | struct wma_wow wow; |
| 1481 | uint8_t no_of_suspend_ind; |
| 1482 | uint8_t no_of_resume_ind; |
| 1483 | /* Have a back up of arp info to send along |
| 1484 | * with ns info suppose if ns also enabled |
| 1485 | */ |
| 1486 | tSirHostOffloadReq mArpInfo; |
| 1487 | struct wma_tx_ack_work_ctx *ack_work_ctx; |
| 1488 | uint8_t powersave_mode; |
| 1489 | bool ptrn_match_enable_all_vdev; |
| 1490 | void *pGetRssiReq; |
| 1491 | t_thermal_mgmt thermal_mgmt_info; |
| 1492 | bool roam_offload_enabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1493 | /* Here ol_ini_info is used to store ini |
| 1494 | * status of arp offload, ns offload |
| 1495 | * and others. Currently 1st bit is used |
| 1496 | * for arp off load and 2nd bit for ns |
| 1497 | * offload currently, rest bits are unused |
| 1498 | */ |
| 1499 | uint8_t ol_ini_info; |
| 1500 | bool ssdp; |
Komal Seelam | 9764a84 | 2016-05-24 11:07:23 +0530 | [diff] [blame] | 1501 | bool enable_mc_list; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1502 | uint8_t ibss_started; |
| 1503 | tSetBssKeyParams ibsskey_info; |
| 1504 | struct ieee80211com *dfs_ic; |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1505 | txFailIndCallback hddTxFailCb; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1506 | #ifdef FEATURE_WLAN_SCAN_PNO |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 1507 | qdf_wake_lock_t pno_wake_lock; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1508 | #endif |
| 1509 | #ifdef FEATURE_WLAN_EXTSCAN |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 1510 | qdf_wake_lock_t extscan_wake_lock; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1511 | #endif |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 1512 | qdf_wake_lock_t wow_wake_lock; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1513 | int wow_nack; |
Rajeev Kumar | 4c42662 | 2016-08-25 14:51:42 -0700 | [diff] [blame] | 1514 | bool wow_initial_wake_up; |
Anurag Chouhan | 8e0ccd3 | 2016-02-19 15:30:20 +0530 | [diff] [blame] | 1515 | qdf_atomic_t is_wow_bus_suspended; |
Anurag Chouhan | 210db07 | 2016-02-22 18:42:15 +0530 | [diff] [blame] | 1516 | qdf_mc_timer_t wma_scan_comp_timer; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1517 | uint8_t dfs_phyerr_filter_offload; |
| 1518 | bool suitable_ap_hb_failure; |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1519 | uint32_t suitable_ap_hb_failure_rssi; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1520 | ibss_power_save_params wma_ibss_power_save_params; |
| 1521 | #ifdef FEATURE_WLAN_RA_FILTERING |
| 1522 | bool IsRArateLimitEnabled; |
| 1523 | uint16_t RArateLimitInterval; |
| 1524 | #endif |
| 1525 | #ifdef WLAN_FEATURE_LPSS |
| 1526 | bool is_lpass_enabled; |
| 1527 | #endif |
| 1528 | #ifdef WLAN_FEATURE_NAN |
| 1529 | bool is_nan_enabled; |
| 1530 | #endif |
| 1531 | uint8_t staMaxLIModDtim; |
| 1532 | uint8_t staModDtim; |
| 1533 | uint8_t staDynamicDtim; |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1534 | uint8_t enable_mhf_offload; |
| 1535 | unsigned long last_mhf_entries_timestamp; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1536 | int32_t dfs_pri_multiplier; |
| 1537 | uint32_t hw_bd_id; |
| 1538 | uint32_t hw_bd_info[HW_BD_INFO_SIZE]; |
| 1539 | uint32_t miracast_value; |
Anurag Chouhan | 210db07 | 2016-02-22 18:42:15 +0530 | [diff] [blame] | 1540 | qdf_mc_timer_t log_completion_timer; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1541 | uint32_t num_dbs_hw_modes; |
| 1542 | struct dbs_hw_mode_info hw_mode; |
| 1543 | uint32_t old_hw_mode_index; |
| 1544 | uint32_t new_hw_mode_index; |
Krunal Soni | 2e48d01 | 2016-05-02 16:55:26 -0700 | [diff] [blame] | 1545 | struct extended_caps phy_caps; |
Anurag Chouhan | 8e0ccd3 | 2016-02-19 15:30:20 +0530 | [diff] [blame] | 1546 | qdf_atomic_t scan_id_counter; |
Nitesh Shah | 0f3fce5 | 2016-10-13 22:01:41 +0530 | [diff] [blame] | 1547 | qdf_atomic_t num_pending_scans; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1548 | wma_peer_authorized_fp peer_authorized_cb; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1549 | uint32_t wow_pno_match_wake_up_count; |
| 1550 | uint32_t wow_pno_complete_wake_up_count; |
| 1551 | uint32_t wow_gscan_wake_up_count; |
| 1552 | uint32_t wow_low_rssi_wake_up_count; |
| 1553 | uint32_t wow_rssi_breach_wake_up_count; |
| 1554 | uint32_t wow_ucast_wake_up_count; |
| 1555 | uint32_t wow_bcast_wake_up_count; |
| 1556 | uint32_t wow_ipv4_mcast_wake_up_count; |
| 1557 | uint32_t wow_ipv6_mcast_wake_up_count; |
| 1558 | uint32_t wow_ipv6_mcast_ra_stats; |
| 1559 | uint32_t wow_ipv6_mcast_ns_stats; |
| 1560 | uint32_t wow_ipv6_mcast_na_stats; |
Sreelakshmi Konamki | e1cd51f | 2016-08-19 16:58:24 +0530 | [diff] [blame] | 1561 | uint32_t wow_icmpv4_count; |
Himanshu Agarwal | 4574e28 | 2016-08-10 15:22:45 +0530 | [diff] [blame] | 1562 | uint32_t wow_icmpv6_count; |
Selvaraj, Sridhar | 172cabc | 2016-07-05 15:19:24 +0530 | [diff] [blame] | 1563 | uint32_t wow_oem_response_wake_up_count; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1564 | |
| 1565 | /* OCB request contexts */ |
| 1566 | struct sir_ocb_config *ocb_config_req; |
| 1567 | struct dual_mac_config dual_mac_cfg; |
| 1568 | struct { |
| 1569 | uint16_t pool_size; |
| 1570 | uint16_t num_free; |
| 1571 | union wmi_desc_elem_t *array; |
| 1572 | union wmi_desc_elem_t *freelist; |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 1573 | qdf_spinlock_t wmi_desc_pool_lock; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1574 | } wmi_desc_pool; |
| 1575 | uint8_t max_scan; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1576 | uint16_t self_gen_frm_pwr; |
| 1577 | bool tx_chain_mask_cck; |
Chandrasekaran, Manishekar | c841692 | 2015-10-14 11:19:00 +0530 | [diff] [blame] | 1578 | /* Going with a timer instead of wait event because on receiving the |
| 1579 | * service ready event, we will be waiting on the MC thread for the |
| 1580 | * service extended ready event which is also processed in MC thread. |
| 1581 | * This leads to MC thread being stuck. Alternative was to process |
| 1582 | * these events in tasklet/workqueue context. But, this leads to |
| 1583 | * race conditions when the events are processed in two different |
| 1584 | * context. So, processing ready event and extended ready event in |
| 1585 | * the serialized MC thread context with a timer. |
| 1586 | */ |
Anurag Chouhan | 210db07 | 2016-02-22 18:42:15 +0530 | [diff] [blame] | 1587 | qdf_mc_timer_t service_ready_ext_timer; |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 1588 | void (*csr_roam_synch_cb)(tpAniSirGlobal mac, |
| 1589 | roam_offload_synch_ind *roam_synch_data, |
Varun Reddy Yeturu | f907f91 | 2016-03-21 15:06:22 -0700 | [diff] [blame] | 1590 | tpSirBssDescription bss_desc_ptr, |
| 1591 | enum sir_roam_op_code reason); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1592 | QDF_STATUS (*pe_roam_synch_cb)(tpAniSirGlobal mac, |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 1593 | roam_offload_synch_ind *roam_synch_data, |
| 1594 | tpSirBssDescription bss_desc_ptr); |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 1595 | qdf_wake_lock_t wmi_cmd_rsp_wake_lock; |
| 1596 | qdf_runtime_lock_t wmi_cmd_rsp_runtime_lock; |
Houston Hoffman | c45db89 | 2015-11-13 19:59:25 -0800 | [diff] [blame] | 1597 | qdf_runtime_lock_t wma_runtime_resume_lock; |
Krishna Kumaar Natarajan | 1ae4911 | 2015-11-24 21:43:22 -0800 | [diff] [blame] | 1598 | uint32_t fine_time_measurement_cap; |
Rajeev Kumar | e5a1682 | 2016-07-27 13:11:42 -0700 | [diff] [blame] | 1599 | bool bpf_enabled; |
Anurag Chouhan | 04dbf6d | 2016-09-08 15:32:52 +0530 | [diff] [blame] | 1600 | bool bpf_packet_filter_enable; |
Komal Seelam | 02d0934 | 2016-02-23 18:03:19 +0530 | [diff] [blame] | 1601 | struct wma_ini_config ini_config; |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 1602 | struct wma_valid_channels saved_chan; |
Deepak Dhamdhere | 13230d3 | 2016-05-26 00:46:53 -0700 | [diff] [blame] | 1603 | /* NAN datapath support enabled in firmware */ |
| 1604 | bool nan_datapath_enabled; |
Naveen Rawat | 0fc3f69 | 2016-06-22 14:30:54 -0700 | [diff] [blame] | 1605 | QDF_STATUS (*pe_ndp_event_handler)(tpAniSirGlobal mac_ctx, |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 1606 | cds_msg_t *msg); |
Sandeep Puligilla | afa5289 | 2016-10-26 19:03:16 -0700 | [diff] [blame] | 1607 | bool fw_timeout_crash; |
Naveen Rawat | 64e477e | 2016-05-20 10:34:56 -0700 | [diff] [blame] | 1608 | bool sub_20_support; |
Himanshu Agarwal | f65bd4c | 2016-12-05 17:21:12 +0530 | [diff] [blame] | 1609 | tp_wma_packetdump_cb wma_mgmt_tx_packetdump_cb; |
| 1610 | tp_wma_packetdump_cb wma_mgmt_rx_packetdump_cb; |
Srinivas Girigowda | ad874a8 | 2016-10-25 14:08:00 -0700 | [diff] [blame] | 1611 | tSirLLStatsResults *link_stats_results; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1612 | } t_wma_handle, *tp_wma_handle; |
| 1613 | |
| 1614 | /** |
| 1615 | * struct wma_target_cap - target capabality |
| 1616 | * @wmi_service_bitmap: wmi services bitmap |
| 1617 | * @wlan_resource_config: resource config |
| 1618 | */ |
| 1619 | struct wma_target_cap { |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 1620 | /* wmi services bitmap received from Target */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1621 | uint32_t wmi_service_bitmap[WMI_SERVICE_BM_SIZE]; |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 1622 | /* default resource config,the os shim can overwrite it */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1623 | wmi_resource_config wlan_resource_config; |
| 1624 | }; |
| 1625 | |
| 1626 | /** |
| 1627 | * struct t_wma_start_req - wma start request parameters |
| 1628 | * @pConfigBuffer: config buffer |
| 1629 | * @usConfigBufferLen: Length of the config buffer above |
| 1630 | * @driver_type: Production or FTM driver |
| 1631 | * @pUserData: user data |
| 1632 | * @pIndUserData: indication function pointer to send to UMAC |
| 1633 | * |
| 1634 | * The shared memory between WDI and HAL is 4K so maximum data can be |
| 1635 | * transferred from WDI to HAL is 4K |
| 1636 | */ |
| 1637 | typedef struct { |
| 1638 | void *pConfigBuffer; |
| 1639 | uint16_t usConfigBufferLen; |
| 1640 | t_wma_drv_type driver_type; |
| 1641 | void *pUserData; |
| 1642 | void *pIndUserData; |
| 1643 | } t_wma_start_req; |
| 1644 | |
| 1645 | /* Enumeration for Version */ |
| 1646 | typedef enum { |
| 1647 | WLAN_HAL_MSG_VERSION0 = 0, |
| 1648 | WLAN_HAL_MSG_VERSION1 = 1, |
| 1649 | WLAN_HAL_MSG_WCNSS_CTRL_VERSION = 0x7FFF, /*define as 2 bytes data */ |
| 1650 | WLAN_HAL_MSG_VERSION_MAX_FIELD = WLAN_HAL_MSG_WCNSS_CTRL_VERSION |
| 1651 | } tHalHostMsgVersion; |
| 1652 | |
| 1653 | /** |
| 1654 | * struct sHalMacStartParameter - mac start request parameters |
| 1655 | * @driverType: driver type (production/FTM) |
| 1656 | * @uConfigBufferLen: length of config buffer |
| 1657 | */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 1658 | typedef struct qdf_packed sHalMacStartParameter { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1659 | tDriverType driverType; |
| 1660 | uint32_t uConfigBufferLen; |
| 1661 | |
| 1662 | /* Following this there is a TLV formatted buffer of length |
| 1663 | * "uConfigBufferLen" bytes containing all config values. |
| 1664 | * The TLV is expected to be formatted like this: |
| 1665 | * 0 15 31 31+CFG_LEN-1 length-1 |
| 1666 | * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......| |
| 1667 | */ |
| 1668 | } tHalMacStartParameter, *tpHalMacStartParameter; |
| 1669 | |
| 1670 | extern void cds_wma_complete_cback(void *p_cds_context); |
| 1671 | extern void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G, |
| 1672 | uint16_t regdmn5G, int8_t ctl2G, |
| 1673 | int8_t ctl5G); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1674 | /** |
| 1675 | * enum frame_index - Frame index |
| 1676 | * @GENERIC_NODOWNLD_NOACK_COMP_INDEX: Frame index for no download comp no ack |
| 1677 | * @GENERIC_DOWNLD_COMP_NOACK_COMP_INDEX: Frame index for download comp no ack |
| 1678 | * @GENERIC_DOWNLD_COMP_ACK_COMP_INDEX: Frame index for download comp and ack |
| 1679 | * @GENERIC_NODOWLOAD_ACK_COMP_INDEX: Frame index for no download comp and ack |
| 1680 | * @FRAME_INDEX_MAX: maximum frame index |
| 1681 | */ |
| 1682 | enum frame_index { |
| 1683 | GENERIC_NODOWNLD_NOACK_COMP_INDEX, |
| 1684 | GENERIC_DOWNLD_COMP_NOACK_COMP_INDEX, |
| 1685 | GENERIC_DOWNLD_COMP_ACK_COMP_INDEX, |
| 1686 | GENERIC_NODOWLOAD_ACK_COMP_INDEX, |
| 1687 | FRAME_INDEX_MAX |
| 1688 | }; |
| 1689 | |
| 1690 | /** |
| 1691 | * struct wma_tx_ack_work_ctx - tx ack work context |
| 1692 | * @wma_handle: wma handle |
| 1693 | * @sub_type: sub type |
| 1694 | * @status: status |
| 1695 | * @ack_cmp_work: work structure |
| 1696 | */ |
| 1697 | struct wma_tx_ack_work_ctx { |
| 1698 | tp_wma_handle wma_handle; |
| 1699 | uint16_t sub_type; |
| 1700 | int32_t status; |
Anurag Chouhan | 42958bb | 2016-02-19 15:43:11 +0530 | [diff] [blame] | 1701 | qdf_work_t ack_cmp_work; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1702 | }; |
| 1703 | |
| 1704 | /** |
| 1705 | * struct wma_target_req - target request parameters |
| 1706 | * @event_timeout: event timeout |
| 1707 | * @node: list |
| 1708 | * @user_data: user data |
| 1709 | * @msg_type: message type |
| 1710 | * @vdev_id: vdev id |
| 1711 | * @type: type |
| 1712 | */ |
| 1713 | struct wma_target_req { |
Anurag Chouhan | 210db07 | 2016-02-22 18:42:15 +0530 | [diff] [blame] | 1714 | qdf_mc_timer_t event_timeout; |
Anurag Chouhan | ffb2154 | 2016-02-17 14:33:03 +0530 | [diff] [blame] | 1715 | qdf_list_node_t node; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1716 | void *user_data; |
| 1717 | uint32_t msg_type; |
| 1718 | uint8_t vdev_id; |
| 1719 | uint8_t type; |
| 1720 | }; |
| 1721 | |
| 1722 | /** |
| 1723 | * struct wma_vdev_start_req - vdev start request parameters |
| 1724 | * @beacon_intval: beacon interval |
| 1725 | * @dtim_period: dtim period |
| 1726 | * @max_txpow: max tx power |
| 1727 | * @chan_offset: channel offset |
| 1728 | * @is_dfs: is dfs supported or not |
| 1729 | * @vdev_id: vdev id |
| 1730 | * @chan: channel |
| 1731 | * @oper_mode: operating mode |
| 1732 | * @ssid: ssid |
| 1733 | * @hidden_ssid: hidden ssid |
| 1734 | * @pmf_enabled: is pmf enabled or not |
| 1735 | * @vht_capable: VHT capabality |
| 1736 | * @ht_capable: HT capabality |
| 1737 | * @dfs_pri_multiplier: DFS multiplier |
| 1738 | * @dot11_mode: 802.11 mode |
| 1739 | * @is_half_rate: is the channel operating at 10MHz |
| 1740 | * @is_quarter_rate: is the channel operating at 5MHz |
| 1741 | * @preferred_tx_streams: policy manager indicates the preferred |
| 1742 | * number of transmit streams |
| 1743 | * @preferred_rx_streams: policy manager indicates the preferred |
| 1744 | * number of receive streams |
| 1745 | */ |
| 1746 | struct wma_vdev_start_req { |
| 1747 | uint32_t beacon_intval; |
| 1748 | uint32_t dtim_period; |
| 1749 | int32_t max_txpow; |
Kiran Kumar Lokere | 1364467 | 2016-02-29 15:40:10 -0800 | [diff] [blame] | 1750 | enum phy_ch_width chan_width; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1751 | bool is_dfs; |
| 1752 | uint8_t vdev_id; |
| 1753 | uint8_t chan; |
| 1754 | uint8_t oper_mode; |
| 1755 | tSirMacSSid ssid; |
| 1756 | uint8_t hidden_ssid; |
| 1757 | uint8_t pmf_enabled; |
| 1758 | uint8_t vht_capable; |
| 1759 | uint8_t ch_center_freq_seg0; |
| 1760 | uint8_t ch_center_freq_seg1; |
| 1761 | uint8_t ht_capable; |
| 1762 | int32_t dfs_pri_multiplier; |
| 1763 | uint8_t dot11_mode; |
| 1764 | bool is_half_rate; |
| 1765 | bool is_quarter_rate; |
| 1766 | uint32_t preferred_tx_streams; |
| 1767 | uint32_t preferred_rx_streams; |
Kondabattini, Ganesh | b72e25c | 2016-09-02 14:43:59 +0530 | [diff] [blame] | 1768 | uint8_t beacon_tx_rate; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1769 | }; |
| 1770 | |
| 1771 | /** |
| 1772 | * struct wma_set_key_params - set key parameters |
| 1773 | * @vdev_id: vdev id |
| 1774 | * @def_key_idx: used to see if we have to read the key from cfg |
| 1775 | * @key_len: key length |
| 1776 | * @peer_mac: peer mac address |
| 1777 | * @singl_tid_rc: 1=Single TID based Replay Count, 0=Per TID based RC |
| 1778 | * @key_type: key type |
| 1779 | * @key_idx: key index |
| 1780 | * @unicast: unicast flag |
| 1781 | * @key_data: key data |
| 1782 | */ |
| 1783 | struct wma_set_key_params { |
| 1784 | uint8_t vdev_id; |
| 1785 | /* def_key_idx can be used to see if we have to read the key from cfg */ |
| 1786 | uint32_t def_key_idx; |
| 1787 | uint16_t key_len; |
| 1788 | uint8_t peer_mac[IEEE80211_ADDR_LEN]; |
| 1789 | uint8_t singl_tid_rc; |
| 1790 | enum eAniEdType key_type; |
| 1791 | uint32_t key_idx; |
| 1792 | bool unicast; |
| 1793 | uint8_t key_data[SIR_MAC_MAX_KEY_LENGTH]; |
| 1794 | }; |
| 1795 | |
| 1796 | /** |
| 1797 | * struct t_thermal_cmd_params - thermal command parameters |
| 1798 | * @minTemp: minimum temprature |
| 1799 | * @maxTemp: maximum temprature |
| 1800 | * @thermalEnable: thermal enable |
| 1801 | */ |
| 1802 | typedef struct { |
| 1803 | uint16_t minTemp; |
| 1804 | uint16_t maxTemp; |
| 1805 | uint8_t thermalEnable; |
| 1806 | } t_thermal_cmd_params, *tp_thermal_cmd_params; |
| 1807 | |
| 1808 | /** |
| 1809 | * enum wma_cfg_cmd_id - wma cmd ids |
| 1810 | * @WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID: txrx firmware stats enable command |
| 1811 | * @WMA_VDEV_TXRX_FWSTATS_RESET_CMDID: txrx firmware stats reset command |
| 1812 | * @WMA_VDEV_MCC_SET_TIME_LATENCY: set MCC latency time |
| 1813 | * @WMA_VDEV_MCC_SET_TIME_QUOTA: set MCC time quota |
| 1814 | * @WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE: set IBSS ATIM window size |
| 1815 | * @WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED: set IBSS enable power save |
| 1816 | * @WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED: set IBSS power collapse enable |
| 1817 | * @WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX: awake IBSS on TX/RX |
| 1818 | * @WMA_VDEV_IBSS_SET_INACTIVITY_TIME: set IBSS inactivity time |
| 1819 | * @WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME: set IBSS TXSP |
| 1820 | * @WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS: set IBSS power save warmup time |
| 1821 | * @WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW: set IBSS power save ATIM |
| 1822 | * @WMA_VDEV_DFS_CONTROL_CMDID: DFS control command |
| 1823 | * @WMA_VDEV_TXRX_GET_IPA_UC_FW_STATS_CMDID: get IPA microcontroller fw stats |
| 1824 | * |
| 1825 | * wma command ids for configuration request which |
| 1826 | * does not involve sending a wmi command. |
| 1827 | */ |
| 1828 | enum wma_cfg_cmd_id { |
| 1829 | WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID = WMI_CMDID_MAX, |
| 1830 | WMA_VDEV_TXRX_FWSTATS_RESET_CMDID, |
| 1831 | WMA_VDEV_MCC_SET_TIME_LATENCY, |
| 1832 | WMA_VDEV_MCC_SET_TIME_QUOTA, |
| 1833 | WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE, |
| 1834 | WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED, |
| 1835 | WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED, |
| 1836 | WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX, |
| 1837 | WMA_VDEV_IBSS_SET_INACTIVITY_TIME, |
| 1838 | WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME, |
| 1839 | WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS, |
| 1840 | WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW, |
| 1841 | WMA_VDEV_DFS_CONTROL_CMDID, |
| 1842 | WMA_VDEV_TXRX_GET_IPA_UC_FW_STATS_CMDID, |
| 1843 | WMA_CMD_ID_MAX |
| 1844 | }; |
| 1845 | |
| 1846 | /** |
| 1847 | * struct wma_trigger_uapsd_params - trigger uapsd parameters |
| 1848 | * @wmm_ac: wmm access catagory |
| 1849 | * @user_priority: user priority |
| 1850 | * @service_interval: service interval |
| 1851 | * @suspend_interval: suspend interval |
| 1852 | * @delay_interval: delay interval |
| 1853 | */ |
| 1854 | typedef struct wma_trigger_uapsd_params { |
| 1855 | uint32_t wmm_ac; |
| 1856 | uint32_t user_priority; |
| 1857 | uint32_t service_interval; |
| 1858 | uint32_t suspend_interval; |
| 1859 | uint32_t delay_interval; |
| 1860 | } t_wma_trigger_uapsd_params, *tp_wma_trigger_uapsd_params; |
| 1861 | |
| 1862 | /** |
| 1863 | * enum uapsd_peer_param_max_sp - U-APSD maximum service period of peer station |
| 1864 | * @UAPSD_MAX_SP_LEN_UNLIMITED: unlimited max service period |
| 1865 | * @UAPSD_MAX_SP_LEN_2: max service period = 2 |
| 1866 | * @UAPSD_MAX_SP_LEN_4: max service period = 4 |
| 1867 | * @UAPSD_MAX_SP_LEN_6: max service period = 6 |
| 1868 | */ |
| 1869 | enum uapsd_peer_param_max_sp { |
| 1870 | UAPSD_MAX_SP_LEN_UNLIMITED = 0, |
| 1871 | UAPSD_MAX_SP_LEN_2 = 2, |
| 1872 | UAPSD_MAX_SP_LEN_4 = 4, |
| 1873 | UAPSD_MAX_SP_LEN_6 = 6 |
| 1874 | }; |
| 1875 | |
| 1876 | /** |
| 1877 | * enum uapsd_peer_param_enabled_ac - U-APSD Enabled AC's of peer station |
| 1878 | * @UAPSD_VO_ENABLED: enable uapsd for voice |
| 1879 | * @UAPSD_VI_ENABLED: enable uapsd for video |
| 1880 | * @UAPSD_BK_ENABLED: enable uapsd for background |
| 1881 | * @UAPSD_BE_ENABLED: enable uapsd for best effort |
| 1882 | */ |
| 1883 | enum uapsd_peer_param_enabled_ac { |
| 1884 | UAPSD_VO_ENABLED = 0x01, |
| 1885 | UAPSD_VI_ENABLED = 0x02, |
| 1886 | UAPSD_BK_ENABLED = 0x04, |
| 1887 | UAPSD_BE_ENABLED = 0x08 |
| 1888 | }; |
| 1889 | |
| 1890 | /** |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 1891 | * enum profile_id_t - Firmware profiling index |
| 1892 | * @PROF_CPU_IDLE: cpu idle profile |
| 1893 | * @PROF_PPDU_PROC: ppdu processing profile |
| 1894 | * @PROF_PPDU_POST: ppdu post profile |
| 1895 | * @PROF_HTT_TX_INPUT: htt tx input profile |
| 1896 | * @PROF_MSDU_ENQ: msdu enqueue profile |
| 1897 | * @PROF_PPDU_POST_HAL: ppdu post profile |
| 1898 | * @PROF_COMPUTE_TX_TIME: tx time profile |
| 1899 | * @PROF_MAX_ID: max profile index |
| 1900 | */ |
| 1901 | enum profile_id_t { |
| 1902 | PROF_CPU_IDLE, |
| 1903 | PROF_PPDU_PROC, |
| 1904 | PROF_PPDU_POST, |
| 1905 | PROF_HTT_TX_INPUT, |
| 1906 | PROF_MSDU_ENQ, |
| 1907 | PROF_PPDU_POST_HAL, |
| 1908 | PROF_COMPUTE_TX_TIME, |
| 1909 | PROF_MAX_ID, |
| 1910 | }; |
| 1911 | |
| 1912 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1913 | * struct p2p_ie - P2P IE structural definition. |
| 1914 | * @p2p_id: p2p id |
| 1915 | * @p2p_len: p2p length |
| 1916 | * @p2p_oui: p2p OUI |
| 1917 | * @p2p_oui_type: p2p OUI type |
| 1918 | */ |
| 1919 | struct p2p_ie { |
| 1920 | uint8_t p2p_id; |
| 1921 | uint8_t p2p_len; |
| 1922 | uint8_t p2p_oui[3]; |
| 1923 | uint8_t p2p_oui_type; |
| 1924 | } __packed; |
| 1925 | |
| 1926 | /** |
| 1927 | * struct p2p_noa_descriptor - noa descriptor |
| 1928 | * @type_count: 255: continuous schedule, 0: reserved |
| 1929 | * @duration: Absent period duration in micro seconds |
| 1930 | * @interval: Absent period interval in micro seconds |
| 1931 | * @start_time: 32 bit tsf time when in starts |
| 1932 | */ |
| 1933 | struct p2p_noa_descriptor { |
| 1934 | uint8_t type_count; |
| 1935 | uint32_t duration; |
| 1936 | uint32_t interval; |
| 1937 | uint32_t start_time; |
| 1938 | } __packed; |
| 1939 | |
| 1940 | /** |
| 1941 | * struct p2p_sub_element_noa - p2p noa element |
| 1942 | * @p2p_sub_id: p2p sub id |
| 1943 | * @p2p_sub_len: p2p sub length |
| 1944 | * @index: identifies instance of NOA su element |
| 1945 | * @oppPS: oppPS state of the AP |
| 1946 | * @ctwindow: ctwindow in TUs |
| 1947 | * @num_descriptors: number of NOA descriptors |
| 1948 | * @noa_descriptors: noa descriptors |
| 1949 | */ |
| 1950 | struct p2p_sub_element_noa { |
| 1951 | uint8_t p2p_sub_id; |
| 1952 | uint8_t p2p_sub_len; |
| 1953 | uint8_t index; /* identifies instance of NOA su element */ |
| 1954 | uint8_t oppPS:1, /* oppPS state of the AP */ |
| 1955 | ctwindow:7; /* ctwindow in TUs */ |
| 1956 | uint8_t num_descriptors; /* number of NOA descriptors */ |
| 1957 | struct p2p_noa_descriptor noa_descriptors[WMA_MAX_NOA_DESCRIPTORS]; |
| 1958 | }; |
| 1959 | |
| 1960 | /** |
| 1961 | * struct wma_decap_info_t - decapsulation info |
| 1962 | * @hdr: header |
| 1963 | * @hdr_len: header length |
| 1964 | */ |
| 1965 | struct wma_decap_info_t { |
| 1966 | uint8_t hdr[sizeof(struct ieee80211_qosframe_addr4)]; |
| 1967 | int32_t hdr_len; |
| 1968 | }; |
| 1969 | |
| 1970 | /** |
| 1971 | * enum packet_power_save - packet power save params |
| 1972 | * @WMI_VDEV_PPS_PAID_MATCH: paid match param |
| 1973 | * @WMI_VDEV_PPS_GID_MATCH: gid match param |
| 1974 | * @WMI_VDEV_PPS_EARLY_TIM_CLEAR: early tim clear param |
| 1975 | * @WMI_VDEV_PPS_EARLY_DTIM_CLEAR: early dtim clear param |
| 1976 | * @WMI_VDEV_PPS_EOF_PAD_DELIM: eof pad delim param |
| 1977 | * @WMI_VDEV_PPS_MACADDR_MISMATCH: macaddr mismatch param |
| 1978 | * @WMI_VDEV_PPS_DELIM_CRC_FAIL: delim CRC fail param |
| 1979 | * @WMI_VDEV_PPS_GID_NSTS_ZERO: gid nsts zero param |
| 1980 | * @WMI_VDEV_PPS_RSSI_CHECK: RSSI check param |
| 1981 | * @WMI_VDEV_PPS_5G_EBT: 5G ebt param |
| 1982 | */ |
| 1983 | typedef enum { |
| 1984 | WMI_VDEV_PPS_PAID_MATCH = 0, |
| 1985 | WMI_VDEV_PPS_GID_MATCH = 1, |
| 1986 | WMI_VDEV_PPS_EARLY_TIM_CLEAR = 2, |
| 1987 | WMI_VDEV_PPS_EARLY_DTIM_CLEAR = 3, |
| 1988 | WMI_VDEV_PPS_EOF_PAD_DELIM = 4, |
| 1989 | WMI_VDEV_PPS_MACADDR_MISMATCH = 5, |
| 1990 | WMI_VDEV_PPS_DELIM_CRC_FAIL = 6, |
| 1991 | WMI_VDEV_PPS_GID_NSTS_ZERO = 7, |
| 1992 | WMI_VDEV_PPS_RSSI_CHECK = 8, |
| 1993 | WMI_VDEV_VHT_SET_GID_MGMT = 9, |
| 1994 | WMI_VDEV_PPS_5G_EBT = 10 |
| 1995 | } packet_power_save; |
| 1996 | |
| 1997 | /** |
| 1998 | * enum green_tx_param - green tx parameters |
| 1999 | * @WMI_VDEV_PARAM_GTX_HT_MCS: ht mcs param |
| 2000 | * @WMI_VDEV_PARAM_GTX_VHT_MCS: vht mcs param |
| 2001 | * @WMI_VDEV_PARAM_GTX_USR_CFG: user cfg param |
| 2002 | * @WMI_VDEV_PARAM_GTX_THRE: thre param |
| 2003 | * @WMI_VDEV_PARAM_GTX_MARGIN: green tx margin param |
| 2004 | * @WMI_VDEV_PARAM_GTX_STEP: green tx step param |
| 2005 | * @WMI_VDEV_PARAM_GTX_MINTPC: mintpc param |
| 2006 | * @WMI_VDEV_PARAM_GTX_BW_MASK: bandwidth mask |
| 2007 | */ |
| 2008 | typedef enum { |
| 2009 | WMI_VDEV_PARAM_GTX_HT_MCS, |
| 2010 | WMI_VDEV_PARAM_GTX_VHT_MCS, |
| 2011 | WMI_VDEV_PARAM_GTX_USR_CFG, |
| 2012 | WMI_VDEV_PARAM_GTX_THRE, |
| 2013 | WMI_VDEV_PARAM_GTX_MARGIN, |
| 2014 | WMI_VDEV_PARAM_GTX_STEP, |
| 2015 | WMI_VDEV_PARAM_GTX_MINTPC, |
| 2016 | WMI_VDEV_PARAM_GTX_BW_MASK, |
| 2017 | } green_tx_param; |
| 2018 | |
| 2019 | #ifdef FEATURE_WLAN_TDLS |
| 2020 | /** |
| 2021 | * struct wma_tdls_params - TDLS parameters |
| 2022 | * @vdev_id: vdev id |
| 2023 | * @tdls_state: TDLS state |
| 2024 | * @notification_interval_ms: notification inerval |
| 2025 | * @tx_discovery_threshold: tx discovery threshold |
| 2026 | * @tx_teardown_threshold: tx teardown threashold |
| 2027 | * @rssi_teardown_threshold: RSSI teardown threshold |
| 2028 | * @rssi_delta: RSSI delta |
| 2029 | * @tdls_options: TDLS options |
| 2030 | * @peer_traffic_ind_window: raffic indication window |
| 2031 | * @peer_traffic_response_timeout: traffic response timeout |
| 2032 | * @puapsd_mask: uapsd mask |
| 2033 | * @puapsd_inactivity_time: uapsd inactivity time |
| 2034 | * @puapsd_rx_frame_threshold: uapsd rx frame threshold |
Kabilan Kannan | ca670be | 2015-11-23 01:56:12 -0800 | [diff] [blame] | 2035 | * @teardown_notification_ms: tdls teardown notification interval |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 2036 | * @tdls_peer_kickout_threshold: tdls packet threshold for |
| 2037 | * peer kickout operation |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2038 | */ |
| 2039 | typedef struct wma_tdls_params { |
| 2040 | uint32_t vdev_id; |
| 2041 | uint32_t tdls_state; |
| 2042 | uint32_t notification_interval_ms; |
| 2043 | uint32_t tx_discovery_threshold; |
| 2044 | uint32_t tx_teardown_threshold; |
| 2045 | int32_t rssi_teardown_threshold; |
| 2046 | int32_t rssi_delta; |
| 2047 | uint32_t tdls_options; |
| 2048 | uint32_t peer_traffic_ind_window; |
| 2049 | uint32_t peer_traffic_response_timeout; |
| 2050 | uint32_t puapsd_mask; |
| 2051 | uint32_t puapsd_inactivity_time; |
| 2052 | uint32_t puapsd_rx_frame_threshold; |
Kabilan Kannan | ca670be | 2015-11-23 01:56:12 -0800 | [diff] [blame] | 2053 | uint32_t teardown_notification_ms; |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 2054 | uint32_t tdls_peer_kickout_threshold; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2055 | } t_wma_tdls_params; |
| 2056 | |
| 2057 | /** |
| 2058 | * struct wma_tdls_peer_event - TDLS peer event |
| 2059 | * @vdev_id: vdev id |
| 2060 | * @peer_macaddr: peer MAC address |
| 2061 | * @peer_status: TDLS peer status |
| 2062 | * @peer_reason: TDLS peer reason |
| 2063 | */ |
| 2064 | typedef struct { |
| 2065 | A_UINT32 vdev_id; |
| 2066 | wmi_mac_addr peer_macaddr; |
| 2067 | A_UINT32 peer_status; |
| 2068 | A_UINT32 peer_reason; |
| 2069 | } wma_tdls_peer_event; |
| 2070 | |
| 2071 | #endif /* FEATURE_WLAN_TDLS */ |
| 2072 | |
| 2073 | /** |
| 2074 | * struct wma_dfs_radar_channel_list - dfs radar channel list |
| 2075 | * @nchannels: nuber of channels |
| 2076 | * @channels: Channel number including bonded channels on which |
| 2077 | * radar is present |
| 2078 | */ |
| 2079 | struct wma_dfs_radar_channel_list { |
| 2080 | A_UINT32 nchannels; |
| 2081 | uint8_t channels[WMA_DFS_MAX_20M_SUB_CH]; |
| 2082 | }; |
| 2083 | |
| 2084 | /** |
| 2085 | * struct wma_dfs_radar_indication - Structure to indicate RADAR |
| 2086 | * @vdev_id: vdev id |
| 2087 | * @chan_list: Channel list on which RADAR is detected |
| 2088 | * @dfs_radar_status: Flag to Indicate RADAR presence on the current channel |
| 2089 | * @use_nol: Flag to indicate use NOL |
| 2090 | */ |
| 2091 | struct wma_dfs_radar_indication { |
| 2092 | A_UINT32 vdev_id; |
| 2093 | struct wma_dfs_radar_channel_list chan_list; |
| 2094 | uint32_t dfs_radar_status; |
| 2095 | int use_nol; |
| 2096 | }; |
| 2097 | |
| 2098 | /** |
| 2099 | * enum uapsd_ac - U-APSD Access Categories |
| 2100 | * @UAPSD_BE: best effort |
| 2101 | * @UAPSD_BK: back ground |
| 2102 | * @UAPSD_VI: video |
| 2103 | * @UAPSD_VO: voice |
| 2104 | */ |
| 2105 | enum uapsd_ac { |
| 2106 | UAPSD_BE, |
| 2107 | UAPSD_BK, |
| 2108 | UAPSD_VI, |
| 2109 | UAPSD_VO |
| 2110 | }; |
| 2111 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2112 | QDF_STATUS wma_disable_uapsd_per_ac(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2113 | uint32_t vdev_id, enum uapsd_ac ac); |
| 2114 | |
| 2115 | /** |
| 2116 | * enum uapsd_up - U-APSD User Priorities |
| 2117 | * @UAPSD_UP_BE: best effort |
| 2118 | * @UAPSD_UP_BK: back ground |
| 2119 | * @UAPSD_UP_RESV: reserve |
| 2120 | * @UAPSD_UP_EE: Excellent Effort |
| 2121 | * @UAPSD_UP_CL: Critical Applications |
| 2122 | * @UAPSD_UP_VI: video |
| 2123 | * @UAPSD_UP_VO: voice |
| 2124 | * @UAPSD_UP_NC: Network Control |
| 2125 | */ |
| 2126 | enum uapsd_up { |
| 2127 | UAPSD_UP_BE, |
| 2128 | UAPSD_UP_BK, |
| 2129 | UAPSD_UP_RESV, |
| 2130 | UAPSD_UP_EE, |
| 2131 | UAPSD_UP_CL, |
| 2132 | UAPSD_UP_VI, |
| 2133 | UAPSD_UP_VO, |
| 2134 | UAPSD_UP_NC, |
| 2135 | UAPSD_UP_MAX |
| 2136 | }; |
| 2137 | |
| 2138 | /** |
| 2139 | * struct wma_unit_test_cmd - unit test command parameters |
| 2140 | * @vdev_id: vdev id |
| 2141 | * @module_id: module id |
| 2142 | * @num_args: number of arguments |
| 2143 | * @args: arguments |
| 2144 | */ |
| 2145 | typedef struct wma_unit_test_cmd { |
| 2146 | uint32_t vdev_id; |
| 2147 | WLAN_MODULE_ID module_id; |
| 2148 | uint32_t num_args; |
| 2149 | uint32_t args[WMA_MAX_NUM_ARGS]; |
| 2150 | } t_wma_unit_test_cmd; |
| 2151 | |
| 2152 | /** |
| 2153 | * struct wma_roam_invoke_cmd - roam invoke command |
| 2154 | * @vdev_id: vdev id |
| 2155 | * @bssid: mac address |
| 2156 | * @channel: channel |
| 2157 | */ |
| 2158 | struct wma_roam_invoke_cmd { |
| 2159 | uint32_t vdev_id; |
| 2160 | uint8_t bssid[IEEE80211_ADDR_LEN]; |
| 2161 | uint32_t channel; |
| 2162 | }; |
| 2163 | |
| 2164 | /** |
| 2165 | * struct wma_process_fw_event_params - fw event parameters |
| 2166 | * @wmi_handle: wmi handle |
| 2167 | * @evt_buf: event buffer |
| 2168 | */ |
| 2169 | typedef struct { |
| 2170 | void *wmi_handle; |
| 2171 | void *evt_buf; |
| 2172 | } wma_process_fw_event_params; |
| 2173 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 2174 | int wma_process_fw_event_handler(void *ctx, void *ev, uint8_t rx_ctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2175 | |
| 2176 | A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype, |
| 2177 | eCsrEncryptionType encr); |
| 2178 | A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr); |
| 2179 | |
| 2180 | /* |
| 2181 | * WMA-DFS Hooks |
| 2182 | */ |
| 2183 | int ol_if_dfs_attach(struct ieee80211com *ic, void *ptr, void *radar_info); |
| 2184 | uint64_t ol_if_get_tsf64(struct ieee80211com *ic); |
| 2185 | int ol_if_dfs_disable(struct ieee80211com *ic); |
Chandrasekaran, Manishekar | 22a7e1e | 2015-11-05 10:38:49 +0530 | [diff] [blame] | 2186 | struct dfs_ieee80211_channel *ieee80211_find_channel(struct ieee80211com *ic, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2187 | int freq, uint32_t flags); |
| 2188 | int ol_if_dfs_enable(struct ieee80211com *ic, int *is_fastclk, void *pe); |
| 2189 | uint32_t ieee80211_ieee2mhz(uint32_t chan, uint32_t flags); |
| 2190 | int ol_if_dfs_get_ext_busy(struct ieee80211com *ic); |
| 2191 | int ol_if_dfs_get_mib_cycle_counts_pct(struct ieee80211com *ic, |
| 2192 | uint32_t *rxc_pcnt, uint32_t *rxf_pcnt, |
| 2193 | uint32_t *txf_pcnt); |
| 2194 | uint16_t ol_if_dfs_usenol(struct ieee80211com *ic); |
| 2195 | void ieee80211_mark_dfs(struct ieee80211com *ic, |
Chandrasekaran, Manishekar | 22a7e1e | 2015-11-05 10:38:49 +0530 | [diff] [blame] | 2196 | struct dfs_ieee80211_channel *ichan); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2197 | int wma_dfs_indicate_radar(struct ieee80211com *ic, |
Chandrasekaran, Manishekar | 22a7e1e | 2015-11-05 10:38:49 +0530 | [diff] [blame] | 2198 | struct dfs_ieee80211_channel *ichan); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2199 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2200 | QDF_STATUS wma_trigger_uapsd_params(tp_wma_handle wma_handle, uint32_t vdev_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2201 | tp_wma_trigger_uapsd_params |
| 2202 | trigger_uapsd_params); |
| 2203 | |
| 2204 | /* added to get average snr for both data and beacon */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2205 | QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle, void *pGetRssiReq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2206 | |
| 2207 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2208 | QDF_STATUS wma_update_vdev_tbl(tp_wma_handle wma_handle, uint8_t vdev_id, |
Leo Chang | 9646490 | 2016-10-28 11:10:54 -0700 | [diff] [blame] | 2209 | void *tx_rx_vdev_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2210 | uint8_t *mac, uint32_t vdev_type, bool add_del); |
| 2211 | |
| 2212 | void wma_send_flush_logs_to_fw(tp_wma_handle wma_handle); |
| 2213 | void wma_log_completion_timeout(void *data); |
| 2214 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2215 | QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2216 | struct rssi_monitor_req *req); |
| 2217 | |
Manishekar Chandrasekaran | 7009f25 | 2016-04-21 19:14:15 +0530 | [diff] [blame] | 2218 | QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle, |
| 2219 | struct wmi_pcl_chan_weights *msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2220 | |
Manishekar Chandrasekaran | d964034 | 2016-04-27 12:28:26 +0530 | [diff] [blame] | 2221 | QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2222 | struct sir_hw_mode *msg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2223 | QDF_STATUS wma_get_scan_id(uint32_t *scan_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2224 | |
Manishekar Chandrasekaran | 5d46f70 | 2016-04-27 12:50:52 +0530 | [diff] [blame] | 2225 | QDF_STATUS wma_send_pdev_set_dual_mac_config(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2226 | struct sir_dual_mac_config *msg); |
Archana Ramachandran | d41c3ed | 2016-02-10 15:48:06 -0800 | [diff] [blame] | 2227 | QDF_STATUS wma_send_pdev_set_antenna_mode(tp_wma_handle wma_handle, |
| 2228 | struct sir_antenna_mode_param *msg); |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 2229 | QDF_STATUS wma_crash_inject(tp_wma_handle wma_handle, uint32_t type, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2230 | uint32_t delay_time_ms); |
| 2231 | |
| 2232 | struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, |
| 2233 | uint8_t vdev_id, |
| 2234 | uint32_t msg_type, uint8_t type, |
| 2235 | void *params, uint32_t timeout); |
| 2236 | struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, |
| 2237 | uint8_t vdev_id, uint32_t msg_type, |
| 2238 | uint8_t type, void *params, |
| 2239 | uint32_t timeout); |
| 2240 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2241 | QDF_STATUS wma_vdev_start(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2242 | struct wma_vdev_start_req *req, bool isRestart); |
| 2243 | |
| 2244 | void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id, |
| 2245 | uint8_t type); |
| 2246 | |
| 2247 | int wmi_desc_pool_init(tp_wma_handle wma_handle, uint32_t pool_size); |
| 2248 | void wmi_desc_pool_deinit(tp_wma_handle wma_handle); |
| 2249 | struct wmi_desc_t *wmi_desc_get(tp_wma_handle wma_handle); |
| 2250 | void wmi_desc_put(tp_wma_handle wma_handle, struct wmi_desc_t *wmi_desc); |
| 2251 | int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params, |
| 2252 | uint32_t len); |
Nirav Shah | 2048997 | 2016-06-16 19:20:28 +0530 | [diff] [blame] | 2253 | int wma_mgmt_tx_bundle_completion_handler(void *handle, |
| 2254 | uint8_t *cmpl_event_params, uint32_t len); |
Amar Singhal | 604ba6cf | 2016-07-27 15:29:51 -0700 | [diff] [blame] | 2255 | void wma_set_dfs_region(tp_wma_handle wma, enum dfs_region dfs_region); |
Naveen Rawat | c0c91cd | 2015-11-05 14:27:37 -0800 | [diff] [blame] | 2256 | uint32_t wma_get_vht_ch_width(void); |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 2257 | QDF_STATUS |
| 2258 | wma_config_debug_module_cmd(wmi_unified_t wmi_handle, A_UINT32 param, |
| 2259 | A_UINT32 val, A_UINT32 *module_id_bitmap, |
| 2260 | A_UINT32 bitmap_len); |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 2261 | #ifdef FEATURE_LFR_SUBNET_DETECTION |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2262 | QDF_STATUS wma_set_gateway_params(tp_wma_handle wma, |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 2263 | struct gateway_param_update_req *req); |
| 2264 | #else |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2265 | static inline QDF_STATUS wma_set_gateway_params(tp_wma_handle wma, |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 2266 | struct gateway_param_update_req *req) |
| 2267 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2268 | return QDF_STATUS_SUCCESS; |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 2269 | } |
| 2270 | #endif /* FEATURE_LFR_SUBNET_DETECTION */ |
| 2271 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2272 | #if defined(FEATURE_LRO) |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2273 | QDF_STATUS wma_lro_config_cmd(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2274 | struct wma_lro_config_cmd_t *wma_lro_cmd); |
| 2275 | #else |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2276 | static inline QDF_STATUS wma_lro_config_cmd(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2277 | struct wma_lro_config_cmd_t *wma_lro_cmd) |
| 2278 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 2279 | return QDF_STATUS_SUCCESS; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2280 | } |
| 2281 | #endif |
Dhanashri Atre | 1f0cbe4 | 2015-11-19 10:56:53 -0800 | [diff] [blame] | 2282 | void |
| 2283 | wma_indicate_err(enum ol_rx_err_type err_type, |
| 2284 | struct ol_error_info *err_info); |
Sandeep Puligilla | e087566 | 2016-02-12 16:09:21 -0800 | [diff] [blame] | 2285 | |
| 2286 | QDF_STATUS wma_ht40_stop_obss_scan(tp_wma_handle wma_handle, |
| 2287 | int32_t vdev_id); |
Anurag Chouhan | bf5e0e2 | 2016-09-12 12:54:09 +0530 | [diff] [blame] | 2288 | |
| 2289 | void wma_process_fw_test_cmd(WMA_HANDLE handle, |
| 2290 | struct set_fwtest_params *wma_fwtest); |
| 2291 | |
Sandeep Puligilla | e087566 | 2016-02-12 16:09:21 -0800 | [diff] [blame] | 2292 | QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma, |
| 2293 | struct obss_ht40_scanind *req); |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 2294 | |
| 2295 | int wma_get_bpf_caps_event_handler(void *handle, |
| 2296 | u_int8_t *cmd_param_info, |
| 2297 | u_int32_t len); |
Krunal Soni | aa664da | 2016-06-15 23:46:40 -0700 | [diff] [blame] | 2298 | uint32_t wma_get_num_of_setbits_from_bitmask(uint32_t mask); |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 2299 | QDF_STATUS wma_get_bpf_capabilities(tp_wma_handle wma); |
| 2300 | QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma, |
| 2301 | struct sir_bpf_set_offload *bpf_set_offload); |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 2302 | void wma_process_set_pdev_ie_req(tp_wma_handle wma, |
| 2303 | struct set_ie_param *ie_params); |
| 2304 | void wma_process_set_pdev_ht_ie_req(tp_wma_handle wma, |
| 2305 | struct set_ie_param *ie_params); |
| 2306 | void wma_process_set_pdev_vht_ie_req(tp_wma_handle wma, |
| 2307 | struct set_ie_param *ie_params); |
Deepak Dhamdhere | 13983f2 | 2016-05-31 19:06:09 -0700 | [diff] [blame] | 2308 | void wma_remove_peer(tp_wma_handle wma, u_int8_t *bssid, |
Leo Chang | 9646490 | 2016-10-28 11:10:54 -0700 | [diff] [blame] | 2309 | u_int8_t vdev_id, void *peer, |
Deepak Dhamdhere | 13983f2 | 2016-05-31 19:06:09 -0700 | [diff] [blame] | 2310 | bool roam_synch_in_progress); |
Naveen Rawat | e82c1f3 | 2016-06-22 15:34:36 -0700 | [diff] [blame] | 2311 | |
| 2312 | QDF_STATUS wma_add_wow_wakeup_event(tp_wma_handle wma, |
| 2313 | uint32_t vdev_id, |
| 2314 | uint32_t bitmap, |
| 2315 | bool enable); |
Leo Chang | 9646490 | 2016-10-28 11:10:54 -0700 | [diff] [blame] | 2316 | QDF_STATUS wma_create_peer(tp_wma_handle wma, void *pdev, |
| 2317 | void *vdev, u8 peer_addr[6], |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 2318 | u_int32_t peer_type, u_int8_t vdev_id, |
| 2319 | bool roam_synch_in_progress); |
Naveen Rawat | e82c1f3 | 2016-06-22 15:34:36 -0700 | [diff] [blame] | 2320 | |
Komal Seelam | 02d0934 | 2016-02-23 18:03:19 +0530 | [diff] [blame] | 2321 | struct wma_ini_config *wma_get_ini_handle(tp_wma_handle wma_handle); |
Abhishek Singh | 1c67622 | 2016-05-09 14:20:28 +0530 | [diff] [blame] | 2322 | WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width, |
| 2323 | u8 dot11_mode); |
Krishna Kumaar Natarajan | c5e06ac | 2016-06-30 16:49:19 -0700 | [diff] [blame] | 2324 | |
| 2325 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 2326 | QDF_STATUS wma_start_oem_data_req(tp_wma_handle wma_handle, |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 2327 | struct oem_data_req *oem_req); |
Krishna Kumaar Natarajan | c5e06ac | 2016-06-30 16:49:19 -0700 | [diff] [blame] | 2328 | #endif |
Selvaraj, Sridhar | ebda0f2 | 2016-08-29 16:05:23 +0530 | [diff] [blame] | 2329 | |
| 2330 | QDF_STATUS wma_enable_disable_caevent_ind(tp_wma_handle wma_handle, |
| 2331 | uint8_t val); |
Himanshu Agarwal | f65bd4c | 2016-12-05 17:21:12 +0530 | [diff] [blame] | 2332 | void wma_register_packetdump_callback( |
| 2333 | tp_wma_packetdump_cb wma_mgmt_tx_packetdump_cb, |
| 2334 | tp_wma_packetdump_cb wma_mgmt_rx_packetdump_cb); |
| 2335 | void wma_deregister_packetdump_callback(void); |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 2336 | void wma_update_sta_inactivity_timeout(tp_wma_handle wma, |
| 2337 | struct sme_sta_inactivity_timeout *sta_inactivity_timer); |
Leo Chang | 9646490 | 2016-10-28 11:10:54 -0700 | [diff] [blame] | 2338 | void wma_peer_set_default_routing(void *scn_handle, uint8_t *peer_macaddr, |
| 2339 | uint8_t vdev_id, bool hash_based, uint8_t ring_num); |
| 2340 | int wma_peer_rx_reorder_queue_setup(void *scn_handle, |
| 2341 | uint8_t vdev_id, uint8_t *peer_macaddr, qdf_dma_addr_t hw_qdesc, |
| 2342 | int tid, uint16_t queue_no); |
| 2343 | int wma_peer_rx_reorder_queue_remove(void *scn_handle, |
| 2344 | uint8_t vdev_id, uint8_t *peer_macaddr, uint32_t peer_tid_bitmap); |
Himanshu Agarwal | 2fdf77a | 2016-12-29 11:41:00 +0530 | [diff] [blame^] | 2345 | |
| 2346 | /** |
| 2347 | * wma_form_rx_packet() - form rx cds packet |
| 2348 | * @buf: buffer |
| 2349 | * @mgmt_rx_params: mgmt rx params |
| 2350 | * @rx_pkt: cds packet |
| 2351 | * |
| 2352 | * This functions forms a cds packet from the rx mgmt frame received. |
| 2353 | * |
| 2354 | * Return: 0 for success or error code |
| 2355 | */ |
| 2356 | int wma_form_rx_packet(qdf_nbuf_t buf, |
| 2357 | void *mgmt_rx_params, |
| 2358 | cds_pkt_t *rx_pkt); |
| 2359 | |
| 2360 | /** |
| 2361 | * wma_mgmt_unified_cmd_send() - send the mgmt tx packet |
| 2362 | * @vdev: objmgr vdev |
| 2363 | * @buf: buffer |
| 2364 | * @desc_id: desc id |
| 2365 | * @mgmt_tx_params: mgmt rx params |
| 2366 | * |
| 2367 | * This functions sends mgmt tx packet to WMI layer. |
| 2368 | * |
| 2369 | * Return: 0 for success or error code |
| 2370 | */ |
| 2371 | QDF_STATUS wma_mgmt_unified_cmd_send(struct wlan_objmgr_vdev *vdev, |
| 2372 | qdf_nbuf_t buf, uint32_t desc_id, |
| 2373 | void *mgmt_tx_params); |
| 2374 | #endif |