Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Harprit Chhabada | 98225f6 | 2018-12-11 15:29:55 -0800 | [diff] [blame] | 2 | * Copyright (c) 2013-2019 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)) |
Yeshwanth Sriram Guntuka | 14ab04c | 2018-09-21 15:06:49 +0530 | [diff] [blame] | 57 | #define WMA_INVALID_PER_CHAIN_SNR (0x80) |
| 58 | #define WMA_INVALID_PER_CHAIN_RSSI (0xFF) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 59 | |
| 60 | /* |
| 61 | * Make sure that link monitor and keep alive |
| 62 | * default values should be in sync with CFG. |
| 63 | */ |
| 64 | #define WMA_LINK_MONITOR_DEFAULT_TIME_SECS 10 |
| 65 | #define WMA_KEEP_ALIVE_DEFAULT_TIME_SECS 5 |
| 66 | |
| 67 | #define AGC_DUMP 1 |
| 68 | #define CHAN_DUMP 2 |
| 69 | #define WD_DUMP 3 |
| 70 | #ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG |
| 71 | #define PCIE_DUMP 4 |
| 72 | #endif |
| 73 | |
| 74 | /* conformance test limits */ |
| 75 | #define FCC 0x10 |
| 76 | #define MKK 0x40 |
| 77 | #define ETSI 0x30 |
| 78 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 79 | #define WMI_DEFAULT_NOISE_FLOOR_DBM (-96) |
| 80 | |
| 81 | #define WMI_MCC_MIN_CHANNEL_QUOTA 20 |
| 82 | #define WMI_MCC_MAX_CHANNEL_QUOTA 80 |
| 83 | #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30 |
| 84 | |
| 85 | /* The maximum number of patterns that can be transmitted by the firmware |
| 86 | * and maximum patterns size. |
| 87 | */ |
jsreekum | ac44b92 | 2018-06-12 20:18:39 +0530 | [diff] [blame] | 88 | #ifndef WMA_MAXNUM_PERIODIC_TX_PTRNS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 89 | #define WMA_MAXNUM_PERIODIC_TX_PTRNS 6 |
jsreekum | ac44b92 | 2018-06-12 20:18:39 +0530 | [diff] [blame] | 90 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 91 | |
| 92 | #define WMI_MAX_HOST_CREDITS 2 |
| 93 | #define WMI_WOW_REQUIRED_CREDITS 1 |
| 94 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 95 | #define WMI_MAX_MHF_ENTRIES 32 |
| 96 | |
Kiran Kumar Lokere | 80734c0 | 2018-12-16 22:48:14 -0800 | [diff] [blame] | 97 | #define WMA_WMM_EXPO_TO_VAL(val) ((1 << (val)) - 1) |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 98 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 99 | #define MAX_HT_MCS_IDX 8 |
| 100 | #define MAX_VHT_MCS_IDX 10 |
| 101 | #define INVALID_MCS_IDX 255 |
| 102 | |
| 103 | #define LINK_STATUS_LEGACY 0 |
| 104 | #define LINK_STATUS_VHT 0x1 |
| 105 | #define LINK_STATUS_MIMO 0x2 |
| 106 | #define LINK_SUPPORT_VHT 0x4 |
| 107 | #define LINK_SUPPORT_MIMO 0x8 |
| 108 | |
| 109 | #define LINK_RATE_VHT 0x3 |
| 110 | |
| 111 | #define MAX_ENTRY_HOLD_REQ_QUEUE 2 |
Krishna Kumaar Natarajan | a5c53bd | 2015-10-27 11:48:27 -0700 | [diff] [blame] | 112 | #define MAX_ENTRY_VDEV_RESP_QUEUE 10 |
| 113 | |
Krishna Kumaar Natarajan | b7f9a35 | 2016-03-18 11:40:07 -0700 | [diff] [blame] | 114 | /* Time(in ms) to detect DOS attack */ |
| 115 | #define WMA_MGMT_FRAME_DETECT_DOS_TIMER 1000 |
| 116 | |
Himanshu Agarwal | a1539d3 | 2017-10-11 18:08:56 +0530 | [diff] [blame] | 117 | #define MAX_NUM_HW_MODE 0xff |
| 118 | #define MAX_NUM_PHY 0xff |
| 119 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 120 | /** |
| 121 | * struct index_data_rate_type - non vht data rate type |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 122 | * @mcs_index: mcs rate index |
| 123 | * @ht20_rate: HT20 supported rate table |
| 124 | * @ht40_rate: HT40 supported rate table |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 125 | */ |
| 126 | struct index_data_rate_type { |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 127 | uint8_t mcs_index; |
| 128 | uint16_t ht20_rate[2]; |
| 129 | uint16_t ht40_rate[2]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 130 | }; |
| 131 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 132 | /** |
| 133 | * struct index_vht_data_rate_type - vht data rate type |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 134 | * @mcs_index: mcs rate index |
| 135 | * @ht20_rate: VHT20 supported rate table |
| 136 | * @ht40_rate: VHT40 supported rate table |
| 137 | * @ht80_rate: VHT80 supported rate table |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 138 | */ |
| 139 | struct index_vht_data_rate_type { |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 140 | uint8_t mcs_index; |
| 141 | uint16_t ht20_rate[2]; |
| 142 | uint16_t ht40_rate[2]; |
| 143 | uint16_t ht80_rate[2]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 144 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 145 | |
Jeff Johnson | dab5860 | 2018-07-14 15:30:24 -0700 | [diff] [blame] | 146 | struct wifi_scan_cmd_req_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 147 | /* |
| 148 | * wma_main.c functions declarations |
| 149 | */ |
| 150 | |
Abhishek Singh | 2d775fd | 2017-08-18 10:51:33 +0530 | [diff] [blame] | 151 | /** |
| 152 | * wma_send_msg_by_priority() - Send wma message to PE with priority. |
| 153 | * @wma_handle: wma handle |
| 154 | * @msg_type: message type |
| 155 | * @body_ptr: message body ptr |
| 156 | * @body_val: message body value |
| 157 | * @is_high_priority: if msg is high priority |
| 158 | * |
| 159 | * Return: none |
| 160 | */ |
| 161 | void wma_send_msg_by_priority(tp_wma_handle wma_handle, uint16_t msg_type, |
| 162 | void *body_ptr, uint32_t body_val, bool is_high_priority); |
| 163 | |
| 164 | /** |
| 165 | * wma_send_msg() - Send wma message to PE. |
| 166 | * @wma_handle: wma handle |
| 167 | * @msg_type: message type |
| 168 | * @body_ptr: message body ptr |
| 169 | * @body_val: message body value |
| 170 | * |
| 171 | * Return: none |
| 172 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 173 | void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type, |
| 174 | void *body_ptr, uint32_t body_val); |
| 175 | |
Abhishek Singh | 2d775fd | 2017-08-18 10:51:33 +0530 | [diff] [blame] | 176 | /** |
| 177 | * wma_send_msg_high_priority() - Send wma message to PE with high priority. |
| 178 | * @wma_handle: wma handle |
| 179 | * @msg_type: message type |
| 180 | * @body_ptr: message body ptr |
| 181 | * @body_val: message body value |
| 182 | * |
| 183 | * Return: none |
| 184 | */ |
| 185 | void wma_send_msg_high_priority(tp_wma_handle wma_handle, uint16_t msg_type, |
| 186 | void *body_ptr, uint32_t body_val); |
| 187 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 188 | void wma_data_tx_ack_comp_hdlr(void *wma_context, |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 189 | qdf_nbuf_t netbuf, int32_t status); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 190 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 191 | 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] | 192 | int value); |
| 193 | |
| 194 | /* |
| 195 | * wma_scan_roam.c functions declarations |
| 196 | */ |
| 197 | |
| 198 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 199 | void wma_process_roam_invoke(WMA_HANDLE handle, |
| 200 | struct wma_roam_invoke_cmd *roaminvoke); |
| 201 | |
| 202 | void wma_process_roam_synch_fail(WMA_HANDLE handle, |
| 203 | struct roam_offload_synch_fail *synch_fail); |
| 204 | |
| 205 | int wma_roam_synch_event_handler(void *handle, uint8_t *event, |
| 206 | uint32_t len); |
Padma, Santhosh Kumar | aa2433e | 2017-10-06 14:34:46 +0530 | [diff] [blame] | 207 | |
| 208 | /** |
| 209 | * wma_roam_synch_frame_event_handler() - roam synch frame event handler |
| 210 | * @handle: wma handle |
| 211 | * @event: event data |
| 212 | * @len: length of data |
| 213 | * |
| 214 | * This function is roam synch frame event handler. |
| 215 | * |
| 216 | * Return: Success or Failure status |
| 217 | */ |
| 218 | int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event, |
| 219 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 220 | #endif |
| 221 | |
Kapil Gupta | 5cda225 | 2016-12-29 18:44:26 +0530 | [diff] [blame] | 222 | /** |
| 223 | * wma_update_per_roam_config() -per roam config parameter updation to FW |
| 224 | * @handle: wma handle |
| 225 | * @req_buf: per roam config parameters |
| 226 | * |
| 227 | * Return: none |
| 228 | */ |
| 229 | void wma_update_per_roam_config(WMA_HANDLE handle, |
| 230 | struct wmi_per_roam_config_req *req_buf); |
| 231 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 232 | QDF_STATUS wma_update_channel_list(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 233 | tSirUpdateChanList *chan_list); |
| 234 | |
| 235 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 236 | 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] | 237 | roam_offload_param * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 238 | roam_offload_params, |
| 239 | tSirRoamOffloadScanReq *roam_req); |
| 240 | #endif |
| 241 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 242 | QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 243 | wmi_start_scan_cmd_fixed_param * |
| 244 | scan_cmd_fp, |
| 245 | tSirRoamOffloadScanReq *roam_req, |
| 246 | uint32_t mode, uint32_t vdev_id); |
| 247 | |
Varun Reddy Yeturu | 061d4d6 | 2017-07-20 09:39:32 -0700 | [diff] [blame] | 248 | /** |
| 249 | * wma_roam_scan_mawc_params() - send roam scan mode request to fw |
| 250 | * @wma_handle: wma handle |
| 251 | * @roam_req: roam request param |
| 252 | * |
| 253 | * Fill the MAWC roaming parameters and send |
| 254 | * WMI_ROAM_CONFIGURE_MAWC_CMDID TLV to firmware. |
| 255 | * |
| 256 | * Return: QDF status |
| 257 | */ |
| 258 | QDF_STATUS wma_roam_scan_mawc_params(tp_wma_handle wma_handle, |
| 259 | tSirRoamOffloadScanReq *roam_req); |
| 260 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 261 | 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] | 262 | tSirRoamOffloadScanReq *roam_req); |
| 263 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 264 | 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] | 265 | uint32_t scan_period, |
| 266 | uint32_t scan_age, |
| 267 | uint32_t vdev_id); |
| 268 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 269 | 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] | 270 | uint32_t vdev_id, |
| 271 | int32_t rssi_change_thresh, |
| 272 | uint32_t bcn_rssi_weight, |
| 273 | uint32_t hirssi_delay_btw_scans); |
| 274 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 275 | 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] | 276 | uint8_t chan_count, |
| 277 | uint8_t *chan_list, |
| 278 | uint8_t list_type, uint32_t vdev_id); |
| 279 | |
| 280 | A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype, |
| 281 | eCsrEncryptionType encr); |
| 282 | |
| 283 | A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr); |
| 284 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 285 | void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, |
Jeff Johnson | 9f18aa7 | 2018-12-02 12:05:12 -0800 | [diff] [blame] | 286 | struct mac_context *mac, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 287 | tSirRoamOffloadScanReq *roam_req, |
| 288 | wmi_start_scan_cmd_fixed_param * |
| 289 | scan_params); |
| 290 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 291 | QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 292 | A_INT32 first_bcnt, |
| 293 | A_UINT32 final_bcnt, uint32_t vdev_id); |
| 294 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 295 | QDF_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 296 | uint32_t command, uint32_t vdev_id); |
| 297 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 298 | void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params); |
| 299 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 300 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 301 | void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts); |
| 302 | #endif |
| 303 | |
| 304 | #ifdef FEATURE_WLAN_EXTSCAN |
| 305 | |
| 306 | int wma_extscan_start_stop_event_handler(void *handle, |
| 307 | uint8_t *cmd_param_info, |
| 308 | uint32_t len); |
| 309 | |
| 310 | int wma_extscan_operations_event_handler(void *handle, |
| 311 | uint8_t *cmd_param_info, |
| 312 | uint32_t len); |
| 313 | |
| 314 | int wma_extscan_table_usage_event_handler(void *handle, |
| 315 | uint8_t *cmd_param_info, |
| 316 | uint32_t len); |
| 317 | |
| 318 | int wma_extscan_capabilities_event_handler(void *handle, |
| 319 | uint8_t *cmd_param_info, |
| 320 | uint32_t len); |
| 321 | |
| 322 | int wma_extscan_hotlist_match_event_handler(void *handle, |
| 323 | uint8_t *cmd_param_info, |
| 324 | uint32_t len); |
| 325 | |
| 326 | int wma_extscan_cached_results_event_handler(void *handle, |
| 327 | uint8_t *cmd_param_info, |
| 328 | uint32_t len); |
| 329 | |
| 330 | int wma_extscan_change_results_event_handler(void *handle, |
| 331 | uint8_t *cmd_param_info, |
| 332 | uint32_t len); |
| 333 | |
| 334 | int wma_passpoint_match_event_handler(void *handle, |
| 335 | uint8_t *cmd_param_info, |
| 336 | uint32_t len); |
| 337 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 338 | #endif |
| 339 | |
Pragaspathi Thilagaraj | 30251ec | 2018-12-18 17:22:57 +0530 | [diff] [blame] | 340 | int wma_handle_btm_blacklist_event(void *handle, uint8_t *cmd_param_info, |
| 341 | uint32_t len); |
| 342 | |
Wen Gong | 7952fbd | 2018-04-18 11:27:23 +0800 | [diff] [blame] | 343 | #ifdef FEATURE_WLAN_EXTSCAN |
| 344 | int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len); |
| 345 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 346 | void wma_register_extscan_event_handler(tp_wma_handle wma_handle); |
| 347 | |
Jeff Johnson | dab5860 | 2018-07-14 15:30:24 -0700 | [diff] [blame] | 348 | /** |
| 349 | * wma_start_extscan() - start extscan command to fw. |
| 350 | * @wma: wma handle |
| 351 | * @params: extscan command request params |
| 352 | * |
| 353 | * This function sends start extscan request to fw. |
| 354 | * |
| 355 | * Return: QDF Status. |
| 356 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 357 | QDF_STATUS wma_start_extscan(tp_wma_handle wma, |
Jeff Johnson | dab5860 | 2018-07-14 15:30:24 -0700 | [diff] [blame] | 358 | struct wifi_scan_cmd_req_params *pstart); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 359 | |
Jeff Johnson | 7272ea7 | 2018-07-15 17:22:27 -0700 | [diff] [blame] | 360 | /** |
| 361 | * wma_stop_extscan() - stop extscan command to fw. |
| 362 | * @wma: wma handle |
| 363 | * @params: stop scan command request params |
| 364 | * |
| 365 | * This function sends stop extscan request to fw. |
| 366 | * |
| 367 | * Return: QDF Status. |
| 368 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 369 | QDF_STATUS wma_stop_extscan(tp_wma_handle wma, |
Jeff Johnson | 7272ea7 | 2018-07-15 17:22:27 -0700 | [diff] [blame] | 370 | struct extscan_stop_req_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 371 | |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 372 | /** |
| 373 | * wma_extscan_start_hotlist_monitor() - start hotlist monitor |
| 374 | * @wma: wma handle |
| 375 | * @params: hotlist request params |
| 376 | * |
| 377 | * This function configures hotlist monitor in fw. |
| 378 | * |
| 379 | * Return: QDF status |
| 380 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 381 | QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma, |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 382 | struct extscan_bssid_hotlist_set_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 383 | |
Jeff Johnson | 9743eb7 | 2018-07-14 10:30:04 -0700 | [diff] [blame] | 384 | /** |
| 385 | * wma_extscan_stop_hotlist_monitor() - stop hotlist monitor |
| 386 | * @wma: wma handle |
| 387 | * @params: hotlist request params |
| 388 | * |
| 389 | * This function configures hotlist monitor to stop in fw. |
| 390 | * |
| 391 | * Return: QDF status |
| 392 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 393 | QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma, |
Jeff Johnson | 9743eb7 | 2018-07-14 10:30:04 -0700 | [diff] [blame] | 394 | struct extscan_bssid_hotlist_reset_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 395 | |
Jeff Johnson | b43ed03 | 2018-07-16 06:59:21 -0700 | [diff] [blame] | 396 | /** |
| 397 | * wma_extscan_start_change_monitor() - send start change monitor cmd |
| 398 | * @wma: wma handle |
| 399 | * @params: change monitor request params |
| 400 | * |
| 401 | * This function sends start change monitor request to fw. |
| 402 | * |
| 403 | * Return: QDF status |
| 404 | */ |
| 405 | QDF_STATUS |
| 406 | wma_extscan_start_change_monitor(tp_wma_handle wma, |
| 407 | struct extscan_set_sig_changereq_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 408 | |
Jeff Johnson | 0c8dbc3 | 2018-07-16 22:10:48 -0700 | [diff] [blame] | 409 | /** |
| 410 | * wma_extscan_stop_change_monitor() - send stop change monitor cmd |
| 411 | * @wma: wma handle |
| 412 | * @params: change monitor request params |
| 413 | * |
| 414 | * This function sends stop change monitor request to fw. |
| 415 | * |
| 416 | * Return: QDF status |
| 417 | */ |
| 418 | QDF_STATUS |
| 419 | wma_extscan_stop_change_monitor(tp_wma_handle wma, |
| 420 | struct extscan_capabilities_reset_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 421 | |
Jeff Johnson | 2ba6009 | 2018-07-17 08:19:37 -0700 | [diff] [blame] | 422 | /** |
| 423 | * wma_extscan_get_cached_results() - extscan get cached results |
| 424 | * @wma: wma handle |
| 425 | * @params: cached results parameters |
| 426 | * |
| 427 | * This function send request to fw to get cached results. |
| 428 | * |
| 429 | * Return: QDF status |
| 430 | */ |
| 431 | QDF_STATUS |
| 432 | wma_extscan_get_cached_results(tp_wma_handle wma, |
| 433 | struct extscan_cached_result_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 434 | |
Jeff Johnson | fed9a73 | 2018-07-18 12:18:03 -0700 | [diff] [blame] | 435 | /** |
| 436 | * wma_extscan_get_capabilities() - extscan get capabilities |
| 437 | * @wma: wma handle |
| 438 | * @params: get capabilities params |
| 439 | * |
| 440 | * This function sends request to fw to get extscan capabilities. |
| 441 | * |
| 442 | * Return: QDF status |
| 443 | */ |
| 444 | QDF_STATUS |
| 445 | wma_extscan_get_capabilities(tp_wma_handle wma, |
| 446 | struct extscan_capabilities_params *params); |
| 447 | |
Jeff Johnson | 360135b | 2018-07-18 20:51:47 -0700 | [diff] [blame] | 448 | /** |
| 449 | * wma_set_epno_network_list() - set epno network list |
| 450 | * @wma: WMA handle |
| 451 | * @req: epno config params request structure |
| 452 | * |
| 453 | * This function reads the incoming epno config request structure |
| 454 | * and constructs the WMI message to the firmware. |
| 455 | * |
| 456 | * Return: 0 on success, error number otherwise |
| 457 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 458 | QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma, |
Jeff Johnson | 360135b | 2018-07-18 20:51:47 -0700 | [diff] [blame] | 459 | struct wifi_enhanced_pno_params *req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 460 | |
Jeff Johnson | 2a7f101 | 2018-07-19 07:21:06 -0700 | [diff] [blame] | 461 | /** |
| 462 | * wma_set_passpoint_network_list() - set passpoint network list |
| 463 | * @wma: WMA handle |
| 464 | * @params: passpoint network request structure |
| 465 | * |
| 466 | * This function sends the passpoint configs down to the firmware |
| 467 | * |
| 468 | * Return: QDF_STATUS enumeration |
| 469 | */ |
| 470 | QDF_STATUS |
| 471 | wma_set_passpoint_network_list(tp_wma_handle wma, |
| 472 | struct wifi_passpoint_req_param *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 473 | |
Jeff Johnson | 2a7f101 | 2018-07-19 07:21:06 -0700 | [diff] [blame] | 474 | /** |
| 475 | * wma_reset_passpoint_network_list() - reset passpoint network list |
| 476 | * @wma: WMA handle |
| 477 | * @params: passpoint network request structure |
| 478 | * |
| 479 | * This function sends down WMI command with network id set to wildcard id. |
| 480 | * firmware shall clear all the config entries |
| 481 | * |
| 482 | * Return: QDF_STATUS enumeration |
| 483 | */ |
| 484 | QDF_STATUS |
| 485 | wma_reset_passpoint_network_list(tp_wma_handle wma, |
| 486 | struct wifi_passpoint_req_param *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 487 | #endif |
| 488 | |
Jeff Johnson | 9d45f33 | 2019-01-29 08:42:00 -0800 | [diff] [blame^] | 489 | /** |
| 490 | * wma_scan_probe_setoui() - set scan probe OUI |
| 491 | * @wma: wma handle |
| 492 | * @set_oui: OUI parameters |
| 493 | * |
| 494 | * set scan probe OUI parameters in firmware |
| 495 | * |
| 496 | * Return: QDF status |
| 497 | */ |
| 498 | QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, |
| 499 | struct scan_mac_oui *set_oui); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 500 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 501 | void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id); |
| 502 | |
| 503 | int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf, |
| 504 | uint32_t len); |
| 505 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 506 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 507 | void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id); |
| 508 | static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma, |
| 509 | uint8_t vdev_id) |
| 510 | { |
| 511 | return wma->interfaces[vdev_id].roam_synch_in_progress; |
| 512 | } |
| 513 | #else |
| 514 | static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma, |
| 515 | uint8_t vdev_id) |
| 516 | { |
| 517 | return false; |
| 518 | } |
Varun Reddy Yeturu | 101f954 | 2016-05-24 10:07:52 -0700 | [diff] [blame] | 519 | static inline uint32_t wma_roam_scan_get_cckm_mode( |
| 520 | struct sSirRoamOffloadScanReq *roam_req, uint32_t auth_mode) |
| 521 | { |
| 522 | return WMI_AUTH_CCKM; |
| 523 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 524 | #endif |
| 525 | |
| 526 | /* |
| 527 | * wma_dev_if.c functions declarations |
| 528 | */ |
| 529 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 530 | 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] | 531 | uint8_t *vdev_id); |
| 532 | |
| 533 | /** |
| 534 | * wma_find_vdev_by_id() - Returns vdev handle for given vdev id. |
| 535 | * @wma - wma handle |
| 536 | * @vdev_id - vdev ID |
| 537 | * |
| 538 | * Return: Returns vdev handle if given vdev id is valid. |
| 539 | * Otherwise returns NULL. |
| 540 | */ |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 541 | static inline |
| 542 | 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] | 543 | { |
Naveen Rawat | f2bd42d | 2017-06-29 14:51:43 -0700 | [diff] [blame] | 544 | if (vdev_id >= wma->max_bssid) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 545 | return NULL; |
| 546 | |
| 547 | return wma->interfaces[vdev_id].handle; |
| 548 | } |
| 549 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 550 | bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id); |
| 551 | |
| 552 | #ifdef QCA_IBSS_SUPPORT |
| 553 | 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] | 554 | #else |
| 555 | /** |
| 556 | * wma_is_vdev_in_ibss_mode(): dummy function |
| 557 | * @wma: wma handle |
| 558 | * @vdev_id: vdev id |
| 559 | * |
| 560 | * Return false since no vdev can be in ibss mode without ibss support |
| 561 | */ |
| 562 | static inline |
Mahesh Kumar Kalikot Veetil | 32e4fc7 | 2016-09-09 17:05:22 -0700 | [diff] [blame] | 563 | 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] | 564 | { |
| 565 | return false; |
| 566 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 567 | #endif |
| 568 | |
| 569 | /** |
| 570 | * wma_find_bssid_by_vdev_id() - Get the BSS ID corresponding to the vdev ID |
| 571 | * @wma - wma handle |
| 572 | * @vdev_id - vdev ID |
| 573 | * |
| 574 | * Return: Returns pointer to bssid on success, |
| 575 | * otherwise returns NULL. |
| 576 | */ |
| 577 | static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma, |
| 578 | uint8_t vdev_id) |
| 579 | { |
| 580 | if (vdev_id >= wma->max_bssid) |
| 581 | return NULL; |
| 582 | |
| 583 | return wma->interfaces[vdev_id].bssid; |
| 584 | } |
| 585 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 586 | 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] | 587 | uint8_t *vdev_id); |
| 588 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 589 | QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 590 | struct del_sta_self_params *pdel_sta_self_req_param, |
| 591 | uint8_t generateRsp); |
| 592 | |
| 593 | int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, |
| 594 | uint32_t len); |
| 595 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 596 | 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] | 597 | uint32_t param_id, uint32_t param_value); |
Rajeev Kumar Sirasanagandla | e5787e2 | 2018-10-25 21:10:34 +0530 | [diff] [blame] | 598 | |
| 599 | QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid, |
| 600 | uint8_t vdev_id, void *peer, |
| 601 | bool roam_synch_in_progress); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 602 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 603 | QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev, |
| 604 | struct cdp_vdev *vdev, |
Krunal Soni | bd7e893 | 2018-10-03 11:14:51 -0700 | [diff] [blame] | 605 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 606 | uint32_t peer_type, uint8_t vdev_id, |
| 607 | bool roam_synch_in_progress); |
| 608 | |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 609 | /** |
| 610 | * wma_send_del_bss_response() - send delete bss resp |
| 611 | * @wma: wma handle |
| 612 | * @req: target request |
| 613 | * |
| 614 | * Return: none |
| 615 | */ |
| 616 | void wma_send_del_bss_response(tp_wma_handle wma, struct wma_target_req *req); |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 617 | |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 618 | /** |
Sandeep Puligilla | 2a7fa84 | 2018-10-02 01:00:56 -0700 | [diff] [blame] | 619 | * wma_send_set_link_response() - send set link response |
| 620 | * @wma: wma handle |
| 621 | * @req: target request |
| 622 | * |
| 623 | * Return: none |
| 624 | */ |
| 625 | void wma_send_set_link_response(tp_wma_handle wma, struct wma_target_req *req); |
| 626 | |
| 627 | /** |
Abhishek Singh | fb5b4d3 | 2018-12-06 11:53:08 +0530 | [diff] [blame] | 628 | * __wma_handle_vdev_stop_rsp() - vdev stop response handler |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 629 | * @handle: wma handle |
| 630 | * @cmd_param_info: event buffer |
| 631 | * @len: buffer length |
| 632 | * |
| 633 | * Return: QDF_STATUS_SUCCESS for success or QDF_ERROR code |
| 634 | */ |
| 635 | QDF_STATUS |
Abhishek Singh | fb5b4d3 | 2018-12-06 11:53:08 +0530 | [diff] [blame] | 636 | __wma_handle_vdev_stop_rsp(wmi_vdev_stopped_event_fixed_param *resp_event); |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 637 | |
| 638 | /** |
| 639 | * wma_vdev_stop_resp_handler() - vdev stop response handler |
| 640 | * @handle: wma handle |
| 641 | * @cmd_param_info: event buffer |
| 642 | * @len: buffer length |
| 643 | * |
| 644 | * Return: 0 for success or error code |
| 645 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 646 | int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, |
Krunal Soni | bd7e893 | 2018-10-03 11:14:51 -0700 | [diff] [blame] | 647 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 648 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 649 | struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 650 | struct add_sta_self_params *self_sta_req, |
| 651 | uint8_t generateRsp); |
| 652 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 653 | QDF_STATUS wma_vdev_start(tp_wma_handle wma, struct wma_vdev_start_req *req, |
| 654 | bool isRestart); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 655 | |
| 656 | void wma_vdev_resp_timer(void *data); |
| 657 | |
| 658 | struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, |
| 659 | uint8_t vdev_id, |
| 660 | uint32_t msg_type, uint8_t type, |
| 661 | void *params, uint32_t timeout); |
| 662 | |
| 663 | void wma_hold_req_timer(void *data); |
| 664 | struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, |
| 665 | uint8_t vdev_id, uint32_t msg_type, |
| 666 | uint8_t type, void *params, |
| 667 | uint32_t timeout); |
| 668 | |
| 669 | void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id, |
| 670 | uint8_t type); |
| 671 | |
| 672 | void wma_add_bss(tp_wma_handle wma, tpAddBssParams params); |
| 673 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 674 | void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta); |
| 675 | |
| 676 | void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta); |
| 677 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 678 | void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params); |
| 679 | |
| 680 | int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type); |
| 681 | |
| 682 | void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle, |
| 683 | tpDisableIntraBssFwd pdis_intra_fwd); |
| 684 | |
Deepak Dhamdhere | 2dae1bd | 2016-10-27 10:58:29 -0700 | [diff] [blame] | 685 | void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params); |
| 686 | |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 687 | uint32_t wma_get_bcn_rate_code(uint16_t rate); |
| 688 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 689 | /* |
| 690 | * wma_mgmt.c functions declarations |
| 691 | */ |
Harprit Chhabada | 98225f6 | 2018-12-11 15:29:55 -0800 | [diff] [blame] | 692 | #ifdef CONFIG_WMI_BCN_OFFLOAD |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 693 | int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len); |
Harprit Chhabada | 98225f6 | 2018-12-11 15:29:55 -0800 | [diff] [blame] | 694 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 695 | |
Krunal Soni | bd7e893 | 2018-10-03 11:14:51 -0700 | [diff] [blame] | 696 | int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event, |
| 697 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 698 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 699 | int wma_unified_bcntx_status_event_handler(void *handle, |
| 700 | uint8_t *cmd_param_info, |
| 701 | uint32_t len); |
| 702 | |
mukul sharma | 72c8b22 | 2015-09-04 17:02:01 +0530 | [diff] [blame] | 703 | void wma_set_sta_sa_query_param(tp_wma_handle wma, |
| 704 | uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 705 | |
| 706 | void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id, |
| 707 | uint32_t method, uint32_t timeperiod, |
| 708 | uint8_t *hostv4addr, uint8_t *destv4addr, |
| 709 | uint8_t *destmac); |
| 710 | |
| 711 | int wma_vdev_install_key_complete_event_handler(void *handle, |
| 712 | uint8_t *event, |
| 713 | uint32_t len); |
| 714 | |
Govind Singh | b30d4c0 | 2016-03-24 11:01:23 +0530 | [diff] [blame] | 715 | QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 716 | tSirNwType nw_type, |
| 717 | tpAddStaParams params); |
| 718 | |
Himanshu Agarwal | 009f157 | 2016-03-09 17:26:02 +0530 | [diff] [blame] | 719 | QDF_STATUS wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle, |
| 720 | uint32_t if_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 721 | gtx_config_t *gtx_info); |
| 722 | |
| 723 | void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id, |
| 724 | uint8_t llbcoexist); |
| 725 | |
| 726 | void wma_process_update_beacon_params(tp_wma_handle wma, |
| 727 | tUpdateBeaconParams *bcn_params); |
| 728 | |
Harprit Chhabada | bec6de4 | 2018-09-10 10:21:15 -0700 | [diff] [blame] | 729 | void wma_update_rts_params(tp_wma_handle wma, uint32_t value); |
| 730 | |
| 731 | void wma_update_frag_params(tp_wma_handle wma, uint32_t value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 732 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 733 | void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma, |
| 734 | uint8_t vdev_id, |
| 735 | int8_t peer_num_delta); |
| 736 | |
Kiran Kumar Lokere | 7d6e4c9 | 2018-09-19 13:45:47 -0700 | [diff] [blame] | 737 | #ifdef CRYPTO_SET_KEY_CONVERGED |
| 738 | static inline void wma_set_stakey(tp_wma_handle wma_handle, |
| 739 | tpSetStaKeyParams key_info) |
| 740 | { |
| 741 | } |
| 742 | |
| 743 | static inline void wma_set_bsskey(tp_wma_handle wma_handle, |
| 744 | tpSetBssKeyParams key_info) |
| 745 | { |
| 746 | } |
| 747 | #else |
| 748 | /** |
| 749 | * wma_set_stakey() - set encryption key |
| 750 | * @wma_handle: wma handle |
| 751 | * @key_info: station key info |
| 752 | * |
| 753 | * This function sets encryption key for WEP/WPA/WPA2 |
| 754 | * encryption mode in firmware and send response to upper layer. |
| 755 | * |
| 756 | * Return: none |
| 757 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 758 | void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info); |
| 759 | |
Kiran Kumar Lokere | 7d6e4c9 | 2018-09-19 13:45:47 -0700 | [diff] [blame] | 760 | /** |
| 761 | * wma_set_bsskey() - set encryption key to fw. |
| 762 | * @wma_handle: wma handle |
| 763 | * @key_info: key info |
| 764 | * |
| 765 | * Return: none |
| 766 | */ |
| 767 | void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info); |
| 768 | #endif |
| 769 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 770 | QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 771 | tEdcaParams *edca_params); |
| 772 | |
| 773 | int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event, |
| 774 | uint32_t len); |
| 775 | |
| 776 | void wma_send_probe_rsp_tmpl(tp_wma_handle wma, |
| 777 | tpSendProbeRespParams probe_rsp_info); |
| 778 | |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 779 | /** |
| 780 | * wma_set_ap_vdev_up() - send vdev up req |
| 781 | * @wma: wma handle |
| 782 | * @vdev_id: vdev id |
| 783 | * |
Abhishek Singh | 3d30a3b | 2018-09-12 15:49:18 +0530 | [diff] [blame] | 784 | * Return: QDF_STATUS |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 785 | */ |
Abhishek Singh | 3d30a3b | 2018-09-12 15:49:18 +0530 | [diff] [blame] | 786 | QDF_STATUS wma_set_ap_vdev_up(tp_wma_handle wma, uint8_t vdev_id); |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 787 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 788 | void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info); |
| 789 | |
| 790 | void wma_set_keepalive_req(tp_wma_handle wma, |
| 791 | tSirKeepAliveReq *keepalive); |
| 792 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 793 | void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id, |
| 794 | int32_t rssi); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 795 | |
| 796 | void wma_process_update_opmode(tp_wma_handle wma_handle, |
| 797 | tUpdateVHTOpMode *update_vht_opmode); |
| 798 | |
| 799 | void wma_process_update_rx_nss(tp_wma_handle wma_handle, |
| 800 | tUpdateRxNss *update_rx_nss); |
| 801 | |
| 802 | void wma_process_update_membership(tp_wma_handle wma_handle, |
| 803 | tUpdateMembership *membership); |
| 804 | |
| 805 | void wma_process_update_userpos(tp_wma_handle wma_handle, |
| 806 | tUpdateUserPos *userpos); |
| 807 | |
| 808 | void wma_hidden_ssid_vdev_restart(tp_wma_handle wma_handle, |
| 809 | tHalHiddenSsidVdevRestart *pReq); |
| 810 | |
| 811 | /* |
| 812 | * wma_power.c functions declarations |
| 813 | */ |
| 814 | |
| 815 | void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req); |
| 816 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 817 | 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] | 818 | uint32_t vdev_id, uint32_t param, |
| 819 | uint32_t value); |
| 820 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 821 | QDF_STATUS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 822 | wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id); |
| 823 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 824 | 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] | 825 | uint8_t *peer_addr, uint8_t uapsd_value, |
| 826 | uint8_t max_sp); |
| 827 | |
| 828 | void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param, |
Kiran Kumar Lokere | 27026ae | 2018-03-09 11:38:19 -0800 | [diff] [blame] | 829 | struct wmi_host_wme_vparams *wmm_param, |
| 830 | int ac, bool mu_edca_param); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 831 | |
| 832 | void wma_set_tx_power(WMA_HANDLE handle, |
| 833 | tMaxTxPowerParams *tx_pwr_params); |
| 834 | |
| 835 | void wma_set_max_tx_power(WMA_HANDLE handle, |
| 836 | tMaxTxPowerParams *tx_pwr_params); |
| 837 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 838 | void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req); |
| 839 | |
| 840 | void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req); |
| 841 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 842 | void wma_disable_uapsd_mode(tp_wma_handle wma, tpDisableUapsdParams ps_req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 843 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 844 | QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 845 | |
| 846 | int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event, |
| 847 | uint32_t len); |
| 848 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 849 | QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 850 | tSirTxPowerLimit *ptxlim); |
| 851 | |
| 852 | void wma_update_noa(struct beacon_info *beacon, |
| 853 | struct p2p_sub_element_noa *noa_ie); |
| 854 | |
| 855 | void wma_update_probe_resp_noa(tp_wma_handle wma_handle, |
| 856 | struct p2p_sub_element_noa *noa_ie); |
| 857 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 858 | void wma_process_set_mimops_req(tp_wma_handle wma_handle, |
| 859 | tSetMIMOPS *mimops); |
| 860 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 861 | 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] | 862 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 863 | QDF_STATUS wma_notify_modem_power_state(void *wma_ptr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 864 | tSirModemPowerStateInd *pReq); |
| 865 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 866 | 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] | 867 | int value); |
| 868 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 869 | /* |
| 870 | * wma_data.c functions declarations |
| 871 | */ |
| 872 | |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 873 | void wma_set_bss_rate_flags(tp_wma_handle wma, uint8_t vdev_id, |
| 874 | tpAddBssParams add_bss); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 875 | |
| 876 | int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params); |
| 877 | |
Jiachao Wu | 08719b0 | 2017-07-05 13:05:34 +0800 | [diff] [blame] | 878 | /** |
| 879 | * wma_check_txrx_chainmask() - check txrx chainmask |
| 880 | * @num_rf_chains: number of rf chains |
| 881 | * @cmd_value: command value |
| 882 | * |
| 883 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 884 | */ |
| 885 | 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] | 886 | |
| 887 | int wma_peer_state_change_event_handler(void *handle, |
| 888 | uint8_t *event_buff, |
| 889 | uint32_t len); |
| 890 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 891 | QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 892 | mcc_adaptive_scheduler); |
| 893 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 894 | QDF_STATUS wma_set_mcc_channel_time_latency |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 895 | (tp_wma_handle wma, |
| 896 | uint32_t mcc_channel, uint32_t mcc_channel_time_latency); |
| 897 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 898 | QDF_STATUS wma_set_mcc_channel_time_quota |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 899 | (tp_wma_handle wma, |
| 900 | uint32_t adapter_1_chan_number, |
| 901 | uint32_t adapter_1_quota, uint32_t adapter_2_chan_number); |
| 902 | |
| 903 | void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params); |
| 904 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 905 | QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 906 | tSirRateUpdateInd * |
| 907 | pRateUpdateParams); |
| 908 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 909 | QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 910 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 911 | QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 912 | |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 913 | #if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \ |
| 914 | defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT) |
| 915 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 916 | int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event, |
| 917 | uint32_t len); |
| 918 | #endif |
| 919 | |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 920 | #if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL) |
| 921 | QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma, |
| 922 | struct t_bad_peer_txtcl_config *config); |
Mohit Khanna | 0fe6167 | 2016-05-19 16:53:39 -0700 | [diff] [blame] | 923 | #else |
| 924 | static inline QDF_STATUS |
| 925 | wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma, |
| 926 | struct t_bad_peer_txtcl_config *config) |
| 927 | { |
| 928 | return QDF_STATUS_E_FAILURE; |
| 929 | } |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 930 | #endif |
| 931 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 932 | QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 933 | t_thermal_mgmt *pThermalParams); |
| 934 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 935 | QDF_STATUS wma_process_set_thermal_level(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 936 | uint8_t thermal_level); |
| 937 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 938 | QDF_STATUS wma_set_thermal_mgmt(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 939 | t_thermal_cmd_params thermal_info); |
| 940 | |
| 941 | int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event, |
| 942 | uint32_t len); |
| 943 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 944 | int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data, |
| 945 | uint32_t len); |
| 946 | |
| 947 | int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data, |
| 948 | uint32_t len); |
| 949 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 950 | /* |
| 951 | * wma_utils.c functions declarations |
| 952 | */ |
| 953 | |
| 954 | #ifdef WLAN_FEATURE_STATS_EXT |
| 955 | int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf, |
| 956 | uint32_t len); |
| 957 | #endif |
| 958 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 959 | enum eSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode); |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 960 | int wma_smps_mode_to_force_mode_param(uint8_t smps_mode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 961 | |
| 962 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
| 963 | void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle); |
| 964 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 965 | QDF_STATUS wma_process_ll_stats_clear_req |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 966 | (tp_wma_handle wma, const tpSirLLStatsClearReq clearReq); |
| 967 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 968 | QDF_STATUS wma_process_ll_stats_set_req |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 969 | (tp_wma_handle wma, const tpSirLLStatsSetReq setReq); |
| 970 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 971 | QDF_STATUS wma_process_ll_stats_get_req |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 972 | (tp_wma_handle wma, const tpSirLLStatsGetReq getReq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 973 | |
| 974 | int wma_unified_link_iface_stats_event_handler(void *handle, |
| 975 | uint8_t *cmd_param_info, |
| 976 | uint32_t len); |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 977 | void wma_config_stats_ext_threshold(tp_wma_handle wma, |
| 978 | struct sir_ll_ext_stats_threshold *thresh); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 979 | #endif |
| 980 | |
| 981 | void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus, |
| 982 | uint8_t link_status); |
| 983 | |
| 984 | int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info, |
| 985 | uint32_t len); |
| 986 | |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 987 | /** |
| 988 | * wma_rso_cmd_status_event_handler() - RSO Command status event handler |
| 989 | * @wmi_event: WMI event |
| 990 | * |
| 991 | * This function is used to send RSO command status to upper layer |
| 992 | * |
| 993 | * Return: 0 for success |
| 994 | */ |
| 995 | int wma_rso_cmd_status_event_handler(wmi_roam_event_fixed_param *wmi_event); |
| 996 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 997 | int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info, |
| 998 | uint32_t len); |
| 999 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1000 | QDF_STATUS wma_send_link_speed(uint32_t link_speed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1001 | |
| 1002 | int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info, |
| 1003 | uint32_t len); |
| 1004 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1005 | QDF_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1006 | |
| 1007 | int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap, |
| 1008 | uint32_t len); |
| 1009 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1010 | WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type, |
| 1011 | uint8_t is_ht, uint8_t ch_width, |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 1012 | uint8_t is_vht, bool is_he); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1013 | |
| 1014 | int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle, |
| 1015 | uint8_t vdev_id, uint32_t value); |
| 1016 | |
| 1017 | int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle, |
| 1018 | uint8_t vdev_id, uint32_t value); |
| 1019 | |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 1020 | #ifdef QCA_SUPPORT_CP_STATS |
| 1021 | static inline void wma_get_stats_req(WMA_HANDLE handle, |
| 1022 | struct sAniGetPEStatsReq *get_stats_param) {} |
| 1023 | #else |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1024 | void wma_get_stats_req(WMA_HANDLE handle, |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 1025 | struct sAniGetPEStatsReq *get_stats_param); |
| 1026 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1027 | /* |
| 1028 | * wma_features.c functions declarations |
| 1029 | */ |
| 1030 | |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 1031 | /** |
| 1032 | * wma_sar_register_event_handlers() - Register SAR event handlers |
| 1033 | * @handle: WMA Handle |
| 1034 | * |
| 1035 | * Function to be called during WMA initialization to register SAR |
| 1036 | * event handlers with WMI |
| 1037 | * |
| 1038 | * Return: QDF_STATUS_SUCCESS if registration is successful, otherwise |
| 1039 | * an error enumeration |
| 1040 | */ |
| 1041 | QDF_STATUS wma_sar_register_event_handlers(WMA_HANDLE handle); |
| 1042 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1043 | void wma_process_link_status_req(tp_wma_handle wma, |
| 1044 | tAniGetLinkStatus *pGetLinkStatus); |
| 1045 | |
Will Huang | a981459 | 2017-05-24 15:47:58 +0800 | [diff] [blame] | 1046 | QDF_STATUS wma_get_peer_info(WMA_HANDLE handle, |
| 1047 | struct sir_peer_info_req *peer_info_req); |
| 1048 | |
| 1049 | /** |
| 1050 | * wma_get_peer_info_ext() - get peer info |
| 1051 | * @handle: wma interface |
| 1052 | * @peer_info_req: get peer info request information |
| 1053 | * |
| 1054 | * This function will send WMI_REQUEST_PEER_STATS_INFO_CMDID to FW |
| 1055 | * |
| 1056 | * Return: 0 on success, otherwise error value |
| 1057 | */ |
| 1058 | QDF_STATUS wma_get_peer_info_ext(WMA_HANDLE handle, |
| 1059 | struct sir_peer_info_ext_req *peer_info_req); |
| 1060 | |
| 1061 | /** |
| 1062 | * wma_peer_info_event_handler() - Handler for WMI_PEER_STATS_INFO_EVENTID |
| 1063 | * @handle: WMA global handle |
| 1064 | * @cmd_param_info: Command event data |
| 1065 | * @len: Length of cmd_param_info |
| 1066 | * |
| 1067 | * This function will handle WMI_PEER_STATS_INFO_EVENTID |
| 1068 | * |
| 1069 | * Return: 0 on success, error code otherwise |
| 1070 | */ |
| 1071 | int wma_peer_info_event_handler(void *handle, u_int8_t *cmd_param_info, |
| 1072 | u_int32_t len); |
| 1073 | |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 1074 | int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf, |
| 1075 | uint32_t len); |
| 1076 | |
Govind Singh | f25a0f1 | 2016-03-08 16:09:48 +0530 | [diff] [blame] | 1077 | QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle, |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 1078 | uint32_t cmd, uint32_t value1, uint32_t value2); |
| 1079 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 1080 | 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] | 1081 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1082 | #ifdef FEATURE_WLAN_TDLS |
| 1083 | int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len); |
| 1084 | #endif |
| 1085 | |
| 1086 | int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len); |
| 1087 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1088 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | 4e9cf39 | 2015-11-20 13:35:05 -0800 | [diff] [blame] | 1089 | int wma_oem_data_response_handler(void *handle, uint8_t *datap, |
| 1090 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1091 | #endif |
| 1092 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1093 | #if !defined(REMOVE_PKT_LOG) |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1094 | QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1095 | struct ath_pktlog_wmi_params *params); |
| 1096 | #endif |
| 1097 | |
| 1098 | int wma_wow_wakeup_host_event(void *handle, uint8_t *event, |
| 1099 | uint32_t len); |
Will Huang | 3cd2b7c | 2017-11-17 13:16:56 +0800 | [diff] [blame] | 1100 | |
| 1101 | int wma_d0_wow_disable_ack_event(void *handle, uint8_t *event, uint32_t len); |
| 1102 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1103 | int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len); |
| 1104 | |
Jeff Johnson | 256002f | 2018-12-22 17:53:19 -0800 | [diff] [blame] | 1105 | void wma_del_ts_req(tp_wma_handle wma, struct del_ts_params *msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1106 | |
Jeff Johnson | 5402441 | 2018-12-22 12:07:06 -0800 | [diff] [blame] | 1107 | /** |
| 1108 | * wma_aggr_qos_req() - send aggr qos request to fw |
| 1109 | * @wma: handle to wma |
| 1110 | * @pAggrQosRspMsg - combined struct for all ADD_TS requests. |
| 1111 | * |
| 1112 | * A function to handle WMA_AGGR_QOS_REQ. This will send out |
| 1113 | * ADD_TS requestes to firmware in loop for all the ACs with |
| 1114 | * active flow. |
| 1115 | * |
| 1116 | * Return: none |
| 1117 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1118 | void wma_aggr_qos_req(tp_wma_handle wma, |
Jeff Johnson | 5402441 | 2018-12-22 12:07:06 -0800 | [diff] [blame] | 1119 | struct aggr_add_ts_param *pAggrQosRspMsg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1120 | |
Jeff Johnson | 9851fcc | 2018-12-22 17:29:58 -0800 | [diff] [blame] | 1121 | void wma_add_ts_req(tp_wma_handle wma, struct add_ts_param *msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1122 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1123 | #ifdef FEATURE_WLAN_ESE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1124 | QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1125 | void *pTsmStatsMsg); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 1126 | QDF_STATUS wma_plm_start(tp_wma_handle wma, const tpSirPlmReq plm); |
| 1127 | QDF_STATUS wma_plm_stop(tp_wma_handle wma, const tpSirPlmReq plm); |
| 1128 | void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1129 | #endif |
| 1130 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1131 | QDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle, |
| 1132 | tSirRcvFltMcAddrList * mcbc_param); |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1133 | QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma); |
| 1134 | |
| 1135 | QDF_STATUS wma_process_get_peer_info_req |
| 1136 | (tp_wma_handle wma, tSirIbssGetPeerInfoReqParams *pReq); |
| 1137 | |
| 1138 | QDF_STATUS wma_process_tx_fail_monitor_ind |
| 1139 | (tp_wma_handle wma, tAniTXFailMonitorInd *pReq); |
| 1140 | |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 1141 | #ifdef FEATURE_WLAN_RMC |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1142 | QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma); |
| 1143 | |
| 1144 | QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma); |
| 1145 | |
| 1146 | QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma); |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 1147 | #else |
| 1148 | static inline |
| 1149 | QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma) |
| 1150 | { |
| 1151 | return QDF_STATUS_SUCCESS; |
| 1152 | } |
| 1153 | |
| 1154 | static inline |
| 1155 | QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma) |
| 1156 | { |
| 1157 | return QDF_STATUS_SUCCESS; |
| 1158 | } |
| 1159 | |
| 1160 | static inline |
| 1161 | QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma) |
| 1162 | { |
| 1163 | return QDF_STATUS_SUCCESS; |
| 1164 | } |
| 1165 | #endif |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1166 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1167 | QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle, |
Jeff Johnson | 6dcb44a | 2018-12-23 10:17:00 -0800 | [diff] [blame] | 1168 | tSirAddPeriodicTxPtrn *pattern); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1169 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1170 | QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1171 | tSirDelPeriodicTxPtrn * |
| 1172 | pDelPeriodicTxPtrnParams); |
| 1173 | |
| 1174 | #ifdef WLAN_FEATURE_STATS_EXT |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1175 | QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1176 | #endif |
| 1177 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1178 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1179 | QDF_STATUS wma_enable_ext_wow(tp_wma_handle wma, tpSirExtWoWParams params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1180 | |
| 1181 | int wma_set_app_type1_params_in_fw(tp_wma_handle wma, |
| 1182 | tpSirAppType1Params appType1Params); |
| 1183 | |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1184 | 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] | 1185 | tpSirAppType2Params appType2Params); |
| 1186 | #endif |
| 1187 | |
| 1188 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
| 1189 | int wma_auto_shutdown_event_handler(void *handle, uint8_t *event, |
| 1190 | uint32_t len); |
| 1191 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1192 | 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] | 1193 | tSirAutoShutdownCmdParams * |
| 1194 | auto_sh_cmd); |
| 1195 | #endif |
| 1196 | |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1197 | #ifdef WLAN_FEATURE_TSF |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 1198 | int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len); |
| 1199 | QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, uint32_t vdev_id); |
| 1200 | 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] | 1201 | QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin); |
| 1202 | #else |
| 1203 | static inline QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, |
| 1204 | uint32_t vdev_id) |
| 1205 | { |
| 1206 | return QDF_STATUS_SUCCESS; |
| 1207 | } |
| 1208 | |
| 1209 | static inline QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, |
| 1210 | uint32_t vdev_id) |
| 1211 | { |
| 1212 | return QDF_STATUS_SUCCESS; |
| 1213 | } |
| 1214 | |
| 1215 | static inline int wma_vdev_tsf_handler(void *handle, uint8_t *data, |
| 1216 | uint32_t data_len) |
| 1217 | { |
| 1218 | return 0; |
| 1219 | } |
| 1220 | |
| 1221 | static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin) |
| 1222 | { |
| 1223 | return QDF_STATUS_E_INVAL; |
| 1224 | } |
| 1225 | #endif |
Manikandan Mohan | 80dea79 | 2016-04-28 16:36:48 -0700 | [diff] [blame] | 1226 | 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] | 1227 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1228 | #ifdef DHCP_SERVER_OFFLOAD |
| 1229 | int wma_process_dhcpserver_offload(tp_wma_handle wma_handle, |
| 1230 | tSirDhcpSrvOffloadInfo * |
| 1231 | pDhcpSrvOffloadInfo); |
| 1232 | #endif |
| 1233 | |
| 1234 | #ifdef WLAN_FEATURE_GPIO_LED_FLASHING |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1235 | QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle, |
Jeff Johnson | 5a6b660 | 2017-10-04 14:44:30 -0700 | [diff] [blame] | 1236 | struct flashing_req_params *flashing); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1237 | #endif |
| 1238 | |
Kabilan Kannan | caa8550 | 2018-04-13 18:04:58 -0700 | [diff] [blame] | 1239 | /** |
| 1240 | * wma_sar_rsp_evt_handler() - process sar response event from FW. |
Kabilan Kannan | ebe01e7 | 2018-06-13 01:13:46 -0700 | [diff] [blame] | 1241 | * @handle: ol scn handle |
Kabilan Kannan | caa8550 | 2018-04-13 18:04:58 -0700 | [diff] [blame] | 1242 | * @event: event buffer |
| 1243 | * @len: buffer length |
| 1244 | * |
| 1245 | * Return: 0 for success or error code |
| 1246 | */ |
Kabilan Kannan | ebe01e7 | 2018-06-13 01:13:46 -0700 | [diff] [blame] | 1247 | 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] | 1248 | |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1249 | #ifdef FEATURE_WLAN_CH_AVOID |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1250 | 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] | 1251 | tSirChAvoidUpdateReq * |
| 1252 | ch_avoid_update_req); |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1253 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1254 | |
| 1255 | #ifdef FEATURE_WLAN_TDLS |
| 1256 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1257 | int wma_update_tdls_peer_state(WMA_HANDLE handle, |
| 1258 | tTdlsPeerStateParams *peerStateParams); |
| 1259 | /** |
| 1260 | * wma_set_tdls_offchan_mode() - set tdls off channel mode |
| 1261 | * @handle: wma handle |
| 1262 | * @chan_switch_params: Pointer to tdls channel switch parameter structure |
| 1263 | * |
| 1264 | * This function sets tdls off channel mode |
| 1265 | * |
| 1266 | * Return: 0 on success; negative errno otherwise |
| 1267 | */ |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1268 | QDF_STATUS wma_set_tdls_offchan_mode(WMA_HANDLE wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1269 | tdls_chan_switch_params *chan_switch_params); |
| 1270 | #endif |
| 1271 | |
Hong Shi | b90718f | 2017-02-20 00:57:22 +0800 | [diff] [blame] | 1272 | 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] | 1273 | void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id); |
| 1274 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1275 | #ifdef FEATURE_RSSI_MONITOR |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1276 | int wma_rssi_breached_event_handler(void *handle, |
| 1277 | u_int8_t *cmd_param_info, u_int32_t len); |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1278 | #else /* FEATURE_RSSI_MONITOR */ |
| 1279 | static inline |
| 1280 | int wma_rssi_breached_event_handler(void *handle, |
| 1281 | u_int8_t *cmd_param_info, u_int32_t len) |
| 1282 | { |
| 1283 | return 0; |
| 1284 | } |
| 1285 | #endif /* FEATURE_RSSI_MONITOR */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1286 | |
Kiran Kumar Lokere | ee20577 | 2018-09-27 00:27:27 -0700 | [diff] [blame] | 1287 | QDF_STATUS wma_process_cfg_action_frm_tb_ppdu(tp_wma_handle wma, |
| 1288 | struct cfg_action_frm_tb_ppdu *cfg_info); |
| 1289 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1290 | QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1291 | struct vdev_ie_info *ie_info); |
| 1292 | int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info, |
| 1293 | uint32_t len); |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 1294 | int wma_vdev_delete_handler(void *handle, uint8_t *cmd_param_info, |
| 1295 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1296 | |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 1297 | int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info, |
| 1298 | uint32_t len); |
| 1299 | void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id, |
| 1300 | uint8_t type); |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 1301 | |
| 1302 | QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle, |
| 1303 | struct sir_mac_pwr_dbg_cmd * |
| 1304 | sir_pwr_dbg_params); |
| 1305 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1306 | /** |
| 1307 | * wma_lost_link_info_handler() - collect lost link information and inform SME |
| 1308 | * @wma: WMA handle |
| 1309 | * @vdev_id: vdev ID |
| 1310 | * @rssi: rssi at disconnection time |
| 1311 | * |
| 1312 | * Return: none |
| 1313 | */ |
| 1314 | void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id, |
| 1315 | int32_t rssi); |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 1316 | int wma_unified_power_debug_stats_event_handler(void *handle, |
| 1317 | uint8_t *cmd_param_info, uint32_t len); |
Arunk Khandavalli | ca56d4b | 2018-11-29 15:46:00 +0530 | [diff] [blame] | 1318 | /** |
| 1319 | * wma_unified_beacon_debug_stats_event_handler() - collect beacon debug stats |
| 1320 | * @handle: WMA handle |
| 1321 | * @cmd_param_info: data from event |
| 1322 | * @len: length |
| 1323 | * |
| 1324 | * Return: 0 for success or error code |
| 1325 | */ |
| 1326 | int wma_unified_beacon_debug_stats_event_handler(void *handle, |
| 1327 | uint8_t *cmd_param_info, |
| 1328 | uint32_t len); |
Sen, Devendra | 154b3c4 | 2017-02-13 20:44:15 +0530 | [diff] [blame] | 1329 | |
| 1330 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 1331 | /** |
| 1332 | * wma_sta_kickout_event()- send sta kickout event |
| 1333 | * @kickout_reason - reasoncode for kickout |
| 1334 | * @macaddr[IEEE80211_ADDR_LEN]: Peer mac address |
| 1335 | * @vdev_id: Unique id for identifying the VDEV |
| 1336 | * |
| 1337 | * This function sends sta kickout diag event |
| 1338 | * |
| 1339 | * Return: void. |
| 1340 | */ |
| 1341 | void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id, |
| 1342 | uint8_t *macaddr); |
| 1343 | #else |
| 1344 | static inline void wma_sta_kickout_event(uint32_t kickout_reason, |
| 1345 | uint8_t vdev_id, uint8_t *macaddr) |
| 1346 | { |
| 1347 | |
| 1348 | }; |
| 1349 | #endif /* FEATURE_WLAN_DIAG_SUPPORT */ |
| 1350 | |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1351 | /** |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 1352 | * wma_get_rcpi_req() - get rcpi request |
| 1353 | * @handle: wma handle |
| 1354 | * @rcpi_request: rcpi params |
| 1355 | * |
| 1356 | * Return: none |
| 1357 | */ |
| 1358 | QDF_STATUS wma_get_rcpi_req(WMA_HANDLE handle, |
| 1359 | struct sme_rcpi_req *rcpi_request); |
| 1360 | |
| 1361 | /** |
| 1362 | * wma_rcpi_event_handler() - rcpi event handler |
| 1363 | * @handle: wma handle |
| 1364 | * @cmd_param_info: data from event |
| 1365 | * @len: length |
| 1366 | * |
| 1367 | * Return: 0 for success or error code |
| 1368 | */ |
| 1369 | int wma_rcpi_event_handler(void *handle, uint8_t *cmd_param_info, |
| 1370 | uint32_t len); |
| 1371 | |
| 1372 | /** |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1373 | * wma_acquire_wakelock() - acquire the given wakelock |
| 1374 | * @wl: the wakelock to acquire |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1375 | * @msec: the wakelock duration in milliseconds |
| 1376 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1377 | * This also acquires the wma runtime pm lock. |
| 1378 | * |
| 1379 | * Return: None |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1380 | */ |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1381 | void wma_acquire_wakelock(qdf_wake_lock_t *wl, uint32_t msec); |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1382 | |
| 1383 | /** |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1384 | * wma_release_wakelock() - release the given wakelock |
| 1385 | * @wl: the wakelock to release |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1386 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1387 | * This also releases the wma runtime pm lock. |
| 1388 | * |
| 1389 | * Return: None |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1390 | */ |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1391 | void wma_release_wakelock(qdf_wake_lock_t *wl); |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1392 | |
| 1393 | /** |
Dustin Brown | d5f1294 | 2017-03-10 11:06:25 -0800 | [diff] [blame] | 1394 | * 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] | 1395 | * @wma: a reference to the global WMA handle |
| 1396 | * @params: the vdev start params to send to firmware |
Dustin Brown | d5f1294 | 2017-03-10 11:06:25 -0800 | [diff] [blame] | 1397 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1398 | * Consumers should call wma_release_wakelock() upon receipt of the vdev start |
| 1399 | * response from firmware to avoid power penalties. Alternatively, calling the |
| 1400 | * matching vdev_up or vdev_down APIs will also release this lock. |
Dustin Brown | d5f1294 | 2017-03-10 11:06:25 -0800 | [diff] [blame] | 1401 | * |
| 1402 | * Return: QDF_STATUS |
| 1403 | */ |
| 1404 | QDF_STATUS |
| 1405 | wma_send_vdev_start_to_fw(t_wma_handle *wma, struct vdev_start_params *params); |
| 1406 | |
| 1407 | /** |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1408 | * 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] | 1409 | * @wma: a reference to the global WMA handle |
| 1410 | * @vdev_id: the Id of the vdev to stop |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1411 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1412 | * Consumers should call wma_release_wakelock() upon receipt of the vdev stop |
| 1413 | * response from firmware to avoid power penalties. |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1414 | * |
| 1415 | * Return: QDF_STATUS |
| 1416 | */ |
| 1417 | QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id); |
| 1418 | |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 1419 | int wma_get_arp_stats_handler(void *handle, uint8_t *data, uint32_t data_len); |
| 1420 | |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1421 | /** |
| 1422 | * wma_send_vdev_up_to_fw() - send the vdev up command to firmware |
| 1423 | * @wma: a reference to the global WMA handle |
| 1424 | * @params: the vdev up params to send to firmware |
| 1425 | * @bssid: the BssId to send to firmware |
| 1426 | * |
| 1427 | * This also releases the vdev start wakelock. |
| 1428 | * |
| 1429 | * Return: QDF_STATUS |
| 1430 | */ |
| 1431 | QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma, |
| 1432 | struct vdev_up_params *params, |
| 1433 | uint8_t bssid[IEEE80211_ADDR_LEN]); |
| 1434 | |
| 1435 | /** |
| 1436 | * wma_send_vdev_down_to_fw() - send the vdev down command to firmware |
| 1437 | * @wma: a reference to the global WMA handle |
| 1438 | * @vdev_id: the Id of the vdev to down |
| 1439 | * |
| 1440 | * This also releases the vdev start wakelock. |
| 1441 | * |
| 1442 | * Return: QDF_STATUS |
| 1443 | */ |
| 1444 | QDF_STATUS wma_send_vdev_down_to_fw(t_wma_handle *wma, uint8_t vdev_id); |
| 1445 | |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 1446 | /* |
| 1447 | * wma_rx_aggr_failure_event_handler - event handler to handle rx aggr failure |
| 1448 | * @handle: the wma handle |
| 1449 | * @event_buf: buffer with event |
| 1450 | * @len: buffer length |
| 1451 | * |
| 1452 | * This function receives rx aggregation failure event and then pass to upper |
| 1453 | * layer |
| 1454 | * |
| 1455 | * Return: 0 on success |
| 1456 | */ |
| 1457 | int wma_rx_aggr_failure_event_handler(void *handle, u_int8_t *event_buf, |
| 1458 | u_int32_t len); |
| 1459 | |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 1460 | /** |
| 1461 | * wma_wlan_bt_activity_evt_handler - event handler to handle bt activity |
| 1462 | * @handle: the WMA handle |
| 1463 | * @event: buffer with the event parameters |
| 1464 | * @len: length of the buffer |
| 1465 | * |
| 1466 | * This function receives BT activity event from firmware and passes the event |
| 1467 | * information to upper layers |
| 1468 | * |
| 1469 | * Return: 0 on success |
| 1470 | */ |
| 1471 | int wma_wlan_bt_activity_evt_handler(void *handle, uint8_t *event, |
| 1472 | uint32_t len); |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1473 | |
| 1474 | /** |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1475 | * wma_pdev_div_info_evt_handler - event handler to handle antenna info |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1476 | * @handle: the wma handle |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1477 | * @event_buf: buffer with event |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1478 | * @len: buffer length |
| 1479 | * |
| 1480 | * This function receives antenna info from firmware and passes the event |
| 1481 | * to upper layer |
| 1482 | * |
| 1483 | * Return: 0 on success |
| 1484 | */ |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1485 | 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] | 1486 | u_int32_t len); |
| 1487 | |
lifeng | 7c607dd | 2017-02-21 21:16:49 +0800 | [diff] [blame] | 1488 | /** |
| 1489 | * wma_update_beacon_interval() - update beacon interval in fw |
| 1490 | * @wma: wma handle |
| 1491 | * @vdev_id: vdev id |
| 1492 | * @beaconInterval: becon interval |
| 1493 | * |
| 1494 | * Return: none |
| 1495 | */ |
| 1496 | void |
| 1497 | wma_update_beacon_interval(tp_wma_handle wma, uint8_t vdev_id, |
| 1498 | uint16_t beaconInterval); |
| 1499 | |
| 1500 | #define RESET_BEACON_INTERVAL_TIMEOUT 200 |
| 1501 | |
| 1502 | struct wma_beacon_interval_reset_req { |
| 1503 | qdf_timer_t event_timeout; |
| 1504 | uint8_t vdev_id; |
| 1505 | uint16_t interval; |
| 1506 | }; |
| 1507 | |
| 1508 | /** |
| 1509 | * wma_fill_beacon_interval_reset_req() - req to reset beacon interval |
| 1510 | * @wma: wma handle |
| 1511 | * @vdev_id: vdev id |
| 1512 | * @beacon_interval: beacon interval |
| 1513 | * @timeout: timeout val |
| 1514 | * |
| 1515 | * Return: status |
| 1516 | */ |
| 1517 | int wma_fill_beacon_interval_reset_req(tp_wma_handle wma, uint8_t vdev_id, |
| 1518 | uint16_t beacon_interval, uint32_t timeout); |
Yeshwanth Sriram Guntuka | d5aae7f | 2017-11-27 14:33:51 +0530 | [diff] [blame] | 1519 | /* |
| 1520 | * wma_is_vdev_valid() - check the vdev status |
| 1521 | * @vdev_id: vdev identifier |
| 1522 | * |
| 1523 | * This function verifies the vdev validity |
| 1524 | * |
| 1525 | * Return: 'true' on valid vdev else 'false' |
| 1526 | */ |
| 1527 | bool wma_is_vdev_valid(uint32_t vdev_id); |
Arif Hussain | ee10f90 | 2017-12-27 16:30:17 -0800 | [diff] [blame] | 1528 | |
| 1529 | /** |
| 1530 | * wma_vdev_obss_detection_info_handler - event handler to handle obss detection |
| 1531 | * @handle: the wma handle |
| 1532 | * @event: buffer with event |
| 1533 | * @len: buffer length |
| 1534 | * |
| 1535 | * This function receives obss detection info from firmware which is used to |
| 1536 | * decide obss protection. |
| 1537 | * |
| 1538 | * Return: 0 on success |
| 1539 | */ |
| 1540 | int wma_vdev_obss_detection_info_handler(void *handle, uint8_t *event, |
| 1541 | uint32_t len); |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 1542 | |
| 1543 | /** |
| 1544 | * wma_vdev_bss_color_collision_info_handler - event handler to |
| 1545 | * handle obss color collision detection. |
| 1546 | * @handle: the wma handle |
| 1547 | * @event: buffer with event |
| 1548 | * @len: buffer length |
| 1549 | * |
| 1550 | * This function receives obss color collision detection info from firmware |
| 1551 | * which is used to select new bss color. |
| 1552 | * |
| 1553 | * Return: 0 on success |
| 1554 | */ |
| 1555 | int wma_vdev_bss_color_collision_info_handler(void *handle, |
| 1556 | uint8_t *event, |
| 1557 | uint32_t len); |
| 1558 | |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 1559 | int wma_twt_en_complete_event_handler(void *handle, |
| 1560 | uint8_t *event, uint32_t len); |
Rajeev Kumar Sirasanagandla | 4f20b67 | 2018-03-12 13:52:50 +0530 | [diff] [blame] | 1561 | /** |
| 1562 | * wma_get_roam_scan_stats() - Get roam scan stats request |
| 1563 | * @handle: wma handle |
| 1564 | * @req: request details |
| 1565 | * |
| 1566 | * Return: QDF_STATUS |
| 1567 | */ |
| 1568 | QDF_STATUS wma_get_roam_scan_stats(WMA_HANDLE handle, |
| 1569 | struct sir_roam_scan_stats *req); |
| 1570 | |
| 1571 | /** |
Vignesh Viswanathan | 3635818 | 2018-10-25 17:36:35 +0530 | [diff] [blame] | 1572 | * wma_remove_peer_on_add_bss_failure() - remove the CDP peers in case of |
| 1573 | * ADD BSS request failed |
| 1574 | * @add_bss_params: Pointer to the Add BSS request params |
| 1575 | * |
| 1576 | * This API deletes the CDP peer created during ADD BSS in case of ADD BSS |
| 1577 | * request sent to the FW fails. |
| 1578 | * |
| 1579 | * Return: None; |
| 1580 | */ |
| 1581 | void wma_remove_peer_on_add_bss_failure(tpAddBssParams add_bss_params); |
| 1582 | |
| 1583 | /** |
Rajeev Kumar Sirasanagandla | 4f20b67 | 2018-03-12 13:52:50 +0530 | [diff] [blame] | 1584 | * wma_roam_scan_stats_event_handler() - roam scan stats event handler |
| 1585 | * @handle: wma handle |
| 1586 | * @event: event data |
| 1587 | * @len: length of data |
| 1588 | * |
| 1589 | * Return: Success or Failure status |
| 1590 | */ |
| 1591 | int wma_roam_scan_stats_event_handler(void *handle, uint8_t *event, |
| 1592 | uint32_t len); |
| 1593 | |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 1594 | /** |
Abhishek Singh | fb5b4d3 | 2018-12-06 11:53:08 +0530 | [diff] [blame] | 1595 | * wma_send_vdev_down() - send del bss req to firmware |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 1596 | * @wma: wma handle. |
| 1597 | * @vdev_id: vdev ID of device for which MCC has to be checked |
| 1598 | * |
| 1599 | * This function sends del bss resp to upper layer |
| 1600 | * |
| 1601 | * Return: none |
| 1602 | */ |
Abhishek Singh | fb5b4d3 | 2018-12-06 11:53:08 +0530 | [diff] [blame] | 1603 | void wma_send_vdev_down(tp_wma_handle wma, struct wma_target_req *req); |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 1604 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1605 | #endif |