wmi_unified_reg_api.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. #endif
  55. /*
  56. * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan
  57. * @wmi_handle: wmi handle
  58. * @stop_11d_scan: pointer to 11d scan stop req.
  59. *
  60. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  61. */
  62. QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle,
  63. struct reg_stop_11d_scan_req *stop_11d_scan);
  64. /*
  65. * wmi_unified_send_start_11d_scan_cmd() - start 11d scan
  66. * @wmi_handle: wmi handle
  67. * @start_11d_scan: pointer to 11d scan start req.
  68. *
  69. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  70. */
  71. QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle,
  72. struct reg_start_11d_scan_req *start_11d_scan);
  73. /**
  74. * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country
  75. * @wmi_handle: wmi handle
  76. * @evt_buf: event buffer
  77. * @reg_11d_new_cc: pointer to new 11d country info
  78. * @len: length of buffer
  79. *
  80. * Return: 0 for success or error code
  81. */
  82. QDF_STATUS wmi_extract_reg_11d_new_cc_event(
  83. wmi_unified_t wmi_handle,
  84. uint8_t *evt_buf,
  85. struct reg_11d_new_country *reg_11d_new_cc,
  86. uint32_t len);
  87. /**
  88. * wmi_unified_set_user_country_code_cmd_send() - WMI set country function
  89. * @wmi_handle: wmi handle.
  90. * @pdev_id: Pdev id
  91. * @rd: User country code or regdomain
  92. *
  93. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  94. */
  95. QDF_STATUS wmi_unified_set_user_country_code_cmd_send(
  96. wmi_unified_t wmi_handle,
  97. uint8_t pdev_id, struct cc_regdmn_s *rd);
  98. /**
  99. * wmi_extract_reg_ch_avoid_event() - process freq avoid event
  100. * @wmi_handle: wmi handle.
  101. * @evt_buf: event buffer
  102. * @ch_avoid_ind: buffer pointer to save the event processed data
  103. * @len: length of buffer
  104. *
  105. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  106. */
  107. QDF_STATUS wmi_extract_reg_ch_avoid_event(
  108. wmi_unified_t wmi_handle,
  109. uint8_t *evt_buf,
  110. struct ch_avoid_ind_type *ch_avoid_ind,
  111. uint32_t len);
  112. #endif /* _WMI_UNIFIED_REG_API_H_ */