wmi_unified_dfs_api.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 <qdf_module.h>
  24. #include <wmi_unified_api.h>
  25. #include <wmi_unified_priv.h>
  26. #include <wlan_dfs_utils_api.h>
  27. #include <wmi_unified_dfs_api.h>
  28. QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl,
  29. uint8_t *evt_buf,
  30. uint32_t *vdev_id,
  31. uint32_t len)
  32. {
  33. struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
  34. if (wmi_handle && wmi_handle->ops->extract_dfs_cac_complete_event)
  35. return wmi_handle->ops->extract_dfs_cac_complete_event(
  36. wmi_handle, evt_buf, vdev_id, len);
  37. return QDF_STATUS_E_FAILURE;
  38. }
  39. qdf_export_symbol(wmi_extract_dfs_cac_complete_event);
  40. QDF_STATUS wmi_extract_dfs_radar_detection_event(void *wmi_hdl,
  41. uint8_t *evt_buf,
  42. struct radar_found_info *radar_found,
  43. uint32_t len)
  44. {
  45. struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
  46. if (wmi_handle && wmi_handle->ops->extract_dfs_radar_detection_event)
  47. return wmi_handle->ops->extract_dfs_radar_detection_event(
  48. wmi_handle, evt_buf, radar_found, len);
  49. return QDF_STATUS_E_FAILURE;
  50. }
  51. #ifdef QCA_MCL_DFS_SUPPORT
  52. QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl,
  53. uint8_t *evt_buf,
  54. struct radar_event_info *wlan_radar_event,
  55. uint32_t len)
  56. {
  57. struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
  58. if (wmi_handle->ops->extract_wlan_radar_event_info)
  59. return wmi_handle->ops->extract_wlan_radar_event_info(
  60. wmi_handle, evt_buf, wlan_radar_event, len);
  61. return QDF_STATUS_E_FAILURE;
  62. }
  63. qdf_export_symbol(wmi_extract_dfs_radar_detection_event);
  64. #endif