wmi_unified_dfs_api.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Copyright (c) 2017-2018 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_dfs_utils_api.h>
  25. /**
  26. * wmi_extract_dfs_cac_complete_event() - function to handle cac complete event
  27. * @handle: wma handle
  28. * @event_buf: event buffer
  29. * @vdev_id: vdev id
  30. * @len: length of buffer
  31. *
  32. * Return: 0 for success or error code
  33. */
  34. QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl,
  35. uint8_t *evt_buf,
  36. uint32_t *vdev_id,
  37. uint32_t len);
  38. /**
  39. * wmi_extract_dfs_radar_detection_event() - function to handle radar event
  40. * @handle: wma handle
  41. * @event_buf: event buffer
  42. * @radar_found: radar found event info
  43. * @vdev_id: vdev id
  44. * @len: length of buffer
  45. *
  46. * Return: 0 for success or error code
  47. */
  48. QDF_STATUS wmi_extract_dfs_radar_detection_event(void *wmi_hdl,
  49. uint8_t *evt_buf,
  50. struct radar_found_info *radar_found,
  51. uint32_t len);
  52. #ifdef QCA_MCL_DFS_SUPPORT
  53. /**
  54. * wmi_extract_wlan_radar_event_info() - function to handle radar pulse event.
  55. * @wmi_hdl: wmi handle
  56. * @evt_buf: event buffer
  57. * @wlan_radar_event: pointer to radar event info structure
  58. * @len: length of buffer
  59. *
  60. * Return: QDF_STATUS
  61. */
  62. QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl,
  63. uint8_t *evt_buf,
  64. struct radar_event_info *wlan_radar_event,
  65. uint32_t len);
  66. #endif
  67. /**
  68. * wmi_send_usenol_pdev_param() - function to send usenol pdev param.
  69. * @wmi_hdl: wmi handle
  70. * @usenol: value of usenol
  71. * @pdev: pointer to objmgr_pdev structure
  72. *
  73. * Return: QDF_STATUS
  74. */
  75. #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
  76. QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol,
  77. struct wlan_objmgr_pdev *pdev);
  78. #else
  79. static inline QDF_STATUS
  80. wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol,
  81. struct wlan_objmgr_pdev *pdev)
  82. {
  83. return QDF_STATUS_SUCCESS;
  84. }
  85. #endif
  86. #endif /* _WMI_UNIFIED_DFS_API_H_ */