wmi_unified_reg_api.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*
  2. * Copyright (c) 2017-2021 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. * DOC: This file contains the API definitions for the Unified Wireless Module
  20. * Interface (WMI) which are specific to Regulatory module.
  21. */
  22. #ifndef _WMI_UNIFIED_REG_API_H_
  23. #define _WMI_UNIFIED_REG_API_H_
  24. #include "reg_services_public_struct.h"
  25. /**
  26. * wmi_extract_reg_chan_list_update_event() - function to update channel list
  27. * @wmi_handle: wmi handle
  28. * @event_buf: event buffer
  29. * @reg_info: regulatory info
  30. * @len: length of buffer
  31. *
  32. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  33. */
  34. QDF_STATUS wmi_extract_reg_chan_list_update_event(
  35. wmi_unified_t wmi_handle,
  36. uint8_t *evt_buf,
  37. struct cur_regulatory_info *reg_info,
  38. uint32_t len);
  39. #ifdef CONFIG_BAND_6GHZ
  40. /**
  41. * wmi_extract_reg_chan_list_ext_update_event() - function to update the
  42. * extended channel list
  43. * @wmi_handle: wmi handle
  44. * @evt_buf: event buffer
  45. * @reg_info: regulatory info
  46. * @len: length of buffer
  47. *
  48. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  49. */
  50. QDF_STATUS wmi_extract_reg_chan_list_ext_update_event(wmi_unified_t wmi_handle,
  51. uint8_t *evt_buf,
  52. struct cur_regulatory_info *reg_info,
  53. uint32_t len);
  54. #ifdef CONFIG_AFC_SUPPORT
  55. /**
  56. * wmi_extract_afc_event() - function to read the contents of the AFC event
  57. * @wmi_handle: wmi handle
  58. * @evt_buf: event buffer
  59. * @afc_info: AFC regulatory info
  60. * @len: length of buffer
  61. *
  62. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  63. */
  64. QDF_STATUS wmi_extract_afc_event(wmi_unified_t wmi_handle,
  65. uint8_t *evt_buf,
  66. struct afc_regulatory_info *afc_info,
  67. uint32_t len);
  68. #endif
  69. #endif
  70. /*
  71. * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan
  72. * @wmi_handle: wmi handle
  73. * @stop_11d_scan: pointer to 11d scan stop req.
  74. *
  75. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  76. */
  77. QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle,
  78. struct reg_stop_11d_scan_req *stop_11d_scan);
  79. /*
  80. * wmi_unified_send_start_11d_scan_cmd() - start 11d scan
  81. * @wmi_handle: wmi handle
  82. * @start_11d_scan: pointer to 11d scan start req.
  83. *
  84. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  85. */
  86. QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle,
  87. struct reg_start_11d_scan_req *start_11d_scan);
  88. /**
  89. * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country
  90. * @wmi_handle: wmi handle
  91. * @evt_buf: event buffer
  92. * @reg_11d_new_cc: pointer to new 11d country info
  93. * @len: length of buffer
  94. *
  95. * Return: 0 for success or error code
  96. */
  97. QDF_STATUS wmi_extract_reg_11d_new_cc_event(
  98. wmi_unified_t wmi_handle,
  99. uint8_t *evt_buf,
  100. struct reg_11d_new_country *reg_11d_new_cc,
  101. uint32_t len);
  102. /**
  103. * wmi_unified_set_user_country_code_cmd_send() - WMI set country function
  104. * @wmi_handle: wmi handle.
  105. * @pdev_id: Pdev id
  106. * @rd: User country code or regdomain
  107. *
  108. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  109. */
  110. QDF_STATUS wmi_unified_set_user_country_code_cmd_send(
  111. wmi_unified_t wmi_handle,
  112. uint8_t pdev_id, struct cc_regdmn_s *rd);
  113. /**
  114. * wmi_extract_reg_ch_avoid_event() - process freq avoid event
  115. * @wmi_handle: wmi handle.
  116. * @evt_buf: event buffer
  117. * @ch_avoid_ind: buffer pointer to save the event processed data
  118. * @len: length of buffer
  119. *
  120. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  121. */
  122. QDF_STATUS wmi_extract_reg_ch_avoid_event(
  123. wmi_unified_t wmi_handle,
  124. uint8_t *evt_buf,
  125. struct ch_avoid_ind_type *ch_avoid_ind,
  126. uint32_t len);
  127. #endif /* _WMI_UNIFIED_REG_API_H_ */