wmi_unified_dfs_api.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*
  2. * Copyright (c) 2017-2019, 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 DFS module.
  22. */
  23. #ifndef _WMI_UNIFIED_DFS_API_H_
  24. #define _WMI_UNIFIED_DFS_API_H_
  25. #include <wlan_objmgr_vdev_obj.h>
  26. #include <wlan_dfs_utils_api.h>
  27. /**
  28. * wmi_extract_dfs_cac_complete_event() - function to handle cac complete event
  29. * @wmi_handle: wmi handle
  30. * @evt_buf: event buffer
  31. * @vdev_id: vdev id
  32. * @len: length of buffer
  33. *
  34. * Return: 0 for success or error code
  35. */
  36. QDF_STATUS wmi_extract_dfs_cac_complete_event(
  37. wmi_unified_t wmi_handle,
  38. uint8_t *evt_buf,
  39. uint32_t *vdev_id,
  40. uint32_t len);
  41. /**
  42. * wmi_extract_dfs_ocac_complete_event() - function to handle off channel
  43. * CAC complete event
  44. * @wmi_handle: wmi handle
  45. * @evt_buf: event buffer
  46. * @param: off channel cac complete params
  47. *
  48. * Return: 0 for success or error code
  49. */
  50. QDF_STATUS
  51. wmi_extract_dfs_ocac_complete_event(wmi_unified_t wmi_handle, uint8_t *evt_buf,
  52. struct vdev_adfs_complete_status *param);
  53. /**
  54. * wmi_extract_dfs_radar_detection_event() - function to handle radar event
  55. * @wmi_handle: wmi handle
  56. * @evt_buf: event buffer
  57. * @radar_found: radar found event info
  58. * @len: length of buffer
  59. *
  60. * Return: 0 for success or error code
  61. */
  62. QDF_STATUS wmi_extract_dfs_radar_detection_event(
  63. wmi_unified_t wmi_handle,
  64. uint8_t *evt_buf,
  65. struct radar_found_info *radar_found,
  66. uint32_t len);
  67. #ifdef MOBILE_DFS_SUPPORT
  68. /**
  69. * wmi_extract_wlan_radar_event_info() - function to handle radar pulse event.
  70. * @wmi_handle: wmi handle
  71. * @evt_buf: event buffer
  72. * @wlan_radar_event: pointer to radar event info structure
  73. * @len: length of buffer
  74. *
  75. * Return: QDF_STATUS
  76. */
  77. QDF_STATUS wmi_extract_wlan_radar_event_info(
  78. wmi_unified_t wmi_handle,
  79. uint8_t *evt_buf,
  80. struct radar_event_info *wlan_radar_event,
  81. uint32_t len);
  82. #endif
  83. #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
  84. /**
  85. * wmi_send_usenol_pdev_param() - function to send usenol pdev param.
  86. * @wmi_handle: wmi handle
  87. * @usenol: value of usenol
  88. * @pdev: pointer to objmgr_pdev structure
  89. *
  90. * Return: QDF_STATUS
  91. */
  92. QDF_STATUS wmi_send_usenol_pdev_param(wmi_unified_t wmi_handle, bool usenol,
  93. struct wlan_objmgr_pdev *pdev);
  94. /**
  95. * wmi_send_subchan_marking_pdev_param() - Function to send subchannel
  96. * marking pdev param.
  97. * @wmi_handle: WMI handle.
  98. * @subchanmark: Value of use subchannel marking.
  99. * @pdev: Pointer to objmgr_pdev structure.
  100. *
  101. * Return: QDF_STATUS
  102. */
  103. QDF_STATUS
  104. wmi_send_subchan_marking_pdev_param(wmi_unified_t wmi_handle,
  105. bool subchanmark,
  106. struct wlan_objmgr_pdev *pdev);
  107. #else
  108. static inline QDF_STATUS
  109. wmi_send_usenol_pdev_param(wmi_unified_t wmi_hdl, bool usenol,
  110. struct wlan_objmgr_pdev *pdev)
  111. {
  112. return QDF_STATUS_SUCCESS;
  113. }
  114. static inline QDF_STATUS
  115. wmi_send_subchan_marking_pdev_param(wmi_unified_t wmi_handle,
  116. bool subchanmark,
  117. struct wlan_objmgr_pdev *pdev)
  118. {
  119. return QDF_STATUS_SUCCESS;
  120. }
  121. #endif
  122. #endif /* _WMI_UNIFIED_DFS_API_H_ */