wmi_unified_reg_api.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /*
  2. * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: This file contains the API definitions for the Unified Wireless Module
  21. * Interface (WMI) which are specific to Regulatory module.
  22. */
  23. #ifndef _WMI_UNIFIED_REG_API_H_
  24. #define _WMI_UNIFIED_REG_API_H_
  25. #include "reg_services_public_struct.h"
  26. /**
  27. * wmi_extract_reg_chan_list_update_event() - function to update channel list
  28. * @wmi_handle: wmi handle
  29. * @evt_buf: event buffer
  30. * @reg_info: regulatory info
  31. * @len: length of buffer
  32. *
  33. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  34. */
  35. QDF_STATUS wmi_extract_reg_chan_list_update_event(
  36. wmi_unified_t wmi_handle,
  37. uint8_t *evt_buf,
  38. struct cur_regulatory_info *reg_info,
  39. uint32_t len);
  40. #ifdef CONFIG_BAND_6GHZ
  41. /**
  42. * wmi_extract_reg_chan_list_ext_update_event() - function to update the
  43. * extended channel list
  44. * @wmi_handle: wmi handle
  45. * @evt_buf: event buffer
  46. * @reg_info: regulatory info
  47. * @len: length of buffer
  48. *
  49. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  50. */
  51. QDF_STATUS wmi_extract_reg_chan_list_ext_update_event(wmi_unified_t wmi_handle,
  52. uint8_t *evt_buf,
  53. struct cur_regulatory_info *reg_info,
  54. uint32_t len);
  55. #ifdef CONFIG_AFC_SUPPORT
  56. /**
  57. * wmi_extract_afc_event() - function to read the contents of the AFC event
  58. * @wmi_handle: wmi handle
  59. * @evt_buf: event buffer
  60. * @afc_info: AFC regulatory info
  61. * @len: length of buffer
  62. *
  63. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  64. */
  65. QDF_STATUS wmi_extract_afc_event(wmi_unified_t wmi_handle,
  66. uint8_t *evt_buf,
  67. struct afc_regulatory_info *afc_info,
  68. uint32_t len);
  69. #endif
  70. #endif
  71. /*
  72. * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan
  73. * @wmi_handle: wmi handle
  74. * @stop_11d_scan: pointer to 11d scan stop req.
  75. *
  76. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  77. */
  78. QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle,
  79. struct reg_stop_11d_scan_req *stop_11d_scan);
  80. /*
  81. * wmi_unified_send_start_11d_scan_cmd() - start 11d scan
  82. * @wmi_handle: wmi handle
  83. * @start_11d_scan: pointer to 11d scan start req.
  84. *
  85. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  86. */
  87. QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle,
  88. struct reg_start_11d_scan_req *start_11d_scan);
  89. /**
  90. * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country
  91. * @wmi_handle: wmi handle
  92. * @evt_buf: event buffer
  93. * @reg_11d_new_cc: pointer to new 11d country info
  94. * @len: length of buffer
  95. *
  96. * Return: 0 for success or error code
  97. */
  98. QDF_STATUS wmi_extract_reg_11d_new_cc_event(
  99. wmi_unified_t wmi_handle,
  100. uint8_t *evt_buf,
  101. struct reg_11d_new_country *reg_11d_new_cc,
  102. uint32_t len);
  103. /**
  104. * wmi_unified_set_user_country_code_cmd_send() - WMI set country function
  105. * @wmi_handle: wmi handle.
  106. * @pdev_id: Pdev id
  107. * @rd: User country code or regdomain
  108. *
  109. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  110. */
  111. QDF_STATUS wmi_unified_set_user_country_code_cmd_send(
  112. wmi_unified_t wmi_handle,
  113. uint8_t pdev_id, struct cc_regdmn_s *rd);
  114. /**
  115. * wmi_extract_reg_ch_avoid_event() - process freq avoid event
  116. * @wmi_handle: wmi handle.
  117. * @evt_buf: event buffer
  118. * @ch_avoid_ind: buffer pointer to save the event processed data
  119. * @len: length of buffer
  120. *
  121. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  122. */
  123. QDF_STATUS wmi_extract_reg_ch_avoid_event(
  124. wmi_unified_t wmi_handle,
  125. uint8_t *evt_buf,
  126. struct ch_avoid_ind_type *ch_avoid_ind,
  127. uint32_t len);
  128. /**
  129. * wmi_extract_tgtr2p_table_event() - function to read the contents of the
  130. * rate2power update response event
  131. * @wmi_handle: wmi handle
  132. * @evt_buf: event buffer
  133. * @update_status: Status object
  134. * @len: length of buffer
  135. *
  136. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on error
  137. */
  138. QDF_STATUS wmi_extract_tgtr2p_table_event(wmi_unified_t wmi_handle,
  139. uint8_t *evt_buf,
  140. struct r2p_table_update_status_obj *update_status,
  141. uint32_t len);
  142. #endif /* _WMI_UNIFIED_REG_API_H_ */