wmi_unified_priv.h 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421
  1. /*
  2. * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
  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. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /*
  27. * This file contains the API definitions for the Unified Wireless
  28. * Module Interface (WMI).
  29. */
  30. #ifndef _WMI_UNIFIED_PRIV_H_
  31. #define _WMI_UNIFIED_PRIV_H_
  32. #include <osdep.h>
  33. #include "a_types.h"
  34. #include "wmi_unified_param.h"
  35. #include "wlan_scan_ucfg_api.h"
  36. #include "qdf_atomic.h"
  37. #include "wlan_objmgr_psoc_service_ready_api.h"
  38. #ifdef CONVERGED_P2P_ENABLE
  39. #include <wlan_p2p_public_struct.h>
  40. #endif
  41. #define WMI_UNIFIED_MAX_EVENT 0x100
  42. #ifdef CONFIG_MCL
  43. #define WMI_MAX_CMDS 256
  44. #else
  45. #define WMI_MAX_CMDS 1024
  46. #endif
  47. typedef qdf_nbuf_t wmi_buf_t;
  48. #ifdef WMI_INTERFACE_EVENT_LOGGING
  49. #define WMI_EVENT_DEBUG_MAX_ENTRY (1024)
  50. #define WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH (16)
  51. /* wmi_mgmt commands */
  52. #define WMI_MGMT_EVENT_DEBUG_MAX_ENTRY (256)
  53. /**
  54. * struct wmi_command_debug - WMI command log buffer data type
  55. * @ command - Store WMI Command id
  56. * @ data - Stores WMI command data
  57. * @ time - Time of WMI command handling
  58. */
  59. struct wmi_command_debug {
  60. uint32_t command;
  61. /*16 bytes of WMI cmd excluding TLV and WMI headers */
  62. uint32_t data[WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH/sizeof(uint32_t)];
  63. uint64_t time;
  64. };
  65. /**
  66. * struct wmi_event_debug - WMI event log buffer data type
  67. * @ command - Store WMI Event id
  68. * @ data - Stores WMI Event data
  69. * @ time - Time of WMI Event handling
  70. */
  71. struct wmi_event_debug {
  72. uint32_t event;
  73. /*16 bytes of WMI event data excluding TLV header */
  74. uint32_t data[WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH/sizeof(uint32_t)];
  75. uint64_t time;
  76. };
  77. /**
  78. * struct wmi_command_header - Type for accessing frame data
  79. * @ type - 802.11 Frame type
  80. * @ subType - 802.11 Frame subtype
  81. * @ protVer - 802.11 Version
  82. */
  83. struct wmi_command_header {
  84. #ifndef ANI_LITTLE_BIT_ENDIAN
  85. uint32_t sub_type:4;
  86. uint32_t type:2;
  87. uint32_t prot_ver:2;
  88. #else
  89. uint32_t prot_ver:2;
  90. uint32_t type:2;
  91. uint32_t sub_type:4;
  92. #endif
  93. };
  94. /**
  95. * struct wmi_log_buf_t - WMI log buffer information type
  96. * @buf - Refernce to WMI log buffer
  97. * @ length - length of buffer
  98. * @ buf_tail_idx - Tail index of buffer
  99. * @ p_buf_tail_idx - refernce to buffer tail index. It is added to accommodate
  100. * unified design since MCL uses global variable for buffer tail index
  101. * @ size - the size of the buffer in number of entries
  102. */
  103. struct wmi_log_buf_t {
  104. void *buf;
  105. uint32_t length;
  106. uint32_t buf_tail_idx;
  107. uint32_t *p_buf_tail_idx;
  108. uint32_t size;
  109. };
  110. /**
  111. * struct wmi_debug_log_info - Meta data to hold information of all buffers
  112. * used for WMI logging
  113. * @wmi_command_log_buf_info - Buffer info for WMI Command log
  114. * @wmi_command_tx_cmp_log_buf_info - Buffer info for WMI Command Tx completion
  115. * log
  116. * @wmi_event_log_buf_info - Buffer info for WMI Event log
  117. * @wmi_rx_event_log_buf_info - Buffer info for WMI event received log
  118. * @wmi_mgmt_command_log_buf_info - Buffer info for WMI Management Command log
  119. * @wmi_mgmt_command_tx_cmp_log_buf_info - Buffer info for WMI Management
  120. * Command Tx completion log
  121. * @wmi_mgmt_event_log_buf_info - Buffer info for WMI Management event log
  122. * @wmi_record_lock - Lock WMI recording
  123. * @wmi_logging_enable - Enable/Disable state for WMI logging
  124. * @buf_offset_command - Offset from where WMI command data should be logged
  125. * @buf_offset_event - Offset from where WMI event data should be logged
  126. * @is_management_record - Function refernce to check if command/event is
  127. * management record
  128. * @wmi_id_to_name - Function refernce to API to convert Command id to
  129. * string name
  130. * @wmi_log_debugfs_dir - refernce to debugfs directory
  131. */
  132. struct wmi_debug_log_info {
  133. struct wmi_log_buf_t wmi_command_log_buf_info;
  134. struct wmi_log_buf_t wmi_command_tx_cmp_log_buf_info;
  135. struct wmi_log_buf_t wmi_event_log_buf_info;
  136. struct wmi_log_buf_t wmi_rx_event_log_buf_info;
  137. struct wmi_log_buf_t wmi_mgmt_command_log_buf_info;
  138. struct wmi_log_buf_t wmi_mgmt_command_tx_cmp_log_buf_info;
  139. struct wmi_log_buf_t wmi_mgmt_event_log_buf_info;
  140. qdf_spinlock_t wmi_record_lock;
  141. bool wmi_logging_enable;
  142. uint32_t buf_offset_command;
  143. uint32_t buf_offset_event;
  144. struct dentry *wmi_log_debugfs_dir;
  145. uint8_t wmi_instance_id;
  146. };
  147. #endif /*WMI_INTERFACE_EVENT_LOGGING */
  148. #ifdef WLAN_OPEN_SOURCE
  149. struct fwdebug {
  150. struct sk_buff_head fwlog_queue;
  151. struct completion fwlog_completion;
  152. A_BOOL fwlog_open;
  153. };
  154. #endif /* WLAN_OPEN_SOURCE */
  155. struct wmi_ops {
  156. QDF_STATUS (*send_vdev_create_cmd)(wmi_unified_t wmi_handle,
  157. uint8_t macaddr[IEEE80211_ADDR_LEN],
  158. struct vdev_create_params *param);
  159. QDF_STATUS (*send_vdev_delete_cmd)(wmi_unified_t wmi_handle,
  160. uint8_t if_id);
  161. QDF_STATUS (*send_vdev_stop_cmd)(wmi_unified_t wmi,
  162. uint8_t vdev_id);
  163. QDF_STATUS (*send_enable_broadcast_filter_cmd)(wmi_unified_t wmi_handle,
  164. uint8_t vdev_id, bool enable);
  165. QDF_STATUS (*send_vdev_down_cmd)(wmi_unified_t wmi,
  166. uint8_t vdev_id);
  167. QDF_STATUS (*send_vdev_start_cmd)(wmi_unified_t wmi,
  168. struct vdev_start_params *req);
  169. QDF_STATUS (*send_hidden_ssid_vdev_restart_cmd)(wmi_unified_t wmi_handle,
  170. struct hidden_ssid_vdev_restart_params *restart_params);
  171. QDF_STATUS (*send_peer_flush_tids_cmd)(wmi_unified_t wmi,
  172. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  173. struct peer_flush_params *param);
  174. QDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi,
  175. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  176. uint8_t vdev_id);
  177. QDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi,
  178. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  179. struct peer_set_params *param);
  180. QDF_STATUS (*send_vdev_up_cmd)(wmi_unified_t wmi,
  181. uint8_t bssid[IEEE80211_ADDR_LEN],
  182. struct vdev_up_params *params);
  183. QDF_STATUS (*send_peer_create_cmd)(wmi_unified_t wmi,
  184. struct peer_create_params *param);
  185. QDF_STATUS (*send_green_ap_ps_cmd)(wmi_unified_t wmi_handle,
  186. uint32_t value, uint8_t mac_id);
  187. QDF_STATUS
  188. (*send_pdev_utf_cmd)(wmi_unified_t wmi_handle,
  189. struct pdev_utf_params *param,
  190. uint8_t mac_id);
  191. QDF_STATUS
  192. (*send_pdev_param_cmd)(wmi_unified_t wmi_handle,
  193. struct pdev_params *param,
  194. uint8_t mac_id);
  195. QDF_STATUS (*send_suspend_cmd)(wmi_unified_t wmi_handle,
  196. struct suspend_params *param,
  197. uint8_t mac_id);
  198. QDF_STATUS (*send_resume_cmd)(wmi_unified_t wmi_handle,
  199. uint8_t mac_id);
  200. QDF_STATUS (*send_wow_enable_cmd)(wmi_unified_t wmi_handle,
  201. struct wow_cmd_params *param,
  202. uint8_t mac_id);
  203. QDF_STATUS (*send_set_ap_ps_param_cmd)(wmi_unified_t wmi_handle,
  204. uint8_t *peer_addr,
  205. struct ap_ps_params *param);
  206. QDF_STATUS (*send_set_sta_ps_param_cmd)(wmi_unified_t wmi_handle,
  207. struct sta_ps_params *param);
  208. QDF_STATUS (*send_crash_inject_cmd)(wmi_unified_t wmi_handle,
  209. struct crash_inject *param);
  210. QDF_STATUS
  211. (*send_dbglog_cmd)(wmi_unified_t wmi_handle,
  212. struct dbglog_params *dbglog_param);
  213. QDF_STATUS (*send_vdev_set_param_cmd)(wmi_unified_t wmi_handle,
  214. struct vdev_set_params *param);
  215. QDF_STATUS (*send_stats_request_cmd)(wmi_unified_t wmi_handle,
  216. uint8_t macaddr[IEEE80211_ADDR_LEN],
  217. struct stats_request_params *param);
  218. #ifdef CONFIG_WIN
  219. QDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
  220. WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT);
  221. #else
  222. QDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
  223. uint8_t macaddr[IEEE80211_ADDR_LEN],
  224. struct packet_enable_params *param);
  225. #endif
  226. QDF_STATUS (*send_packet_log_disable_cmd)(wmi_unified_t wmi_handle);
  227. QDF_STATUS (*send_beacon_send_cmd)(wmi_unified_t wmi_handle,
  228. struct beacon_params *param);
  229. QDF_STATUS (*send_beacon_tmpl_send_cmd)(wmi_unified_t wmi_handle,
  230. struct beacon_tmpl_params *param);
  231. QDF_STATUS (*send_peer_assoc_cmd)(wmi_unified_t wmi_handle,
  232. struct peer_assoc_params *param);
  233. QDF_STATUS (*send_scan_start_cmd)(wmi_unified_t wmi_handle,
  234. struct scan_req_params *param);
  235. QDF_STATUS (*send_scan_stop_cmd)(wmi_unified_t wmi_handle,
  236. struct scan_cancel_param *param);
  237. QDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle,
  238. struct scan_chan_list_params *param);
  239. QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
  240. struct wmi_mgmt_params *param);
  241. QDF_STATUS (*send_offchan_data_tx_cmd)(wmi_unified_t wmi_handle,
  242. struct wmi_offchan_data_tx_params *param);
  243. QDF_STATUS (*send_modem_power_state_cmd)(wmi_unified_t wmi_handle,
  244. uint32_t param_value);
  245. QDF_STATUS (*send_set_sta_ps_mode_cmd)(wmi_unified_t wmi_handle,
  246. uint32_t vdev_id, uint8_t val);
  247. QDF_STATUS (*send_get_temperature_cmd)(wmi_unified_t wmi_handle);
  248. QDF_STATUS (*send_set_p2pgo_oppps_req_cmd)(wmi_unified_t wmi_handle,
  249. struct p2p_ps_params *oppps);
  250. QDF_STATUS (*send_set_p2pgo_noa_req_cmd)(wmi_unified_t wmi_handle,
  251. struct p2p_ps_params *noa);
  252. #ifdef CONVERGED_P2P_ENABLE
  253. QDF_STATUS (*send_p2p_lo_start_cmd)(wmi_unified_t wmi_handle,
  254. struct p2p_lo_start *param);
  255. QDF_STATUS (*send_p2p_lo_stop_cmd)(wmi_unified_t wmi_handle,
  256. uint8_t vdev_id);
  257. #endif
  258. QDF_STATUS (*send_set_smps_params_cmd)(wmi_unified_t wmi_handle,
  259. uint8_t vdev_id,
  260. int value);
  261. QDF_STATUS (*send_set_mimops_cmd)(wmi_unified_t wmi_handle,
  262. uint8_t vdev_id, int value);
  263. QDF_STATUS (*send_set_sta_uapsd_auto_trig_cmd)(wmi_unified_t wmi_handle,
  264. struct sta_uapsd_trig_params *param);
  265. QDF_STATUS (*send_ocb_set_utc_time_cmd)(wmi_unified_t wmi_handle,
  266. struct ocb_utc_param *utc);
  267. QDF_STATUS (*send_ocb_get_tsf_timer_cmd)(wmi_unified_t wmi_handle,
  268. uint8_t vdev_id);
  269. QDF_STATUS (*send_ocb_start_timing_advert_cmd)(wmi_unified_t wmi_handle,
  270. struct ocb_timing_advert_param *timing_advert);
  271. QDF_STATUS (*send_ocb_stop_timing_advert_cmd)(wmi_unified_t wmi_handle,
  272. struct ocb_timing_advert_param *timing_advert);
  273. QDF_STATUS (*send_dcc_get_stats_cmd)(wmi_unified_t wmi_handle,
  274. struct dcc_get_stats_param *get_stats_param);
  275. QDF_STATUS (*send_dcc_clear_stats_cmd)(wmi_unified_t wmi_handle,
  276. uint32_t vdev_id, uint32_t dcc_stats_bitmap);
  277. QDF_STATUS (*send_dcc_update_ndl_cmd)(wmi_unified_t wmi_handle,
  278. struct dcc_update_ndl_param *update_ndl_param);
  279. QDF_STATUS (*send_ocb_set_config_cmd)(wmi_unified_t wmi_handle,
  280. struct ocb_config_param *config, uint32_t *ch_mhz);
  281. QDF_STATUS (*send_lro_config_cmd)(wmi_unified_t wmi_handle,
  282. struct wmi_lro_config_cmd_t *wmi_lro_cmd);
  283. QDF_STATUS (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle,
  284. struct thermal_cmd_params *thermal_info);
  285. QDF_STATUS (*send_peer_rate_report_cmd)(wmi_unified_t wmi_handle,
  286. struct wmi_peer_rate_report_params *rate_report_params);
  287. QDF_STATUS (*send_set_mcc_channel_time_quota_cmd)
  288. (wmi_unified_t wmi_handle,
  289. uint32_t adapter_1_chan_freq,
  290. uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
  291. QDF_STATUS (*send_set_mcc_channel_time_latency_cmd)
  292. (wmi_unified_t wmi_handle,
  293. uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
  294. QDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)(
  295. wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
  296. uint32_t pdev_id);
  297. QDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle,
  298. A_UINT32 vdev_id, uint8_t *p2p_ie);
  299. QDF_STATUS (*send_probe_rsp_tmpl_send_cmd)(wmi_unified_t wmi_handle,
  300. uint8_t vdev_id,
  301. struct wmi_probe_resp_params *probe_rsp_info,
  302. uint8_t *frm);
  303. QDF_STATUS (*send_setup_install_key_cmd)(wmi_unified_t wmi_handle,
  304. struct set_key_params *key_params);
  305. QDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle,
  306. uint32_t if_id,
  307. struct wmi_gtx_config *gtx_info);
  308. QDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle,
  309. struct sta_params *params);
  310. QDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle,
  311. uint8_t vdev_id, uint32_t max_retries,
  312. uint32_t retry_interval);
  313. QDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle,
  314. struct gateway_update_req_param *req);
  315. QDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle,
  316. struct rssi_monitor_param *req);
  317. QDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle,
  318. struct scan_mac_oui *psetoui);
  319. QDF_STATUS (*send_reset_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
  320. struct wifi_passpoint_req_param *req);
  321. QDF_STATUS (*send_roam_scan_offload_rssi_thresh_cmd)(wmi_unified_t wmi_handle,
  322. struct roam_offload_scan_rssi_params *roam_req);
  323. QDF_STATUS (*send_roam_scan_filter_cmd)(wmi_unified_t wmi_handle,
  324. struct roam_scan_filter_params *roam_req);
  325. QDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
  326. struct wifi_passpoint_req_param *req);
  327. QDF_STATUS (*send_set_epno_network_list_cmd)(wmi_unified_t wmi_handle,
  328. struct wifi_enhanched_pno_params *req);
  329. QDF_STATUS (*send_extscan_get_capabilities_cmd)(wmi_unified_t wmi_handle,
  330. struct extscan_capabilities_params *pgetcapab);
  331. QDF_STATUS (*send_extscan_get_cached_results_cmd)(wmi_unified_t wmi_handle,
  332. struct extscan_cached_result_params *pcached_results);
  333. QDF_STATUS (*send_extscan_stop_change_monitor_cmd)(wmi_unified_t wmi_handle,
  334. struct extscan_capabilities_reset_params *reset_req);
  335. QDF_STATUS (*send_extscan_start_change_monitor_cmd)(wmi_unified_t wmi_handle,
  336. struct extscan_set_sig_changereq_params *
  337. psigchange);
  338. QDF_STATUS (*send_extscan_stop_hotlist_monitor_cmd)(wmi_unified_t wmi_handle,
  339. struct extscan_bssid_hotlist_reset_params *photlist_reset);
  340. QDF_STATUS (*send_stop_extscan_cmd)(wmi_unified_t wmi_handle,
  341. struct extscan_stop_req_params *pstopcmd);
  342. QDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle,
  343. struct wifi_scan_cmd_req_params *pstart);
  344. QDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle,
  345. const struct plm_req_params *plm);
  346. QDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle,
  347. const struct plm_req_params *plm,
  348. uint32_t *gchannel_list);
  349. QDF_STATUS (*send_csa_offload_enable_cmd)(wmi_unified_t wmi_handle,
  350. uint8_t vdev_id);
  351. QDF_STATUS (*send_pno_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  352. #ifdef FEATURE_WLAN_SCAN_PNO
  353. QDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle,
  354. struct pno_scan_req_params *pno,
  355. uint32_t *gchannel_freq_list);
  356. #endif
  357. QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
  358. struct ipa_offload_control_params *ipa_offload);
  359. QDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg,
  360. uint8_t is_add_ts);
  361. QDF_STATUS (*send_process_ll_stats_clear_cmd)
  362. (wmi_unified_t wmi_handle,
  363. const struct ll_stats_clear_params *clear_req,
  364. uint8_t addr[IEEE80211_ADDR_LEN]);
  365. QDF_STATUS (*send_process_ll_stats_set_cmd)
  366. (wmi_unified_t wmi_handle, const struct ll_stats_set_params *set_req);
  367. QDF_STATUS (*send_process_ll_stats_get_cmd)
  368. (wmi_unified_t wmi_handle, const struct ll_stats_get_params *get_req,
  369. uint8_t addr[IEEE80211_ADDR_LEN]);
  370. QDF_STATUS (*send_get_stats_cmd)(wmi_unified_t wmi_handle,
  371. struct pe_stats_req *get_stats_param,
  372. uint8_t addr[IEEE80211_ADDR_LEN]);
  373. QDF_STATUS (*send_snr_request_cmd)(wmi_unified_t wmi_handle);
  374. QDF_STATUS (*send_snr_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  375. QDF_STATUS (*send_link_status_req_cmd)(wmi_unified_t wmi_handle,
  376. struct link_status_params *link_status);
  377. #ifdef WLAN_PMO_ENABLE
  378. QDF_STATUS (*send_add_wow_wakeup_event_cmd)(wmi_unified_t wmi_handle,
  379. uint32_t vdev_id,
  380. uint32_t bitmap,
  381. bool enable);
  382. QDF_STATUS (*send_wow_patterns_to_fw_cmd)(wmi_unified_t wmi_handle,
  383. uint8_t vdev_id, uint8_t ptrn_id,
  384. const uint8_t *ptrn, uint8_t ptrn_len,
  385. uint8_t ptrn_offset, const uint8_t *mask,
  386. uint8_t mask_len, bool user,
  387. uint8_t default_patterns);
  388. QDF_STATUS (*send_enable_arp_ns_offload_cmd)(wmi_unified_t wmi_handle,
  389. struct pmo_arp_offload_params *arp_offload_req,
  390. struct pmo_ns_offload_params *ns_offload_req,
  391. uint8_t vdev_id);
  392. QDF_STATUS (*send_enable_enhance_multicast_offload_cmd)(
  393. wmi_unified_t wmi_handle,
  394. uint8_t vdev_id, bool action);
  395. QDF_STATUS (*send_add_clear_mcbc_filter_cmd)(wmi_unified_t wmi_handle,
  396. uint8_t vdev_id,
  397. struct qdf_mac_addr multicast_addr,
  398. bool clearList);
  399. QDF_STATUS (*send_gtk_offload_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
  400. struct pmo_gtk_req *params,
  401. bool enable_offload,
  402. uint32_t gtk_offload_opcode);
  403. QDF_STATUS (*send_process_gtk_offload_getinfo_cmd)(wmi_unified_t wmi_handle,
  404. uint8_t vdev_id,
  405. uint64_t offload_req_opcode);
  406. QDF_STATUS (*send_wow_sta_ra_filter_cmd)(wmi_unified_t wmi_handle,
  407. uint8_t vdev_id, uint8_t default_pattern,
  408. uint16_t rate_limit_interval);
  409. QDF_STATUS (*send_action_frame_patterns_cmd)(wmi_unified_t wmi_handle,
  410. struct pmo_action_wakeup_set_params *action_params);
  411. QDF_STATUS (*extract_gtk_rsp_event)(wmi_unified_t wmi_handle,
  412. void *evt_buf,
  413. struct pmo_gtk_rsp_params *gtk_rsp_param, uint32_t len);
  414. QDF_STATUS (*send_lphb_config_hbenable_cmd)(wmi_unified_t wmi_handle,
  415. wmi_hb_set_enable_cmd_fixed_param *params);
  416. QDF_STATUS (*send_lphb_config_tcp_params_cmd)(wmi_unified_t wmi_handle,
  417. wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req);
  418. QDF_STATUS (*send_lphb_config_tcp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
  419. wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp);
  420. QDF_STATUS (*send_lphb_config_udp_params_cmd)(wmi_unified_t wmi_handle,
  421. wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req);
  422. QDF_STATUS (*send_lphb_config_udp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
  423. wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req);
  424. #endif /* end of WLAN_PMO_ENABLE */
  425. #ifdef CONFIG_MCL
  426. QDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle,
  427. wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
  428. QDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle,
  429. wmi_mac_addr peer_macaddr);
  430. QDF_STATUS (*send_egap_conf_params_cmd)(wmi_unified_t wmi_handle,
  431. wmi_ap_ps_egap_param_cmd_fixed_param *egap_params);
  432. QDF_STATUS (*send_process_update_edca_param_cmd)(wmi_unified_t wmi_handle,
  433. uint8_t vdev_id,
  434. wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC]);
  435. QDF_STATUS (*send_bcn_buf_ll_cmd)(wmi_unified_t wmi_handle,
  436. wmi_bcn_send_from_host_cmd_fixed_param * param);
  437. QDF_STATUS (*send_roam_scan_offload_mode_cmd)(wmi_unified_t wmi_handle,
  438. wmi_start_scan_cmd_fixed_param * scan_cmd_fp,
  439. struct roam_offload_scan_params *roam_req);
  440. QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle,
  441. wmi_ap_profile * ap_profile_p,
  442. uint32_t vdev_id);
  443. QDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle,
  444. WMI_PKTLOG_EVENT pktlog_event,
  445. WMI_CMD_ID cmd_id, uint8_t user_triggered);
  446. #endif
  447. QDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle,
  448. uint32_t cmd, uint32_t value1, uint32_t value2);
  449. QDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  450. QDF_STATUS (*send_start_oem_data_cmd)(wmi_unified_t wmi_handle,
  451. uint32_t data_len,
  452. uint8_t *data);
  453. QDF_STATUS
  454. (*send_dfs_phyerr_filter_offload_en_cmd)(wmi_unified_t wmi_handle,
  455. bool dfs_phyerr_filter_offload);
  456. QDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle, uint8_t ptrn_id,
  457. uint8_t vdev_id);
  458. QDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle);
  459. QDF_STATUS (*send_del_ts_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
  460. uint8_t ac);
  461. QDF_STATUS (*send_aggr_qos_cmd)(wmi_unified_t wmi_handle,
  462. struct aggr_add_ts_param *aggr_qos_rsp_msg);
  463. QDF_STATUS (*send_add_ts_cmd)(wmi_unified_t wmi_handle,
  464. struct add_ts_param *msg);
  465. QDF_STATUS (*send_enable_disable_packet_filter_cmd)(wmi_unified_t wmi_handle,
  466. uint8_t vdev_id, bool enable);
  467. QDF_STATUS (*send_config_packet_filter_cmd)(wmi_unified_t wmi_handle,
  468. uint8_t vdev_id, struct rcv_pkt_filter_config *rcv_filter_param,
  469. uint8_t filter_id, bool enable);
  470. QDF_STATUS (*send_process_add_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
  471. struct periodic_tx_pattern *
  472. pAddPeriodicTxPtrnParams,
  473. uint8_t vdev_id);
  474. QDF_STATUS (*send_process_del_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
  475. uint8_t vdev_id,
  476. uint8_t pattern_id);
  477. QDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle,
  478. struct stats_ext_params *preq);
  479. QDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle,
  480. struct ext_wow_params *params);
  481. QDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle,
  482. struct app_type2_params *appType2Params);
  483. QDF_STATUS (*send_set_auto_shutdown_timer_cmd)(wmi_unified_t wmi_handle,
  484. uint32_t timer_val);
  485. QDF_STATUS (*send_nan_req_cmd)(wmi_unified_t wmi_handle,
  486. struct nan_req_params *nan_req);
  487. QDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle,
  488. struct dhcp_offload_info_params *pDhcpSrvOffloadInfo);
  489. QDF_STATUS (*send_process_ch_avoid_update_cmd)(wmi_unified_t wmi_handle);
  490. QDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle,
  491. uint32_t reg_dmn, uint16_t regdmn2G,
  492. uint16_t regdmn5G, int8_t ctl2G,
  493. int8_t ctl5G);
  494. QDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle,
  495. struct tdls_channel_switch_params *chan_switch_params);
  496. QDF_STATUS (*send_update_fw_tdls_state_cmd)(wmi_unified_t wmi_handle,
  497. void *tdls_param, uint8_t tdls_state);
  498. QDF_STATUS (*send_update_tdls_peer_state_cmd)(wmi_unified_t wmi_handle,
  499. struct tdls_peer_state_params *peerStateParams,
  500. uint32_t *ch_mhz);
  501. QDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle,
  502. struct fw_dump_req_param *mem_dump_req);
  503. QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle,
  504. struct vdev_ie_info_param *ie_info);
  505. #ifdef CONFIG_MCL
  506. QDF_STATUS (*send_init_cmd)(wmi_unified_t wmi_handle,
  507. wmi_resource_config *res_cfg,
  508. uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
  509. bool action);
  510. #endif
  511. QDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf);
  512. QDF_STATUS (*check_and_update_fw_version_cmd)(wmi_unified_t wmi_hdl, void *ev);
  513. QDF_STATUS (*send_saved_init_cmd)(wmi_unified_t wmi_handle);
  514. QDF_STATUS (*send_set_base_macaddr_indicate_cmd)(wmi_unified_t wmi_handle,
  515. uint8_t *custom_addr);
  516. QDF_STATUS (*send_log_supported_evt_cmd)(wmi_unified_t wmi_handle,
  517. uint8_t *event,
  518. uint32_t len);
  519. QDF_STATUS (*send_enable_specific_fw_logs_cmd)(wmi_unified_t wmi_handle,
  520. struct wmi_wifi_start_log *start_log);
  521. QDF_STATUS (*send_flush_logs_to_fw_cmd)(wmi_unified_t wmi_handle);
  522. QDF_STATUS (*send_pdev_set_pcl_cmd)(wmi_unified_t wmi_handle,
  523. struct wmi_pcl_chan_weights *msg);
  524. QDF_STATUS (*send_pdev_set_hw_mode_cmd)(wmi_unified_t wmi_handle,
  525. uint32_t hw_mode_index);
  526. QDF_STATUS (*send_pdev_set_dual_mac_config_cmd)(wmi_unified_t wmi_handle,
  527. struct wmi_dual_mac_config *msg);
  528. QDF_STATUS (*send_set_led_flashing_cmd)(wmi_unified_t wmi_handle,
  529. struct flashing_req_params *flashing);
  530. QDF_STATUS (*send_app_type1_params_in_fw_cmd)(wmi_unified_t wmi_handle,
  531. struct app_type1_params *app_type1_params);
  532. QDF_STATUS (*send_set_ssid_hotlist_cmd)(wmi_unified_t wmi_handle,
  533. struct ssid_hotlist_request_params *request);
  534. QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle,
  535. uint8_t vdev_id);
  536. QDF_STATUS (*send_unit_test_cmd)(wmi_unified_t wmi_handle,
  537. struct wmi_unit_test_cmd *wmi_utest);
  538. QDF_STATUS (*send_roam_invoke_cmd)(wmi_unified_t wmi_handle,
  539. struct wmi_roam_invoke_cmd *roaminvoke,
  540. uint32_t ch_hz);
  541. QDF_STATUS (*send_roam_scan_offload_cmd)(wmi_unified_t wmi_handle,
  542. uint32_t command, uint32_t vdev_id);
  543. QDF_STATUS (*send_roam_scan_offload_scan_period_cmd)(wmi_unified_t wmi_handle,
  544. uint32_t scan_period,
  545. uint32_t scan_age,
  546. uint32_t vdev_id);
  547. QDF_STATUS (*send_roam_scan_offload_chan_list_cmd)(wmi_unified_t wmi_handle,
  548. uint8_t chan_count,
  549. uint32_t *chan_list,
  550. uint8_t list_type, uint32_t vdev_id);
  551. QDF_STATUS (*send_roam_scan_offload_rssi_change_cmd)(wmi_unified_t wmi_handle,
  552. uint32_t vdev_id,
  553. int32_t rssi_change_thresh,
  554. uint32_t bcn_rssi_weight,
  555. uint32_t hirssi_delay_btw_scans);
  556. QDF_STATUS (*send_per_roam_config_cmd)(wmi_unified_t wmi_handle,
  557. struct wmi_per_roam_config_req *req_buf);
  558. QDF_STATUS (*send_get_buf_extscan_hotlist_cmd)(wmi_unified_t wmi_handle,
  559. struct ext_scan_setbssi_hotlist_params *
  560. photlist, int *buf_len);
  561. QDF_STATUS (*send_set_active_bpf_mode_cmd)(wmi_unified_t wmi_handle,
  562. uint8_t vdev_id,
  563. enum wmi_host_active_bpf_mode ucast_mode,
  564. enum wmi_host_active_bpf_mode mcast_bcast_mode);
  565. QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle,
  566. uint32_t param);
  567. QDF_STATUS (*send_set_bwf_cmd)(wmi_unified_t wmi_handle,
  568. struct set_bwf_params *param);
  569. QDF_STATUS (*send_set_atf_cmd)(wmi_unified_t wmi_handle,
  570. struct set_atf_params *param);
  571. QDF_STATUS (*send_pdev_fips_cmd)(wmi_unified_t wmi_handle,
  572. struct fips_params *param);
  573. QDF_STATUS (*send_wlan_profile_enable_cmd)(wmi_unified_t wmi_handle,
  574. struct wlan_profile_params *param);
  575. QDF_STATUS (*send_wlan_profile_trigger_cmd)(wmi_unified_t wmi_handle,
  576. struct wlan_profile_params *param);
  577. QDF_STATUS (*send_pdev_set_chan_cmd)(wmi_unified_t wmi_handle,
  578. struct channel_param *param);
  579. QDF_STATUS (*send_set_ht_ie_cmd)(wmi_unified_t wmi_handle,
  580. struct ht_ie_params *param);
  581. QDF_STATUS (*send_set_vht_ie_cmd)(wmi_unified_t wmi_handle,
  582. struct vht_ie_params *param);
  583. QDF_STATUS (*send_wmm_update_cmd)(wmi_unified_t wmi_handle,
  584. struct wmm_update_params *param);
  585. QDF_STATUS (*send_set_ant_switch_tbl_cmd)(wmi_unified_t wmi_handle,
  586. struct ant_switch_tbl_params *param);
  587. QDF_STATUS (*send_set_ratepwr_table_cmd)(wmi_unified_t wmi_handle,
  588. struct ratepwr_table_params *param);
  589. QDF_STATUS (*send_get_ratepwr_table_cmd)(wmi_unified_t wmi_handle);
  590. QDF_STATUS (*send_set_ctl_table_cmd)(wmi_unified_t wmi_handle,
  591. struct ctl_table_params *param);
  592. QDF_STATUS (*send_set_mimogain_table_cmd)(wmi_unified_t wmi_handle,
  593. struct mimogain_table_params *param);
  594. QDF_STATUS (*send_set_ratepwr_chainmsk_cmd)(wmi_unified_t wmi_handle,
  595. struct ratepwr_chainmsk_params *param);
  596. QDF_STATUS (*send_set_macaddr_cmd)(wmi_unified_t wmi_handle,
  597. struct macaddr_params *param);
  598. QDF_STATUS (*send_pdev_scan_start_cmd)(wmi_unified_t wmi_handle);
  599. QDF_STATUS (*send_pdev_scan_end_cmd)(wmi_unified_t wmi_handle);
  600. QDF_STATUS (*send_set_acparams_cmd)(wmi_unified_t wmi_handle,
  601. struct acparams_params *param);
  602. QDF_STATUS (*send_set_vap_dscp_tid_map_cmd)(wmi_unified_t wmi_handle,
  603. struct vap_dscp_tid_map_params *param);
  604. QDF_STATUS (*send_proxy_ast_reserve_cmd)(wmi_unified_t wmi_handle,
  605. struct proxy_ast_reserve_params *param);
  606. QDF_STATUS (*send_pdev_qvit_cmd)(wmi_unified_t wmi_handle,
  607. struct pdev_qvit_params *param);
  608. QDF_STATUS (*send_mcast_group_update_cmd)(wmi_unified_t wmi_handle,
  609. struct mcast_group_update_params *param);
  610. QDF_STATUS (*send_peer_add_wds_entry_cmd)(wmi_unified_t wmi_handle,
  611. struct peer_add_wds_entry_params *param);
  612. QDF_STATUS (*send_peer_del_wds_entry_cmd)(wmi_unified_t wmi_handle,
  613. struct peer_del_wds_entry_params *param);
  614. QDF_STATUS (*send_peer_update_wds_entry_cmd)(wmi_unified_t wmi_handle,
  615. struct peer_update_wds_entry_params *param);
  616. QDF_STATUS (*send_phyerr_enable_cmd)(wmi_unified_t wmi_handle);
  617. QDF_STATUS (*send_phyerr_disable_cmd)(wmi_unified_t wmi_handle);
  618. QDF_STATUS (*send_smart_ant_enable_cmd)(wmi_unified_t wmi_handle,
  619. struct smart_ant_enable_params *param);
  620. QDF_STATUS (*send_smart_ant_set_rx_ant_cmd)(wmi_unified_t wmi_handle,
  621. struct smart_ant_rx_ant_params *param);
  622. QDF_STATUS (*send_smart_ant_set_tx_ant_cmd)(wmi_unified_t wmi_handle,
  623. uint8_t macaddr[IEEE80211_ADDR_LEN],
  624. struct smart_ant_tx_ant_params *param);
  625. QDF_STATUS (*send_smart_ant_set_training_info_cmd)(wmi_unified_t wmi_handle,
  626. uint8_t macaddr[IEEE80211_ADDR_LEN],
  627. struct smart_ant_training_info_params *param);
  628. QDF_STATUS (*send_smart_ant_set_node_config_cmd)(wmi_unified_t wmi_handle,
  629. uint8_t macaddr[IEEE80211_ADDR_LEN],
  630. struct smart_ant_node_config_params *param);
  631. QDF_STATUS (*send_smart_ant_enable_tx_feedback_cmd)(wmi_unified_t wmi_handle,
  632. struct smart_ant_enable_tx_feedback_params *param);
  633. QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle,
  634. struct vdev_spectral_configure_params *param);
  635. QDF_STATUS (*send_vdev_spectral_enable_cmd)(wmi_unified_t wmi_handle,
  636. struct vdev_spectral_enable_params *param);
  637. QDF_STATUS (*send_bss_chan_info_request_cmd)(wmi_unified_t wmi_handle,
  638. struct bss_chan_info_request_params *param);
  639. QDF_STATUS (*send_thermal_mitigation_param_cmd)(wmi_unified_t wmi_handle,
  640. struct thermal_mitigation_params *param);
  641. QDF_STATUS (*send_vdev_set_neighbour_rx_cmd)(wmi_unified_t wmi_handle,
  642. uint8_t macaddr[IEEE80211_ADDR_LEN],
  643. struct set_neighbour_rx_params *param);
  644. QDF_STATUS (*send_vdev_set_fwtest_param_cmd)(wmi_unified_t wmi_handle,
  645. struct set_fwtest_params *param);
  646. QDF_STATUS (*send_vdev_config_ratemask_cmd)(wmi_unified_t wmi_handle,
  647. struct config_ratemask_params *param);
  648. QDF_STATUS (*send_wow_wakeup_cmd)(wmi_unified_t wmi_handle);
  649. QDF_STATUS (*send_wow_add_wakeup_event_cmd)(wmi_unified_t wmi_handle,
  650. struct wow_add_wakeup_params *param);
  651. QDF_STATUS (*send_wow_add_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
  652. struct wow_add_wakeup_pattern_params *param);
  653. QDF_STATUS (*send_wow_remove_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
  654. struct wow_remove_wakeup_pattern_params *param);
  655. QDF_STATUS (*send_pdev_set_regdomain_cmd)(wmi_unified_t wmi_handle,
  656. struct pdev_set_regdomain_params *param);
  657. QDF_STATUS (*send_set_quiet_mode_cmd)(wmi_unified_t wmi_handle,
  658. struct set_quiet_mode_params *param);
  659. QDF_STATUS (*send_set_beacon_filter_cmd)(wmi_unified_t wmi_handle,
  660. struct set_beacon_filter_params *param);
  661. QDF_STATUS (*send_remove_beacon_filter_cmd)(wmi_unified_t wmi_handle,
  662. struct remove_beacon_filter_params *param);
  663. /*
  664. QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
  665. uint8_t macaddr[IEEE80211_ADDR_LEN],
  666. struct mgmt_params *param);
  667. */
  668. QDF_STATUS (*send_addba_clearresponse_cmd)(wmi_unified_t wmi_handle,
  669. uint8_t macaddr[IEEE80211_ADDR_LEN],
  670. struct addba_clearresponse_params *param);
  671. QDF_STATUS (*send_addba_send_cmd)(wmi_unified_t wmi_handle,
  672. uint8_t macaddr[IEEE80211_ADDR_LEN],
  673. struct addba_send_params *param);
  674. QDF_STATUS (*send_delba_send_cmd)(wmi_unified_t wmi_handle,
  675. uint8_t macaddr[IEEE80211_ADDR_LEN],
  676. struct delba_send_params *param);
  677. QDF_STATUS (*send_addba_setresponse_cmd)(wmi_unified_t wmi_handle,
  678. uint8_t macaddr[IEEE80211_ADDR_LEN],
  679. struct addba_setresponse_params *param);
  680. QDF_STATUS (*send_singleamsdu_cmd)(wmi_unified_t wmi_handle,
  681. uint8_t macaddr[IEEE80211_ADDR_LEN],
  682. struct singleamsdu_params *param);
  683. QDF_STATUS (*send_set_qboost_param_cmd)(wmi_unified_t wmi_handle,
  684. uint8_t macaddr[IEEE80211_ADDR_LEN],
  685. struct set_qboost_params *param);
  686. QDF_STATUS (*send_mu_scan_cmd)(wmi_unified_t wmi_handle,
  687. struct mu_scan_params *param);
  688. QDF_STATUS (*send_lteu_config_cmd)(wmi_unified_t wmi_handle,
  689. struct lteu_config_params *param);
  690. QDF_STATUS (*send_set_ps_mode_cmd)(wmi_unified_t wmi_handle,
  691. struct set_ps_mode_params *param);
  692. void (*save_service_bitmap)(wmi_unified_t wmi_handle,
  693. void *evt_buf, void *bitmap_buf);
  694. bool (*is_service_enabled)(wmi_unified_t wmi_handle,
  695. uint32_t service_id);
  696. QDF_STATUS (*get_target_cap_from_service_ready)(wmi_unified_t wmi_handle,
  697. void *evt_buf, struct wlan_psoc_target_capability_info *ev);
  698. QDF_STATUS (*extract_fw_version)(wmi_unified_t wmi_handle,
  699. void *ev, struct wmi_host_fw_ver *fw_ver);
  700. QDF_STATUS (*extract_fw_abi_version)(wmi_unified_t wmi_handle,
  701. void *ev, struct wmi_host_fw_abi_ver *fw_ver);
  702. QDF_STATUS (*extract_hal_reg_cap)(wmi_unified_t wmi_handle, void *evt_buf,
  703. struct wlan_psoc_hal_reg_capability *hal_reg_cap);
  704. host_mem_req * (*extract_host_mem_req)(wmi_unified_t wmi_handle,
  705. void *evt_buf, uint8_t *num_entries);
  706. QDF_STATUS (*init_cmd_send)(wmi_unified_t wmi_handle,
  707. struct wmi_init_cmd_param *param);
  708. QDF_STATUS (*save_fw_version)(wmi_unified_t wmi_handle, void *evt_buf);
  709. uint32_t (*ready_extract_init_status)(wmi_unified_t wmi_hdl, void *ev);
  710. QDF_STATUS (*ready_extract_mac_addr)(wmi_unified_t wmi_hdl, void *ev,
  711. uint8_t *macaddr);
  712. QDF_STATUS (*check_and_update_fw_version)(wmi_unified_t wmi_hdl, void *ev);
  713. uint8_t* (*extract_dbglog_data_len)(wmi_unified_t wmi_handle, void *evt_buf,
  714. uint32_t *len);
  715. QDF_STATUS (*send_ext_resource_config)(wmi_unified_t wmi_handle,
  716. wmi_host_ext_resource_config *ext_cfg);
  717. QDF_STATUS (*send_nf_dbr_dbm_info_get_cmd)(wmi_unified_t wmi_handle);
  718. QDF_STATUS (*send_packet_power_info_get_cmd)(wmi_unified_t wmi_handle,
  719. struct packet_power_info_params *param);
  720. QDF_STATUS (*send_gpio_config_cmd)(wmi_unified_t wmi_handle,
  721. struct gpio_config_params *param);
  722. QDF_STATUS (*send_gpio_output_cmd)(wmi_unified_t wmi_handle,
  723. struct gpio_output_params *param);
  724. QDF_STATUS (*send_rtt_meas_req_test_cmd)(wmi_unified_t wmi_handle,
  725. struct rtt_meas_req_test_params *param);
  726. QDF_STATUS (*send_rtt_meas_req_cmd)(wmi_unified_t wmi_handle,
  727. struct rtt_meas_req_params *param);
  728. QDF_STATUS (*send_rtt_keepalive_req_cmd)(wmi_unified_t wmi_handle,
  729. struct rtt_keepalive_req_params *param);
  730. QDF_STATUS (*send_lci_set_cmd)(wmi_unified_t wmi_handle,
  731. struct lci_set_params *param);
  732. QDF_STATUS (*send_lcr_set_cmd)(wmi_unified_t wmi_handle,
  733. struct lcr_set_params *param);
  734. QDF_STATUS (*send_periodic_chan_stats_config_cmd)(wmi_unified_t wmi_handle,
  735. struct periodic_chan_stats_params *param);
  736. QDF_STATUS
  737. (*send_atf_peer_request_cmd)(wmi_unified_t wmi_handle,
  738. struct atf_peer_request_params *param);
  739. QDF_STATUS
  740. (*send_set_atf_grouping_cmd)(wmi_unified_t wmi_handle,
  741. struct atf_grouping_params *param);
  742. QDF_STATUS (*send_get_user_position_cmd)(wmi_unified_t wmi_handle,
  743. uint32_t value);
  744. QDF_STATUS
  745. (*send_reset_peer_mumimo_tx_count_cmd)(wmi_unified_t wmi_handle,
  746. uint32_t value);
  747. QDF_STATUS (*send_get_peer_mumimo_tx_count_cmd)(wmi_unified_t wmi_handle,
  748. uint32_t value);
  749. QDF_STATUS
  750. (*send_pdev_caldata_version_check_cmd)(wmi_unified_t wmi_handle,
  751. uint32_t value);
  752. QDF_STATUS
  753. (*send_btcoex_wlan_priority_cmd)(wmi_unified_t wmi_handle,
  754. struct btcoex_cfg_params *param);
  755. QDF_STATUS
  756. (*send_btcoex_duty_cycle_cmd)(wmi_unified_t wmi_handle,
  757. struct btcoex_cfg_params *param);
  758. QDF_STATUS
  759. (*send_coex_ver_cfg_cmd)(wmi_unified_t wmi_handle, coex_ver_cfg_t *param);
  760. QDF_STATUS (*extract_wds_addr_event)(wmi_unified_t wmi_handle,
  761. void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
  762. QDF_STATUS (*extract_dcs_interference_type)(wmi_unified_t wmi_handle,
  763. void *evt_buf, struct wmi_host_dcs_interference_param *param);
  764. QDF_STATUS (*extract_dcs_cw_int)(wmi_unified_t wmi_handle, void *evt_buf,
  765. wmi_host_ath_dcs_cw_int *cw_int);
  766. QDF_STATUS (*extract_dcs_im_tgt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  767. wmi_host_dcs_im_tgt_stats_t *wlan_stat);
  768. QDF_STATUS (*extract_fips_event_data)(wmi_unified_t wmi_handle,
  769. void *evt_buf, struct wmi_host_fips_event_param *param);
  770. QDF_STATUS (*extract_vdev_start_resp)(wmi_unified_t wmi_handle, void *evt_buf,
  771. wmi_host_vdev_start_resp *vdev_rsp);
  772. QDF_STATUS (*extract_tbttoffset_update_params)(void *wmi_hdl, void *evt_buf,
  773. uint32_t *vdev_map, uint32_t **tbttoffset_list);
  774. QDF_STATUS (*extract_mgmt_rx_params)(wmi_unified_t wmi_handle, void *evt_buf,
  775. struct mgmt_rx_event_params *hdr, uint8_t **bufp);
  776. QDF_STATUS (*extract_vdev_stopped_param)(wmi_unified_t wmi_handle,
  777. void *evt_buf, uint32_t *vdev_id);
  778. QDF_STATUS (*extract_vdev_roam_param)(wmi_unified_t wmi_handle, void *evt_buf,
  779. wmi_host_roam_event *param);
  780. QDF_STATUS (*extract_vdev_scan_ev_param)(wmi_unified_t wmi_handle,
  781. void *evt_buf, struct scan_event *param);
  782. QDF_STATUS (*extract_mu_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
  783. wmi_host_mu_report_event *param);
  784. QDF_STATUS (*extract_mu_db_entry)(wmi_unified_t wmi_hdl, void *evt_buf,
  785. uint8_t idx, wmi_host_mu_db_entry *param);
  786. QDF_STATUS (*extract_mumimo_tx_count_ev_param)(wmi_unified_t wmi_handle,
  787. void *evt_buf, wmi_host_peer_txmu_cnt_event *param);
  788. QDF_STATUS (*extract_peer_gid_userpos_list_ev_param)(wmi_unified_t wmi_handle,
  789. void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
  790. QDF_STATUS (*extract_pdev_caldata_version_check_ev_param)(
  791. wmi_unified_t wmi_handle,
  792. void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
  793. QDF_STATUS (*extract_pdev_tpc_config_ev_param)(wmi_unified_t wmi_handle,
  794. void *evt_buf, wmi_host_pdev_tpc_config_event *param);
  795. QDF_STATUS (*extract_gpio_input_ev_param)(wmi_unified_t wmi_handle,
  796. void *evt_buf, uint32_t *gpio_num);
  797. QDF_STATUS (*extract_pdev_reserve_ast_ev_param)(wmi_unified_t wmi_handle,
  798. void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param);
  799. QDF_STATUS (*extract_nfcal_power_ev_param)(wmi_unified_t wmi_handle,
  800. void *evt_buf,
  801. wmi_host_pdev_nfcal_power_all_channels_event *param);
  802. QDF_STATUS (*extract_pdev_tpc_ev_param)(wmi_unified_t wmi_handle,
  803. void *evt_buf, wmi_host_pdev_tpc_event *param);
  804. QDF_STATUS (*extract_pdev_generic_buffer_ev_param)(wmi_unified_t wmi_handle,
  805. void *evt_buf, wmi_host_pdev_generic_buffer_event *param);
  806. QDF_STATUS (*extract_mgmt_tx_compl_param)(wmi_unified_t wmi_handle,
  807. void *evt_buf, wmi_host_mgmt_tx_compl_event *param);
  808. QDF_STATUS (*extract_offchan_data_tx_compl_param)(wmi_unified_t wmi_handle,
  809. void *evt_buf,
  810. struct wmi_host_offchan_data_tx_compl_event *param);
  811. QDF_STATUS (*extract_pdev_csa_switch_count_status)(wmi_unified_t wmi_handle,
  812. void *evt_buf, struct pdev_csa_switch_count_status *param);
  813. QDF_STATUS (*extract_swba_vdev_map)(wmi_unified_t wmi_handle, void *evt_buf,
  814. uint32_t *vdev_map);
  815. QDF_STATUS (*extract_swba_tim_info)(wmi_unified_t wmi_handle, void *evt_buf,
  816. uint32_t idx, wmi_host_tim_info *tim_info);
  817. QDF_STATUS (*extract_swba_noa_info)(wmi_unified_t wmi_handle, void *evt_buf,
  818. uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
  819. #ifdef CONVERGED_P2P_ENABLE
  820. QDF_STATUS (*extract_p2p_lo_stop_ev_param)(wmi_unified_t wmi_handle,
  821. void *evt_buf, struct p2p_lo_event *param);
  822. QDF_STATUS (*extract_p2p_noa_ev_param)(wmi_unified_t wmi_handle,
  823. void *evt_buf, struct p2p_noa_info *param);
  824. #endif
  825. QDF_STATUS (*extract_peer_sta_ps_statechange_ev)(wmi_unified_t wmi_handle,
  826. void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
  827. QDF_STATUS (*extract_peer_sta_kickout_ev)(wmi_unified_t wmi_handle,
  828. void *evt_buf, wmi_host_peer_sta_kickout_event *ev);
  829. QDF_STATUS (*extract_peer_ratecode_list_ev)(wmi_unified_t wmi_handle,
  830. void *evt_buf, uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap);
  831. QDF_STATUS (*extract_comb_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  832. uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
  833. QDF_STATUS (*extract_single_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  834. uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
  835. QDF_STATUS (*extract_composite_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  836. uint16_t datalen, wmi_host_phyerr_t *phyerr);
  837. QDF_STATUS (*extract_rtt_hdr)(wmi_unified_t wmi_handle, void *evt_buf,
  838. wmi_host_rtt_event_hdr *ev);
  839. QDF_STATUS (*extract_rtt_ev)(wmi_unified_t wmi_handle, void *evt_buf,
  840. wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len);
  841. QDF_STATUS (*extract_rtt_error_report_ev)(wmi_unified_t wmi_handle,
  842. void *evt_buf, wmi_host_rtt_error_report_event *ev);
  843. QDF_STATUS (*extract_all_stats_count)(wmi_unified_t wmi_handle, void *evt_buf,
  844. wmi_host_stats_event *stats_param);
  845. QDF_STATUS (*extract_pdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  846. uint32_t index, wmi_host_pdev_stats *pdev_stats);
  847. QDF_STATUS (*extract_pdev_ext_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  848. uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats);
  849. QDF_STATUS (*extract_vdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  850. uint32_t index, wmi_host_vdev_stats *vdev_stats);
  851. QDF_STATUS (*extract_peer_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  852. uint32_t index, wmi_host_peer_stats *peer_stats);
  853. QDF_STATUS (*extract_bcnflt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  854. uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
  855. QDF_STATUS (*extract_peer_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  856. uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats);
  857. QDF_STATUS (*extract_chan_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  858. uint32_t index, wmi_host_chan_stats *chan_stats);
  859. QDF_STATUS (*extract_thermal_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  860. uint32_t *temp, uint32_t *level);
  861. QDF_STATUS (*extract_thermal_level_stats)(wmi_unified_t wmi_handle,
  862. void *evt_buf, uint8_t idx, uint32_t *levelcount,
  863. uint32_t *dccount);
  864. QDF_STATUS (*extract_profile_ctx)(wmi_unified_t wmi_handle, void *evt_buf,
  865. wmi_host_wlan_profile_ctx_t *profile_ctx);
  866. QDF_STATUS (*extract_profile_data)(wmi_unified_t wmi_handle, void *evt_buf,
  867. uint8_t idx,
  868. wmi_host_wlan_profile_t *profile_data);
  869. QDF_STATUS (*extract_chan_info_event)(wmi_unified_t wmi_handle, void *evt_buf,
  870. wmi_host_chan_info_event *chan_info);
  871. QDF_STATUS (*extract_channel_hopping_event)(wmi_unified_t wmi_handle,
  872. void *evt_buf,
  873. wmi_host_pdev_channel_hopping_event *ch_hopping);
  874. QDF_STATUS (*extract_bss_chan_info_event)(wmi_unified_t wmi_handle,
  875. void *evt_buf,
  876. wmi_host_pdev_bss_chan_info_event *bss_chan_info);
  877. QDF_STATUS (*extract_inst_rssi_stats_event)(wmi_unified_t wmi_handle,
  878. void *evt_buf, wmi_host_inst_stats_resp *inst_rssi_resp);
  879. QDF_STATUS (*extract_tx_data_traffic_ctrl_ev)(wmi_unified_t wmi_handle,
  880. void *evt_buf, wmi_host_tx_data_traffic_ctrl_event *ev);
  881. QDF_STATUS (*extract_atf_peer_stats_ev)(wmi_unified_t wmi_handle,
  882. void *evt_buf, wmi_host_atf_peer_stats_event *ev);
  883. QDF_STATUS (*extract_atf_token_info_ev)(wmi_unified_t wmi_handle,
  884. void *evt_buf,
  885. uint8_t idx,
  886. wmi_host_atf_peer_stats_info *atf_token_info);
  887. QDF_STATUS (*extract_vdev_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  888. uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
  889. QDF_STATUS (*send_power_dbg_cmd)(wmi_unified_t wmi_handle,
  890. struct wmi_power_dbg_params *param);
  891. QDF_STATUS (*send_multiple_vdev_restart_req_cmd)(wmi_unified_t wmi_handle,
  892. struct multiple_vdev_restart_params *param);
  893. QDF_STATUS (*send_adapt_dwelltime_params_cmd)(wmi_unified_t wmi_handle,
  894. struct wmi_adaptive_dwelltime_params *dwelltime_params);
  895. QDF_STATUS (*send_fw_test_cmd)(wmi_unified_t wmi_handle,
  896. struct set_fwtest_params *wmi_fwtest);
  897. QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle,
  898. struct encrypt_decrypt_req_params *params);
  899. QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle,
  900. struct sar_limit_cmd_params *params);
  901. QDF_STATUS (*send_peer_rx_reorder_queue_setup_cmd)(wmi_unified_t wmi_handle,
  902. struct rx_reorder_queue_setup_params *param);
  903. QDF_STATUS (*send_peer_rx_reorder_queue_remove_cmd)(wmi_unified_t wmi_handle,
  904. struct rx_reorder_queue_remove_params *param);
  905. QDF_STATUS (*extract_service_ready_ext)(wmi_unified_t wmi_handle,
  906. uint8_t *evt_buf,
  907. struct wlan_psoc_host_service_ext_param *param);
  908. QDF_STATUS (*extract_hw_mode_cap_service_ready_ext)(
  909. wmi_unified_t wmi_handle,
  910. uint8_t *evt_buf, uint8_t hw_mode_idx,
  911. struct wlan_psoc_host_hw_mode_caps *param);
  912. QDF_STATUS (*extract_mac_phy_cap_service_ready_ext)(
  913. wmi_unified_t wmi_handle,
  914. uint8_t *evt_buf,
  915. uint8_t hw_mode_id,
  916. uint8_t phy_id,
  917. struct wlan_psoc_host_mac_phy_caps *param);
  918. QDF_STATUS (*extract_reg_cap_service_ready_ext)(
  919. wmi_unified_t wmi_handle,
  920. uint8_t *evt_buf, uint8_t phy_idx,
  921. struct wlan_psoc_host_hal_reg_capabilities_ext *param);
  922. QDF_STATUS (*extract_pdev_utf_event)(wmi_unified_t wmi_hdl,
  923. uint8_t *evt_buf,
  924. struct wmi_host_pdev_utf_event *param);
  925. QDF_STATUS (*extract_pdev_qvit_event)(wmi_unified_t wmi_hdl,
  926. uint8_t *evt_buf,
  927. struct wmi_host_pdev_qvit_event *param);
  928. uint16_t (*wmi_set_htc_tx_tag)(wmi_unified_t wmi_handle,
  929. wmi_buf_t buf, uint32_t cmd_id);
  930. QDF_STATUS (*extract_peer_delete_response_event)(
  931. wmi_unified_t wmi_handle,
  932. void *evt_buf,
  933. struct wmi_host_peer_delete_response_event *param);
  934. bool (*is_management_record)(uint32_t cmd_id);
  935. uint8_t *(*wmi_id_to_name)(uint32_t cmd_id);
  936. QDF_STATUS (*send_dfs_phyerr_offload_en_cmd)(wmi_unified_t wmi_handle,
  937. uint32_t pdev_id);
  938. QDF_STATUS (*send_dfs_phyerr_offload_dis_cmd)(wmi_unified_t wmi_handle,
  939. uint32_t pdev_id);
  940. QDF_STATUS (*extract_reg_chan_list_update_event)(wmi_unified_t wmi_handle,
  941. uint8_t *evt_buf,
  942. struct cur_regulatory_info
  943. *reg_info,
  944. uint32_t len);
  945. };
  946. struct target_abi_version {
  947. A_UINT32 abi_version_0;
  948. /** WMI Major and Minor versions */
  949. A_UINT32 abi_version_1;
  950. /** WMI change revision */
  951. A_UINT32 abi_version_ns_0;
  952. /** ABI version namespace first four dwords */
  953. A_UINT32 abi_version_ns_1;
  954. /** ABI version namespace second four dwords */
  955. A_UINT32 abi_version_ns_2;
  956. /** ABI version namespace third four dwords */
  957. A_UINT32 abi_version_ns_3;
  958. /** ABI version namespace fourth four dwords */
  959. };
  960. /* Forward declartion for psoc*/
  961. struct wlan_objmgr_psoc;
  962. /**
  963. * struct wmi_init_cmd - Saved wmi INIT command
  964. * @buf: Buffer containing the wmi INIT command
  965. * @buf_len: Length of the buffer
  966. */
  967. struct wmi_cmd_init {
  968. wmi_buf_t buf;
  969. uint32_t buf_len;
  970. };
  971. struct wmi_unified {
  972. void *scn_handle; /* handle to device */
  973. osdev_t osdev; /* handle to use OS-independent services */
  974. qdf_atomic_t pending_cmds;
  975. HTC_ENDPOINT_ID wmi_endpoint_id;
  976. uint16_t max_msg_len;
  977. uint32_t *event_id;
  978. wmi_unified_event_handler *event_handler;
  979. enum wmi_rx_exec_ctx *ctx;
  980. void *htc_handle;
  981. qdf_spinlock_t eventq_lock;
  982. qdf_nbuf_queue_t event_queue;
  983. struct work_struct rx_event_work;
  984. int wmi_stop_in_progress;
  985. #ifdef CONFIG_MCL
  986. struct _wmi_abi_version fw_abi_version;
  987. struct _wmi_abi_version final_abi_vers;
  988. #endif
  989. struct wmi_cmd_init saved_wmi_init_cmd;
  990. uint32_t num_of_diag_events_logs;
  991. uint32_t *events_logs_list;
  992. #ifdef WLAN_OPEN_SOURCE
  993. struct fwdebug dbglog;
  994. struct dentry *debugfs_phy;
  995. #endif /* WLAN_OPEN_SOURCE */
  996. #ifdef WMI_INTERFACE_EVENT_LOGGING
  997. struct wmi_debug_log_info log_info;
  998. #endif /*WMI_INTERFACE_EVENT_LOGGING */
  999. qdf_atomic_t is_target_suspended;
  1000. #ifdef FEATURE_RUNTIME_PM
  1001. qdf_atomic_t runtime_pm_inprogress;
  1002. #endif
  1003. qdf_atomic_t is_wow_bus_suspended;
  1004. bool tag_crash_inject;
  1005. enum wmi_target_type target_type;
  1006. struct wmi_rx_ops rx_ops;
  1007. struct wmi_ops *ops;
  1008. bool use_cookie;
  1009. bool wmi_stopinprogress;
  1010. uint32_t *wmi_events;
  1011. #ifndef CONFIG_MCL
  1012. /* WMI service bitmap recieved from target */
  1013. uint32_t *wmi_service_bitmap;
  1014. uint32_t *pdev_param;
  1015. uint32_t *vdev_param;
  1016. uint32_t *services;
  1017. #endif
  1018. struct wmi_soc *soc;
  1019. };
  1020. #define WMI_MAX_RADIOS 3
  1021. struct wmi_soc {
  1022. struct wlan_objmgr_psoc *wmi_psoc;
  1023. void *scn_handle; /* handle to device */
  1024. qdf_atomic_t num_pdevs;
  1025. enum wmi_target_type target_type;
  1026. void *htc_handle;
  1027. uint32_t event_id[WMI_UNIFIED_MAX_EVENT];
  1028. wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
  1029. uint32_t max_event_idx;
  1030. enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT];
  1031. qdf_spinlock_t ctx_lock;
  1032. struct wmi_unified *wmi_pdev[WMI_MAX_RADIOS];
  1033. HTC_ENDPOINT_ID wmi_endpoint_id[WMI_MAX_RADIOS];
  1034. uint16_t max_msg_len[WMI_MAX_RADIOS];
  1035. struct wmi_ops *ops;
  1036. uint32_t wmi_events[wmi_events_max];
  1037. #ifndef CONFIG_MCL
  1038. /* WMI service bitmap recieved from target */
  1039. uint32_t wmi_service_bitmap[wmi_services_max];
  1040. uint32_t pdev_param[wmi_pdev_param_max];
  1041. uint32_t vdev_param[wmi_vdev_param_max];
  1042. uint32_t services[wmi_services_max];
  1043. #endif
  1044. };
  1045. #ifdef WMI_NON_TLV_SUPPORT
  1046. /* ONLY_NON_TLV_TARGET:TLV attach dummy function defintion for case when
  1047. * driver supports only NON-TLV target (WIN mainline) */
  1048. #define wmi_tlv_attach(x) qdf_print("TLV Unavailable\n")
  1049. #else
  1050. void wmi_tlv_attach(wmi_unified_t wmi_handle);
  1051. #endif
  1052. void wmi_non_tlv_attach(wmi_unified_t wmi_handle);
  1053. /**
  1054. * wmi_align() - provides word aligned parameter
  1055. * @param: parameter to be aligned
  1056. *
  1057. * Return: word aligned parameter
  1058. */
  1059. static inline uint32_t wmi_align(uint32_t param)
  1060. {
  1061. return roundup(param, sizeof(uint32_t));
  1062. }
  1063. #endif