Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Nachiket Kukade | 2c73ade | 2017-12-20 17:30:36 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 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_API_H |
| 29 | #define WMA_API_H |
| 30 | |
| 31 | #include "osdep.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 32 | #include "ani_global.h" |
| 33 | #include "a_types.h" |
Govind Singh | 5b48620 | 2016-06-09 18:29:42 +0530 | [diff] [blame] | 34 | #include "osapi_linux.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 35 | #include "wmi_unified.h" |
| 36 | #ifdef NOT_YET |
| 37 | #include "htc_api.h" |
| 38 | #endif |
| 39 | #include "lim_global.h" |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 40 | #include "cds_utils.h" |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 41 | #include "scheduler_api.h" |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 42 | #include "wlan_policy_mgr_api.h" |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame^] | 43 | #include "wma_sar_public_structs.h" |
Tushnim Bhattacharyya | 45ed04f | 2017-03-15 10:15:05 -0700 | [diff] [blame] | 44 | #include <cdp_txrx_ops.h> |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 45 | |
| 46 | typedef void *WMA_HANDLE; |
| 47 | |
| 48 | /** |
| 49 | * enum GEN_PARAM - general parameters |
| 50 | * @GEN_VDEV_PARAM_AMPDU: Set ampdu size |
| 51 | * @GEN_VDEV_PARAM_AMSDU: Set amsdu size |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 52 | * @GEN_PARAM_CRASH_INJECT: inject crash |
Rajeev Kumar | f4390fa | 2016-12-22 13:17:33 -0800 | [diff] [blame] | 53 | * @GEN_PARAM_MODULATED_DTIM: moduled dtim |
| 54 | * @GEN_PARAM_CAPTURE_TSF: read tsf |
| 55 | * @GEN_PARAM_RESET_TSF_GPIO: reset tsf gpio |
| 56 | * @GEN_VDEV_ROAM_SYNCH_DELAY: roam sync delay |
Mukul Sharma | 6398b25 | 2017-05-01 17:58:12 +0530 | [diff] [blame] | 57 | * @GEN_PARAM_LISTEN_INTERVAL: listen interval |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 58 | */ |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 59 | enum GEN_PARAM { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 60 | GEN_VDEV_PARAM_AMPDU = 0x1, |
| 61 | GEN_VDEV_PARAM_AMSDU, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 62 | GEN_PARAM_CRASH_INJECT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 63 | GEN_PARAM_MODULATED_DTIM, |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 64 | GEN_PARAM_CAPTURE_TSF, |
| 65 | GEN_PARAM_RESET_TSF_GPIO, |
Varun Reddy Yeturu | 5ab4746 | 2016-05-08 18:08:11 -0700 | [diff] [blame] | 66 | GEN_VDEV_ROAM_SYNCH_DELAY, |
Mukul Sharma | 6398b25 | 2017-05-01 17:58:12 +0530 | [diff] [blame] | 67 | GEN_PARAM_LISTEN_INTERVAL, |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 68 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 69 | |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 70 | /** |
| 71 | * struct wma_caps_per_phy - various caps per phy |
| 72 | * @ht_2g: entire HT cap for 2G band in terms of 32 bit flag |
| 73 | * @ht_5g: entire HT cap for 5G band in terms of 32 bit flag |
| 74 | * @vht_2g: entire VHT cap for 2G band in terms of 32 bit flag |
| 75 | * @vht_5g: entire VHT cap for 5G band in terms of 32 bit flag |
| 76 | * @he_2g: entire HE cap for 2G band in terms of 32 bit flag |
| 77 | * @he_5g: entire HE cap for 5G band in terms of 32 bit flag |
| 78 | */ |
| 79 | struct wma_caps_per_phy { |
| 80 | uint32_t ht_2g; |
| 81 | uint32_t ht_5g; |
| 82 | uint32_t vht_2g; |
| 83 | uint32_t vht_5g; |
| 84 | uint32_t he_2g; |
| 85 | uint32_t he_5g; |
| 86 | }; |
| 87 | |
| 88 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 89 | #define VDEV_CMD 1 |
| 90 | #define PDEV_CMD 2 |
| 91 | #define GEN_CMD 3 |
| 92 | #define DBG_CMD 4 |
| 93 | #define PPS_CMD 5 |
| 94 | #define QPOWER_CMD 6 |
| 95 | #define GTX_CMD 7 |
| 96 | |
| 97 | typedef void (*wma_peer_authorized_fp) (uint32_t vdev_id); |
| 98 | |
| 99 | |
Jeff Johnson | 8ad89c6 | 2017-09-13 08:55:55 -0700 | [diff] [blame] | 100 | QDF_STATUS wma_pre_start(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 101 | |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 102 | QDF_STATUS wma_mc_process_handler(struct scheduler_msg *msg); |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 103 | |
Jeff Johnson | d489255 | 2017-09-13 08:41:31 -0700 | [diff] [blame] | 104 | QDF_STATUS wma_start(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 105 | |
Jeff Johnson | acc1cc7 | 2017-09-13 08:47:49 -0700 | [diff] [blame] | 106 | QDF_STATUS wma_stop(uint8_t reason); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 107 | |
Jeff Johnson | 542da35 | 2017-09-13 09:17:28 -0700 | [diff] [blame] | 108 | QDF_STATUS wma_close(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 109 | |
Jeff Johnson | 7b3ddc2 | 2017-09-13 09:42:44 -0700 | [diff] [blame] | 110 | QDF_STATUS wma_wmi_service_close(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 111 | |
Jeff Johnson | 6b8473d | 2017-09-13 09:20:53 -0700 | [diff] [blame] | 112 | QDF_STATUS wma_wmi_work_close(void); |
Xun Luo | a858a47 | 2015-11-10 08:24:45 -0800 | [diff] [blame] | 113 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 114 | int wma_rx_ready_event(void *handle, uint8_t *ev, uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 115 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 116 | int wma_rx_service_ready_event(void *handle, uint8_t *ev, uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 117 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 118 | int wma_rx_service_ready_ext_event(void *handle, uint8_t *ev, uint32_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 119 | |
Jeff Johnson | 1f8d0a0 | 2017-09-13 08:09:05 -0700 | [diff] [blame] | 120 | void wma_setneedshutdown(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 121 | |
Jeff Johnson | 1b5404e | 2017-09-13 08:04:46 -0700 | [diff] [blame] | 122 | bool wma_needshutdown(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 123 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 124 | QDF_STATUS wma_wait_for_ready_event(WMA_HANDLE handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 125 | |
| 126 | uint8_t wma_map_channel(uint8_t mapChannel); |
| 127 | |
| 128 | int wma_cli_get_command(int vdev_id, int param_id, int vpdev); |
| 129 | int wma_cli_set_command(int vdev_id, int param_id, int sval, int vpdev); |
| 130 | int wma_cli_set2_command(int vdev_id, int param_id, int sval1, |
| 131 | int sval2, int vpdev); |
| 132 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 133 | QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 134 | |
Jeff Johnson | abb7404 | 2017-08-31 11:44:55 -0700 | [diff] [blame] | 135 | /** |
| 136 | * wma_get_wcnss_software_version() - get wcnss software version |
| 137 | * @version: version pointer |
| 138 | * @version_buffer_size: buffer size |
| 139 | * |
| 140 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 141 | */ |
| 142 | QDF_STATUS wma_get_wcnss_software_version(uint8_t *version, |
| 143 | uint32_t version_buffer_size); |
| 144 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 145 | void wma_set_peer_authorized_cb(void *wma_ctx, wma_peer_authorized_fp auth_cb); |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 146 | QDF_STATUS wma_set_peer_param(void *wma_ctx, uint8_t *peer_addr, |
| 147 | uint32_t param_id, |
| 148 | uint32_t param_value, uint32_t vdev_id); |
Mukul Sharma | c3886aa | 2017-05-04 17:53:22 +0530 | [diff] [blame] | 149 | QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 150 | #ifdef NOT_YET |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 151 | QDF_STATUS wma_update_channel_list(WMA_HANDLE handle, void *scan_chan_info); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 152 | #endif |
| 153 | |
| 154 | uint8_t *wma_get_vdev_address_by_vdev_id(uint8_t vdev_id); |
| 155 | struct wma_txrx_node *wma_get_interface_by_vdev_id(uint8_t vdev_id); |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 156 | QDF_STATUS wma_get_connection_info(uint8_t vdev_id, |
| 157 | struct policy_mgr_vdev_entry_info *conn_table_entry); |
| 158 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 159 | bool wma_is_vdev_up(uint8_t vdev_id); |
| 160 | |
| 161 | void *wma_get_beacon_buffer_by_vdev_id(uint8_t vdev_id, uint32_t *buffer_size); |
| 162 | |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 163 | bool wma_get_fw_wlan_feat_caps(enum cap_bitmap feature); |
| 164 | void wma_set_fw_wlan_feat_caps(enum cap_bitmap feature); |
Rajeev Kumar | feb9638 | 2017-01-22 19:42:09 -0800 | [diff] [blame] | 165 | tSirRetStatus wma_post_ctrl_msg(tpAniSirGlobal pMac, |
| 166 | struct scheduler_msg *pMsg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 167 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 168 | void wma_register_wow_wakeup_events(WMA_HANDLE handle, uint8_t vdev_id, |
| 169 | uint8_t vdev_type, uint8_t sub_type); |
| 170 | void wma_register_wow_default_patterns(WMA_HANDLE handle, uint8_t vdev_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 171 | int8_t wma_get_mac_id_of_vdev(uint32_t vdev_id); |
| 172 | void wma_update_intf_hw_mode_params(uint32_t vdev_id, uint32_t mac_id, |
| 173 | uint32_t cfgd_hw_mode_index); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 174 | void wma_set_dbs_capability_ut(uint32_t dbs); |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 175 | QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy, |
| 176 | enum hw_mode_dbs_capab hw_mode, enum cds_band_type band); |
| 177 | bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel); |
yeshwanth sriram guntuka | 584c233 | 2017-07-29 12:50:25 +0530 | [diff] [blame] | 178 | int wma_unified_radio_tx_mem_free(void *handle); |
Krunal Soni | aadaa27 | 2017-10-04 16:42:55 -0700 | [diff] [blame] | 179 | /** |
| 180 | * wma_form_unit_test_cmd_and_send() - to form a wma command and send it to FW |
| 181 | * @session_id: wma session id to be filled while forming the command |
| 182 | * @module_id: module id given by user to be filled in the command |
| 183 | * @arg_count: number of argument count |
| 184 | * @arg: pointer to argument list |
| 185 | * |
| 186 | * This API exposed to HDD layer which takes the argument from user and forms |
| 187 | * the wma unit test command to be sent down to firmware |
| 188 | * |
| 189 | * Return: QDF_STATUS based on overall success |
| 190 | */ |
| 191 | QDF_STATUS wma_form_unit_test_cmd_and_send(uint32_t vdev_id, |
| 192 | uint32_t module_id, uint32_t arg_count, uint32_t *arg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 193 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 194 | #if defined(FEATURE_LRO) |
Dhanashri Atre | 09828f1 | 2016-11-13 10:36:58 -0800 | [diff] [blame] | 195 | int wma_lro_init(struct cdp_lro_hash_config *lro_config); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 196 | #endif |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 197 | |
Gupta, Kapil | 4cb1d7d | 2016-04-16 18:16:25 -0700 | [diff] [blame] | 198 | QDF_STATUS wma_remove_beacon_filter(WMA_HANDLE wma, |
| 199 | struct beacon_filter_param *filter_params); |
| 200 | |
| 201 | QDF_STATUS wma_add_beacon_filter(WMA_HANDLE wma, |
| 202 | struct beacon_filter_param *filter_params); |
Gupta, Kapil | 96c7f2f | 2016-04-25 19:13:41 +0530 | [diff] [blame] | 203 | QDF_STATUS wma_send_adapt_dwelltime_params(WMA_HANDLE handle, |
| 204 | struct adaptive_dwelltime_params *dwelltime_params); |
Nitesh Shah | f9a09ff | 2017-05-22 15:46:25 +0530 | [diff] [blame] | 205 | |
| 206 | /** |
| 207 | * wma_send_dbs_scan_selection_params() - send DBS scan selection configuration |
| 208 | * params to firmware |
| 209 | * @handle: wma handler |
| 210 | * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params |
| 211 | * |
| 212 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure |
| 213 | */ |
| 214 | QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle, |
| 215 | struct wmi_dbs_scan_sel_params *dbs_scan_params); |
Himanshu Agarwal | b229a14 | 2017-12-21 10:16:45 +0530 | [diff] [blame] | 216 | #ifdef WLAN_SUPPORT_GREEN_AP |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 217 | void wma_setup_egap_support(struct wma_tgt_cfg *tgt_cfg, WMA_HANDLE handle); |
| 218 | void wma_register_egap_event_handle(WMA_HANDLE handle); |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 219 | #else |
| 220 | static inline void wma_setup_egap_support(struct wma_tgt_cfg *tgt_cfg, |
| 221 | WMA_HANDLE handle) {} |
| 222 | static inline void wma_register_egap_event_handle(WMA_HANDLE handle) {} |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 223 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 224 | QDF_STATUS wma_set_tx_power_scale(uint8_t vdev_id, int value); |
| 225 | QDF_STATUS wma_set_tx_power_scale_decr_db(uint8_t vdev_id, int value); |
Naveen Rawat | 0fc3f69 | 2016-06-22 14:30:54 -0700 | [diff] [blame] | 226 | |
Kiran Kumar Lokere | d0fad46 | 2017-06-13 18:23:48 -0700 | [diff] [blame] | 227 | bool wma_is_csa_offload_enabled(void); |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 228 | bool wma_is_p2p_lo_capable(void); |
Dustin Brown | 8d8d9fe | 2017-07-18 16:01:25 -0700 | [diff] [blame] | 229 | bool wma_capability_enhanced_mcast_filter(void); |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 230 | QDF_STATUS wma_p2p_lo_start(struct sir_p2p_lo_start *params); |
| 231 | QDF_STATUS wma_p2p_lo_stop(u_int32_t vdev_id); |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 232 | QDF_STATUS wma_get_wakelock_stats(struct sir_wake_lock_stats *wake_lock_stats); |
Naveen Rawat | 8cc23b0 | 2016-07-14 12:22:56 -0700 | [diff] [blame] | 233 | void wma_process_pdev_hw_mode_trans_ind(void *wma, |
| 234 | wmi_pdev_hw_mode_transition_event_fixed_param *fixed_param, |
| 235 | wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry, |
| 236 | struct sir_hw_mode_trans_ind *hw_mode_trans_ind); |
Padma, Santhosh Kumar | 72e7aec | 2016-10-12 17:23:44 +0530 | [diff] [blame] | 237 | |
Agrawal Ashish | b2d1a45 | 2016-05-05 12:23:58 +0530 | [diff] [blame] | 238 | /** |
| 239 | * wma_set_cts2self_for_p2p_go() - set CTS2SELF command for P2P GO. |
| 240 | * @wma_handle: pointer to wma handle. |
| 241 | * @cts2self_for_p2p_go: value needs to set to firmware. |
| 242 | * |
| 243 | * At the time of driver startup, inform about ini parma to FW that |
| 244 | * if legacy client connects to P2P GO, stop using NOA for P2P GO. |
| 245 | * |
| 246 | * Return: QDF_STATUS. |
| 247 | */ |
| 248 | QDF_STATUS wma_set_cts2self_for_p2p_go(void *wma_handle, |
| 249 | uint32_t cts2self_for_p2p_go); |
Padma, Santhosh Kumar | a711967 | 2016-08-16 16:05:14 +0530 | [diff] [blame] | 250 | QDF_STATUS wma_set_tx_rx_aggregation_size |
| 251 | (struct sir_set_tx_rx_aggregation_size *tx_rx_aggregation_size); |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame^] | 252 | |
| 253 | /** |
| 254 | * wma_get_sar_limit() - get SAR limits from the target |
| 255 | * @handle: wma handle |
| 256 | * @callback: Callback function to invoke with the results |
| 257 | * @context: Opaque context to pass back to caller in the callback |
| 258 | * |
| 259 | * This function sends WMI command to get SAR limits. |
| 260 | * |
| 261 | * Return: QDF_STATUS enumeration |
| 262 | */ |
| 263 | QDF_STATUS wma_get_sar_limit(WMA_HANDLE handle, |
| 264 | wma_sar_cb callback, void *context); |
| 265 | |
Kabilan Kannan | 3c0a735 | 2016-12-02 18:49:38 -0800 | [diff] [blame] | 266 | /** |
| 267 | * wma_set_sar_limit() - set sar limits in the target |
| 268 | * @handle: wma handle |
| 269 | * @sar_limit_cmd_params: sar limit cmd params |
| 270 | * |
| 271 | * This function sends WMI command to set SAR limits. |
| 272 | * |
| 273 | * Return: QDF_STATUS enumeration |
| 274 | */ |
| 275 | QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle, |
| 276 | struct sar_limit_cmd_params *sar_limit_params); |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame^] | 277 | |
Dustin Brown | 10a7b71 | 2016-10-07 10:31:16 -0700 | [diff] [blame] | 278 | /** |
| 279 | * wma_set_qpower_config() - update qpower config in wma |
| 280 | * @vdev_id: the Id of the vdev to configure |
| 281 | * @qpower: new qpower value |
| 282 | * |
| 283 | * Return: QDF_STATUS_SUCCESS on success, error number otherwise |
| 284 | */ |
| 285 | QDF_STATUS wma_set_qpower_config(uint8_t vdev_id, uint8_t qpower); |
Krishna Kumaar Natarajan | 0103ef8 | 2017-02-17 18:15:56 -0800 | [diff] [blame] | 286 | |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 287 | bool wma_is_service_enabled(WMI_SERVICE service_type); |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 288 | |
Will Huang | 3cd2b7c | 2017-11-17 13:16:56 +0800 | [diff] [blame] | 289 | #ifdef FEATURE_WLAN_D0WOW |
| 290 | static inline bool wma_d0_wow_is_supported(void) |
| 291 | { |
| 292 | return wma_is_service_enabled(WMI_SERVICE_D0WOW) && |
| 293 | (!wma_is_service_enabled(WMI_SERVICE_UNIFIED_WOW_CAPABILITY)); |
| 294 | } |
| 295 | #else |
| 296 | static inline bool wma_d0_wow_is_supported(void) |
| 297 | { |
| 298 | return false; |
| 299 | } |
| 300 | #endif |
| 301 | |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 302 | /** |
| 303 | * wma_store_pdev() - store pdev |
| 304 | * @wma_ctx: wma context |
| 305 | * @pdev: pdev context |
| 306 | * |
| 307 | * Return: void |
| 308 | */ |
| 309 | void wma_store_pdev(void *wma_ctx, struct wlan_objmgr_pdev *pdev); |
| 310 | |
Krishna Kumaar Natarajan | c7e2bb7 | 2017-03-10 10:38:46 -0800 | [diff] [blame] | 311 | /** |
| 312 | * wmi_to_sir_peer_type() - convert peer type from WMI to SIR enum |
| 313 | * @type: enum wmi_peer_type |
| 314 | * |
| 315 | * Return: tSirWifiPeerType |
| 316 | */ |
| 317 | tSirWifiPeerType wmi_to_sir_peer_type(enum wmi_peer_type type); |
Yu Wang | 46082dc | 2017-09-19 12:25:38 +0800 | [diff] [blame] | 318 | |
| 319 | QDF_STATUS wma_crash_inject(WMA_HANDLE wma_handle, uint32_t type, |
| 320 | uint32_t delay_time_ms); |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 321 | |
| 322 | /** |
Dustin Brown | 0555718 | 2017-10-12 14:44:49 -0700 | [diff] [blame] | 323 | * wma_critical_events_in_flight() - get the number of critical events in flight |
| 324 | * |
| 325 | * This API gets the number of events in flight which should prevent power |
| 326 | * collapse. |
| 327 | * |
| 328 | * Return: the number of critical events in flight |
| 329 | */ |
| 330 | uint32_t wma_critical_events_in_flight(void); |
| 331 | |
| 332 | /** |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 333 | * wma_set_vc_mode_config() - set voltage corner mode config to FW. |
| 334 | * @wma_handle: pointer to wma handle. |
| 335 | * @vc_bitmap: value needs to set to firmware. |
| 336 | * |
| 337 | * At the time of driver startup, set operating voltage corner mode |
| 338 | * for differenet phymode and bw configurations. |
| 339 | * |
| 340 | * Return: QDF_STATUS. |
| 341 | */ |
| 342 | QDF_STATUS wma_set_vc_mode_config(void *wma_handle, |
| 343 | uint32_t vc_bitmap); |
| 344 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 345 | #endif |