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 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #ifndef WMA_API_H |
| 20 | #define WMA_API_H |
| 21 | |
| 22 | #include "osdep.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 23 | #include "ani_global.h" |
| 24 | #include "a_types.h" |
Govind Singh | 5b48620 | 2016-06-09 18:29:42 +0530 | [diff] [blame] | 25 | #include "osapi_linux.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 26 | #include "wmi_unified.h" |
| 27 | #ifdef NOT_YET |
| 28 | #include "htc_api.h" |
| 29 | #endif |
| 30 | #include "lim_global.h" |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 31 | #include "cds_utils.h" |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 32 | #include "scheduler_api.h" |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 33 | #include "wlan_policy_mgr_api.h" |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 34 | #include "wma_sar_public_structs.h" |
Tushnim Bhattacharyya | 45ed04f | 2017-03-15 10:15:05 -0700 | [diff] [blame] | 35 | #include <cdp_txrx_ops.h> |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 36 | |
| 37 | typedef void *WMA_HANDLE; |
| 38 | |
| 39 | /** |
| 40 | * enum GEN_PARAM - general parameters |
| 41 | * @GEN_VDEV_PARAM_AMPDU: Set ampdu size |
| 42 | * @GEN_VDEV_PARAM_AMSDU: Set amsdu size |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 43 | * @GEN_PARAM_CRASH_INJECT: inject crash |
Rajeev Kumar | f4390fa | 2016-12-22 13:17:33 -0800 | [diff] [blame] | 44 | * @GEN_PARAM_MODULATED_DTIM: moduled dtim |
| 45 | * @GEN_PARAM_CAPTURE_TSF: read tsf |
| 46 | * @GEN_PARAM_RESET_TSF_GPIO: reset tsf gpio |
| 47 | * @GEN_VDEV_ROAM_SYNCH_DELAY: roam sync delay |
Mukul Sharma | 6398b25 | 2017-05-01 17:58:12 +0530 | [diff] [blame] | 48 | * @GEN_PARAM_LISTEN_INTERVAL: listen interval |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 49 | */ |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 50 | enum GEN_PARAM { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 51 | GEN_VDEV_PARAM_AMPDU = 0x1, |
| 52 | GEN_VDEV_PARAM_AMSDU, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 53 | GEN_PARAM_CRASH_INJECT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 54 | GEN_PARAM_MODULATED_DTIM, |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 55 | GEN_PARAM_CAPTURE_TSF, |
| 56 | GEN_PARAM_RESET_TSF_GPIO, |
Varun Reddy Yeturu | 5ab4746 | 2016-05-08 18:08:11 -0700 | [diff] [blame] | 57 | GEN_VDEV_ROAM_SYNCH_DELAY, |
Mukul Sharma | 6398b25 | 2017-05-01 17:58:12 +0530 | [diff] [blame] | 58 | GEN_PARAM_LISTEN_INTERVAL, |
Manikandan Mohan | 1dd8b5d | 2017-04-18 15:54:09 -0700 | [diff] [blame] | 59 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 60 | |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 61 | /** |
| 62 | * struct wma_caps_per_phy - various caps per phy |
| 63 | * @ht_2g: entire HT cap for 2G band in terms of 32 bit flag |
| 64 | * @ht_5g: entire HT cap for 5G band in terms of 32 bit flag |
| 65 | * @vht_2g: entire VHT cap for 2G band in terms of 32 bit flag |
| 66 | * @vht_5g: entire VHT cap for 5G band in terms of 32 bit flag |
| 67 | * @he_2g: entire HE cap for 2G band in terms of 32 bit flag |
| 68 | * @he_5g: entire HE cap for 5G band in terms of 32 bit flag |
Naveen Rawat | 9832247 | 2018-03-06 10:29:42 -0800 | [diff] [blame] | 69 | * @tx_chain_mask_2G: tx chain mask for 2g |
| 70 | * @rx_chain_mask_2G: rx chain mask for 2g |
| 71 | * @tx_chain_mask_5G: tx chain mask for 5g |
| 72 | * @rx_chain_mask_5G: rx chain mask for 5g |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 73 | */ |
| 74 | struct wma_caps_per_phy { |
| 75 | uint32_t ht_2g; |
| 76 | uint32_t ht_5g; |
| 77 | uint32_t vht_2g; |
| 78 | uint32_t vht_5g; |
| 79 | uint32_t he_2g; |
| 80 | uint32_t he_5g; |
Naveen Rawat | 9832247 | 2018-03-06 10:29:42 -0800 | [diff] [blame] | 81 | uint32_t tx_chain_mask_2G; |
| 82 | uint32_t rx_chain_mask_2G; |
| 83 | uint32_t tx_chain_mask_5G; |
| 84 | uint32_t rx_chain_mask_5G; |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 85 | }; |
| 86 | |
| 87 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 88 | #define VDEV_CMD 1 |
| 89 | #define PDEV_CMD 2 |
| 90 | #define GEN_CMD 3 |
| 91 | #define DBG_CMD 4 |
| 92 | #define PPS_CMD 5 |
| 93 | #define QPOWER_CMD 6 |
| 94 | #define GTX_CMD 7 |
| 95 | |
| 96 | typedef void (*wma_peer_authorized_fp) (uint32_t vdev_id); |
| 97 | |
| 98 | |
Jeff Johnson | 8ad89c6 | 2017-09-13 08:55:55 -0700 | [diff] [blame] | 99 | QDF_STATUS wma_pre_start(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 100 | |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 101 | QDF_STATUS wma_mc_process_handler(struct scheduler_msg *msg); |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 102 | |
Jeff Johnson | d489255 | 2017-09-13 08:41:31 -0700 | [diff] [blame] | 103 | QDF_STATUS wma_start(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 104 | |
Jeff Johnson | 62cd680 | 2018-07-20 12:38:25 -0700 | [diff] [blame] | 105 | /** |
| 106 | * wma_stop() - wma stop function. |
| 107 | * |
| 108 | * Performs all of the operations required to stop the WMA layer |
| 109 | * |
| 110 | * Return: QDF_STATUS_SUCCESS on success, QDF Error on failure |
| 111 | */ |
| 112 | QDF_STATUS wma_stop(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 113 | |
Jeff Johnson | 542da35 | 2017-09-13 09:17:28 -0700 | [diff] [blame] | 114 | QDF_STATUS wma_close(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 115 | |
Jeff Johnson | 7b3ddc2 | 2017-09-13 09:42:44 -0700 | [diff] [blame] | 116 | QDF_STATUS wma_wmi_service_close(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 117 | |
Jeff Johnson | 6b8473d | 2017-09-13 09:20:53 -0700 | [diff] [blame] | 118 | QDF_STATUS wma_wmi_work_close(void); |
Xun Luo | a858a47 | 2015-11-10 08:24:45 -0800 | [diff] [blame] | 119 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 120 | 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] | 121 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 122 | 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] | 123 | |
Govind Singh | d76a5b0 | 2016-03-08 15:12:14 +0530 | [diff] [blame] | 124 | 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] | 125 | |
Jeff Johnson | 1f8d0a0 | 2017-09-13 08:09:05 -0700 | [diff] [blame] | 126 | void wma_setneedshutdown(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 127 | |
Jeff Johnson | 1b5404e | 2017-09-13 08:04:46 -0700 | [diff] [blame] | 128 | bool wma_needshutdown(void); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 129 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 130 | QDF_STATUS wma_wait_for_ready_event(WMA_HANDLE handle); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 131 | |
| 132 | uint8_t wma_map_channel(uint8_t mapChannel); |
| 133 | |
| 134 | int wma_cli_get_command(int vdev_id, int param_id, int vpdev); |
| 135 | int wma_cli_set_command(int vdev_id, int param_id, int sval, int vpdev); |
| 136 | int wma_cli_set2_command(int vdev_id, int param_id, int sval1, |
| 137 | int sval2, int vpdev); |
| 138 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 139 | 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] | 140 | |
Jeff Johnson | abb7404 | 2017-08-31 11:44:55 -0700 | [diff] [blame] | 141 | /** |
| 142 | * wma_get_wcnss_software_version() - get wcnss software version |
| 143 | * @version: version pointer |
| 144 | * @version_buffer_size: buffer size |
| 145 | * |
| 146 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 147 | */ |
| 148 | QDF_STATUS wma_get_wcnss_software_version(uint8_t *version, |
| 149 | uint32_t version_buffer_size); |
| 150 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 151 | 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] | 152 | QDF_STATUS wma_set_peer_param(void *wma_ctx, uint8_t *peer_addr, |
| 153 | uint32_t param_id, |
| 154 | uint32_t param_value, uint32_t vdev_id); |
Mukul Sharma | c3886aa | 2017-05-04 17:53:22 +0530 | [diff] [blame] | 155 | QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 156 | #ifdef NOT_YET |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 157 | 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] | 158 | #endif |
| 159 | |
| 160 | uint8_t *wma_get_vdev_address_by_vdev_id(uint8_t vdev_id); |
| 161 | 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] | 162 | QDF_STATUS wma_get_connection_info(uint8_t vdev_id, |
| 163 | struct policy_mgr_vdev_entry_info *conn_table_entry); |
| 164 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 165 | bool wma_is_vdev_up(uint8_t vdev_id); |
| 166 | |
| 167 | void *wma_get_beacon_buffer_by_vdev_id(uint8_t vdev_id, uint32_t *buffer_size); |
| 168 | |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 169 | bool wma_get_fw_wlan_feat_caps(enum cap_bitmap feature); |
| 170 | void wma_set_fw_wlan_feat_caps(enum cap_bitmap feature); |
Jeff Johnson | e88dd75 | 2018-06-07 22:57:54 -0700 | [diff] [blame] | 171 | |
| 172 | QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 173 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 174 | void wma_register_wow_wakeup_events(WMA_HANDLE handle, uint8_t vdev_id, |
| 175 | uint8_t vdev_type, uint8_t sub_type); |
| 176 | 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] | 177 | int8_t wma_get_mac_id_of_vdev(uint32_t vdev_id); |
| 178 | void wma_update_intf_hw_mode_params(uint32_t vdev_id, uint32_t mac_id, |
| 179 | uint32_t cfgd_hw_mode_index); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 180 | void wma_set_dbs_capability_ut(uint32_t dbs); |
Krunal Soni | 0193b6f | 2016-08-15 15:53:43 -0700 | [diff] [blame] | 181 | QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy, |
| 182 | enum hw_mode_dbs_capab hw_mode, enum cds_band_type band); |
| 183 | bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel); |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 184 | |
| 185 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
yeshwanth sriram guntuka | 584c233 | 2017-07-29 12:50:25 +0530 | [diff] [blame] | 186 | int wma_unified_radio_tx_mem_free(void *handle); |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 187 | #else /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 188 | static inline int wma_unified_radio_tx_mem_free(void *handle) |
| 189 | { |
| 190 | return 0; |
| 191 | } |
| 192 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 193 | |
Krunal Soni | aadaa27 | 2017-10-04 16:42:55 -0700 | [diff] [blame] | 194 | /** |
| 195 | * wma_form_unit_test_cmd_and_send() - to form a wma command and send it to FW |
| 196 | * @session_id: wma session id to be filled while forming the command |
| 197 | * @module_id: module id given by user to be filled in the command |
| 198 | * @arg_count: number of argument count |
| 199 | * @arg: pointer to argument list |
| 200 | * |
| 201 | * This API exposed to HDD layer which takes the argument from user and forms |
| 202 | * the wma unit test command to be sent down to firmware |
| 203 | * |
| 204 | * Return: QDF_STATUS based on overall success |
| 205 | */ |
| 206 | QDF_STATUS wma_form_unit_test_cmd_and_send(uint32_t vdev_id, |
| 207 | uint32_t module_id, uint32_t arg_count, uint32_t *arg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 208 | |
Manjunathappa Prakash | 7b0ad46 | 2018-04-15 00:37:16 -0700 | [diff] [blame] | 209 | /** |
| 210 | * wma_lro_init() - sends LRO configuration to FW |
| 211 | * @lro_config: pointer to the config parameters |
| 212 | * |
| 213 | * This function ends LRO configuration to FW. |
| 214 | * |
| 215 | * Return: 0 for success or reasons for failure |
| 216 | */ |
Dhanashri Atre | 09828f1 | 2016-11-13 10:36:58 -0800 | [diff] [blame] | 217 | int wma_lro_init(struct cdp_lro_hash_config *lro_config); |
Ryan Hsu | 3c8f79f | 2015-12-02 16:45:09 -0800 | [diff] [blame] | 218 | |
Gupta, Kapil | 4cb1d7d | 2016-04-16 18:16:25 -0700 | [diff] [blame] | 219 | QDF_STATUS wma_remove_beacon_filter(WMA_HANDLE wma, |
| 220 | struct beacon_filter_param *filter_params); |
| 221 | |
| 222 | QDF_STATUS wma_add_beacon_filter(WMA_HANDLE wma, |
| 223 | struct beacon_filter_param *filter_params); |
Gupta, Kapil | 96c7f2f | 2016-04-25 19:13:41 +0530 | [diff] [blame] | 224 | QDF_STATUS wma_send_adapt_dwelltime_params(WMA_HANDLE handle, |
| 225 | struct adaptive_dwelltime_params *dwelltime_params); |
Nitesh Shah | f9a09ff | 2017-05-22 15:46:25 +0530 | [diff] [blame] | 226 | |
| 227 | /** |
| 228 | * wma_send_dbs_scan_selection_params() - send DBS scan selection configuration |
| 229 | * params to firmware |
| 230 | * @handle: wma handler |
| 231 | * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params |
| 232 | * |
| 233 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure |
| 234 | */ |
| 235 | QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle, |
| 236 | struct wmi_dbs_scan_sel_params *dbs_scan_params); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 237 | QDF_STATUS wma_set_tx_power_scale(uint8_t vdev_id, int value); |
| 238 | 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] | 239 | |
Kiran Kumar Lokere | d0fad46 | 2017-06-13 18:23:48 -0700 | [diff] [blame] | 240 | bool wma_is_csa_offload_enabled(void); |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 241 | bool wma_is_p2p_lo_capable(void); |
Dustin Brown | 8d8d9fe | 2017-07-18 16:01:25 -0700 | [diff] [blame] | 242 | bool wma_capability_enhanced_mcast_filter(void); |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 243 | QDF_STATUS wma_p2p_lo_start(struct sir_p2p_lo_start *params); |
| 244 | QDF_STATUS wma_p2p_lo_stop(u_int32_t vdev_id); |
Naveen Rawat | 3ff5cff | 2018-01-29 14:31:16 -0800 | [diff] [blame] | 245 | #ifndef QCA_SUPPORT_CP_STATS |
Padma, Santhosh Kumar | 5e33beb | 2016-08-08 19:07:06 +0530 | [diff] [blame] | 246 | QDF_STATUS wma_get_wakelock_stats(struct sir_wake_lock_stats *wake_lock_stats); |
Naveen Rawat | 3ff5cff | 2018-01-29 14:31:16 -0800 | [diff] [blame] | 247 | #endif |
Naveen Rawat | 8cc23b0 | 2016-07-14 12:22:56 -0700 | [diff] [blame] | 248 | void wma_process_pdev_hw_mode_trans_ind(void *wma, |
| 249 | wmi_pdev_hw_mode_transition_event_fixed_param *fixed_param, |
| 250 | wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry, |
| 251 | struct sir_hw_mode_trans_ind *hw_mode_trans_ind); |
Padma, Santhosh Kumar | 72e7aec | 2016-10-12 17:23:44 +0530 | [diff] [blame] | 252 | |
Agrawal Ashish | b2d1a45 | 2016-05-05 12:23:58 +0530 | [diff] [blame] | 253 | /** |
| 254 | * wma_set_cts2self_for_p2p_go() - set CTS2SELF command for P2P GO. |
| 255 | * @wma_handle: pointer to wma handle. |
| 256 | * @cts2self_for_p2p_go: value needs to set to firmware. |
| 257 | * |
| 258 | * At the time of driver startup, inform about ini parma to FW that |
| 259 | * if legacy client connects to P2P GO, stop using NOA for P2P GO. |
| 260 | * |
| 261 | * Return: QDF_STATUS. |
| 262 | */ |
| 263 | QDF_STATUS wma_set_cts2self_for_p2p_go(void *wma_handle, |
| 264 | uint32_t cts2self_for_p2p_go); |
Padma, Santhosh Kumar | a711967 | 2016-08-16 16:05:14 +0530 | [diff] [blame] | 265 | QDF_STATUS wma_set_tx_rx_aggregation_size |
| 266 | (struct sir_set_tx_rx_aggregation_size *tx_rx_aggregation_size); |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 267 | |
| 268 | /** |
Paul Zhang | ee09f8e | 2018-04-23 16:11:32 +0800 | [diff] [blame] | 269 | * wma_set_tx_rx_aggregation_size_per_ac() - set aggregation size per ac |
| 270 | * @tx_rx_aggregation_size: the parameter for aggregation size |
| 271 | * |
| 272 | * This function try to set the aggregation size per AC. |
| 273 | * |
| 274 | * Return: QDF_STATUS enumeration |
| 275 | */ |
| 276 | QDF_STATUS wma_set_tx_rx_aggregation_size_per_ac |
| 277 | (struct sir_set_tx_rx_aggregation_size *tx_rx_aggregation_size); |
| 278 | /** |
Paul Zhang | 33fae27 | 2018-04-23 16:19:00 +0800 | [diff] [blame] | 279 | * wma_set_sw_retry_threshold() - set sw retry threshold per AC for tx |
| 280 | * @tx_rx_aggregation_size: value needs to set to firmware |
| 281 | * |
| 282 | * This function sends WMI command to set the sw retry threshold per AC |
| 283 | * for Tx. |
| 284 | * |
| 285 | * Return: QDF_STATUS. |
| 286 | */ |
| 287 | QDF_STATUS wma_set_sw_retry_threshold |
| 288 | (struct sir_set_tx_aggr_sw_retry_threshold *tx_rx_aggregation_size); |
| 289 | /** |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 290 | * wma_get_sar_limit() - get SAR limits from the target |
| 291 | * @handle: wma handle |
| 292 | * @callback: Callback function to invoke with the results |
| 293 | * @context: Opaque context to pass back to caller in the callback |
| 294 | * |
| 295 | * This function sends WMI command to get SAR limits. |
| 296 | * |
| 297 | * Return: QDF_STATUS enumeration |
| 298 | */ |
| 299 | QDF_STATUS wma_get_sar_limit(WMA_HANDLE handle, |
| 300 | wma_sar_cb callback, void *context); |
| 301 | |
Kabilan Kannan | 3c0a735 | 2016-12-02 18:49:38 -0800 | [diff] [blame] | 302 | /** |
| 303 | * wma_set_sar_limit() - set sar limits in the target |
| 304 | * @handle: wma handle |
| 305 | * @sar_limit_cmd_params: sar limit cmd params |
| 306 | * |
| 307 | * This function sends WMI command to set SAR limits. |
| 308 | * |
| 309 | * Return: QDF_STATUS enumeration |
| 310 | */ |
| 311 | QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle, |
| 312 | struct sar_limit_cmd_params *sar_limit_params); |
Jeff Johnson | f0e54b0 | 2017-12-18 15:22:25 -0800 | [diff] [blame] | 313 | |
Dustin Brown | 10a7b71 | 2016-10-07 10:31:16 -0700 | [diff] [blame] | 314 | /** |
| 315 | * wma_set_qpower_config() - update qpower config in wma |
| 316 | * @vdev_id: the Id of the vdev to configure |
| 317 | * @qpower: new qpower value |
| 318 | * |
| 319 | * Return: QDF_STATUS_SUCCESS on success, error number otherwise |
| 320 | */ |
| 321 | 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] | 322 | |
Will Huang | 3cd2b7c | 2017-11-17 13:16:56 +0800 | [diff] [blame] | 323 | #ifdef FEATURE_WLAN_D0WOW |
| 324 | static inline bool wma_d0_wow_is_supported(void) |
| 325 | { |
Will Huang | 67ce1e3 | 2018-04-25 17:57:24 +0800 | [diff] [blame] | 326 | return true; |
Will Huang | 3cd2b7c | 2017-11-17 13:16:56 +0800 | [diff] [blame] | 327 | } |
| 328 | #else |
| 329 | static inline bool wma_d0_wow_is_supported(void) |
| 330 | { |
| 331 | return false; |
| 332 | } |
| 333 | #endif |
| 334 | |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 335 | /** |
| 336 | * wma_store_pdev() - store pdev |
| 337 | * @wma_ctx: wma context |
| 338 | * @pdev: pdev context |
| 339 | * |
| 340 | * Return: void |
| 341 | */ |
| 342 | void wma_store_pdev(void *wma_ctx, struct wlan_objmgr_pdev *pdev); |
| 343 | |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 344 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Krishna Kumaar Natarajan | c7e2bb7 | 2017-03-10 10:38:46 -0800 | [diff] [blame] | 345 | /** |
| 346 | * wmi_to_sir_peer_type() - convert peer type from WMI to SIR enum |
| 347 | * @type: enum wmi_peer_type |
| 348 | * |
| 349 | * Return: tSirWifiPeerType |
| 350 | */ |
| 351 | tSirWifiPeerType wmi_to_sir_peer_type(enum wmi_peer_type type); |
Qiwei Cai | 3719efe | 2018-06-11 21:09:29 +0800 | [diff] [blame] | 352 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
Yu Wang | 46082dc | 2017-09-19 12:25:38 +0800 | [diff] [blame] | 353 | |
| 354 | QDF_STATUS wma_crash_inject(WMA_HANDLE wma_handle, uint32_t type, |
| 355 | uint32_t delay_time_ms); |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 356 | |
| 357 | /** |
Dustin Brown | 0555718 | 2017-10-12 14:44:49 -0700 | [diff] [blame] | 358 | * wma_critical_events_in_flight() - get the number of critical events in flight |
| 359 | * |
| 360 | * This API gets the number of events in flight which should prevent power |
| 361 | * collapse. |
| 362 | * |
| 363 | * Return: the number of critical events in flight |
| 364 | */ |
| 365 | uint32_t wma_critical_events_in_flight(void); |
| 366 | |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame^] | 367 | #ifdef FEATURE_WLAN_DYNAMIC_CVM |
Dustin Brown | 0555718 | 2017-10-12 14:44:49 -0700 | [diff] [blame] | 368 | /** |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 369 | * wma_set_vc_mode_config() - set voltage corner mode config to FW. |
| 370 | * @wma_handle: pointer to wma handle. |
| 371 | * @vc_bitmap: value needs to set to firmware. |
| 372 | * |
| 373 | * At the time of driver startup, set operating voltage corner mode |
| 374 | * for differenet phymode and bw configurations. |
| 375 | * |
| 376 | * Return: QDF_STATUS. |
| 377 | */ |
| 378 | QDF_STATUS wma_set_vc_mode_config(void *wma_handle, |
| 379 | uint32_t vc_bitmap); |
Rachit Kankane | f6834c4 | 2018-08-02 18:47:50 +0530 | [diff] [blame^] | 380 | #endif |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 381 | |
Yun Park | c3e3556 | 2018-03-08 12:05:52 -0800 | [diff] [blame] | 382 | QDF_STATUS wma_process_dhcp_ind(WMA_HANDLE wma_handle, |
| 383 | tAniDHCPInd *ta_dhcp_ind); |
| 384 | |
Kabilan Kannan | fc3a8c0 | 2018-02-21 13:36:29 -0800 | [diff] [blame] | 385 | /** |
| 386 | * wma_wmi_stop() - send wmi stop cmd |
| 387 | * |
| 388 | * Return: None |
| 389 | */ |
| 390 | void wma_wmi_stop(void); |
| 391 | |
Naveen Rawat | fa2a100 | 2018-05-17 16:06:37 -0700 | [diff] [blame] | 392 | /** |
| 393 | * wma_get_mcs_idx() - get mcs index |
| 394 | * @max_rate: max rate |
| 395 | * @rate_flags: rate flags |
| 396 | * @nss: nss |
| 397 | * @mcs_rate_flag: mcs rate flags |
| 398 | * |
| 399 | * Return: mcs index |
| 400 | */ |
| 401 | uint8_t wma_get_mcs_idx(uint16_t max_rate, uint8_t rate_flags, |
Hanumanth Reddy Pothula | 834f943 | 2018-05-30 14:20:32 +0530 | [diff] [blame] | 402 | uint8_t *nss, uint8_t *mcs_rate_flag); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 403 | #endif |