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