Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Nachiket Kukade | 2c73ade | 2017-12-20 17:30:36 +0530 | [diff] [blame] | 2 | * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #ifndef WMA_INTERNAL_H |
| 20 | #define WMA_INTERNAL_H |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 21 | #include <cdp_txrx_handle.h> |
Deepak Dhamdhere | e2dd544 | 2016-05-27 15:05:51 -0700 | [diff] [blame] | 22 | #if !defined(REMOVE_PKT_LOG) |
| 23 | #include "pktlog_ac.h" |
| 24 | #endif |
| 25 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 26 | /* ################### defines ################### */ |
| 27 | /* |
| 28 | * TODO: Following constant should be shared by firwmare in |
| 29 | * wmi_unified.h. This will be done once wmi_unified.h is updated. |
| 30 | */ |
| 31 | #define WMI_PEER_STATE_AUTHORIZED 0x2 |
| 32 | |
| 33 | #define WMA_2_4_GHZ_MAX_FREQ 3000 |
| 34 | #define WOW_CSA_EVENT_OFFSET 12 |
| 35 | |
| 36 | #define WMA_DEFAULT_SCAN_REQUESTER_ID 1 |
| 37 | #define WMI_SCAN_FINISH_EVENTS (WMI_SCAN_EVENT_START_FAILED | \ |
| 38 | WMI_SCAN_EVENT_COMPLETED | \ |
| 39 | WMI_SCAN_EVENT_DEQUEUED) |
| 40 | /* default value */ |
| 41 | #define DEFAULT_INFRA_STA_KEEP_ALIVE_PERIOD 20 |
mukul sharma | 72c8b22 | 2015-09-04 17:02:01 +0530 | [diff] [blame] | 42 | #define DEFAULT_STA_SA_QUERY_MAX_RETRIES_COUNT (5) |
| 43 | #define DEFAULT_STA_SA_QUERY_RETRY_INTERVAL (200) |
| 44 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 45 | /* pdev vdev and peer stats*/ |
| 46 | #define FW_PDEV_STATS_SET 0x1 |
| 47 | #define FW_VDEV_STATS_SET 0x2 |
| 48 | #define FW_PEER_STATS_SET 0x4 |
Himanshu Agarwal | 37e4241 | 2016-07-21 14:35:09 +0530 | [diff] [blame] | 49 | #define FW_RSSI_PER_CHAIN_STATS_SET 0x8 |
| 50 | #define FW_STATS_SET 0xf |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 51 | |
| 52 | /*AR9888/AR6320 noise floor approx value |
| 53 | * similar to the mentioned the WMA |
| 54 | */ |
| 55 | #define WMA_TGT_NOISE_FLOOR_DBM (-96) |
Naveen Rawat | f440a13 | 2017-05-05 12:27:39 -0700 | [diff] [blame] | 56 | #define WMA_TGT_MAX_SNR (WMA_TGT_NOISE_FLOOR_DBM * (-1)) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 57 | |
| 58 | /* |
| 59 | * Make sure that link monitor and keep alive |
| 60 | * default values should be in sync with CFG. |
| 61 | */ |
| 62 | #define WMA_LINK_MONITOR_DEFAULT_TIME_SECS 10 |
| 63 | #define WMA_KEEP_ALIVE_DEFAULT_TIME_SECS 5 |
| 64 | |
| 65 | #define AGC_DUMP 1 |
| 66 | #define CHAN_DUMP 2 |
| 67 | #define WD_DUMP 3 |
| 68 | #ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG |
| 69 | #define PCIE_DUMP 4 |
| 70 | #endif |
| 71 | |
| 72 | /* conformance test limits */ |
| 73 | #define FCC 0x10 |
| 74 | #define MKK 0x40 |
| 75 | #define ETSI 0x30 |
| 76 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 77 | #define WMI_DEFAULT_NOISE_FLOOR_DBM (-96) |
| 78 | |
| 79 | #define WMI_MCC_MIN_CHANNEL_QUOTA 20 |
| 80 | #define WMI_MCC_MAX_CHANNEL_QUOTA 80 |
| 81 | #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30 |
| 82 | |
| 83 | /* The maximum number of patterns that can be transmitted by the firmware |
| 84 | * and maximum patterns size. |
| 85 | */ |
jsreekum | ac44b92 | 2018-06-12 20:18:39 +0530 | [diff] [blame] | 86 | #ifndef WMA_MAXNUM_PERIODIC_TX_PTRNS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 87 | #define WMA_MAXNUM_PERIODIC_TX_PTRNS 6 |
jsreekum | ac44b92 | 2018-06-12 20:18:39 +0530 | [diff] [blame] | 88 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 89 | |
| 90 | #define WMI_MAX_HOST_CREDITS 2 |
| 91 | #define WMI_WOW_REQUIRED_CREDITS 1 |
| 92 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 93 | #define WMI_MAX_MHF_ENTRIES 32 |
| 94 | |
| 95 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 96 | #define MAX_HT_MCS_IDX 8 |
| 97 | #define MAX_VHT_MCS_IDX 10 |
| 98 | #define INVALID_MCS_IDX 255 |
| 99 | |
| 100 | #define LINK_STATUS_LEGACY 0 |
| 101 | #define LINK_STATUS_VHT 0x1 |
| 102 | #define LINK_STATUS_MIMO 0x2 |
| 103 | #define LINK_SUPPORT_VHT 0x4 |
| 104 | #define LINK_SUPPORT_MIMO 0x8 |
| 105 | |
| 106 | #define LINK_RATE_VHT 0x3 |
| 107 | |
| 108 | #define MAX_ENTRY_HOLD_REQ_QUEUE 2 |
Krishna Kumaar Natarajan | a5c53bd | 2015-10-27 11:48:27 -0700 | [diff] [blame] | 109 | #define MAX_ENTRY_VDEV_RESP_QUEUE 10 |
| 110 | |
Krishna Kumaar Natarajan | b7f9a35 | 2016-03-18 11:40:07 -0700 | [diff] [blame] | 111 | /* Time(in ms) to detect DOS attack */ |
| 112 | #define WMA_MGMT_FRAME_DETECT_DOS_TIMER 1000 |
| 113 | |
Himanshu Agarwal | a1539d3 | 2017-10-11 18:08:56 +0530 | [diff] [blame] | 114 | #define MAX_NUM_HW_MODE 0xff |
| 115 | #define MAX_NUM_PHY 0xff |
| 116 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 117 | /** |
| 118 | * struct index_data_rate_type - non vht data rate type |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 119 | * @mcs_index: mcs rate index |
| 120 | * @ht20_rate: HT20 supported rate table |
| 121 | * @ht40_rate: HT40 supported rate table |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 122 | */ |
| 123 | struct index_data_rate_type { |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 124 | uint8_t mcs_index; |
| 125 | uint16_t ht20_rate[2]; |
| 126 | uint16_t ht40_rate[2]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 127 | }; |
| 128 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 129 | /** |
| 130 | * struct index_vht_data_rate_type - vht data rate type |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 131 | * @mcs_index: mcs rate index |
| 132 | * @ht20_rate: VHT20 supported rate table |
| 133 | * @ht40_rate: VHT40 supported rate table |
| 134 | * @ht80_rate: VHT80 supported rate table |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 135 | */ |
| 136 | struct index_vht_data_rate_type { |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 137 | uint8_t mcs_index; |
| 138 | uint16_t ht20_rate[2]; |
| 139 | uint16_t ht40_rate[2]; |
| 140 | uint16_t ht80_rate[2]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 141 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 142 | |
Wen Gong | 7952fbd | 2018-04-18 11:27:23 +0800 | [diff] [blame] | 143 | struct tSirWifiScanCmdReqParams; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 144 | /* |
| 145 | * wma_main.c functions declarations |
| 146 | */ |
| 147 | |
| 148 | int |
| 149 | wmi_unified_pdev_set_param(wmi_unified_t wmi_handle, WMI_PDEV_PARAM param_id, |
| 150 | uint32_t param_value); |
| 151 | |
Abhishek Singh | 2d775fd | 2017-08-18 10:51:33 +0530 | [diff] [blame] | 152 | /** |
| 153 | * wma_send_msg_by_priority() - Send wma message to PE with priority. |
| 154 | * @wma_handle: wma handle |
| 155 | * @msg_type: message type |
| 156 | * @body_ptr: message body ptr |
| 157 | * @body_val: message body value |
| 158 | * @is_high_priority: if msg is high priority |
| 159 | * |
| 160 | * Return: none |
| 161 | */ |
| 162 | void wma_send_msg_by_priority(tp_wma_handle wma_handle, uint16_t msg_type, |
| 163 | void *body_ptr, uint32_t body_val, bool is_high_priority); |
| 164 | |
| 165 | /** |
| 166 | * wma_send_msg() - Send wma message to PE. |
| 167 | * @wma_handle: wma handle |
| 168 | * @msg_type: message type |
| 169 | * @body_ptr: message body ptr |
| 170 | * @body_val: message body value |
| 171 | * |
| 172 | * Return: none |
| 173 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 174 | void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type, |
| 175 | void *body_ptr, uint32_t body_val); |
| 176 | |
Abhishek Singh | 2d775fd | 2017-08-18 10:51:33 +0530 | [diff] [blame] | 177 | /** |
| 178 | * wma_send_msg_high_priority() - Send wma message to PE with high priority. |
| 179 | * @wma_handle: wma handle |
| 180 | * @msg_type: message type |
| 181 | * @body_ptr: message body ptr |
| 182 | * @body_val: message body value |
| 183 | * |
| 184 | * Return: none |
| 185 | */ |
| 186 | void wma_send_msg_high_priority(tp_wma_handle wma_handle, uint16_t msg_type, |
| 187 | void *body_ptr, uint32_t body_val); |
| 188 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 189 | void wma_data_tx_ack_comp_hdlr(void *wma_context, |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 190 | qdf_nbuf_t netbuf, int32_t status); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 191 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 192 | QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 193 | int value); |
| 194 | |
| 195 | /* |
| 196 | * wma_scan_roam.c functions declarations |
| 197 | */ |
| 198 | |
| 199 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 200 | void wma_process_roam_invoke(WMA_HANDLE handle, |
| 201 | struct wma_roam_invoke_cmd *roaminvoke); |
| 202 | |
| 203 | void wma_process_roam_synch_fail(WMA_HANDLE handle, |
| 204 | struct roam_offload_synch_fail *synch_fail); |
| 205 | |
| 206 | int wma_roam_synch_event_handler(void *handle, uint8_t *event, |
| 207 | uint32_t len); |
Padma, Santhosh Kumar | aa2433e | 2017-10-06 14:34:46 +0530 | [diff] [blame] | 208 | |
| 209 | /** |
| 210 | * wma_roam_synch_frame_event_handler() - roam synch frame event handler |
| 211 | * @handle: wma handle |
| 212 | * @event: event data |
| 213 | * @len: length of data |
| 214 | * |
| 215 | * This function is roam synch frame event handler. |
| 216 | * |
| 217 | * Return: Success or Failure status |
| 218 | */ |
| 219 | int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event, |
| 220 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 221 | #endif |
| 222 | |
Kapil Gupta | 5cda225 | 2016-12-29 18:44:26 +0530 | [diff] [blame] | 223 | /** |
| 224 | * wma_update_per_roam_config() -per roam config parameter updation to FW |
| 225 | * @handle: wma handle |
| 226 | * @req_buf: per roam config parameters |
| 227 | * |
| 228 | * Return: none |
| 229 | */ |
| 230 | void wma_update_per_roam_config(WMA_HANDLE handle, |
| 231 | struct wmi_per_roam_config_req *req_buf); |
| 232 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 233 | QDF_STATUS wma_update_channel_list(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 234 | tSirUpdateChanList *chan_list); |
| 235 | |
| 236 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 237 | QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, |
Himanshu Agarwal | b56ad2e | 2016-07-19 15:43:09 +0530 | [diff] [blame] | 238 | roam_offload_param * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 239 | roam_offload_params, |
| 240 | tSirRoamOffloadScanReq *roam_req); |
| 241 | #endif |
| 242 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 243 | QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 244 | wmi_start_scan_cmd_fixed_param * |
| 245 | scan_cmd_fp, |
| 246 | tSirRoamOffloadScanReq *roam_req, |
| 247 | uint32_t mode, uint32_t vdev_id); |
| 248 | |
Varun Reddy Yeturu | 061d4d6 | 2017-07-20 09:39:32 -0700 | [diff] [blame] | 249 | /** |
| 250 | * wma_roam_scan_mawc_params() - send roam scan mode request to fw |
| 251 | * @wma_handle: wma handle |
| 252 | * @roam_req: roam request param |
| 253 | * |
| 254 | * Fill the MAWC roaming parameters and send |
| 255 | * WMI_ROAM_CONFIGURE_MAWC_CMDID TLV to firmware. |
| 256 | * |
| 257 | * Return: QDF status |
| 258 | */ |
| 259 | QDF_STATUS wma_roam_scan_mawc_params(tp_wma_handle wma_handle, |
| 260 | tSirRoamOffloadScanReq *roam_req); |
| 261 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 262 | QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 263 | tSirRoamOffloadScanReq *roam_req); |
| 264 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 265 | QDF_STATUS wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 266 | uint32_t scan_period, |
| 267 | uint32_t scan_age, |
| 268 | uint32_t vdev_id); |
| 269 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 270 | QDF_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 271 | uint32_t vdev_id, |
| 272 | int32_t rssi_change_thresh, |
| 273 | uint32_t bcn_rssi_weight, |
| 274 | uint32_t hirssi_delay_btw_scans); |
| 275 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 276 | QDF_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 277 | uint8_t chan_count, |
| 278 | uint8_t *chan_list, |
| 279 | uint8_t list_type, uint32_t vdev_id); |
| 280 | |
| 281 | A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype, |
| 282 | eCsrEncryptionType encr); |
| 283 | |
| 284 | A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr); |
| 285 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 286 | void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, |
| 287 | tpAniSirGlobal pMac, |
| 288 | tSirRoamOffloadScanReq *roam_req, |
| 289 | wmi_start_scan_cmd_fixed_param * |
| 290 | scan_params); |
| 291 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 292 | QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 293 | A_INT32 first_bcnt, |
| 294 | A_UINT32 final_bcnt, uint32_t vdev_id); |
| 295 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 296 | QDF_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 297 | uint32_t command, uint32_t vdev_id); |
| 298 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 299 | QDF_STATUS wma_roam_preauth_chan_set(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 300 | tpSwitchChannelParams params, |
| 301 | uint8_t vdev_id); |
| 302 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 303 | QDF_STATUS wma_roam_preauth_chan_cancel(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 304 | tpSwitchChannelParams params, |
| 305 | uint8_t vdev_id); |
| 306 | |
| 307 | void wma_roam_preauth_scan_event_handler(tp_wma_handle wma_handle, |
| 308 | uint8_t vdev_id, |
| 309 | wmi_scan_event_fixed_param * |
| 310 | wmi_event); |
| 311 | |
| 312 | void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params); |
| 313 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 314 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 315 | void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts); |
| 316 | #endif |
| 317 | |
| 318 | #ifdef FEATURE_WLAN_EXTSCAN |
| 319 | |
| 320 | int wma_extscan_start_stop_event_handler(void *handle, |
| 321 | uint8_t *cmd_param_info, |
| 322 | uint32_t len); |
| 323 | |
| 324 | int wma_extscan_operations_event_handler(void *handle, |
| 325 | uint8_t *cmd_param_info, |
| 326 | uint32_t len); |
| 327 | |
| 328 | int wma_extscan_table_usage_event_handler(void *handle, |
| 329 | uint8_t *cmd_param_info, |
| 330 | uint32_t len); |
| 331 | |
| 332 | int wma_extscan_capabilities_event_handler(void *handle, |
| 333 | uint8_t *cmd_param_info, |
| 334 | uint32_t len); |
| 335 | |
| 336 | int wma_extscan_hotlist_match_event_handler(void *handle, |
| 337 | uint8_t *cmd_param_info, |
| 338 | uint32_t len); |
| 339 | |
| 340 | int wma_extscan_cached_results_event_handler(void *handle, |
| 341 | uint8_t *cmd_param_info, |
| 342 | uint32_t len); |
| 343 | |
| 344 | int wma_extscan_change_results_event_handler(void *handle, |
| 345 | uint8_t *cmd_param_info, |
| 346 | uint32_t len); |
| 347 | |
| 348 | int wma_passpoint_match_event_handler(void *handle, |
| 349 | uint8_t *cmd_param_info, |
| 350 | uint32_t len); |
| 351 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 352 | #endif |
| 353 | |
Wen Gong | 7952fbd | 2018-04-18 11:27:23 +0800 | [diff] [blame] | 354 | #ifdef FEATURE_WLAN_EXTSCAN |
| 355 | int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len); |
| 356 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 357 | void wma_register_extscan_event_handler(tp_wma_handle wma_handle); |
| 358 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 359 | QDF_STATUS wma_start_extscan(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 360 | tSirWifiScanCmdReqParams *pstart); |
| 361 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 362 | QDF_STATUS wma_stop_extscan(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 363 | tSirExtScanStopReqParams *pstopcmd); |
| 364 | |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 365 | /** |
| 366 | * wma_extscan_start_hotlist_monitor() - start hotlist monitor |
| 367 | * @wma: wma handle |
| 368 | * @params: hotlist request params |
| 369 | * |
| 370 | * This function configures hotlist monitor in fw. |
| 371 | * |
| 372 | * Return: QDF status |
| 373 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 374 | QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma, |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 375 | struct extscan_bssid_hotlist_set_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 376 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 377 | QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma, |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 378 | tSirExtScanResetBssidHotlistReqParams *photlist_reset); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 379 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 380 | QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 381 | tSirExtScanSetSigChangeReqParams * |
| 382 | psigchange); |
| 383 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 384 | QDF_STATUS wma_extscan_stop_change_monitor(tp_wma_handle wma, |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 385 | tSirExtScanResetSignificantChangeReqParams *pResetReq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 386 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 387 | QDF_STATUS wma_extscan_get_cached_results(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 388 | tSirExtScanGetCachedResultsReqParams * |
| 389 | pcached_results); |
| 390 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 391 | QDF_STATUS wma_extscan_get_capabilities(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 392 | tSirGetExtScanCapabilitiesReqParams * |
| 393 | pgetcapab); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 394 | QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 395 | struct wifi_epno_params *req); |
| 396 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 397 | QDF_STATUS wma_set_passpoint_network_list(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 398 | struct wifi_passpoint_req *req); |
| 399 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 400 | QDF_STATUS wma_reset_passpoint_network_list(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 401 | struct wifi_passpoint_req *req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 402 | #endif |
| 403 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 404 | QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 405 | |
| 406 | int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data, uint32_t len); |
| 407 | |
| 408 | void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id); |
| 409 | |
| 410 | int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf, |
| 411 | uint32_t len); |
| 412 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 413 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 414 | void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id); |
| 415 | static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma, |
| 416 | uint8_t vdev_id) |
| 417 | { |
| 418 | return wma->interfaces[vdev_id].roam_synch_in_progress; |
| 419 | } |
| 420 | #else |
| 421 | static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma, |
| 422 | uint8_t vdev_id) |
| 423 | { |
| 424 | return false; |
| 425 | } |
Varun Reddy Yeturu | 101f954 | 2016-05-24 10:07:52 -0700 | [diff] [blame] | 426 | static inline uint32_t wma_roam_scan_get_cckm_mode( |
| 427 | struct sSirRoamOffloadScanReq *roam_req, uint32_t auth_mode) |
| 428 | { |
| 429 | return WMI_AUTH_CCKM; |
| 430 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 431 | #endif |
| 432 | |
| 433 | /* |
| 434 | * wma_dev_if.c functions declarations |
| 435 | */ |
| 436 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 437 | struct cdp_vdev *wma_find_vdev_by_addr(tp_wma_handle wma, uint8_t *addr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 438 | uint8_t *vdev_id); |
| 439 | |
| 440 | /** |
| 441 | * wma_find_vdev_by_id() - Returns vdev handle for given vdev id. |
| 442 | * @wma - wma handle |
| 443 | * @vdev_id - vdev ID |
| 444 | * |
| 445 | * Return: Returns vdev handle if given vdev id is valid. |
| 446 | * Otherwise returns NULL. |
| 447 | */ |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 448 | static inline |
| 449 | struct cdp_vdev *wma_find_vdev_by_id(tp_wma_handle wma, uint8_t vdev_id) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 450 | { |
Naveen Rawat | f2bd42d | 2017-06-29 14:51:43 -0700 | [diff] [blame] | 451 | if (vdev_id >= wma->max_bssid) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 452 | return NULL; |
| 453 | |
| 454 | return wma->interfaces[vdev_id].handle; |
| 455 | } |
| 456 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 457 | bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id); |
| 458 | |
| 459 | #ifdef QCA_IBSS_SUPPORT |
| 460 | bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id); |
Houston Hoffman | 79b4af2 | 2015-10-06 12:01:08 -0700 | [diff] [blame] | 461 | #else |
| 462 | /** |
| 463 | * wma_is_vdev_in_ibss_mode(): dummy function |
| 464 | * @wma: wma handle |
| 465 | * @vdev_id: vdev id |
| 466 | * |
| 467 | * Return false since no vdev can be in ibss mode without ibss support |
| 468 | */ |
| 469 | static inline |
Mahesh Kumar Kalikot Veetil | 32e4fc7 | 2016-09-09 17:05:22 -0700 | [diff] [blame] | 470 | bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id) |
Houston Hoffman | 79b4af2 | 2015-10-06 12:01:08 -0700 | [diff] [blame] | 471 | { |
| 472 | return false; |
| 473 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 474 | #endif |
| 475 | |
| 476 | /** |
| 477 | * wma_find_bssid_by_vdev_id() - Get the BSS ID corresponding to the vdev ID |
| 478 | * @wma - wma handle |
| 479 | * @vdev_id - vdev ID |
| 480 | * |
| 481 | * Return: Returns pointer to bssid on success, |
| 482 | * otherwise returns NULL. |
| 483 | */ |
| 484 | static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma, |
| 485 | uint8_t vdev_id) |
| 486 | { |
| 487 | if (vdev_id >= wma->max_bssid) |
| 488 | return NULL; |
| 489 | |
| 490 | return wma->interfaces[vdev_id].bssid; |
| 491 | } |
| 492 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 493 | struct cdp_vdev *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 494 | uint8_t *vdev_id); |
| 495 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 496 | QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 497 | struct del_sta_self_params *pdel_sta_self_req_param, |
| 498 | uint8_t generateRsp); |
| 499 | |
| 500 | int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, |
| 501 | uint32_t len); |
| 502 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 503 | QDF_STATUS wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 504 | uint32_t param_id, uint32_t param_value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 505 | void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid, |
Leo Chang | 9646490 | 2016-10-28 11:10:54 -0700 | [diff] [blame] | 506 | uint8_t vdev_id, void *peer, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 507 | bool roam_synch_in_progress); |
| 508 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 509 | QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev, |
| 510 | struct cdp_vdev *vdev, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 511 | u8 peer_addr[IEEE80211_ADDR_LEN], |
| 512 | uint32_t peer_type, uint8_t vdev_id, |
| 513 | bool roam_synch_in_progress); |
| 514 | |
| 515 | int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, |
| 516 | u32 len); |
| 517 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 518 | struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 519 | struct add_sta_self_params *self_sta_req, |
| 520 | uint8_t generateRsp); |
| 521 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 522 | QDF_STATUS wma_vdev_start(tp_wma_handle wma, struct wma_vdev_start_req *req, |
| 523 | bool isRestart); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 524 | |
| 525 | void wma_vdev_resp_timer(void *data); |
| 526 | |
| 527 | struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, |
| 528 | uint8_t vdev_id, |
| 529 | uint32_t msg_type, uint8_t type, |
| 530 | void *params, uint32_t timeout); |
| 531 | |
| 532 | void wma_hold_req_timer(void *data); |
| 533 | struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, |
| 534 | uint8_t vdev_id, uint32_t msg_type, |
| 535 | uint8_t type, void *params, |
| 536 | uint32_t timeout); |
| 537 | |
| 538 | void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id, |
| 539 | uint8_t type); |
| 540 | |
| 541 | void wma_add_bss(tp_wma_handle wma, tpAddBssParams params); |
| 542 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 543 | void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta); |
| 544 | |
| 545 | void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta); |
| 546 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 547 | void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params); |
| 548 | |
| 549 | int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type); |
| 550 | |
| 551 | void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle, |
| 552 | tpDisableIntraBssFwd pdis_intra_fwd); |
| 553 | |
Deepak Dhamdhere | 2dae1bd | 2016-10-27 10:58:29 -0700 | [diff] [blame] | 554 | void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params); |
| 555 | |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 556 | uint32_t wma_get_bcn_rate_code(uint16_t rate); |
| 557 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 558 | /* |
| 559 | * wma_mgmt.c functions declarations |
| 560 | */ |
| 561 | |
| 562 | int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len); |
| 563 | |
| 564 | int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len); |
| 565 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 566 | int wma_unified_bcntx_status_event_handler(void *handle, |
| 567 | uint8_t *cmd_param_info, |
| 568 | uint32_t len); |
| 569 | |
mukul sharma | 72c8b22 | 2015-09-04 17:02:01 +0530 | [diff] [blame] | 570 | void wma_set_sta_sa_query_param(tp_wma_handle wma, |
| 571 | uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 572 | |
| 573 | void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id, |
| 574 | uint32_t method, uint32_t timeperiod, |
| 575 | uint8_t *hostv4addr, uint8_t *destv4addr, |
| 576 | uint8_t *destmac); |
| 577 | |
| 578 | int wma_vdev_install_key_complete_event_handler(void *handle, |
| 579 | uint8_t *event, |
| 580 | uint32_t len); |
| 581 | |
Govind Singh | b30d4c0 | 2016-03-24 11:01:23 +0530 | [diff] [blame] | 582 | QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 583 | tSirNwType nw_type, |
| 584 | tpAddStaParams params); |
| 585 | |
Himanshu Agarwal | 009f157 | 2016-03-09 17:26:02 +0530 | [diff] [blame] | 586 | QDF_STATUS wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle, |
| 587 | uint32_t if_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 588 | gtx_config_t *gtx_info); |
| 589 | |
| 590 | void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id, |
| 591 | uint8_t llbcoexist); |
| 592 | |
| 593 | void wma_process_update_beacon_params(tp_wma_handle wma, |
| 594 | tUpdateBeaconParams *bcn_params); |
| 595 | |
Rajeev Kumar | 416b73f | 2017-01-21 16:45:21 -0800 | [diff] [blame] | 596 | void wma_update_cfg_params(tp_wma_handle wma, struct scheduler_msg *cfgParam); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 597 | |
| 598 | void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info); |
| 599 | |
| 600 | void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma, |
| 601 | uint8_t vdev_id, |
| 602 | int8_t peer_num_delta); |
| 603 | |
| 604 | void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info); |
| 605 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 606 | QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 607 | tEdcaParams *edca_params); |
| 608 | |
| 609 | int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event, |
| 610 | uint32_t len); |
| 611 | |
| 612 | void wma_send_probe_rsp_tmpl(tp_wma_handle wma, |
| 613 | tpSendProbeRespParams probe_rsp_info); |
| 614 | |
| 615 | void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info); |
| 616 | |
| 617 | void wma_set_keepalive_req(tp_wma_handle wma, |
| 618 | tSirKeepAliveReq *keepalive); |
| 619 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 620 | void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id, |
| 621 | int32_t rssi); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 622 | |
| 623 | void wma_process_update_opmode(tp_wma_handle wma_handle, |
| 624 | tUpdateVHTOpMode *update_vht_opmode); |
| 625 | |
| 626 | void wma_process_update_rx_nss(tp_wma_handle wma_handle, |
| 627 | tUpdateRxNss *update_rx_nss); |
| 628 | |
| 629 | void wma_process_update_membership(tp_wma_handle wma_handle, |
| 630 | tUpdateMembership *membership); |
| 631 | |
| 632 | void wma_process_update_userpos(tp_wma_handle wma_handle, |
| 633 | tUpdateUserPos *userpos); |
| 634 | |
| 635 | void wma_hidden_ssid_vdev_restart(tp_wma_handle wma_handle, |
| 636 | tHalHiddenSsidVdevRestart *pReq); |
| 637 | |
| 638 | /* |
| 639 | * wma_power.c functions declarations |
| 640 | */ |
| 641 | |
| 642 | void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req); |
| 643 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 644 | QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 645 | uint32_t vdev_id, uint32_t param, |
| 646 | uint32_t value); |
| 647 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 648 | QDF_STATUS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 649 | wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id); |
| 650 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 651 | QDF_STATUS wma_set_ap_peer_uapsd(tp_wma_handle wma, uint32_t vdev_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 652 | uint8_t *peer_addr, uint8_t uapsd_value, |
| 653 | uint8_t max_sp); |
| 654 | |
| 655 | void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param, |
Kiran Kumar Lokere | 27026ae | 2018-03-09 11:38:19 -0800 | [diff] [blame] | 656 | struct wmi_host_wme_vparams *wmm_param, |
| 657 | int ac, bool mu_edca_param); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 658 | |
| 659 | void wma_set_tx_power(WMA_HANDLE handle, |
| 660 | tMaxTxPowerParams *tx_pwr_params); |
| 661 | |
| 662 | void wma_set_max_tx_power(WMA_HANDLE handle, |
| 663 | tMaxTxPowerParams *tx_pwr_params); |
| 664 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 665 | void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req); |
| 666 | |
| 667 | void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req); |
| 668 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 669 | void wma_disable_uapsd_mode(tp_wma_handle wma, tpDisableUapsdParams ps_req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 670 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 671 | QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 672 | |
| 673 | int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event, |
| 674 | uint32_t len); |
| 675 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 676 | QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 677 | tSirTxPowerLimit *ptxlim); |
| 678 | |
| 679 | void wma_update_noa(struct beacon_info *beacon, |
| 680 | struct p2p_sub_element_noa *noa_ie); |
| 681 | |
| 682 | void wma_update_probe_resp_noa(tp_wma_handle wma_handle, |
| 683 | struct p2p_sub_element_noa *noa_ie); |
| 684 | |
| 685 | int wma_p2p_noa_event_handler(void *handle, uint8_t *event, |
| 686 | uint32_t len); |
| 687 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 688 | void wma_process_set_mimops_req(tp_wma_handle wma_handle, |
| 689 | tSetMIMOPS *mimops); |
| 690 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 691 | QDF_STATUS wma_set_mimops(tp_wma_handle wma, uint8_t vdev_id, int value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 692 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 693 | QDF_STATUS wma_notify_modem_power_state(void *wma_ptr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 694 | tSirModemPowerStateInd *pReq); |
| 695 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 696 | QDF_STATUS wma_set_smps_params(tp_wma_handle wma, uint8_t vdev_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 697 | int value); |
| 698 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 699 | /* |
| 700 | * wma_data.c functions declarations |
| 701 | */ |
| 702 | |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 703 | void wma_set_bss_rate_flags(tp_wma_handle wma, uint8_t vdev_id, |
| 704 | tpAddBssParams add_bss); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 705 | |
| 706 | int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params); |
| 707 | |
Jiachao Wu | 08719b0 | 2017-07-05 13:05:34 +0800 | [diff] [blame] | 708 | /** |
| 709 | * wma_check_txrx_chainmask() - check txrx chainmask |
| 710 | * @num_rf_chains: number of rf chains |
| 711 | * @cmd_value: command value |
| 712 | * |
| 713 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 714 | */ |
| 715 | QDF_STATUS wma_check_txrx_chainmask(int num_rf_chains, int cmd_value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 716 | |
| 717 | int wma_peer_state_change_event_handler(void *handle, |
| 718 | uint8_t *event_buff, |
| 719 | uint32_t len); |
| 720 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 721 | QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 722 | mcc_adaptive_scheduler); |
| 723 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 724 | QDF_STATUS wma_set_mcc_channel_time_latency |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 725 | (tp_wma_handle wma, |
| 726 | uint32_t mcc_channel, uint32_t mcc_channel_time_latency); |
| 727 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 728 | QDF_STATUS wma_set_mcc_channel_time_quota |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 729 | (tp_wma_handle wma, |
| 730 | uint32_t adapter_1_chan_number, |
| 731 | uint32_t adapter_1_quota, uint32_t adapter_2_chan_number); |
| 732 | |
| 733 | void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params); |
| 734 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 735 | QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 736 | tSirRateUpdateInd * |
| 737 | pRateUpdateParams); |
| 738 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 739 | QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 740 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 741 | QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 742 | |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 743 | #if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \ |
| 744 | defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT) |
| 745 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 746 | int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event, |
| 747 | uint32_t len); |
| 748 | #endif |
| 749 | |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 750 | #if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL) |
| 751 | QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma, |
| 752 | struct t_bad_peer_txtcl_config *config); |
Mohit Khanna | 0fe6167 | 2016-05-19 16:53:39 -0700 | [diff] [blame] | 753 | #else |
| 754 | static inline QDF_STATUS |
| 755 | wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma, |
| 756 | struct t_bad_peer_txtcl_config *config) |
| 757 | { |
| 758 | return QDF_STATUS_E_FAILURE; |
| 759 | } |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 760 | #endif |
| 761 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 762 | QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 763 | t_thermal_mgmt *pThermalParams); |
| 764 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 765 | QDF_STATUS wma_process_set_thermal_level(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 766 | uint8_t thermal_level); |
| 767 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 768 | QDF_STATUS wma_set_thermal_mgmt(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 769 | t_thermal_cmd_params thermal_info); |
| 770 | |
| 771 | int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event, |
| 772 | uint32_t len); |
| 773 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 774 | int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data, |
| 775 | uint32_t len); |
| 776 | |
| 777 | int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data, |
| 778 | uint32_t len); |
| 779 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 780 | /* |
| 781 | * wma_utils.c functions declarations |
| 782 | */ |
| 783 | |
| 784 | #ifdef WLAN_FEATURE_STATS_EXT |
| 785 | int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf, |
| 786 | uint32_t len); |
| 787 | #endif |
| 788 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 789 | enum eSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode); |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 790 | int wma_smps_mode_to_force_mode_param(uint8_t smps_mode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 791 | |
| 792 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
| 793 | void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle); |
| 794 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 795 | QDF_STATUS wma_process_ll_stats_clear_req |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 796 | (tp_wma_handle wma, const tpSirLLStatsClearReq clearReq); |
| 797 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 798 | QDF_STATUS wma_process_ll_stats_set_req |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 799 | (tp_wma_handle wma, const tpSirLLStatsSetReq setReq); |
| 800 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 801 | QDF_STATUS wma_process_ll_stats_get_req |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 802 | (tp_wma_handle wma, const tpSirLLStatsGetReq getReq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 803 | |
| 804 | int wma_unified_link_iface_stats_event_handler(void *handle, |
| 805 | uint8_t *cmd_param_info, |
| 806 | uint32_t len); |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 807 | void wma_config_stats_ext_threshold(tp_wma_handle wma, |
| 808 | struct sir_ll_ext_stats_threshold *thresh); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 809 | #endif |
| 810 | |
| 811 | void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus, |
| 812 | uint8_t link_status); |
| 813 | |
| 814 | int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info, |
| 815 | uint32_t len); |
| 816 | |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 817 | /** |
| 818 | * wma_rso_cmd_status_event_handler() - RSO Command status event handler |
| 819 | * @wmi_event: WMI event |
| 820 | * |
| 821 | * This function is used to send RSO command status to upper layer |
| 822 | * |
| 823 | * Return: 0 for success |
| 824 | */ |
| 825 | int wma_rso_cmd_status_event_handler(wmi_roam_event_fixed_param *wmi_event); |
| 826 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 827 | int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info, |
| 828 | uint32_t len); |
| 829 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 830 | QDF_STATUS wma_send_link_speed(uint32_t link_speed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 831 | |
| 832 | int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info, |
| 833 | uint32_t len); |
| 834 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 835 | QDF_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 836 | |
| 837 | int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap, |
| 838 | uint32_t len); |
| 839 | |
| 840 | bool wma_is_sap_active(tp_wma_handle wma_handle); |
| 841 | |
| 842 | bool wma_is_p2p_go_active(tp_wma_handle wma_handle); |
| 843 | |
| 844 | bool wma_is_p2p_cli_active(tp_wma_handle wma_handle); |
| 845 | |
| 846 | bool wma_is_sta_active(tp_wma_handle wma_handle); |
| 847 | |
| 848 | WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type, |
| 849 | uint8_t is_ht, uint8_t ch_width, |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 850 | uint8_t is_vht, bool is_he); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 851 | |
| 852 | int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle, |
| 853 | uint8_t vdev_id, uint32_t value); |
| 854 | |
| 855 | int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle, |
| 856 | uint8_t vdev_id, uint32_t value); |
| 857 | |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 858 | #ifdef QCA_SUPPORT_CP_STATS |
| 859 | static inline void wma_get_stats_req(WMA_HANDLE handle, |
| 860 | struct sAniGetPEStatsReq *get_stats_param) {} |
| 861 | #else |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 862 | void wma_get_stats_req(WMA_HANDLE handle, |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 863 | struct sAniGetPEStatsReq *get_stats_param); |
| 864 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 865 | /* |
| 866 | * wma_features.c functions declarations |
| 867 | */ |
| 868 | |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 869 | /** |
| 870 | * wma_sar_register_event_handlers() - Register SAR event handlers |
| 871 | * @handle: WMA Handle |
| 872 | * |
| 873 | * Function to be called during WMA initialization to register SAR |
| 874 | * event handlers with WMI |
| 875 | * |
| 876 | * Return: QDF_STATUS_SUCCESS if registration is successful, otherwise |
| 877 | * an error enumeration |
| 878 | */ |
| 879 | QDF_STATUS wma_sar_register_event_handlers(WMA_HANDLE handle); |
| 880 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 881 | void wma_process_link_status_req(tp_wma_handle wma, |
| 882 | tAniGetLinkStatus *pGetLinkStatus); |
| 883 | |
Will Huang | a981459 | 2017-05-24 15:47:58 +0800 | [diff] [blame] | 884 | QDF_STATUS wma_get_peer_info(WMA_HANDLE handle, |
| 885 | struct sir_peer_info_req *peer_info_req); |
| 886 | |
| 887 | /** |
| 888 | * wma_get_peer_info_ext() - get peer info |
| 889 | * @handle: wma interface |
| 890 | * @peer_info_req: get peer info request information |
| 891 | * |
| 892 | * This function will send WMI_REQUEST_PEER_STATS_INFO_CMDID to FW |
| 893 | * |
| 894 | * Return: 0 on success, otherwise error value |
| 895 | */ |
| 896 | QDF_STATUS wma_get_peer_info_ext(WMA_HANDLE handle, |
| 897 | struct sir_peer_info_ext_req *peer_info_req); |
| 898 | |
| 899 | /** |
| 900 | * wma_peer_info_event_handler() - Handler for WMI_PEER_STATS_INFO_EVENTID |
| 901 | * @handle: WMA global handle |
| 902 | * @cmd_param_info: Command event data |
| 903 | * @len: Length of cmd_param_info |
| 904 | * |
| 905 | * This function will handle WMI_PEER_STATS_INFO_EVENTID |
| 906 | * |
| 907 | * Return: 0 on success, error code otherwise |
| 908 | */ |
| 909 | int wma_peer_info_event_handler(void *handle, u_int8_t *cmd_param_info, |
| 910 | u_int32_t len); |
| 911 | |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 912 | int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf, |
| 913 | uint32_t len); |
| 914 | |
Govind Singh | f25a0f1 | 2016-03-08 16:09:48 +0530 | [diff] [blame] | 915 | QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle, |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 916 | uint32_t cmd, uint32_t value1, uint32_t value2); |
| 917 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 918 | void wma_wow_tx_complete(void *wma); |
| 919 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 920 | int wma_unified_csa_offload_enable(tp_wma_handle wma, uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 921 | |
| 922 | #ifdef WLAN_FEATURE_NAN |
| 923 | int wma_nan_rsp_event_handler(void *handle, uint8_t *event_buf, uint32_t len); |
| 924 | #endif |
| 925 | |
| 926 | #ifdef FEATURE_WLAN_TDLS |
| 927 | int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len); |
| 928 | #endif |
| 929 | |
| 930 | int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len); |
| 931 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 932 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | 4e9cf39 | 2015-11-20 13:35:05 -0800 | [diff] [blame] | 933 | int wma_oem_data_response_handler(void *handle, uint8_t *datap, |
| 934 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 935 | #endif |
| 936 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 937 | #if !defined(REMOVE_PKT_LOG) |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 938 | QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 939 | struct ath_pktlog_wmi_params *params); |
| 940 | #endif |
| 941 | |
| 942 | int wma_wow_wakeup_host_event(void *handle, uint8_t *event, |
| 943 | uint32_t len); |
Will Huang | 3cd2b7c | 2017-11-17 13:16:56 +0800 | [diff] [blame] | 944 | |
| 945 | int wma_d0_wow_disable_ack_event(void *handle, uint8_t *event, uint32_t len); |
| 946 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 947 | int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len); |
| 948 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 949 | void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg); |
| 950 | |
| 951 | void wma_aggr_qos_req(tp_wma_handle wma, |
| 952 | tAggrAddTsParams *pAggrQosRspMsg); |
| 953 | |
| 954 | void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg); |
| 955 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 956 | #ifdef FEATURE_WLAN_ESE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 957 | QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 958 | void *pTsmStatsMsg); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 959 | QDF_STATUS wma_plm_start(tp_wma_handle wma, const tpSirPlmReq plm); |
| 960 | QDF_STATUS wma_plm_stop(tp_wma_handle wma, const tpSirPlmReq plm); |
| 961 | void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 962 | #endif |
| 963 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 964 | QDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle, |
| 965 | tSirRcvFltMcAddrList * mcbc_param); |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 966 | QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma); |
| 967 | |
| 968 | QDF_STATUS wma_process_get_peer_info_req |
| 969 | (tp_wma_handle wma, tSirIbssGetPeerInfoReqParams *pReq); |
| 970 | |
| 971 | QDF_STATUS wma_process_tx_fail_monitor_ind |
| 972 | (tp_wma_handle wma, tAniTXFailMonitorInd *pReq); |
| 973 | |
| 974 | QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma); |
| 975 | |
| 976 | QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma); |
| 977 | |
| 978 | QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma); |
| 979 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 980 | QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 981 | tSirAddPeriodicTxPtrn * |
| 982 | pAddPeriodicTxPtrnParams); |
| 983 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 984 | QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 985 | tSirDelPeriodicTxPtrn * |
| 986 | pDelPeriodicTxPtrnParams); |
| 987 | |
| 988 | #ifdef WLAN_FEATURE_STATS_EXT |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 989 | QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 990 | #endif |
| 991 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 992 | QDF_STATUS wma_process_ibss_route_table_update_ind(void *wma_handle, |
| 993 | tAniIbssRouteTable * pData); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 994 | |
| 995 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 996 | QDF_STATUS wma_enable_ext_wow(tp_wma_handle wma, tpSirExtWoWParams params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 997 | |
| 998 | int wma_set_app_type1_params_in_fw(tp_wma_handle wma, |
| 999 | tpSirAppType1Params appType1Params); |
| 1000 | |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1001 | QDF_STATUS wma_set_app_type2_params_in_fw(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1002 | tpSirAppType2Params appType2Params); |
| 1003 | #endif |
| 1004 | |
| 1005 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
| 1006 | int wma_auto_shutdown_event_handler(void *handle, uint8_t *event, |
| 1007 | uint32_t len); |
| 1008 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1009 | QDF_STATUS wma_set_auto_shutdown_timer_req(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1010 | tSirAutoShutdownCmdParams * |
| 1011 | auto_sh_cmd); |
| 1012 | #endif |
| 1013 | |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1014 | #ifdef WLAN_FEATURE_TSF |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 1015 | int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len); |
| 1016 | QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, uint32_t vdev_id); |
| 1017 | QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, uint32_t vdev_id); |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1018 | QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin); |
| 1019 | #else |
| 1020 | static inline QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, |
| 1021 | uint32_t vdev_id) |
| 1022 | { |
| 1023 | return QDF_STATUS_SUCCESS; |
| 1024 | } |
| 1025 | |
| 1026 | static inline QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, |
| 1027 | uint32_t vdev_id) |
| 1028 | { |
| 1029 | return QDF_STATUS_SUCCESS; |
| 1030 | } |
| 1031 | |
| 1032 | static inline int wma_vdev_tsf_handler(void *handle, uint8_t *data, |
| 1033 | uint32_t data_len) |
| 1034 | { |
| 1035 | return 0; |
| 1036 | } |
| 1037 | |
| 1038 | static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin) |
| 1039 | { |
| 1040 | return QDF_STATUS_E_INVAL; |
| 1041 | } |
| 1042 | #endif |
Manikandan Mohan | 80dea79 | 2016-04-28 16:36:48 -0700 | [diff] [blame] | 1043 | QDF_STATUS wma_set_wisa_params(tp_wma_handle wma, struct sir_wisa_params *wisa); |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 1044 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1045 | #ifdef WLAN_FEATURE_NAN |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1046 | QDF_STATUS wma_nan_req(void *wma_ptr, tpNanRequest nan_req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1047 | #endif |
| 1048 | |
| 1049 | #ifdef DHCP_SERVER_OFFLOAD |
| 1050 | int wma_process_dhcpserver_offload(tp_wma_handle wma_handle, |
| 1051 | tSirDhcpSrvOffloadInfo * |
| 1052 | pDhcpSrvOffloadInfo); |
| 1053 | #endif |
| 1054 | |
| 1055 | #ifdef WLAN_FEATURE_GPIO_LED_FLASHING |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1056 | QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle, |
Jeff Johnson | 5a6b660 | 2017-10-04 14:44:30 -0700 | [diff] [blame] | 1057 | struct flashing_req_params *flashing); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1058 | #endif |
| 1059 | |
Kabilan Kannan | caa8550 | 2018-04-13 18:04:58 -0700 | [diff] [blame] | 1060 | /** |
| 1061 | * wma_sar_rsp_evt_handler() - process sar response event from FW. |
Kabilan Kannan | ebe01e7 | 2018-06-13 01:13:46 -0700 | [diff] [blame] | 1062 | * @handle: ol scn handle |
Kabilan Kannan | caa8550 | 2018-04-13 18:04:58 -0700 | [diff] [blame] | 1063 | * @event: event buffer |
| 1064 | * @len: buffer length |
| 1065 | * |
| 1066 | * Return: 0 for success or error code |
| 1067 | */ |
Kabilan Kannan | ebe01e7 | 2018-06-13 01:13:46 -0700 | [diff] [blame] | 1068 | int wma_sar_rsp_evt_handler(ol_scn_t handle, uint8_t *event, uint32_t len); |
Kabilan Kannan | caa8550 | 2018-04-13 18:04:58 -0700 | [diff] [blame] | 1069 | |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1070 | #ifdef FEATURE_WLAN_CH_AVOID |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1071 | QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1072 | tSirChAvoidUpdateReq * |
| 1073 | ch_avoid_update_req); |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1074 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1075 | |
| 1076 | #ifdef FEATURE_WLAN_TDLS |
| 1077 | |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1078 | QDF_STATUS wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1079 | int wma_update_tdls_peer_state(WMA_HANDLE handle, |
| 1080 | tTdlsPeerStateParams *peerStateParams); |
| 1081 | /** |
| 1082 | * wma_set_tdls_offchan_mode() - set tdls off channel mode |
| 1083 | * @handle: wma handle |
| 1084 | * @chan_switch_params: Pointer to tdls channel switch parameter structure |
| 1085 | * |
| 1086 | * This function sets tdls off channel mode |
| 1087 | * |
| 1088 | * Return: 0 on success; negative errno otherwise |
| 1089 | */ |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1090 | QDF_STATUS wma_set_tdls_offchan_mode(WMA_HANDLE wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1091 | tdls_chan_switch_params *chan_switch_params); |
| 1092 | #endif |
| 1093 | |
Hong Shi | b90718f | 2017-02-20 00:57:22 +0800 | [diff] [blame] | 1094 | void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1095 | void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id); |
| 1096 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame^] | 1097 | #ifdef FEATURE_RSSI_MONITOR |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1098 | int wma_rssi_breached_event_handler(void *handle, |
| 1099 | u_int8_t *cmd_param_info, u_int32_t len); |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame^] | 1100 | #else /* FEATURE_RSSI_MONITOR */ |
| 1101 | static inline |
| 1102 | int wma_rssi_breached_event_handler(void *handle, |
| 1103 | u_int8_t *cmd_param_info, u_int32_t len) |
| 1104 | { |
| 1105 | return 0; |
| 1106 | } |
| 1107 | #endif /* FEATURE_RSSI_MONITOR */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1108 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1109 | QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1110 | struct vdev_ie_info *ie_info); |
| 1111 | int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info, |
| 1112 | uint32_t len); |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 1113 | int wma_vdev_delete_handler(void *handle, uint8_t *cmd_param_info, |
| 1114 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1115 | |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 1116 | int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info, |
| 1117 | uint32_t len); |
| 1118 | void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id, |
| 1119 | uint8_t type); |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 1120 | int wma_p2p_lo_event_handler(void *handle, uint8_t *event_buf, |
| 1121 | uint32_t len); |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 1122 | |
| 1123 | QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle, |
| 1124 | struct sir_mac_pwr_dbg_cmd * |
| 1125 | sir_pwr_dbg_params); |
| 1126 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1127 | /** |
| 1128 | * wma_lost_link_info_handler() - collect lost link information and inform SME |
| 1129 | * @wma: WMA handle |
| 1130 | * @vdev_id: vdev ID |
| 1131 | * @rssi: rssi at disconnection time |
| 1132 | * |
| 1133 | * Return: none |
| 1134 | */ |
| 1135 | void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id, |
| 1136 | int32_t rssi); |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 1137 | int wma_unified_power_debug_stats_event_handler(void *handle, |
| 1138 | uint8_t *cmd_param_info, uint32_t len); |
Sen, Devendra | 154b3c4 | 2017-02-13 20:44:15 +0530 | [diff] [blame] | 1139 | |
| 1140 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 1141 | /** |
| 1142 | * wma_sta_kickout_event()- send sta kickout event |
| 1143 | * @kickout_reason - reasoncode for kickout |
| 1144 | * @macaddr[IEEE80211_ADDR_LEN]: Peer mac address |
| 1145 | * @vdev_id: Unique id for identifying the VDEV |
| 1146 | * |
| 1147 | * This function sends sta kickout diag event |
| 1148 | * |
| 1149 | * Return: void. |
| 1150 | */ |
| 1151 | void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id, |
| 1152 | uint8_t *macaddr); |
| 1153 | #else |
| 1154 | static inline void wma_sta_kickout_event(uint32_t kickout_reason, |
| 1155 | uint8_t vdev_id, uint8_t *macaddr) |
| 1156 | { |
| 1157 | |
| 1158 | }; |
| 1159 | #endif /* FEATURE_WLAN_DIAG_SUPPORT */ |
| 1160 | |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1161 | /** |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 1162 | * wma_get_rcpi_req() - get rcpi request |
| 1163 | * @handle: wma handle |
| 1164 | * @rcpi_request: rcpi params |
| 1165 | * |
| 1166 | * Return: none |
| 1167 | */ |
| 1168 | QDF_STATUS wma_get_rcpi_req(WMA_HANDLE handle, |
| 1169 | struct sme_rcpi_req *rcpi_request); |
| 1170 | |
| 1171 | /** |
| 1172 | * wma_rcpi_event_handler() - rcpi event handler |
| 1173 | * @handle: wma handle |
| 1174 | * @cmd_param_info: data from event |
| 1175 | * @len: length |
| 1176 | * |
| 1177 | * Return: 0 for success or error code |
| 1178 | */ |
| 1179 | int wma_rcpi_event_handler(void *handle, uint8_t *cmd_param_info, |
| 1180 | uint32_t len); |
| 1181 | |
| 1182 | /** |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1183 | * wma_acquire_wakelock() - acquire the given wakelock |
| 1184 | * @wl: the wakelock to acquire |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1185 | * @msec: the wakelock duration in milliseconds |
| 1186 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1187 | * This also acquires the wma runtime pm lock. |
| 1188 | * |
| 1189 | * Return: None |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1190 | */ |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1191 | void wma_acquire_wakelock(qdf_wake_lock_t *wl, uint32_t msec); |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1192 | |
| 1193 | /** |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1194 | * wma_release_wakelock() - release the given wakelock |
| 1195 | * @wl: the wakelock to release |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1196 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1197 | * This also releases the wma runtime pm lock. |
| 1198 | * |
| 1199 | * Return: None |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1200 | */ |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1201 | void wma_release_wakelock(qdf_wake_lock_t *wl); |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1202 | |
| 1203 | /** |
Dustin Brown | d5f1294 | 2017-03-10 11:06:25 -0800 | [diff] [blame] | 1204 | * wma_send_vdev_start_to_fw() - send the vdev start command to firmware |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1205 | * @wma: a reference to the global WMA handle |
| 1206 | * @params: the vdev start params to send to firmware |
Dustin Brown | d5f1294 | 2017-03-10 11:06:25 -0800 | [diff] [blame] | 1207 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1208 | * Consumers should call wma_release_wakelock() upon receipt of the vdev start |
| 1209 | * response from firmware to avoid power penalties. Alternatively, calling the |
| 1210 | * matching vdev_up or vdev_down APIs will also release this lock. |
Dustin Brown | d5f1294 | 2017-03-10 11:06:25 -0800 | [diff] [blame] | 1211 | * |
| 1212 | * Return: QDF_STATUS |
| 1213 | */ |
| 1214 | QDF_STATUS |
| 1215 | wma_send_vdev_start_to_fw(t_wma_handle *wma, struct vdev_start_params *params); |
| 1216 | |
| 1217 | /** |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1218 | * wma_send_vdev_stop_to_fw() - send the vdev stop command to firmware |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1219 | * @wma: a reference to the global WMA handle |
| 1220 | * @vdev_id: the Id of the vdev to stop |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1221 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1222 | * Consumers should call wma_release_wakelock() upon receipt of the vdev stop |
| 1223 | * response from firmware to avoid power penalties. |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1224 | * |
| 1225 | * Return: QDF_STATUS |
| 1226 | */ |
| 1227 | QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id); |
| 1228 | |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 1229 | int wma_get_arp_stats_handler(void *handle, uint8_t *data, uint32_t data_len); |
| 1230 | |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1231 | /** |
| 1232 | * wma_send_vdev_up_to_fw() - send the vdev up command to firmware |
| 1233 | * @wma: a reference to the global WMA handle |
| 1234 | * @params: the vdev up params to send to firmware |
| 1235 | * @bssid: the BssId to send to firmware |
| 1236 | * |
| 1237 | * This also releases the vdev start wakelock. |
| 1238 | * |
| 1239 | * Return: QDF_STATUS |
| 1240 | */ |
| 1241 | QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma, |
| 1242 | struct vdev_up_params *params, |
| 1243 | uint8_t bssid[IEEE80211_ADDR_LEN]); |
| 1244 | |
| 1245 | /** |
| 1246 | * wma_send_vdev_down_to_fw() - send the vdev down command to firmware |
| 1247 | * @wma: a reference to the global WMA handle |
| 1248 | * @vdev_id: the Id of the vdev to down |
| 1249 | * |
| 1250 | * This also releases the vdev start wakelock. |
| 1251 | * |
| 1252 | * Return: QDF_STATUS |
| 1253 | */ |
| 1254 | QDF_STATUS wma_send_vdev_down_to_fw(t_wma_handle *wma, uint8_t vdev_id); |
| 1255 | |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 1256 | /* |
| 1257 | * wma_rx_aggr_failure_event_handler - event handler to handle rx aggr failure |
| 1258 | * @handle: the wma handle |
| 1259 | * @event_buf: buffer with event |
| 1260 | * @len: buffer length |
| 1261 | * |
| 1262 | * This function receives rx aggregation failure event and then pass to upper |
| 1263 | * layer |
| 1264 | * |
| 1265 | * Return: 0 on success |
| 1266 | */ |
| 1267 | int wma_rx_aggr_failure_event_handler(void *handle, u_int8_t *event_buf, |
| 1268 | u_int32_t len); |
| 1269 | |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 1270 | /** |
| 1271 | * wma_wlan_bt_activity_evt_handler - event handler to handle bt activity |
| 1272 | * @handle: the WMA handle |
| 1273 | * @event: buffer with the event parameters |
| 1274 | * @len: length of the buffer |
| 1275 | * |
| 1276 | * This function receives BT activity event from firmware and passes the event |
| 1277 | * information to upper layers |
| 1278 | * |
| 1279 | * Return: 0 on success |
| 1280 | */ |
| 1281 | int wma_wlan_bt_activity_evt_handler(void *handle, uint8_t *event, |
| 1282 | uint32_t len); |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1283 | |
| 1284 | /** |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1285 | * wma_pdev_div_info_evt_handler - event handler to handle antenna info |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1286 | * @handle: the wma handle |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1287 | * @event_buf: buffer with event |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1288 | * @len: buffer length |
| 1289 | * |
| 1290 | * This function receives antenna info from firmware and passes the event |
| 1291 | * to upper layer |
| 1292 | * |
| 1293 | * Return: 0 on success |
| 1294 | */ |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1295 | int wma_pdev_div_info_evt_handler(void *handle, u_int8_t *event_buf, |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1296 | u_int32_t len); |
| 1297 | |
lifeng | 7c607dd | 2017-02-21 21:16:49 +0800 | [diff] [blame] | 1298 | /** |
| 1299 | * wma_update_beacon_interval() - update beacon interval in fw |
| 1300 | * @wma: wma handle |
| 1301 | * @vdev_id: vdev id |
| 1302 | * @beaconInterval: becon interval |
| 1303 | * |
| 1304 | * Return: none |
| 1305 | */ |
| 1306 | void |
| 1307 | wma_update_beacon_interval(tp_wma_handle wma, uint8_t vdev_id, |
| 1308 | uint16_t beaconInterval); |
| 1309 | |
| 1310 | #define RESET_BEACON_INTERVAL_TIMEOUT 200 |
| 1311 | |
| 1312 | struct wma_beacon_interval_reset_req { |
| 1313 | qdf_timer_t event_timeout; |
| 1314 | uint8_t vdev_id; |
| 1315 | uint16_t interval; |
| 1316 | }; |
| 1317 | |
| 1318 | /** |
| 1319 | * wma_fill_beacon_interval_reset_req() - req to reset beacon interval |
| 1320 | * @wma: wma handle |
| 1321 | * @vdev_id: vdev id |
| 1322 | * @beacon_interval: beacon interval |
| 1323 | * @timeout: timeout val |
| 1324 | * |
| 1325 | * Return: status |
| 1326 | */ |
| 1327 | int wma_fill_beacon_interval_reset_req(tp_wma_handle wma, uint8_t vdev_id, |
| 1328 | uint16_t beacon_interval, uint32_t timeout); |
Yeshwanth Sriram Guntuka | d5aae7f | 2017-11-27 14:33:51 +0530 | [diff] [blame] | 1329 | /* |
| 1330 | * wma_is_vdev_valid() - check the vdev status |
| 1331 | * @vdev_id: vdev identifier |
| 1332 | * |
| 1333 | * This function verifies the vdev validity |
| 1334 | * |
| 1335 | * Return: 'true' on valid vdev else 'false' |
| 1336 | */ |
| 1337 | bool wma_is_vdev_valid(uint32_t vdev_id); |
Arif Hussain | ee10f90 | 2017-12-27 16:30:17 -0800 | [diff] [blame] | 1338 | |
| 1339 | /** |
| 1340 | * wma_vdev_obss_detection_info_handler - event handler to handle obss detection |
| 1341 | * @handle: the wma handle |
| 1342 | * @event: buffer with event |
| 1343 | * @len: buffer length |
| 1344 | * |
| 1345 | * This function receives obss detection info from firmware which is used to |
| 1346 | * decide obss protection. |
| 1347 | * |
| 1348 | * Return: 0 on success |
| 1349 | */ |
| 1350 | int wma_vdev_obss_detection_info_handler(void *handle, uint8_t *event, |
| 1351 | uint32_t len); |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 1352 | |
| 1353 | /** |
| 1354 | * wma_vdev_bss_color_collision_info_handler - event handler to |
| 1355 | * handle obss color collision detection. |
| 1356 | * @handle: the wma handle |
| 1357 | * @event: buffer with event |
| 1358 | * @len: buffer length |
| 1359 | * |
| 1360 | * This function receives obss color collision detection info from firmware |
| 1361 | * which is used to select new bss color. |
| 1362 | * |
| 1363 | * Return: 0 on success |
| 1364 | */ |
| 1365 | int wma_vdev_bss_color_collision_info_handler(void *handle, |
| 1366 | uint8_t *event, |
| 1367 | uint32_t len); |
| 1368 | |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 1369 | int wma_twt_en_complete_event_handler(void *handle, |
| 1370 | uint8_t *event, uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1371 | #endif |