wmi_unified_dfs_api.h 3.8 KB

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