wmi_unified_concurrency_api.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2013-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: Implement API's specific to concurrency component.
  20. */
  21. #include <wmi_unified_priv.h>
  22. #include <wmi_unified_concurrency_api.h>
  23. QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
  24. void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
  25. uint32_t pdev_id)
  26. {
  27. wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
  28. if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
  29. return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
  30. mcc_adaptive_scheduler, pdev_id);
  31. return QDF_STATUS_E_FAILURE;
  32. }
  33. QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
  34. uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
  35. {
  36. wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
  37. if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
  38. return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
  39. mcc_channel_freq,
  40. mcc_channel_time_latency);
  41. return QDF_STATUS_E_FAILURE;
  42. }
  43. QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
  44. uint32_t adapter_1_chan_freq,
  45. uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
  46. {
  47. wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
  48. if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
  49. return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
  50. adapter_1_chan_freq,
  51. adapter_1_quota,
  52. adapter_2_chan_freq);
  53. return QDF_STATUS_E_FAILURE;
  54. }