wmi_unified_dfs_api.c 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  3. *
  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: Implement API's specific to DFS component.
  21. */
  22. #include <qdf_status.h>
  23. #include <wmi_unified_api.h>
  24. #include <wmi_unified_priv.h>
  25. #include <wlan_dfs_utils_api.h>
  26. #include <wmi_unified_dfs_api.h>
  27. QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl,
  28. uint8_t *evt_buf,
  29. uint32_t *vdev_id,
  30. uint32_t len)
  31. {
  32. struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
  33. if (wmi_handle->ops->extract_dfs_cac_complete_event)
  34. return wmi_handle->ops->extract_dfs_cac_complete_event(
  35. wmi_handle, evt_buf, vdev_id, len);
  36. return QDF_STATUS_E_FAILURE;
  37. }
  38. EXPORT_SYMBOL(wmi_extract_dfs_cac_complete_event);
  39. QDF_STATUS wmi_extract_dfs_radar_detection_event(void *wmi_hdl,
  40. uint8_t *evt_buf,
  41. struct radar_found_info *radar_found,
  42. uint32_t len)
  43. {
  44. struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
  45. if (wmi_handle->ops->extract_dfs_radar_detection_event)
  46. return wmi_handle->ops->extract_dfs_radar_detection_event(
  47. wmi_handle, evt_buf, radar_found, len);
  48. return QDF_STATUS_E_FAILURE;
  49. }
  50. #ifdef QCA_MCL_DFS_SUPPORT
  51. QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl,
  52. uint8_t *evt_buf,
  53. struct radar_event_info *wlan_radar_event,
  54. uint32_t len)
  55. {
  56. struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
  57. if (wmi_handle->ops->extract_wlan_radar_event_info)
  58. return wmi_handle->ops->extract_wlan_radar_event_info(
  59. wmi_handle, evt_buf, wlan_radar_event, len);
  60. return QDF_STATUS_E_FAILURE;
  61. }
  62. #endif
  63. EXPORT_SYMBOL(wmi_extract_dfs_radar_detection_event);