wmi_unified_priv.h 43 KB

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