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 |
mukul sharma | 72c8b22 | 2015-09-04 17:02:01 +0530 | [diff] [blame] | 34 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 35 | /*AR9888/AR6320 noise floor approx value |
| 36 | * similar to the mentioned the WMA |
| 37 | */ |
| 38 | #define WMA_TGT_NOISE_FLOOR_DBM (-96) |
Yeshwanth Sriram Guntuka | 14ab04c | 2018-09-21 15:06:49 +0530 | [diff] [blame] | 39 | #define WMA_INVALID_PER_CHAIN_SNR (0x80) |
| 40 | #define WMA_INVALID_PER_CHAIN_RSSI (0xFF) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 41 | |
| 42 | /* |
| 43 | * Make sure that link monitor and keep alive |
| 44 | * default values should be in sync with CFG. |
| 45 | */ |
| 46 | #define WMA_LINK_MONITOR_DEFAULT_TIME_SECS 10 |
| 47 | #define WMA_KEEP_ALIVE_DEFAULT_TIME_SECS 5 |
| 48 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 49 | /* The maximum number of patterns that can be transmitted by the firmware |
| 50 | * and maximum patterns size. |
| 51 | */ |
jsreekum | ac44b92 | 2018-06-12 20:18:39 +0530 | [diff] [blame] | 52 | #ifndef WMA_MAXNUM_PERIODIC_TX_PTRNS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 53 | #define WMA_MAXNUM_PERIODIC_TX_PTRNS 6 |
jsreekum | ac44b92 | 2018-06-12 20:18:39 +0530 | [diff] [blame] | 54 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 55 | |
Kiran Kumar Lokere | 80734c0 | 2018-12-16 22:48:14 -0800 | [diff] [blame] | 56 | #define WMA_WMM_EXPO_TO_VAL(val) ((1 << (val)) - 1) |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 57 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 58 | #define MAX_HT_MCS_IDX 8 |
| 59 | #define MAX_VHT_MCS_IDX 10 |
Jingxiang Ge | f1d8159 | 2019-10-20 12:03:22 +0800 | [diff] [blame] | 60 | #ifdef WLAN_FEATURE_11AX |
| 61 | #define MAX_HE_MCS_IDX 12 |
| 62 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 63 | #define INVALID_MCS_IDX 255 |
| 64 | |
Jingxiang Ge | f1d8159 | 2019-10-20 12:03:22 +0800 | [diff] [blame] | 65 | #define IS_MCS_HAS_DCM_RATE(val) \ |
| 66 | ((val) == 0 || (val) == 1 || \ |
| 67 | (val) == 3 || (val) == 4) |
| 68 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 69 | #define LINK_STATUS_LEGACY 0 |
| 70 | #define LINK_STATUS_VHT 0x1 |
| 71 | #define LINK_STATUS_MIMO 0x2 |
| 72 | #define LINK_SUPPORT_VHT 0x4 |
| 73 | #define LINK_SUPPORT_MIMO 0x8 |
| 74 | |
| 75 | #define LINK_RATE_VHT 0x3 |
| 76 | |
| 77 | #define MAX_ENTRY_HOLD_REQ_QUEUE 2 |
Krishna Kumaar Natarajan | a5c53bd | 2015-10-27 11:48:27 -0700 | [diff] [blame] | 78 | #define MAX_ENTRY_VDEV_RESP_QUEUE 10 |
| 79 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 80 | /** |
| 81 | * struct index_data_rate_type - non vht data rate type |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 82 | * @mcs_index: mcs rate index |
| 83 | * @ht20_rate: HT20 supported rate table |
| 84 | * @ht40_rate: HT40 supported rate table |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 85 | */ |
| 86 | struct index_data_rate_type { |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 87 | uint8_t mcs_index; |
| 88 | uint16_t ht20_rate[2]; |
| 89 | uint16_t ht40_rate[2]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 90 | }; |
| 91 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 92 | /** |
| 93 | * struct index_vht_data_rate_type - vht data rate type |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 94 | * @mcs_index: mcs rate index |
| 95 | * @ht20_rate: VHT20 supported rate table |
| 96 | * @ht40_rate: VHT40 supported rate table |
| 97 | * @ht80_rate: VHT80 supported rate table |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 98 | */ |
| 99 | struct index_vht_data_rate_type { |
Ryan Hsu | 6139d2d | 2015-11-04 17:29:00 -0800 | [diff] [blame] | 100 | uint8_t mcs_index; |
| 101 | uint16_t ht20_rate[2]; |
| 102 | uint16_t ht40_rate[2]; |
| 103 | uint16_t ht80_rate[2]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 104 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 105 | |
Jingxiang Ge | f1d8159 | 2019-10-20 12:03:22 +0800 | [diff] [blame] | 106 | #ifdef WLAN_FEATURE_11AX |
| 107 | #define MAX_HE_DCM_INDEX 2 |
| 108 | /** |
| 109 | * struct index_he_data_rate_type - he data rate type |
| 110 | * @beacon_rate_index: Beacon rate index |
| 111 | * @supported_he80_rate: he80 rate |
| 112 | * @supported_he40_rate: he40 rate |
| 113 | * @supported_he20_rate: he20 rate |
| 114 | */ |
| 115 | struct index_he_data_rate_type { |
| 116 | uint8_t beacon_rate_index; |
| 117 | uint16_t supported_he20_rate[MAX_HE_DCM_INDEX][3]; |
| 118 | uint16_t supported_he40_rate[MAX_HE_DCM_INDEX][3]; |
| 119 | uint16_t supported_he80_rate[MAX_HE_DCM_INDEX][3]; |
| 120 | }; |
| 121 | #endif |
| 122 | |
Jeff Johnson | dab5860 | 2018-07-14 15:30:24 -0700 | [diff] [blame] | 123 | struct wifi_scan_cmd_req_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 124 | /* |
| 125 | * wma_main.c functions declarations |
| 126 | */ |
| 127 | |
Abhishek Singh | 2d775fd | 2017-08-18 10:51:33 +0530 | [diff] [blame] | 128 | /** |
| 129 | * wma_send_msg_by_priority() - Send wma message to PE with priority. |
| 130 | * @wma_handle: wma handle |
| 131 | * @msg_type: message type |
| 132 | * @body_ptr: message body ptr |
| 133 | * @body_val: message body value |
| 134 | * @is_high_priority: if msg is high priority |
| 135 | * |
| 136 | * Return: none |
| 137 | */ |
| 138 | void wma_send_msg_by_priority(tp_wma_handle wma_handle, uint16_t msg_type, |
| 139 | void *body_ptr, uint32_t body_val, bool is_high_priority); |
| 140 | |
| 141 | /** |
| 142 | * wma_send_msg() - Send wma message to PE. |
| 143 | * @wma_handle: wma handle |
| 144 | * @msg_type: message type |
| 145 | * @body_ptr: message body ptr |
| 146 | * @body_val: message body value |
| 147 | * |
| 148 | * Return: none |
| 149 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 150 | void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type, |
| 151 | void *body_ptr, uint32_t body_val); |
| 152 | |
Abhishek Singh | 2d775fd | 2017-08-18 10:51:33 +0530 | [diff] [blame] | 153 | /** |
| 154 | * wma_send_msg_high_priority() - Send wma message to PE with high priority. |
| 155 | * @wma_handle: wma handle |
| 156 | * @msg_type: message type |
| 157 | * @body_ptr: message body ptr |
| 158 | * @body_val: message body value |
| 159 | * |
| 160 | * Return: none |
| 161 | */ |
| 162 | void wma_send_msg_high_priority(tp_wma_handle wma_handle, uint16_t msg_type, |
| 163 | void *body_ptr, uint32_t body_val); |
| 164 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 165 | void wma_data_tx_ack_comp_hdlr(void *wma_context, |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 166 | qdf_nbuf_t netbuf, int32_t status); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 167 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 168 | 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] | 169 | int value); |
| 170 | |
| 171 | /* |
| 172 | * wma_scan_roam.c functions declarations |
| 173 | */ |
| 174 | |
| 175 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 176 | void wma_process_roam_invoke(WMA_HANDLE handle, |
| 177 | struct wma_roam_invoke_cmd *roaminvoke); |
| 178 | |
| 179 | void wma_process_roam_synch_fail(WMA_HANDLE handle, |
| 180 | struct roam_offload_synch_fail *synch_fail); |
| 181 | |
| 182 | int wma_roam_synch_event_handler(void *handle, uint8_t *event, |
| 183 | uint32_t len); |
Padma, Santhosh Kumar | aa2433e | 2017-10-06 14:34:46 +0530 | [diff] [blame] | 184 | |
| 185 | /** |
Pragaspathi Thilagaraj | 7a7163b | 2019-07-14 22:47:09 +0530 | [diff] [blame] | 186 | * wma_roam_auth_offload_event_handler() - Handle LFR-3.0 Roam authentication |
| 187 | * offload event. |
| 188 | * @handle: wma_handle |
| 189 | * @event: rso auth offload event data pointer |
| 190 | * @len: length of the data |
| 191 | * |
| 192 | * Handles roam authentication offload event from firmware which is triggered |
| 193 | * after roam candidate selection. |
| 194 | */ |
| 195 | int wma_roam_auth_offload_event_handler(WMA_HANDLE handle, uint8_t *event, |
| 196 | uint32_t len); |
| 197 | |
| 198 | /** |
Sandeep Puligilla | 3746d5d | 2018-10-23 16:01:11 -0700 | [diff] [blame] | 199 | * wma_mlme_roam_synch_event_handler_cb() - roam synch event handler |
| 200 | * @handle: wma handle |
| 201 | * @event: event data |
| 202 | * @len: length of data |
| 203 | * |
| 204 | * This function is roam synch event handler. It sends roam |
| 205 | * indication for upper layer. |
| 206 | * |
| 207 | * Return: Success or Failure status |
| 208 | */ |
| 209 | int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event, |
| 210 | uint32_t len); |
| 211 | |
| 212 | /** |
Padma, Santhosh Kumar | aa2433e | 2017-10-06 14:34:46 +0530 | [diff] [blame] | 213 | * wma_roam_synch_frame_event_handler() - roam synch frame event handler |
| 214 | * @handle: wma handle |
| 215 | * @event: event data |
| 216 | * @len: length of data |
| 217 | * |
| 218 | * This function is roam synch frame event handler. |
| 219 | * |
| 220 | * Return: Success or Failure status |
| 221 | */ |
| 222 | int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event, |
| 223 | uint32_t len); |
Ashish Kumar Dhanotiya | 0213793 | 2019-02-26 21:43:32 +0530 | [diff] [blame] | 224 | #else |
| 225 | static inline int wma_mlme_roam_synch_event_handler_cb(void *handle, |
| 226 | uint8_t *event, |
| 227 | uint32_t len) |
| 228 | { |
| 229 | return 0; |
| 230 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 231 | #endif |
| 232 | |
Kapil Gupta | 5cda225 | 2016-12-29 18:44:26 +0530 | [diff] [blame] | 233 | /** |
| 234 | * wma_update_per_roam_config() -per roam config parameter updation to FW |
| 235 | * @handle: wma handle |
| 236 | * @req_buf: per roam config parameters |
| 237 | * |
| 238 | * Return: none |
| 239 | */ |
| 240 | void wma_update_per_roam_config(WMA_HANDLE handle, |
| 241 | struct wmi_per_roam_config_req *req_buf); |
| 242 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 243 | QDF_STATUS wma_update_channel_list(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 244 | tSirUpdateChanList *chan_list); |
| 245 | |
| 246 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 247 | 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] | 248 | roam_offload_param * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 249 | roam_offload_params, |
Jeff Johnson | e6da4b0 | 2019-02-06 22:22:04 -0800 | [diff] [blame] | 250 | struct roam_offload_scan_req *roam_req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 251 | #endif |
| 252 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 253 | QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 254 | wmi_start_scan_cmd_fixed_param * |
| 255 | scan_cmd_fp, |
Jeff Johnson | e6da4b0 | 2019-02-06 22:22:04 -0800 | [diff] [blame] | 256 | struct roam_offload_scan_req *roam_req, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 257 | uint32_t mode, uint32_t vdev_id); |
| 258 | |
Varun Reddy Yeturu | 061d4d6 | 2017-07-20 09:39:32 -0700 | [diff] [blame] | 259 | /** |
| 260 | * wma_roam_scan_mawc_params() - send roam scan mode request to fw |
| 261 | * @wma_handle: wma handle |
| 262 | * @roam_req: roam request param |
| 263 | * |
| 264 | * Fill the MAWC roaming parameters and send |
| 265 | * WMI_ROAM_CONFIGURE_MAWC_CMDID TLV to firmware. |
| 266 | * |
| 267 | * Return: QDF status |
| 268 | */ |
| 269 | QDF_STATUS wma_roam_scan_mawc_params(tp_wma_handle wma_handle, |
Jeff Johnson | e6da4b0 | 2019-02-06 22:22:04 -0800 | [diff] [blame] | 270 | struct roam_offload_scan_req *roam_req); |
Varun Reddy Yeturu | 061d4d6 | 2017-07-20 09:39:32 -0700 | [diff] [blame] | 271 | |
Jeff Johnson | e6da4b0 | 2019-02-06 22:22:04 -0800 | [diff] [blame] | 272 | /** |
| 273 | * wma_roam_scan_offload_rssi_threshold() - set scan offload rssi threashold |
| 274 | * @wma_handle: wma handle |
| 275 | * @roam_req: Roaming request buffer |
| 276 | * |
| 277 | * Send WMI_ROAM_SCAN_RSSI_THRESHOLD TLV to firmware |
| 278 | * |
| 279 | * Return: QDF status |
| 280 | */ |
| 281 | QDF_STATUS |
| 282 | wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle, |
| 283 | struct roam_offload_scan_req *roam_req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 284 | |
Pragaspathi Thilagaraj | 2b8ea35 | 2019-04-12 02:23:50 +0530 | [diff] [blame] | 285 | QDF_STATUS |
| 286 | wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle, |
| 287 | struct roam_offload_scan_req *roam_req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 288 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 289 | 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] | 290 | uint32_t vdev_id, |
| 291 | int32_t rssi_change_thresh, |
| 292 | uint32_t bcn_rssi_weight, |
| 293 | uint32_t hirssi_delay_btw_scans); |
| 294 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 295 | 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] | 296 | uint8_t chan_count, |
Tushnim Bhattacharyya | 42299b8 | 2019-09-01 18:03:54 -0700 | [diff] [blame] | 297 | uint32_t *chan_freq_list, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 298 | uint8_t list_type, uint32_t vdev_id); |
| 299 | |
Pragaspathi Thilagaraj | 7a1a08e | 2019-05-29 01:20:29 +0530 | [diff] [blame] | 300 | A_UINT32 e_csr_auth_type_to_rsn_authmode(enum csr_akm_type authtype, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 301 | eCsrEncryptionType encr); |
| 302 | |
| 303 | A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr); |
| 304 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 305 | void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, |
Jeff Johnson | 9f18aa7 | 2018-12-02 12:05:12 -0800 | [diff] [blame] | 306 | struct mac_context *mac, |
Jeff Johnson | e6da4b0 | 2019-02-06 22:22:04 -0800 | [diff] [blame] | 307 | struct roam_offload_scan_req *roam_req, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 308 | wmi_start_scan_cmd_fixed_param * |
| 309 | scan_params); |
| 310 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 311 | QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 312 | A_INT32 first_bcnt, |
| 313 | A_UINT32 final_bcnt, uint32_t vdev_id); |
| 314 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 315 | QDF_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 316 | uint32_t command, uint32_t vdev_id); |
| 317 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 318 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
| 319 | void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts); |
| 320 | #endif |
| 321 | |
| 322 | #ifdef FEATURE_WLAN_EXTSCAN |
| 323 | |
| 324 | int wma_extscan_start_stop_event_handler(void *handle, |
| 325 | uint8_t *cmd_param_info, |
| 326 | uint32_t len); |
| 327 | |
| 328 | int wma_extscan_operations_event_handler(void *handle, |
| 329 | uint8_t *cmd_param_info, |
| 330 | uint32_t len); |
| 331 | |
| 332 | int wma_extscan_table_usage_event_handler(void *handle, |
| 333 | uint8_t *cmd_param_info, |
| 334 | uint32_t len); |
| 335 | |
| 336 | int wma_extscan_capabilities_event_handler(void *handle, |
| 337 | uint8_t *cmd_param_info, |
| 338 | uint32_t len); |
| 339 | |
| 340 | int wma_extscan_hotlist_match_event_handler(void *handle, |
| 341 | uint8_t *cmd_param_info, |
| 342 | uint32_t len); |
| 343 | |
| 344 | int wma_extscan_cached_results_event_handler(void *handle, |
| 345 | uint8_t *cmd_param_info, |
| 346 | uint32_t len); |
| 347 | |
| 348 | int wma_extscan_change_results_event_handler(void *handle, |
| 349 | uint8_t *cmd_param_info, |
| 350 | uint32_t len); |
| 351 | |
| 352 | int wma_passpoint_match_event_handler(void *handle, |
| 353 | uint8_t *cmd_param_info, |
| 354 | uint32_t len); |
| 355 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 356 | #endif |
| 357 | |
Pragaspathi Thilagaraj | 30251ec | 2018-12-18 17:22:57 +0530 | [diff] [blame] | 358 | int wma_handle_btm_blacklist_event(void *handle, uint8_t *cmd_param_info, |
| 359 | uint32_t len); |
| 360 | |
Wen Gong | 7952fbd | 2018-04-18 11:27:23 +0800 | [diff] [blame] | 361 | #ifdef FEATURE_WLAN_EXTSCAN |
| 362 | int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len); |
| 363 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 364 | void wma_register_extscan_event_handler(tp_wma_handle wma_handle); |
| 365 | |
Jeff Johnson | dab5860 | 2018-07-14 15:30:24 -0700 | [diff] [blame] | 366 | /** |
| 367 | * wma_start_extscan() - start extscan command to fw. |
| 368 | * @wma: wma handle |
| 369 | * @params: extscan command request params |
| 370 | * |
| 371 | * This function sends start extscan request to fw. |
| 372 | * |
| 373 | * Return: QDF Status. |
| 374 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 375 | QDF_STATUS wma_start_extscan(tp_wma_handle wma, |
Jeff Johnson | dab5860 | 2018-07-14 15:30:24 -0700 | [diff] [blame] | 376 | struct wifi_scan_cmd_req_params *pstart); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 377 | |
Jeff Johnson | 7272ea7 | 2018-07-15 17:22:27 -0700 | [diff] [blame] | 378 | /** |
| 379 | * wma_stop_extscan() - stop extscan command to fw. |
| 380 | * @wma: wma handle |
| 381 | * @params: stop scan command request params |
| 382 | * |
| 383 | * This function sends stop extscan request to fw. |
| 384 | * |
| 385 | * Return: QDF Status. |
| 386 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 387 | QDF_STATUS wma_stop_extscan(tp_wma_handle wma, |
Jeff Johnson | 7272ea7 | 2018-07-15 17:22:27 -0700 | [diff] [blame] | 388 | struct extscan_stop_req_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 389 | |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 390 | /** |
| 391 | * wma_extscan_start_hotlist_monitor() - start hotlist monitor |
| 392 | * @wma: wma handle |
| 393 | * @params: hotlist request params |
| 394 | * |
| 395 | * This function configures hotlist monitor in fw. |
| 396 | * |
| 397 | * Return: QDF status |
| 398 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 399 | QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma, |
Jeff Johnson | 1148cb0 | 2018-07-13 23:14:32 -0700 | [diff] [blame] | 400 | struct extscan_bssid_hotlist_set_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 401 | |
Jeff Johnson | 9743eb7 | 2018-07-14 10:30:04 -0700 | [diff] [blame] | 402 | /** |
| 403 | * wma_extscan_stop_hotlist_monitor() - stop hotlist monitor |
| 404 | * @wma: wma handle |
| 405 | * @params: hotlist request params |
| 406 | * |
| 407 | * This function configures hotlist monitor to stop in fw. |
| 408 | * |
| 409 | * Return: QDF status |
| 410 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 411 | QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma, |
Jeff Johnson | 9743eb7 | 2018-07-14 10:30:04 -0700 | [diff] [blame] | 412 | struct extscan_bssid_hotlist_reset_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 413 | |
Jeff Johnson | b43ed03 | 2018-07-16 06:59:21 -0700 | [diff] [blame] | 414 | /** |
| 415 | * wma_extscan_start_change_monitor() - send start change monitor cmd |
| 416 | * @wma: wma handle |
| 417 | * @params: change monitor request params |
| 418 | * |
| 419 | * This function sends start change monitor request to fw. |
| 420 | * |
| 421 | * Return: QDF status |
| 422 | */ |
| 423 | QDF_STATUS |
| 424 | wma_extscan_start_change_monitor(tp_wma_handle wma, |
| 425 | struct extscan_set_sig_changereq_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 426 | |
Jeff Johnson | 0c8dbc3 | 2018-07-16 22:10:48 -0700 | [diff] [blame] | 427 | /** |
| 428 | * wma_extscan_stop_change_monitor() - send stop change monitor cmd |
| 429 | * @wma: wma handle |
| 430 | * @params: change monitor request params |
| 431 | * |
| 432 | * This function sends stop change monitor request to fw. |
| 433 | * |
| 434 | * Return: QDF status |
| 435 | */ |
| 436 | QDF_STATUS |
| 437 | wma_extscan_stop_change_monitor(tp_wma_handle wma, |
| 438 | struct extscan_capabilities_reset_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 439 | |
Jeff Johnson | 2ba6009 | 2018-07-17 08:19:37 -0700 | [diff] [blame] | 440 | /** |
| 441 | * wma_extscan_get_cached_results() - extscan get cached results |
| 442 | * @wma: wma handle |
| 443 | * @params: cached results parameters |
| 444 | * |
| 445 | * This function send request to fw to get cached results. |
| 446 | * |
| 447 | * Return: QDF status |
| 448 | */ |
| 449 | QDF_STATUS |
| 450 | wma_extscan_get_cached_results(tp_wma_handle wma, |
| 451 | struct extscan_cached_result_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 452 | |
Jeff Johnson | fed9a73 | 2018-07-18 12:18:03 -0700 | [diff] [blame] | 453 | /** |
| 454 | * wma_extscan_get_capabilities() - extscan get capabilities |
| 455 | * @wma: wma handle |
| 456 | * @params: get capabilities params |
| 457 | * |
| 458 | * This function sends request to fw to get extscan capabilities. |
| 459 | * |
| 460 | * Return: QDF status |
| 461 | */ |
| 462 | QDF_STATUS |
| 463 | wma_extscan_get_capabilities(tp_wma_handle wma, |
| 464 | struct extscan_capabilities_params *params); |
| 465 | |
Jeff Johnson | 360135b | 2018-07-18 20:51:47 -0700 | [diff] [blame] | 466 | /** |
| 467 | * wma_set_epno_network_list() - set epno network list |
| 468 | * @wma: WMA handle |
| 469 | * @req: epno config params request structure |
| 470 | * |
| 471 | * This function reads the incoming epno config request structure |
| 472 | * and constructs the WMI message to the firmware. |
| 473 | * |
| 474 | * Return: 0 on success, error number otherwise |
| 475 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 476 | QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma, |
Jeff Johnson | 360135b | 2018-07-18 20:51:47 -0700 | [diff] [blame] | 477 | struct wifi_enhanced_pno_params *req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 478 | |
Jeff Johnson | 2a7f101 | 2018-07-19 07:21:06 -0700 | [diff] [blame] | 479 | /** |
| 480 | * wma_set_passpoint_network_list() - set passpoint network list |
| 481 | * @wma: WMA handle |
| 482 | * @params: passpoint network request structure |
| 483 | * |
| 484 | * This function sends the passpoint configs down to the firmware |
| 485 | * |
| 486 | * Return: QDF_STATUS enumeration |
| 487 | */ |
| 488 | QDF_STATUS |
| 489 | wma_set_passpoint_network_list(tp_wma_handle wma, |
| 490 | struct wifi_passpoint_req_param *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 491 | |
Jeff Johnson | 2a7f101 | 2018-07-19 07:21:06 -0700 | [diff] [blame] | 492 | /** |
| 493 | * wma_reset_passpoint_network_list() - reset passpoint network list |
| 494 | * @wma: WMA handle |
| 495 | * @params: passpoint network request structure |
| 496 | * |
| 497 | * This function sends down WMI command with network id set to wildcard id. |
| 498 | * firmware shall clear all the config entries |
| 499 | * |
| 500 | * Return: QDF_STATUS enumeration |
| 501 | */ |
| 502 | QDF_STATUS |
| 503 | wma_reset_passpoint_network_list(tp_wma_handle wma, |
| 504 | struct wifi_passpoint_req_param *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 505 | #endif |
| 506 | |
Jeff Johnson | 9d45f33 | 2019-01-29 08:42:00 -0800 | [diff] [blame] | 507 | /** |
| 508 | * wma_scan_probe_setoui() - set scan probe OUI |
| 509 | * @wma: wma handle |
| 510 | * @set_oui: OUI parameters |
| 511 | * |
| 512 | * set scan probe OUI parameters in firmware |
| 513 | * |
| 514 | * Return: QDF status |
| 515 | */ |
| 516 | QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, |
| 517 | struct scan_mac_oui *set_oui); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 518 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 519 | void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id); |
| 520 | |
| 521 | int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf, |
| 522 | uint32_t len); |
| 523 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 524 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Varun Reddy Yeturu | d5939f8 | 2015-12-24 18:14:02 -0800 | [diff] [blame] | 525 | void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id); |
| 526 | static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma, |
| 527 | uint8_t vdev_id) |
| 528 | { |
| 529 | return wma->interfaces[vdev_id].roam_synch_in_progress; |
| 530 | } |
| 531 | #else |
| 532 | static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma, |
| 533 | uint8_t vdev_id) |
| 534 | { |
| 535 | return false; |
| 536 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 537 | #endif |
| 538 | |
| 539 | /* |
| 540 | * wma_dev_if.c functions declarations |
| 541 | */ |
| 542 | |
Abhishek Ambure | 3ee8088 | 2019-09-20 16:32:12 +0530 | [diff] [blame] | 543 | /** |
| 544 | * wma_find_vdev_by_addr() - find vdev_id from mac address |
| 545 | * @wma: wma handle |
| 546 | * @addr: mac address |
| 547 | * @vdev_id: return vdev_id |
| 548 | * |
| 549 | * Return: Returns vdev handle or NULL if mac address don't match |
| 550 | */ |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 551 | 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] | 552 | uint8_t *vdev_id); |
| 553 | |
| 554 | /** |
| 555 | * wma_find_vdev_by_id() - Returns vdev handle for given vdev id. |
| 556 | * @wma - wma handle |
| 557 | * @vdev_id - vdev ID |
| 558 | * |
| 559 | * Return: Returns vdev handle if given vdev id is valid. |
| 560 | * Otherwise returns NULL. |
| 561 | */ |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 562 | static inline |
| 563 | 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] | 564 | { |
Naveen Rawat | f2bd42d | 2017-06-29 14:51:43 -0700 | [diff] [blame] | 565 | if (vdev_id >= wma->max_bssid) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 566 | return NULL; |
| 567 | |
Abhishek Ambure | 24cff9e | 2019-10-01 12:09:55 +0530 | [diff] [blame] | 568 | if (!wma->interfaces[vdev_id].vdev) |
| 569 | return NULL; |
| 570 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 571 | return wlan_vdev_get_dp_handle(wma->interfaces[vdev_id].vdev); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 572 | } |
| 573 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 574 | bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id); |
| 575 | |
| 576 | #ifdef QCA_IBSS_SUPPORT |
Abhishek Ambure | 8ed62cb | 2019-09-11 19:03:57 +0530 | [diff] [blame] | 577 | /** |
| 578 | * wma_is_vdev_in_ibss_mode() - check that vdev is in ibss mode or not |
| 579 | * @wma: wma handle |
| 580 | * @vdev_id: vdev id |
| 581 | * |
| 582 | * Helper function to know whether given vdev id |
| 583 | * is in IBSS mode or not. |
| 584 | * |
| 585 | * Return: True/False |
| 586 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 587 | bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id); |
Abhishek Ambure | 8ed62cb | 2019-09-11 19:03:57 +0530 | [diff] [blame] | 588 | |
| 589 | /** |
| 590 | * wma_adjust_ibss_heart_beat_timer() - set ibss heart beat timer in fw. |
| 591 | * @wma: wma handle |
| 592 | * @vdev_id: vdev id |
| 593 | * @peer_num_delta: peer number delta value |
| 594 | * |
| 595 | * Return: none |
| 596 | */ |
| 597 | void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma, |
| 598 | uint8_t vdev_id, |
| 599 | int8_t peer_num_delta); |
| 600 | |
| 601 | /** |
| 602 | * wma_set_ibss_pwrsave_params() - set ibss power save parameter to fw |
| 603 | * @wma: wma handle |
| 604 | * @vdev_id: vdev id |
| 605 | * |
| 606 | * Return: 0 for success or error code. |
| 607 | */ |
| 608 | QDF_STATUS |
| 609 | wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id); |
| 610 | |
| 611 | /** |
| 612 | * wma_ibss_peer_info_event_handler() - IBSS peer info event handler |
| 613 | * @handle: wma handle |
| 614 | * @data: event data |
| 615 | * @len: length of data |
| 616 | * |
| 617 | * This function handles IBSS peer info event from FW. |
| 618 | * |
| 619 | * Return: 0 for success or error code |
| 620 | */ |
| 621 | int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data, |
| 622 | uint32_t len); |
Houston Hoffman | 79b4af2 | 2015-10-06 12:01:08 -0700 | [diff] [blame] | 623 | #else |
| 624 | /** |
| 625 | * wma_is_vdev_in_ibss_mode(): dummy function |
| 626 | * @wma: wma handle |
| 627 | * @vdev_id: vdev id |
| 628 | * |
| 629 | * Return false since no vdev can be in ibss mode without ibss support |
| 630 | */ |
| 631 | static inline |
Mahesh Kumar Kalikot Veetil | 32e4fc7 | 2016-09-09 17:05:22 -0700 | [diff] [blame] | 632 | 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] | 633 | { |
| 634 | return false; |
| 635 | } |
Abhishek Ambure | 8ed62cb | 2019-09-11 19:03:57 +0530 | [diff] [blame] | 636 | |
| 637 | /** |
| 638 | * wma_adjust_ibss_heart_beat_timer() - set ibss heart beat timer in fw. |
| 639 | * @wma: wma handle |
| 640 | * @vdev_id: vdev id |
| 641 | * @peer_num_delta: peer number delta value |
| 642 | * |
| 643 | * This function is dummy |
| 644 | * |
| 645 | * Return: none |
| 646 | */ |
| 647 | static inline void |
| 648 | wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma, |
| 649 | uint8_t vdev_id, |
| 650 | int8_t peer_num_delta) |
| 651 | { |
| 652 | } |
| 653 | |
| 654 | /** |
| 655 | * wma_ibss_peer_info_event_handler() - IBSS peer info event handler |
| 656 | * @handle: wma handle |
| 657 | * @data: event data |
| 658 | * @len: length of data |
| 659 | * |
| 660 | * This function is dummy |
| 661 | * |
| 662 | * Return: 0 for success or error code |
| 663 | */ |
| 664 | static inline int |
| 665 | wma_ibss_peer_info_event_handler(void *handle, uint8_t *data, |
| 666 | uint32_t len) |
| 667 | { |
| 668 | return 0; |
| 669 | } |
Abhishek Ambure | 27f9830 | 2019-09-25 20:00:36 +0530 | [diff] [blame] | 670 | |
| 671 | /** |
| 672 | * wma_set_ibss_pwrsave_params() - set ibss power save parameter to fw |
| 673 | * @wma: wma handle |
| 674 | * @vdev_id: vdev id |
| 675 | * |
| 676 | * This function is dummy |
| 677 | * |
| 678 | * Return: 0 for success or error code. |
| 679 | */ |
| 680 | static inline QDF_STATUS |
| 681 | wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id) |
| 682 | { |
| 683 | return QDF_STATUS_SUCCESS; |
| 684 | } |
Abhishek Ambure | 8ed62cb | 2019-09-11 19:03:57 +0530 | [diff] [blame] | 685 | #endif /* QCA_IBSS_SUPPORT */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 686 | |
| 687 | /** |
Abhishek Ambure | 3ee8088 | 2019-09-20 16:32:12 +0530 | [diff] [blame] | 688 | * wma_get_vdev_bssid() - Get BSSID from mlme_obj |
| 689 | * @vdev - pointer to vdev |
| 690 | * |
| 691 | * This API is used to get BSSID stored in vdev mlme object. |
| 692 | * |
| 693 | * Return: pointer to bssid on success else NULL. |
| 694 | */ |
| 695 | uint8_t *wma_get_vdev_bssid(struct wlan_objmgr_vdev *vdev); |
| 696 | |
| 697 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 698 | * wma_find_bssid_by_vdev_id() - Get the BSS ID corresponding to the vdev ID |
| 699 | * @wma - wma handle |
| 700 | * @vdev_id - vdev ID |
| 701 | * |
| 702 | * Return: Returns pointer to bssid on success, |
| 703 | * otherwise returns NULL. |
| 704 | */ |
| 705 | static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma, |
| 706 | uint8_t vdev_id) |
| 707 | { |
| 708 | if (vdev_id >= wma->max_bssid) |
| 709 | return NULL; |
| 710 | |
Abhishek Ambure | 3ee8088 | 2019-09-20 16:32:12 +0530 | [diff] [blame] | 711 | return wma_get_vdev_bssid(wma->interfaces[vdev_id].vdev); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 712 | } |
| 713 | |
Abhishek Ambure | 3ee8088 | 2019-09-20 16:32:12 +0530 | [diff] [blame] | 714 | /** |
| 715 | * wma_find_vdev_by_bssid() - Get the corresponding vdev_id from BSSID |
| 716 | * @wma - wma handle |
| 717 | * @vdev_id - vdev ID |
| 718 | * |
| 719 | * Return: fill vdev_id with appropriate vdev id and return vdev |
| 720 | * handle or NULL if not found. |
| 721 | */ |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 722 | 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] | 723 | uint8_t *vdev_id); |
| 724 | |
Abhishek Ambure | cbef144 | 2019-06-10 17:15:00 +0530 | [diff] [blame] | 725 | /** |
| 726 | * wma_vdev_detach() - send vdev delete command to fw |
| 727 | * @wma_handle: wma handle |
| 728 | * @pdel_vdev_req_param: del vdev params |
| 729 | * |
| 730 | * Return: QDF status |
| 731 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 732 | QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle, |
Abhishek Ambure | cbef144 | 2019-06-10 17:15:00 +0530 | [diff] [blame] | 733 | struct del_vdev_params *pdel_vdev_req_param); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 734 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 735 | 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] | 736 | uint32_t param_id, uint32_t param_value); |
Rajeev Kumar Sirasanagandla | e5787e2 | 2018-10-25 21:10:34 +0530 | [diff] [blame] | 737 | |
| 738 | QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid, |
| 739 | uint8_t vdev_id, void *peer, |
| 740 | bool roam_synch_in_progress); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 741 | |
Rakshith Suresh Patkar | 5f9efa3 | 2019-02-04 13:26:56 +0530 | [diff] [blame] | 742 | QDF_STATUS wma_peer_unmap_conf_send(tp_wma_handle wma, |
| 743 | struct send_peer_unmap_conf_params *msg); |
| 744 | |
Venkata Sharath Chandra Manchala | 0d44d45 | 2016-11-23 17:48:15 -0800 | [diff] [blame] | 745 | QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev, |
| 746 | struct cdp_vdev *vdev, |
Srinivas Girigowda | a47b45f | 2019-02-27 12:29:02 -0800 | [diff] [blame] | 747 | uint8_t peer_addr[QDF_MAC_ADDR_SIZE], |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 748 | uint32_t peer_type, uint8_t vdev_id, |
| 749 | bool roam_synch_in_progress); |
| 750 | |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 751 | /** |
| 752 | * wma_send_del_bss_response() - send delete bss resp |
| 753 | * @wma: wma handle |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 754 | * @resp: pointer to del bss response |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 755 | * |
| 756 | * Return: none |
| 757 | */ |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 758 | void wma_send_del_bss_response(tp_wma_handle wma, struct del_bss_resp *resp); |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 759 | |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 760 | /** |
Abhishek Singh | fb5b4d3 | 2018-12-06 11:53:08 +0530 | [diff] [blame] | 761 | * __wma_handle_vdev_stop_rsp() - vdev stop response handler |
Abhishek Ambure | 09905d7 | 2019-08-08 19:45:55 +0530 | [diff] [blame] | 762 | * @resp_event: pointer to response received |
Abhishek Singh | 2904a6a | 2018-08-30 17:45:59 +0530 | [diff] [blame] | 763 | * |
| 764 | * Return: QDF_STATUS_SUCCESS for success or QDF_ERROR code |
| 765 | */ |
| 766 | QDF_STATUS |
Abhishek Ambure | 09905d7 | 2019-08-08 19:45:55 +0530 | [diff] [blame] | 767 | __wma_handle_vdev_stop_rsp(struct vdev_stop_response *resp_event); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 768 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 769 | void wma_hold_req_timer(void *data); |
| 770 | struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, |
| 771 | uint8_t vdev_id, uint32_t msg_type, |
| 772 | uint8_t type, void *params, |
| 773 | uint32_t timeout); |
| 774 | |
Abhishek Ambure | 8ed62cb | 2019-09-11 19:03:57 +0530 | [diff] [blame] | 775 | /** |
| 776 | * wma_add_bss() - Add BSS request to fw as per opmode |
| 777 | * @wma: wma handle |
| 778 | * @params: add bss params |
| 779 | * |
| 780 | * Return: none |
| 781 | */ |
Jianmin Zhu | f07aa51 | 2019-08-09 18:20:17 +0800 | [diff] [blame] | 782 | void wma_add_bss(tp_wma_handle wma, struct bss_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 783 | |
Abhishek Ambure | 8ed62cb | 2019-09-11 19:03:57 +0530 | [diff] [blame] | 784 | /** |
| 785 | * wma_add_sta() - process add sta request as per opmode |
| 786 | * @wma: wma handle |
| 787 | * @add_Sta: add sta params |
| 788 | * |
| 789 | * Return: none |
| 790 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 791 | void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta); |
| 792 | |
Abhishek Ambure | 8ed62cb | 2019-09-11 19:03:57 +0530 | [diff] [blame] | 793 | /** |
| 794 | * wma_delete_sta() - process del sta request as per opmode |
| 795 | * @wma: wma handle |
| 796 | * @del_sta: delete sta params |
| 797 | * |
| 798 | * Return: none |
| 799 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 800 | void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta); |
| 801 | |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 802 | /** |
| 803 | * wma_delete_bss() - process delete bss request from upper layer |
| 804 | * @wma: wma handle |
| 805 | * @vdev_id: vdev id |
| 806 | * |
| 807 | * Return: none |
| 808 | */ |
| 809 | void wma_delete_bss(tp_wma_handle wma, uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 810 | |
| 811 | int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type); |
| 812 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 813 | /** |
| 814 | * wma_set_vdev_intrabss_fwd() - set intra_fwd value to wni_in. |
| 815 | * @wma_handle: wma handle |
| 816 | * @pdis_intra_fwd: Pointer to DisableIntraBssFwd struct |
| 817 | * |
| 818 | * Return: none |
| 819 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 820 | void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle, |
| 821 | tpDisableIntraBssFwd pdis_intra_fwd); |
| 822 | |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 823 | /** |
| 824 | * wma_delete_bss_ho_fail() - process delete bss request for handoff failure |
| 825 | * @wma: wma handle |
| 826 | * @vdev_id: vdev id |
| 827 | * |
| 828 | * Delete BSS in case of ROAM_HO_FAIL processing is handled separately in |
| 829 | * this routine. It needs to be done without sending any commands to firmware |
| 830 | * because firmware has already stopped and deleted peer and vdev is down. |
| 831 | * Relevant logic is aggregated from other routines. It changes the host |
| 832 | * data structures without sending VDEV_STOP, PEER_FLUSH_TIDS, PEER_DELETE |
| 833 | * and VDEV_DOWN commands to firmware. |
| 834 | * |
| 835 | * Return: none |
| 836 | */ |
| 837 | void wma_delete_bss_ho_fail(tp_wma_handle wma, uint8_t vdev_id); |
Deepak Dhamdhere | 2dae1bd | 2016-10-27 10:58:29 -0700 | [diff] [blame] | 838 | |
Jiachao Wu | 712d4fd | 2017-08-23 16:52:34 +0800 | [diff] [blame] | 839 | uint32_t wma_get_bcn_rate_code(uint16_t rate); |
| 840 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 841 | /* |
| 842 | * wma_mgmt.c functions declarations |
| 843 | */ |
Liangwei Dong | 03e080c | 2019-07-02 17:06:39 +0800 | [diff] [blame] | 844 | #ifdef WLAN_WMI_BCN |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 845 | 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] | 846 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 847 | |
Abhishek Ambure | 3ee8088 | 2019-09-20 16:32:12 +0530 | [diff] [blame] | 848 | /** |
| 849 | * wma_peer_sta_kickout_event_handler() - kickout event handler |
| 850 | * @handle: wma handle |
| 851 | * @event: event data |
| 852 | * @len: data length |
| 853 | * |
| 854 | * Kickout event is received from firmware on observing beacon miss |
| 855 | * It handles kickout event for different modes and indicate to |
| 856 | * upper layers. |
| 857 | * |
| 858 | * Return: 0 for success or error code |
| 859 | */ |
Krunal Soni | bd7e893 | 2018-10-03 11:14:51 -0700 | [diff] [blame] | 860 | int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event, |
| 861 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 862 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 863 | /** |
| 864 | * wma_unified_bcntx_status_event_handler() - beacon tx status event handler |
| 865 | * @handle: wma handle |
| 866 | * @cmd_param_info: event data |
| 867 | * @len: data length |
| 868 | * |
| 869 | * WMI Handler for WMI_OFFLOAD_BCN_TX_STATUS_EVENTID event from firmware. |
| 870 | * This event is generated by FW when the beacon transmission is offloaded |
| 871 | * and the host performs beacon template modification using WMI_BCN_TMPL_CMDID |
| 872 | * The FW generates this event when the first successful beacon transmission |
| 873 | * after template update |
| 874 | * |
| 875 | * Return: 0 for success or error code |
| 876 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 877 | int wma_unified_bcntx_status_event_handler(void *handle, |
| 878 | uint8_t *cmd_param_info, |
| 879 | uint32_t len); |
| 880 | |
mukul sharma | 72c8b22 | 2015-09-04 17:02:01 +0530 | [diff] [blame] | 881 | void wma_set_sta_sa_query_param(tp_wma_handle wma, |
| 882 | uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 883 | |
| 884 | void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id, |
| 885 | uint32_t method, uint32_t timeperiod, |
| 886 | uint8_t *hostv4addr, uint8_t *destv4addr, |
| 887 | uint8_t *destmac); |
| 888 | |
| 889 | int wma_vdev_install_key_complete_event_handler(void *handle, |
| 890 | uint8_t *event, |
| 891 | uint32_t len); |
| 892 | |
Abhishek Singh | 8d92ea7 | 2019-10-22 12:18:12 +0530 | [diff] [blame] | 893 | /** |
| 894 | * wma_objmgr_set_peer_mlme_phymode() - set phymode to peer object |
| 895 | * @wma: wma handle |
| 896 | * @mac_addr: mac addr of peer |
| 897 | * @phymode: phymode value to set |
| 898 | * |
| 899 | * Return: None |
| 900 | */ |
| 901 | void wma_objmgr_set_peer_mlme_phymode(tp_wma_handle wma, uint8_t *mac_addr, |
| 902 | enum wlan_phymode phymode); |
| 903 | |
Govind Singh | b30d4c0 | 2016-03-24 11:01:23 +0530 | [diff] [blame] | 904 | QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 905 | tSirNwType nw_type, |
| 906 | tpAddStaParams params); |
| 907 | |
Himanshu Agarwal | 009f157 | 2016-03-09 17:26:02 +0530 | [diff] [blame] | 908 | QDF_STATUS wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle, |
| 909 | uint32_t if_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 910 | gtx_config_t *gtx_info); |
| 911 | |
| 912 | void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id, |
| 913 | uint8_t llbcoexist); |
| 914 | |
| 915 | void wma_process_update_beacon_params(tp_wma_handle wma, |
| 916 | tUpdateBeaconParams *bcn_params); |
| 917 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 918 | /** |
| 919 | * wma_update_rts_params() - update cfg parameters to target |
| 920 | * @wma: wma handle |
| 921 | * @value: rts_threshold |
| 922 | * |
| 923 | * Return: none |
| 924 | */ |
Harprit Chhabada | bec6de4 | 2018-09-10 10:21:15 -0700 | [diff] [blame] | 925 | void wma_update_rts_params(tp_wma_handle wma, uint32_t value); |
| 926 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 927 | /** |
| 928 | * wma_update_frag_params() - update cfg parameters to target |
| 929 | * @wma: wma handle |
| 930 | * @value: frag_threshold |
| 931 | * |
| 932 | * Return: none |
| 933 | */ |
Harprit Chhabada | bec6de4 | 2018-09-10 10:21:15 -0700 | [diff] [blame] | 934 | void wma_update_frag_params(tp_wma_handle wma, uint32_t value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 935 | |
Kiran Kumar Lokere | 7d6e4c9 | 2018-09-19 13:45:47 -0700 | [diff] [blame] | 936 | #ifdef CRYPTO_SET_KEY_CONVERGED |
| 937 | static inline void wma_set_stakey(tp_wma_handle wma_handle, |
| 938 | tpSetStaKeyParams key_info) |
| 939 | { |
| 940 | } |
| 941 | |
| 942 | static inline void wma_set_bsskey(tp_wma_handle wma_handle, |
| 943 | tpSetBssKeyParams key_info) |
| 944 | { |
| 945 | } |
| 946 | #else |
| 947 | /** |
| 948 | * wma_set_stakey() - set encryption key |
| 949 | * @wma_handle: wma handle |
| 950 | * @key_info: station key info |
| 951 | * |
| 952 | * This function sets encryption key for WEP/WPA/WPA2 |
| 953 | * encryption mode in firmware and send response to upper layer. |
| 954 | * |
| 955 | * Return: none |
| 956 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 957 | void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info); |
| 958 | |
Kiran Kumar Lokere | 7d6e4c9 | 2018-09-19 13:45:47 -0700 | [diff] [blame] | 959 | /** |
| 960 | * wma_set_bsskey() - set encryption key to fw. |
| 961 | * @wma_handle: wma handle |
| 962 | * @key_info: key info |
| 963 | * |
| 964 | * Return: none |
| 965 | */ |
| 966 | void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info); |
| 967 | #endif |
| 968 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 969 | QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 970 | tEdcaParams *edca_params); |
| 971 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 972 | /** |
| 973 | * wma_tbttoffset_update_event_handler() - tbtt offset update handler |
| 974 | * @handle: wma handle |
| 975 | * @event: event buffer |
| 976 | * @len: data length |
| 977 | * |
| 978 | * Return: 0 for success or error code |
| 979 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 980 | int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event, |
| 981 | uint32_t len); |
| 982 | |
| 983 | void wma_send_probe_rsp_tmpl(tp_wma_handle wma, |
| 984 | tpSendProbeRespParams probe_rsp_info); |
| 985 | |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 986 | /** |
| 987 | * wma_set_ap_vdev_up() - send vdev up req |
| 988 | * @wma: wma handle |
| 989 | * @vdev_id: vdev id |
| 990 | * |
Abhishek Singh | 3d30a3b | 2018-09-12 15:49:18 +0530 | [diff] [blame] | 991 | * Return: QDF_STATUS |
Abhishek Singh | dfa69c3 | 2018-08-30 15:39:34 +0530 | [diff] [blame] | 992 | */ |
Abhishek Singh | 3d30a3b | 2018-09-12 15:49:18 +0530 | [diff] [blame] | 993 | 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] | 994 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 995 | void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info); |
| 996 | |
| 997 | void wma_set_keepalive_req(tp_wma_handle wma, |
Jeff Johnson | 562ccad | 2019-02-06 22:10:24 -0800 | [diff] [blame] | 998 | struct keep_alive_req *keepalive); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 999 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1000 | void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id, |
| 1001 | int32_t rssi); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1002 | |
| 1003 | void wma_process_update_opmode(tp_wma_handle wma_handle, |
| 1004 | tUpdateVHTOpMode *update_vht_opmode); |
| 1005 | |
| 1006 | void wma_process_update_rx_nss(tp_wma_handle wma_handle, |
| 1007 | tUpdateRxNss *update_rx_nss); |
| 1008 | |
| 1009 | void wma_process_update_membership(tp_wma_handle wma_handle, |
| 1010 | tUpdateMembership *membership); |
| 1011 | |
| 1012 | void wma_process_update_userpos(tp_wma_handle wma_handle, |
| 1013 | tUpdateUserPos *userpos); |
| 1014 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1015 | /* |
| 1016 | * wma_power.c functions declarations |
| 1017 | */ |
| 1018 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 1019 | /** |
| 1020 | * wma_enable_sta_ps_mode() - enable sta powersave params in fw |
| 1021 | * @wma: wma handle |
| 1022 | * @ps_req: power save request |
| 1023 | * |
| 1024 | * Return: none |
| 1025 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1026 | void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req); |
| 1027 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 1028 | 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] | 1029 | uint32_t vdev_id, uint32_t param, |
| 1030 | uint32_t value); |
| 1031 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 1032 | 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] | 1033 | uint8_t *peer_addr, uint8_t uapsd_value, |
| 1034 | uint8_t max_sp); |
| 1035 | |
| 1036 | void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param, |
Kiran Kumar Lokere | 27026ae | 2018-03-09 11:38:19 -0800 | [diff] [blame] | 1037 | struct wmi_host_wme_vparams *wmm_param, |
| 1038 | int ac, bool mu_edca_param); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1039 | |
| 1040 | void wma_set_tx_power(WMA_HANDLE handle, |
| 1041 | tMaxTxPowerParams *tx_pwr_params); |
| 1042 | |
| 1043 | void wma_set_max_tx_power(WMA_HANDLE handle, |
| 1044 | tMaxTxPowerParams *tx_pwr_params); |
| 1045 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1046 | void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req); |
| 1047 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 1048 | /** |
| 1049 | * wma_enable_uapsd_mode() - enable uapsd mode in fw |
| 1050 | * @wma: wma handle |
| 1051 | * @ps_req: power save request |
| 1052 | * |
| 1053 | * Return: none |
| 1054 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1055 | void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req); |
| 1056 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 1057 | void wma_disable_uapsd_mode(tp_wma_handle wma, tpDisableUapsdParams ps_req); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1058 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1059 | QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1060 | |
| 1061 | int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event, |
| 1062 | uint32_t len); |
| 1063 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1064 | QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle, |
Jeff Johnson | 19ce8d0 | 2019-02-08 22:56:23 -0800 | [diff] [blame] | 1065 | struct tx_power_limit *ptxlim); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1066 | |
| 1067 | void wma_update_noa(struct beacon_info *beacon, |
| 1068 | struct p2p_sub_element_noa *noa_ie); |
| 1069 | |
| 1070 | void wma_update_probe_resp_noa(tp_wma_handle wma_handle, |
| 1071 | struct p2p_sub_element_noa *noa_ie); |
| 1072 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1073 | void wma_process_set_mimops_req(tp_wma_handle wma_handle, |
| 1074 | tSetMIMOPS *mimops); |
| 1075 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1076 | 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] | 1077 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1078 | QDF_STATUS wma_notify_modem_power_state(void *wma_ptr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1079 | tSirModemPowerStateInd *pReq); |
| 1080 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1081 | 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] | 1082 | int value); |
| 1083 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1084 | /* |
| 1085 | * wma_data.c functions declarations |
| 1086 | */ |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 1087 | /** |
| 1088 | * wma_set_bss_rate_flags() - set rate flags based on BSS capability |
| 1089 | * @wma: pointer to wma handle |
| 1090 | * @vdev_id: vdev id |
| 1091 | * @add_bss: pointer to bss params |
| 1092 | * |
| 1093 | * Return: none |
| 1094 | */ |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 1095 | void wma_set_bss_rate_flags(tp_wma_handle wma, uint8_t vdev_id, |
Jianmin Zhu | f07aa51 | 2019-08-09 18:20:17 +0800 | [diff] [blame] | 1096 | struct bss_params *add_bss); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1097 | |
| 1098 | int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params); |
| 1099 | |
Jiachao Wu | 08719b0 | 2017-07-05 13:05:34 +0800 | [diff] [blame] | 1100 | /** |
| 1101 | * wma_check_txrx_chainmask() - check txrx chainmask |
| 1102 | * @num_rf_chains: number of rf chains |
| 1103 | * @cmd_value: command value |
| 1104 | * |
| 1105 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 1106 | */ |
| 1107 | 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] | 1108 | |
| 1109 | int wma_peer_state_change_event_handler(void *handle, |
| 1110 | uint8_t *event_buff, |
| 1111 | uint32_t len); |
| 1112 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1113 | QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1114 | mcc_adaptive_scheduler); |
| 1115 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1116 | QDF_STATUS wma_set_mcc_channel_time_latency |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1117 | (tp_wma_handle wma, |
| 1118 | uint32_t mcc_channel, uint32_t mcc_channel_time_latency); |
| 1119 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1120 | QDF_STATUS wma_set_mcc_channel_time_quota |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1121 | (tp_wma_handle wma, |
| 1122 | uint32_t adapter_1_chan_number, |
| 1123 | uint32_t adapter_1_quota, uint32_t adapter_2_chan_number); |
| 1124 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 1125 | /** |
| 1126 | * wma_process_rate_update_indate() - rate update indication |
| 1127 | * @wma: wma handle |
| 1128 | * @pRateUpdateParams: Rate update params |
| 1129 | * |
| 1130 | * This function update rate & short GI interval to fw based on params |
| 1131 | * send by SME. |
| 1132 | * |
| 1133 | * Return: QDF status |
| 1134 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1135 | QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1136 | tSirRateUpdateInd * |
| 1137 | pRateUpdateParams); |
| 1138 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1139 | QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1140 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1141 | QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1142 | |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 1143 | #if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \ |
| 1144 | defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT) |
| 1145 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 1146 | /** |
| 1147 | * wma_mcc_vdev_tx_pause_evt_handler() - pause event handler |
| 1148 | * @handle: wma handle |
| 1149 | * @event: event buffer |
| 1150 | * @len: data length |
| 1151 | * |
| 1152 | * This function handle pause event from fw and pause/unpause |
| 1153 | * vdev. |
| 1154 | * |
| 1155 | * Return: 0 for success or error code. |
| 1156 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1157 | int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event, |
| 1158 | uint32_t len); |
| 1159 | #endif |
| 1160 | |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 1161 | #if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL) |
| 1162 | QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma, |
| 1163 | struct t_bad_peer_txtcl_config *config); |
Mohit Khanna | 0fe6167 | 2016-05-19 16:53:39 -0700 | [diff] [blame] | 1164 | #else |
| 1165 | static inline QDF_STATUS |
| 1166 | wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma, |
| 1167 | struct t_bad_peer_txtcl_config *config) |
| 1168 | { |
| 1169 | return QDF_STATUS_E_FAILURE; |
| 1170 | } |
Poddar, Siddarth | 5a91f5b | 2016-04-28 12:24:10 +0530 | [diff] [blame] | 1171 | #endif |
| 1172 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1173 | QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1174 | t_thermal_mgmt *pThermalParams); |
| 1175 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1176 | QDF_STATUS wma_process_set_thermal_level(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1177 | uint8_t thermal_level); |
| 1178 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1179 | QDF_STATUS wma_set_thermal_mgmt(tp_wma_handle wma_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1180 | t_thermal_cmd_params thermal_info); |
| 1181 | |
| 1182 | int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event, |
| 1183 | uint32_t len); |
| 1184 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1185 | int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data, |
| 1186 | uint32_t len); |
| 1187 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1188 | /* |
| 1189 | * wma_utils.c functions declarations |
| 1190 | */ |
| 1191 | |
| 1192 | #ifdef WLAN_FEATURE_STATS_EXT |
| 1193 | int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf, |
| 1194 | uint32_t len); |
| 1195 | #endif |
| 1196 | |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 1197 | enum eSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode); |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1198 | int wma_smps_mode_to_force_mode_param(uint8_t smps_mode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1199 | |
| 1200 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
| 1201 | void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle); |
| 1202 | |
Abhishek Ambure | 3ee8088 | 2019-09-20 16:32:12 +0530 | [diff] [blame] | 1203 | /** |
| 1204 | * wma_process_ll_stats_clear_req() - clear link layer stats |
| 1205 | * @wma: wma handle |
| 1206 | * @clearReq: ll stats clear request command params |
| 1207 | * |
| 1208 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 1209 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1210 | QDF_STATUS wma_process_ll_stats_clear_req |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1211 | (tp_wma_handle wma, const tpSirLLStatsClearReq clearReq); |
| 1212 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1213 | QDF_STATUS wma_process_ll_stats_set_req |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1214 | (tp_wma_handle wma, const tpSirLLStatsSetReq setReq); |
| 1215 | |
Abhishek Ambure | 3ee8088 | 2019-09-20 16:32:12 +0530 | [diff] [blame] | 1216 | /** |
| 1217 | * wma_process_ll_stats_get_req() - link layer stats get request |
| 1218 | * @wma:wma handle |
| 1219 | * @getReq:ll stats get request command params |
| 1220 | * |
| 1221 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 1222 | */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1223 | QDF_STATUS wma_process_ll_stats_get_req |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 1224 | (tp_wma_handle wma, const tpSirLLStatsGetReq getReq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1225 | |
| 1226 | int wma_unified_link_iface_stats_event_handler(void *handle, |
| 1227 | uint8_t *cmd_param_info, |
| 1228 | uint32_t len); |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 1229 | void wma_config_stats_ext_threshold(tp_wma_handle wma, |
| 1230 | struct sir_ll_ext_stats_threshold *thresh); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1231 | #endif |
| 1232 | |
| 1233 | void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus, |
| 1234 | uint8_t link_status); |
| 1235 | |
Abhishek Ambure | 0b2ea32 | 2019-09-23 19:25:39 +0530 | [diff] [blame] | 1236 | /** |
| 1237 | * wma_link_status_event_handler() - link status event handler |
| 1238 | * @handle: wma handle |
| 1239 | * @cmd_param_info: data from event |
| 1240 | * @len: length |
| 1241 | * |
| 1242 | * Return: 0 for success or error code |
| 1243 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1244 | int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info, |
| 1245 | uint32_t len); |
| 1246 | |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 1247 | /** |
| 1248 | * wma_rso_cmd_status_event_handler() - RSO Command status event handler |
| 1249 | * @wmi_event: WMI event |
| 1250 | * |
| 1251 | * This function is used to send RSO command status to upper layer |
| 1252 | * |
| 1253 | * Return: 0 for success |
| 1254 | */ |
| 1255 | int wma_rso_cmd_status_event_handler(wmi_roam_event_fixed_param *wmi_event); |
| 1256 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1257 | int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info, |
| 1258 | uint32_t len); |
| 1259 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1260 | QDF_STATUS wma_send_link_speed(uint32_t link_speed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1261 | |
| 1262 | int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info, |
| 1263 | uint32_t len); |
| 1264 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1265 | QDF_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1266 | |
| 1267 | int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap, |
| 1268 | uint32_t len); |
| 1269 | |
Abhishek Ambure | 6a2773e | 2019-10-14 15:15:42 +0530 | [diff] [blame] | 1270 | /** |
| 1271 | * wma_peer_phymode() - get phymode |
| 1272 | * @nw_type: nw type |
| 1273 | * @sta_type: sta type |
| 1274 | * @is_ht: is ht supported |
| 1275 | * @ch_width: supported channel width |
| 1276 | * @is_vht: is vht supported |
| 1277 | * @is_he: is HE supported |
| 1278 | * |
| 1279 | * Return: host phymode |
| 1280 | */ |
| 1281 | enum wlan_phymode |
| 1282 | wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type, |
| 1283 | uint8_t is_ht, uint8_t ch_width, |
| 1284 | uint8_t is_vht, bool is_he); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1285 | |
| 1286 | int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle, |
| 1287 | uint8_t vdev_id, uint32_t value); |
| 1288 | |
| 1289 | int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle, |
| 1290 | uint8_t vdev_id, uint32_t value); |
| 1291 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1292 | /* |
| 1293 | * wma_features.c functions declarations |
| 1294 | */ |
| 1295 | |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 1296 | /** |
| 1297 | * wma_sar_register_event_handlers() - Register SAR event handlers |
| 1298 | * @handle: WMA Handle |
| 1299 | * |
| 1300 | * Function to be called during WMA initialization to register SAR |
| 1301 | * event handlers with WMI |
| 1302 | * |
| 1303 | * Return: QDF_STATUS_SUCCESS if registration is successful, otherwise |
| 1304 | * an error enumeration |
| 1305 | */ |
| 1306 | QDF_STATUS wma_sar_register_event_handlers(WMA_HANDLE handle); |
| 1307 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1308 | void wma_process_link_status_req(tp_wma_handle wma, |
| 1309 | tAniGetLinkStatus *pGetLinkStatus); |
| 1310 | |
Will Huang | a981459 | 2017-05-24 15:47:58 +0800 | [diff] [blame] | 1311 | /** |
| 1312 | * wma_get_peer_info_ext() - get peer info |
| 1313 | * @handle: wma interface |
| 1314 | * @peer_info_req: get peer info request information |
| 1315 | * |
| 1316 | * This function will send WMI_REQUEST_PEER_STATS_INFO_CMDID to FW |
| 1317 | * |
| 1318 | * Return: 0 on success, otherwise error value |
| 1319 | */ |
| 1320 | QDF_STATUS wma_get_peer_info_ext(WMA_HANDLE handle, |
| 1321 | struct sir_peer_info_ext_req *peer_info_req); |
| 1322 | |
| 1323 | /** |
guangde | 4853c40 | 2019-05-06 15:54:04 +0800 | [diff] [blame] | 1324 | * wma_get_isolation() - get antenna isolation |
| 1325 | * @handle: wma interface |
| 1326 | * |
| 1327 | * This function will send WMI_COEX_GET_ANTENNA_ISOLATION_CMDID to FW |
| 1328 | * |
| 1329 | * Return: 0 on success, otherwise error value |
| 1330 | */ |
| 1331 | QDF_STATUS wma_get_isolation(tp_wma_handle wma); |
| 1332 | |
| 1333 | /** |
Will Huang | a981459 | 2017-05-24 15:47:58 +0800 | [diff] [blame] | 1334 | * wma_peer_info_event_handler() - Handler for WMI_PEER_STATS_INFO_EVENTID |
| 1335 | * @handle: WMA global handle |
| 1336 | * @cmd_param_info: Command event data |
| 1337 | * @len: Length of cmd_param_info |
| 1338 | * |
| 1339 | * This function will handle WMI_PEER_STATS_INFO_EVENTID |
| 1340 | * |
| 1341 | * Return: 0 on success, error code otherwise |
| 1342 | */ |
| 1343 | int wma_peer_info_event_handler(void *handle, u_int8_t *cmd_param_info, |
| 1344 | u_int32_t len); |
| 1345 | |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 1346 | int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf, |
| 1347 | uint32_t len); |
| 1348 | |
Govind Singh | f25a0f1 | 2016-03-08 16:09:48 +0530 | [diff] [blame] | 1349 | QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle, |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 1350 | uint32_t cmd, uint32_t value1, uint32_t value2); |
| 1351 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 1352 | 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] | 1353 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1354 | #ifdef FEATURE_WLAN_TDLS |
| 1355 | int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len); |
| 1356 | #endif |
| 1357 | |
| 1358 | int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len); |
| 1359 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1360 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | 4e9cf39 | 2015-11-20 13:35:05 -0800 | [diff] [blame] | 1361 | int wma_oem_data_response_handler(void *handle, uint8_t *datap, |
| 1362 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1363 | #endif |
| 1364 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1365 | #if !defined(REMOVE_PKT_LOG) |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1366 | QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1367 | struct ath_pktlog_wmi_params *params); |
| 1368 | #endif |
| 1369 | |
| 1370 | int wma_wow_wakeup_host_event(void *handle, uint8_t *event, |
| 1371 | uint32_t len); |
Will Huang | 3cd2b7c | 2017-11-17 13:16:56 +0800 | [diff] [blame] | 1372 | |
| 1373 | int wma_d0_wow_disable_ack_event(void *handle, uint8_t *event, uint32_t len); |
| 1374 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1375 | int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len); |
| 1376 | |
Jeff Johnson | 256002f | 2018-12-22 17:53:19 -0800 | [diff] [blame] | 1377 | 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] | 1378 | |
Jeff Johnson | 5402441 | 2018-12-22 12:07:06 -0800 | [diff] [blame] | 1379 | /** |
| 1380 | * wma_aggr_qos_req() - send aggr qos request to fw |
| 1381 | * @wma: handle to wma |
| 1382 | * @pAggrQosRspMsg - combined struct for all ADD_TS requests. |
| 1383 | * |
| 1384 | * A function to handle WMA_AGGR_QOS_REQ. This will send out |
| 1385 | * ADD_TS requestes to firmware in loop for all the ACs with |
| 1386 | * active flow. |
| 1387 | * |
| 1388 | * Return: none |
| 1389 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1390 | void wma_aggr_qos_req(tp_wma_handle wma, |
Jeff Johnson | 5402441 | 2018-12-22 12:07:06 -0800 | [diff] [blame] | 1391 | struct aggr_add_ts_param *pAggrQosRspMsg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1392 | |
Jeff Johnson | 9851fcc | 2018-12-22 17:29:58 -0800 | [diff] [blame] | 1393 | 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] | 1394 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1395 | #ifdef FEATURE_WLAN_ESE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1396 | QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1397 | void *pTsmStatsMsg); |
Jeff Johnson | 36583f0 | 2019-02-26 08:02:11 -0800 | [diff] [blame] | 1398 | void wma_config_plm(tp_wma_handle wma, struct plm_req_params *plm); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1399 | #endif |
| 1400 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1401 | QDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle, |
| 1402 | tSirRcvFltMcAddrList * mcbc_param); |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1403 | QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma); |
| 1404 | |
| 1405 | QDF_STATUS wma_process_get_peer_info_req |
| 1406 | (tp_wma_handle wma, tSirIbssGetPeerInfoReqParams *pReq); |
| 1407 | |
| 1408 | QDF_STATUS wma_process_tx_fail_monitor_ind |
| 1409 | (tp_wma_handle wma, tAniTXFailMonitorInd *pReq); |
| 1410 | |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 1411 | #ifdef FEATURE_WLAN_RMC |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1412 | QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma); |
| 1413 | |
| 1414 | QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma); |
| 1415 | |
| 1416 | QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma); |
Rachit Kankane | ee1735c | 2018-08-02 13:19:34 +0530 | [diff] [blame] | 1417 | #else |
| 1418 | static inline |
| 1419 | QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma) |
| 1420 | { |
| 1421 | return QDF_STATUS_SUCCESS; |
| 1422 | } |
| 1423 | |
| 1424 | static inline |
| 1425 | QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma) |
| 1426 | { |
| 1427 | return QDF_STATUS_SUCCESS; |
| 1428 | } |
| 1429 | |
| 1430 | static inline |
| 1431 | QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma) |
| 1432 | { |
| 1433 | return QDF_STATUS_SUCCESS; |
| 1434 | } |
| 1435 | #endif |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 1436 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1437 | QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle, |
Jeff Johnson | 6dcb44a | 2018-12-23 10:17:00 -0800 | [diff] [blame] | 1438 | tSirAddPeriodicTxPtrn *pattern); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1439 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1440 | QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1441 | tSirDelPeriodicTxPtrn * |
| 1442 | pDelPeriodicTxPtrnParams); |
| 1443 | |
| 1444 | #ifdef WLAN_FEATURE_STATS_EXT |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1445 | QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1446 | #endif |
| 1447 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1448 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1449 | QDF_STATUS wma_enable_ext_wow(tp_wma_handle wma, tpSirExtWoWParams params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1450 | |
| 1451 | int wma_set_app_type1_params_in_fw(tp_wma_handle wma, |
| 1452 | tpSirAppType1Params appType1Params); |
| 1453 | |
Himanshu Agarwal | 4419541 | 2016-03-09 13:03:54 +0530 | [diff] [blame] | 1454 | 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] | 1455 | tpSirAppType2Params appType2Params); |
| 1456 | #endif |
| 1457 | |
| 1458 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
| 1459 | int wma_auto_shutdown_event_handler(void *handle, uint8_t *event, |
| 1460 | uint32_t len); |
| 1461 | |
Jeff Johnson | a9ade7d | 2019-02-17 10:08:17 -0800 | [diff] [blame] | 1462 | /** |
| 1463 | * wma_set_auto_shutdown_timer_req() - sets auto shutdown timer in firmware |
| 1464 | * @wma_handle: wma handle |
| 1465 | * @auto_sh_cmd: auto shutdown timer params |
| 1466 | * |
| 1467 | * Return: QDF status |
| 1468 | */ |
| 1469 | QDF_STATUS |
| 1470 | wma_set_auto_shutdown_timer_req(tp_wma_handle wma_handle, |
| 1471 | struct auto_shutdown_cmd *auto_sh_cmd); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1472 | #endif |
| 1473 | |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1474 | #ifdef WLAN_FEATURE_TSF |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 1475 | int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len); |
| 1476 | QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, uint32_t vdev_id); |
| 1477 | 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] | 1478 | QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin); |
| 1479 | #else |
| 1480 | static inline QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, |
| 1481 | uint32_t vdev_id) |
| 1482 | { |
| 1483 | return QDF_STATUS_SUCCESS; |
| 1484 | } |
| 1485 | |
| 1486 | static inline QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, |
| 1487 | uint32_t vdev_id) |
| 1488 | { |
| 1489 | return QDF_STATUS_SUCCESS; |
| 1490 | } |
| 1491 | |
| 1492 | static inline int wma_vdev_tsf_handler(void *handle, uint8_t *data, |
| 1493 | uint32_t data_len) |
| 1494 | { |
| 1495 | return 0; |
| 1496 | } |
| 1497 | |
| 1498 | static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin) |
| 1499 | { |
| 1500 | return QDF_STATUS_E_INVAL; |
| 1501 | } |
| 1502 | #endif |
Manikandan Mohan | 80dea79 | 2016-04-28 16:36:48 -0700 | [diff] [blame] | 1503 | 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] | 1504 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1505 | #ifdef DHCP_SERVER_OFFLOAD |
Jeff Johnson | 8bfc29e | 2019-02-15 07:58:15 -0800 | [diff] [blame] | 1506 | /** |
| 1507 | * wma_process_dhcpserver_offload() - enable DHCP server offload |
| 1508 | * @wma_handle: wma handle |
| 1509 | * @params: DHCP server offload information |
| 1510 | * |
| 1511 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 1512 | */ |
| 1513 | QDF_STATUS |
| 1514 | wma_process_dhcpserver_offload(tp_wma_handle wma_handle, |
| 1515 | struct dhcp_offload_info_params *params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1516 | #endif |
| 1517 | |
| 1518 | #ifdef WLAN_FEATURE_GPIO_LED_FLASHING |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1519 | QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle, |
Jeff Johnson | 5a6b660 | 2017-10-04 14:44:30 -0700 | [diff] [blame] | 1520 | struct flashing_req_params *flashing); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1521 | #endif |
| 1522 | |
Kabilan Kannan | caa8550 | 2018-04-13 18:04:58 -0700 | [diff] [blame] | 1523 | /** |
| 1524 | * wma_sar_rsp_evt_handler() - process sar response event from FW. |
Kabilan Kannan | ebe01e7 | 2018-06-13 01:13:46 -0700 | [diff] [blame] | 1525 | * @handle: ol scn handle |
Kabilan Kannan | caa8550 | 2018-04-13 18:04:58 -0700 | [diff] [blame] | 1526 | * @event: event buffer |
| 1527 | * @len: buffer length |
| 1528 | * |
| 1529 | * Return: 0 for success or error code |
| 1530 | */ |
Kabilan Kannan | ebe01e7 | 2018-06-13 01:13:46 -0700 | [diff] [blame] | 1531 | 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] | 1532 | |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1533 | #ifdef FEATURE_WLAN_CH_AVOID |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1534 | 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] | 1535 | tSirChAvoidUpdateReq * |
| 1536 | ch_avoid_update_req); |
Nirav Shah | eb017be | 2018-02-15 11:20:58 +0530 | [diff] [blame] | 1537 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1538 | |
| 1539 | #ifdef FEATURE_WLAN_TDLS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1540 | int wma_update_tdls_peer_state(WMA_HANDLE handle, |
Jeff Johnson | 517ee49 | 2019-02-07 11:59:04 -0800 | [diff] [blame] | 1541 | struct tdls_peer_update_state *peer_state); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1542 | #endif |
| 1543 | |
Hong Shi | b90718f | 2017-02-20 00:57:22 +0800 | [diff] [blame] | 1544 | 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] | 1545 | void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id); |
| 1546 | |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1547 | #ifdef FEATURE_RSSI_MONITOR |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1548 | int wma_rssi_breached_event_handler(void *handle, |
| 1549 | u_int8_t *cmd_param_info, u_int32_t len); |
Qiwei Cai | e689a26 | 2018-07-26 15:50:22 +0800 | [diff] [blame] | 1550 | #else /* FEATURE_RSSI_MONITOR */ |
| 1551 | static inline |
| 1552 | int wma_rssi_breached_event_handler(void *handle, |
| 1553 | u_int8_t *cmd_param_info, u_int32_t len) |
| 1554 | { |
| 1555 | return 0; |
| 1556 | } |
| 1557 | #endif /* FEATURE_RSSI_MONITOR */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1558 | |
Kiran Kumar Lokere | ee20577 | 2018-09-27 00:27:27 -0700 | [diff] [blame] | 1559 | QDF_STATUS wma_process_cfg_action_frm_tb_ppdu(tp_wma_handle wma, |
| 1560 | struct cfg_action_frm_tb_ppdu *cfg_info); |
| 1561 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1562 | QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1563 | struct vdev_ie_info *ie_info); |
| 1564 | int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info, |
| 1565 | uint32_t len); |
| 1566 | |
Sandeep Puligilla | 19ddda2 | 2016-01-05 12:18:02 -0800 | [diff] [blame] | 1567 | int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info, |
| 1568 | uint32_t len); |
| 1569 | void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id, |
| 1570 | uint8_t type); |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 1571 | |
| 1572 | QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle, |
| 1573 | struct sir_mac_pwr_dbg_cmd * |
| 1574 | sir_pwr_dbg_params); |
| 1575 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1576 | /** |
| 1577 | * wma_lost_link_info_handler() - collect lost link information and inform SME |
| 1578 | * @wma: WMA handle |
| 1579 | * @vdev_id: vdev ID |
| 1580 | * @rssi: rssi at disconnection time |
| 1581 | * |
| 1582 | * Return: none |
| 1583 | */ |
| 1584 | void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id, |
| 1585 | int32_t rssi); |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 1586 | int wma_unified_power_debug_stats_event_handler(void *handle, |
| 1587 | uint8_t *cmd_param_info, uint32_t len); |
Arunk Khandavalli | ca56d4b | 2018-11-29 15:46:00 +0530 | [diff] [blame] | 1588 | /** |
| 1589 | * wma_unified_beacon_debug_stats_event_handler() - collect beacon debug stats |
| 1590 | * @handle: WMA handle |
| 1591 | * @cmd_param_info: data from event |
| 1592 | * @len: length |
| 1593 | * |
| 1594 | * Return: 0 for success or error code |
| 1595 | */ |
| 1596 | int wma_unified_beacon_debug_stats_event_handler(void *handle, |
| 1597 | uint8_t *cmd_param_info, |
| 1598 | uint32_t len); |
Sen, Devendra | 154b3c4 | 2017-02-13 20:44:15 +0530 | [diff] [blame] | 1599 | |
| 1600 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 1601 | /** |
| 1602 | * wma_sta_kickout_event()- send sta kickout event |
| 1603 | * @kickout_reason - reasoncode for kickout |
Srinivas Girigowda | a47b45f | 2019-02-27 12:29:02 -0800 | [diff] [blame] | 1604 | * @macaddr[QDF_MAC_ADDR_SIZE]: Peer mac address |
Sen, Devendra | 154b3c4 | 2017-02-13 20:44:15 +0530 | [diff] [blame] | 1605 | * @vdev_id: Unique id for identifying the VDEV |
| 1606 | * |
| 1607 | * This function sends sta kickout diag event |
| 1608 | * |
| 1609 | * Return: void. |
| 1610 | */ |
| 1611 | void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id, |
| 1612 | uint8_t *macaddr); |
| 1613 | #else |
| 1614 | static inline void wma_sta_kickout_event(uint32_t kickout_reason, |
| 1615 | uint8_t vdev_id, uint8_t *macaddr) |
| 1616 | { |
| 1617 | |
| 1618 | }; |
| 1619 | #endif /* FEATURE_WLAN_DIAG_SUPPORT */ |
| 1620 | |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1621 | /** |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 1622 | * wma_get_rcpi_req() - get rcpi request |
| 1623 | * @handle: wma handle |
| 1624 | * @rcpi_request: rcpi params |
| 1625 | * |
| 1626 | * Return: none |
| 1627 | */ |
| 1628 | QDF_STATUS wma_get_rcpi_req(WMA_HANDLE handle, |
| 1629 | struct sme_rcpi_req *rcpi_request); |
| 1630 | |
| 1631 | /** |
| 1632 | * wma_rcpi_event_handler() - rcpi event handler |
| 1633 | * @handle: wma handle |
| 1634 | * @cmd_param_info: data from event |
| 1635 | * @len: length |
| 1636 | * |
| 1637 | * Return: 0 for success or error code |
| 1638 | */ |
| 1639 | int wma_rcpi_event_handler(void *handle, uint8_t *cmd_param_info, |
| 1640 | uint32_t len); |
| 1641 | |
| 1642 | /** |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1643 | * wma_acquire_wakelock() - acquire the given wakelock |
| 1644 | * @wl: the wakelock to acquire |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1645 | * @msec: the wakelock duration in milliseconds |
| 1646 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1647 | * This also acquires the wma runtime pm lock. |
| 1648 | * |
| 1649 | * Return: None |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1650 | */ |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1651 | void wma_acquire_wakelock(qdf_wake_lock_t *wl, uint32_t msec); |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1652 | |
| 1653 | /** |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1654 | * wma_release_wakelock() - release the given wakelock |
| 1655 | * @wl: the wakelock to release |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1656 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1657 | * This also releases the wma runtime pm lock. |
| 1658 | * |
| 1659 | * Return: None |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1660 | */ |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1661 | void wma_release_wakelock(qdf_wake_lock_t *wl); |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1662 | |
| 1663 | /** |
| 1664 | * 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] | 1665 | * @wma: a reference to the global WMA handle |
| 1666 | * @vdev_id: the Id of the vdev to stop |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1667 | * |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1668 | * Consumers should call wma_release_wakelock() upon receipt of the vdev stop |
| 1669 | * response from firmware to avoid power penalties. |
Dustin Brown | bf6d16b | 2017-03-03 11:41:05 -0800 | [diff] [blame] | 1670 | * |
| 1671 | * Return: QDF_STATUS |
| 1672 | */ |
| 1673 | QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id); |
| 1674 | |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 1675 | int wma_get_arp_stats_handler(void *handle, uint8_t *data, uint32_t data_len); |
| 1676 | |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1677 | /** |
Dustin Brown | ec2c92e | 2017-07-26 11:13:49 -0700 | [diff] [blame] | 1678 | * wma_send_vdev_down_to_fw() - send the vdev down command to firmware |
| 1679 | * @wma: a reference to the global WMA handle |
| 1680 | * @vdev_id: the Id of the vdev to down |
| 1681 | * |
| 1682 | * This also releases the vdev start wakelock. |
| 1683 | * |
| 1684 | * Return: QDF_STATUS |
| 1685 | */ |
| 1686 | QDF_STATUS wma_send_vdev_down_to_fw(t_wma_handle *wma, uint8_t vdev_id); |
| 1687 | |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 1688 | /* |
| 1689 | * wma_rx_aggr_failure_event_handler - event handler to handle rx aggr failure |
| 1690 | * @handle: the wma handle |
| 1691 | * @event_buf: buffer with event |
| 1692 | * @len: buffer length |
| 1693 | * |
| 1694 | * This function receives rx aggregation failure event and then pass to upper |
| 1695 | * layer |
| 1696 | * |
| 1697 | * Return: 0 on success |
| 1698 | */ |
| 1699 | int wma_rx_aggr_failure_event_handler(void *handle, u_int8_t *event_buf, |
| 1700 | u_int32_t len); |
| 1701 | |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 1702 | /** |
| 1703 | * wma_wlan_bt_activity_evt_handler - event handler to handle bt activity |
| 1704 | * @handle: the WMA handle |
| 1705 | * @event: buffer with the event parameters |
| 1706 | * @len: length of the buffer |
| 1707 | * |
| 1708 | * This function receives BT activity event from firmware and passes the event |
| 1709 | * information to upper layers |
| 1710 | * |
| 1711 | * Return: 0 on success |
| 1712 | */ |
| 1713 | int wma_wlan_bt_activity_evt_handler(void *handle, uint8_t *event, |
| 1714 | uint32_t len); |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1715 | |
| 1716 | /** |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1717 | * wma_pdev_div_info_evt_handler - event handler to handle antenna info |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1718 | * @handle: the wma handle |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1719 | * @event_buf: buffer with event |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1720 | * @len: buffer length |
| 1721 | * |
| 1722 | * This function receives antenna info from firmware and passes the event |
| 1723 | * to upper layer |
| 1724 | * |
| 1725 | * Return: 0 on success |
| 1726 | */ |
lifeng | fe6c3e2 | 2018-04-03 12:10:04 +0800 | [diff] [blame] | 1727 | 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] | 1728 | u_int32_t len); |
| 1729 | |
lifeng | 7c607dd | 2017-02-21 21:16:49 +0800 | [diff] [blame] | 1730 | /** |
| 1731 | * wma_update_beacon_interval() - update beacon interval in fw |
| 1732 | * @wma: wma handle |
| 1733 | * @vdev_id: vdev id |
| 1734 | * @beaconInterval: becon interval |
| 1735 | * |
| 1736 | * Return: none |
| 1737 | */ |
| 1738 | void |
| 1739 | wma_update_beacon_interval(tp_wma_handle wma, uint8_t vdev_id, |
| 1740 | uint16_t beaconInterval); |
| 1741 | |
| 1742 | #define RESET_BEACON_INTERVAL_TIMEOUT 200 |
| 1743 | |
| 1744 | struct wma_beacon_interval_reset_req { |
| 1745 | qdf_timer_t event_timeout; |
| 1746 | uint8_t vdev_id; |
| 1747 | uint16_t interval; |
| 1748 | }; |
| 1749 | |
| 1750 | /** |
| 1751 | * wma_fill_beacon_interval_reset_req() - req to reset beacon interval |
| 1752 | * @wma: wma handle |
| 1753 | * @vdev_id: vdev id |
| 1754 | * @beacon_interval: beacon interval |
| 1755 | * @timeout: timeout val |
| 1756 | * |
| 1757 | * Return: status |
| 1758 | */ |
| 1759 | int wma_fill_beacon_interval_reset_req(tp_wma_handle wma, uint8_t vdev_id, |
| 1760 | uint16_t beacon_interval, uint32_t timeout); |
Yeshwanth Sriram Guntuka | d5aae7f | 2017-11-27 14:33:51 +0530 | [diff] [blame] | 1761 | /* |
| 1762 | * wma_is_vdev_valid() - check the vdev status |
| 1763 | * @vdev_id: vdev identifier |
| 1764 | * |
| 1765 | * This function verifies the vdev validity |
| 1766 | * |
| 1767 | * Return: 'true' on valid vdev else 'false' |
| 1768 | */ |
| 1769 | bool wma_is_vdev_valid(uint32_t vdev_id); |
Arif Hussain | ee10f90 | 2017-12-27 16:30:17 -0800 | [diff] [blame] | 1770 | |
| 1771 | /** |
| 1772 | * wma_vdev_obss_detection_info_handler - event handler to handle obss detection |
| 1773 | * @handle: the wma handle |
| 1774 | * @event: buffer with event |
| 1775 | * @len: buffer length |
| 1776 | * |
| 1777 | * This function receives obss detection info from firmware which is used to |
| 1778 | * decide obss protection. |
| 1779 | * |
| 1780 | * Return: 0 on success |
| 1781 | */ |
| 1782 | int wma_vdev_obss_detection_info_handler(void *handle, uint8_t *event, |
| 1783 | uint32_t len); |
Arif Hussain | 05fb487 | 2018-01-03 16:02:55 -0800 | [diff] [blame] | 1784 | |
| 1785 | /** |
| 1786 | * wma_vdev_bss_color_collision_info_handler - event handler to |
| 1787 | * handle obss color collision detection. |
| 1788 | * @handle: the wma handle |
| 1789 | * @event: buffer with event |
| 1790 | * @len: buffer length |
| 1791 | * |
| 1792 | * This function receives obss color collision detection info from firmware |
| 1793 | * which is used to select new bss color. |
| 1794 | * |
| 1795 | * Return: 0 on success |
| 1796 | */ |
| 1797 | int wma_vdev_bss_color_collision_info_handler(void *handle, |
| 1798 | uint8_t *event, |
| 1799 | uint32_t len); |
| 1800 | |
Kiran Kumar Lokere | 54819a3 | 2019-10-04 18:30:43 -0700 | [diff] [blame] | 1801 | #ifdef WLAN_SUPPORT_TWT |
| 1802 | /** |
| 1803 | * wma_twt_en_complete_event_handler - TWT enable complete event handler |
| 1804 | * @handle: wma handle |
| 1805 | * @event: buffer with event |
| 1806 | * @len: buffer length |
| 1807 | * |
| 1808 | * Return: 0 on success |
| 1809 | */ |
Varun Reddy Yeturu | 3c9f89c | 2018-04-18 19:10:34 -0700 | [diff] [blame] | 1810 | int wma_twt_en_complete_event_handler(void *handle, |
| 1811 | uint8_t *event, uint32_t len); |
Kiran Kumar Lokere | 54819a3 | 2019-10-04 18:30:43 -0700 | [diff] [blame] | 1812 | |
| 1813 | /** |
| 1814 | * wma_twt_disable_comp_event_handler- TWT disable complete event handler |
| 1815 | * @handle: wma handle |
| 1816 | * @event: buffer with event |
| 1817 | * @len: buffer length |
| 1818 | * |
| 1819 | * Return: 0 on success |
| 1820 | */ |
| 1821 | int wma_twt_disable_comp_event_handler(void *handle, uint8_t *event, |
| 1822 | uint32_t len); |
| 1823 | #else |
| 1824 | static inline int wma_twt_en_complete_event_handler(void *handle, |
| 1825 | uint8_t *event, |
| 1826 | uint32_t len) |
| 1827 | { |
| 1828 | return 0; |
| 1829 | } |
| 1830 | |
| 1831 | static inline int wma_twt_disable_comp_event_handler(void *handle, |
| 1832 | uint8_t *event, |
| 1833 | uint32_t len) |
| 1834 | { |
| 1835 | return 0; |
| 1836 | } |
| 1837 | #endif |
Abhishek Ambure | 6a2773e | 2019-10-14 15:15:42 +0530 | [diff] [blame] | 1838 | |
Rajeev Kumar Sirasanagandla | 4f20b67 | 2018-03-12 13:52:50 +0530 | [diff] [blame] | 1839 | /** |
| 1840 | * wma_get_roam_scan_stats() - Get roam scan stats request |
| 1841 | * @handle: wma handle |
| 1842 | * @req: request details |
| 1843 | * |
| 1844 | * Return: QDF_STATUS |
| 1845 | */ |
| 1846 | QDF_STATUS wma_get_roam_scan_stats(WMA_HANDLE handle, |
| 1847 | struct sir_roam_scan_stats *req); |
| 1848 | |
| 1849 | /** |
| 1850 | * wma_roam_scan_stats_event_handler() - roam scan stats event handler |
| 1851 | * @handle: wma handle |
| 1852 | * @event: event data |
| 1853 | * @len: length of data |
| 1854 | * |
| 1855 | * Return: Success or Failure status |
| 1856 | */ |
| 1857 | int wma_roam_scan_stats_event_handler(void *handle, uint8_t *event, |
| 1858 | uint32_t len); |
| 1859 | |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 1860 | /** |
Abhishek Singh | fb5b4d3 | 2018-12-06 11:53:08 +0530 | [diff] [blame] | 1861 | * wma_send_vdev_down() - send del bss req to firmware |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 1862 | * @wma: wma handle. |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 1863 | * @req: pointer to del bss response |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 1864 | * |
| 1865 | * This function sends del bss resp to upper layer |
| 1866 | * |
| 1867 | * Return: none |
| 1868 | */ |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 1869 | void wma_send_vdev_down(tp_wma_handle wma, struct del_bss_resp *req); |
Abhishek Singh | caa6185 | 2018-09-12 15:50:04 +0530 | [diff] [blame] | 1870 | |
Yeshwanth Sriram Guntuka | fa9f379 | 2019-02-28 18:24:58 +0530 | [diff] [blame] | 1871 | /** |
| 1872 | * wma_cold_boot_cal_event_handler() - Cold boot cal event handler |
| 1873 | * @wma_ctx: wma handle |
| 1874 | * @event_buff: event data |
| 1875 | * @len: length of data |
| 1876 | * |
| 1877 | * Return: Success or Failure status |
| 1878 | */ |
| 1879 | int wma_cold_boot_cal_event_handler(void *wma_ctx, uint8_t *event_buff, |
| 1880 | uint32_t len); |
Srinivas Dasari | f4e1b12 | 2019-08-22 03:39:48 +0530 | [diff] [blame] | 1881 | |
| 1882 | /** |
| 1883 | * wma_set_roam_triggers() - Send roam trigger bitmap to WMI |
| 1884 | * @wma_handle: wma handle |
| 1885 | * @triggers: Carries vdev id and roam trigger bitmap. |
| 1886 | * |
| 1887 | * Return: Success or Failure status |
| 1888 | */ |
| 1889 | QDF_STATUS wma_set_roam_triggers(tp_wma_handle wma_handle, |
| 1890 | struct roam_triggers *triggers); |
Sourav Mohapatra | 2a67b0e | 2019-10-15 17:59:59 +0530 | [diff] [blame^] | 1891 | |
| 1892 | /** |
| 1893 | * wma_get_ani_level_evt_handler - event handler to fetch ani level |
| 1894 | * @handle: the wma handle |
| 1895 | * @event_buf: buffer with event |
| 1896 | * @len: buffer length |
| 1897 | * |
| 1898 | * This function receives ani level from firmware and passes the event |
| 1899 | * to upper layer |
| 1900 | * |
| 1901 | * Return: 0 on success |
| 1902 | */ |
| 1903 | int wma_get_ani_level_evt_handler(void *handle, uint8_t *event_buf, |
| 1904 | uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1905 | #endif |