wmi_unified_ap_api.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. /*
  2. * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * This file contains the API definitions for the generic AP WMIs
  20. */
  21. #ifndef _WMI_UNIFIED_AP_API_H_
  22. #define _WMI_UNIFIED_AP_API_H_
  23. #include "wmi_unified_param.h"
  24. QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
  25. struct beacon_params *param);
  26. QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
  27. uint32_t param);
  28. QDF_STATUS wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl,
  29. uint32_t value);
  30. QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
  31. struct ht_ie_params *param);
  32. QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
  33. struct vht_ie_params *param);
  34. QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
  35. struct ctl_table_params *param);
  36. QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
  37. struct mimogain_table_params *param);
  38. QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
  39. struct peer_add_wds_entry_params *param);
  40. QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
  41. struct peer_del_wds_entry_params *param);
  42. QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
  43. struct peer_update_wds_entry_params *param);
  44. QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
  45. uint8_t macaddr[IEEE80211_ADDR_LEN],
  46. struct set_neighbour_rx_params *param);
  47. QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
  48. struct config_ratemask_params *param);
  49. QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
  50. struct set_quiet_mode_params *param);
  51. QDF_STATUS wmi_unified_set_bcn_offload_quiet_mode_cmd_send(void *wmi_hdl,
  52. struct set_bcn_offload_quiet_mode_params *param);
  53. QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl,
  54. uint8_t mac_id);
  55. QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
  56. struct packet_power_info_params *param);
  57. QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl,
  58. void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
  59. QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
  60. void *evt_buf, struct wmi_host_dcs_interference_param *param);
  61. QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
  62. wmi_host_ath_dcs_cw_int *cw_int);
  63. QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
  64. wmi_host_dcs_im_tgt_stats_t *wlan_stat);
  65. QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
  66. uint8_t idx, struct tbttoffset_params *tbtt_param);
  67. QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
  68. void *evt_buf, uint8_t idx,
  69. struct tbttoffset_params *tbtt_param);
  70. QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
  71. uint32_t *num_vdevs);
  72. QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
  73. uint32_t *num_vdevs);
  74. QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
  75. void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
  76. QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
  77. wmi_host_pdev_tpc_config_event *param);
  78. QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
  79. wmi_host_pdev_nfcal_power_all_channels_event *param);
  80. QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
  81. wmi_host_pdev_tpc_event *param);
  82. QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
  83. struct wmi_host_offchan_data_tx_compl_event *param);
  84. QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
  85. void *evt_buf,
  86. struct pdev_csa_switch_count_status *param);
  87. QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
  88. uint32_t *num_vdevs);
  89. QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
  90. uint32_t idx, wmi_host_tim_info *tim_info);
  91. QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
  92. uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
  93. QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl,
  94. void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
  95. QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
  96. wmi_host_peer_sta_kickout_event *ev);
  97. QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
  98. wmi_host_inst_stats_resp *inst_rssi_resp);
  99. QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
  100. struct multiple_vdev_restart_params *param);
  101. QDF_STATUS wmi_extract_peer_delete_response_event(void *wmi_hdl,
  102. uint8_t *evt_buf,
  103. struct wmi_host_peer_delete_response_event *param);
  104. /**
  105. * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw
  106. * @wmi_hdl: wmi handle
  107. * @bcn_ctrl_param: pointer to bcn_offload_control param
  108. *
  109. * Return: QDF_STATUS_SUCCESS for success or error code
  110. */
  111. QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
  112. struct bcn_offload_control *bcn_ctrl_param);
  113. #ifdef WLAN_SUPPORT_FILS
  114. /**
  115. * wmi_unified_fils_vdev_config_send_cmd() - send FILS config cmd to fw
  116. * @wmi_hdl: wmi handle
  117. * @param: fils config params
  118. *
  119. * Return: QDF_STATUS_SUCCESS for success or error code
  120. */
  121. QDF_STATUS
  122. wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl,
  123. struct config_fils_params *param);
  124. /**
  125. * wmi_extract_swfda_vdev_id() - api to extract vdev id
  126. * @wmi_hdl: wmi handle
  127. * @evt_buf: pointer to event buffer
  128. * @vdev_id: pointer to vdev id
  129. *
  130. * Return: QDF_STATUS_SUCCESS for success or error code
  131. */
  132. QDF_STATUS wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf,
  133. uint32_t *vdev_id);
  134. /**
  135. * wmi_unified_fils_discovery_send_cmd() - send FILS discovery cmd to fw
  136. * @wmi_hdl: wmi handle
  137. * @param: fils discovery params
  138. *
  139. * Return: QDF_STATUS_SUCCESS for success or error code
  140. */
  141. QDF_STATUS wmi_unified_fils_discovery_send_cmd(void *wmi_hdl,
  142. struct fd_params *param);
  143. #endif /* WLAN_SUPPORT_FILS */
  144. QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
  145. uint8_t macaddr[IEEE80211_ADDR_LEN],
  146. struct set_qboost_params *param);
  147. QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
  148. struct gpio_config_params *param);
  149. QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
  150. struct gpio_output_params *param);
  151. QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
  152. struct mcast_group_update_params *param);
  153. QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
  154. struct pdev_qvit_params *param);
  155. QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
  156. struct wmm_update_params *param);
  157. QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
  158. wmi_host_vdev_start_resp *vdev_rsp);
  159. /**
  160. * wmi_extract_vdev_delete_resp - api to extract vdev delete
  161. * response event params
  162. * @wmi_handle: wma handle
  163. * @evt_buf: pointer to event buffer
  164. * @delele_rsp: pointer to hold delete response from firmware
  165. *
  166. * Return: QDF_STATUS_SUCCESS for successful event parse
  167. * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
  168. */
  169. QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
  170. struct wmi_host_vdev_delete_resp *delele_rsp);
  171. QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
  172. uint32_t *vdev_id);
  173. QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
  174. wmi_host_mgmt_tx_compl_event *param);
  175. QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
  176. wmi_host_chan_info_event *chan_info);
  177. QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
  178. wmi_host_pdev_channel_hopping_event *ch_hopping);
  179. QDF_STATUS wmi_unified_peer_chan_width_switch_cmd_send(void *wmi_hdl,
  180. struct peer_chan_width_switch_params *param);
  181. /**
  182. * wmi_unified_peer_del_all_wds_entries_cmd_send() - send delete
  183. * all wds entries cmd to fw
  184. * @wmi_hdl: wmi handle
  185. * @param: delete all wds entries params
  186. *
  187. * Return: QDF_STATUS_SUCCESS for success or error code
  188. */
  189. QDF_STATUS wmi_unified_peer_del_all_wds_entries_cmd_send(void *wmi_hdl,
  190. struct peer_del_all_wds_entries_params *param);
  191. #endif /* _WMI_UNIFIED_AP_API_H_ */