wmi_unified_reg_api.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright (c) 2017-2019 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. * reg_chan_list_update_handler() - 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: 0 for success or error code
  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. /*
  40. * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan
  41. * @wmi_handle: wmi handle
  42. * @stop_11d_scan: pointer to 11d scan stop req.
  43. *
  44. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  45. */
  46. QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle,
  47. struct reg_stop_11d_scan_req *stop_11d_scan);
  48. /*
  49. * wmi_unified_send_start_11d_scan_cmd() - start 11d scan
  50. * @wmi_handle: wmi handle
  51. * @start_11d_scan: pointer to 11d scan start req.
  52. *
  53. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  54. */
  55. QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle,
  56. struct reg_start_11d_scan_req *start_11d_scan);
  57. /**
  58. * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country
  59. * @wmi_handle: wmi handle
  60. * @evt_buf: event buffer
  61. * @reg_11d_new_cc: pointer to new 11d country info
  62. * @len: length of buffer
  63. *
  64. * Return: 0 for success or error code
  65. */
  66. QDF_STATUS wmi_extract_reg_11d_new_cc_event(
  67. wmi_unified_t wmi_handle,
  68. uint8_t *evt_buf,
  69. struct reg_11d_new_country *reg_11d_new_cc,
  70. uint32_t len);
  71. /**
  72. * wmi_unified_set_user_country_code_cmd_send() - WMI set country function
  73. * @wmi_handle: wmi handle.
  74. * @pdev_id: Pdev id
  75. * @rd: User country code or regdomain
  76. *
  77. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  78. */
  79. QDF_STATUS wmi_unified_set_user_country_code_cmd_send(
  80. wmi_unified_t wmi_handle,
  81. uint8_t pdev_id, struct cc_regdmn_s *rd);
  82. /**
  83. * wmi_extract_reg_ch_avoid_event() - process freq avoid event
  84. * @wmi_handle: wmi handle.
  85. * @evt_buf: event buffer
  86. * @ch_avoid_ind: buffer pointer to save the event processed data
  87. * @len: length of buffer
  88. *
  89. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  90. */
  91. QDF_STATUS wmi_extract_reg_ch_avoid_event(
  92. wmi_unified_t wmi_handle,
  93. uint8_t *evt_buf,
  94. struct ch_avoid_ind_type *ch_avoid_ind,
  95. uint32_t len);
  96. #endif /* _WMI_UNIFIED_REG_API_H_ */