wmi_unified_11be_setup_api.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #include "wmi_unified_priv.h"
  17. #ifdef WLAN_MLO_MULTI_CHIP
  18. #include "wmi_unified_11be_setup_api.h"
  19. #endif
  20. #include "wmi_unified_11be_tlv.h"
  21. /**
  22. * wmi_mlo_setup_cmd_send() - Send MLO setup command
  23. * @wmi_handle: WMI handle for this pdev
  24. * @params: MLO setup params
  25. *
  26. * Return: QDF_STATUS code
  27. */
  28. QDF_STATUS wmi_mlo_setup_cmd_send(wmi_unified_t wmi_handle,
  29. struct wmi_mlo_setup_params *params)
  30. {
  31. if (wmi_handle->ops->mlo_setup_cmd_send)
  32. return wmi_handle->ops->mlo_setup_cmd_send(
  33. wmi_handle, params);
  34. return QDF_STATUS_E_FAILURE;
  35. }
  36. /**
  37. * wmi_mlo_teardown_cmd_send() - Send MLO teardown command
  38. * @wmi_handle: WMI handle for this pdev
  39. * @params: MLO teardown params
  40. *
  41. * Return: QDF_STATUS code
  42. */
  43. QDF_STATUS wmi_mlo_teardown_cmd_send(wmi_unified_t wmi_handle,
  44. struct wmi_mlo_teardown_params *params)
  45. {
  46. if (wmi_handle->ops->mlo_teardown_cmd_send)
  47. return wmi_handle->ops->mlo_teardown_cmd_send(
  48. wmi_handle, params);
  49. return QDF_STATUS_E_FAILURE;
  50. }
  51. /**
  52. * wmi_mlo_ready_cmd_send() - Send MLO ready command
  53. * @wmi_handle: WMI handle for this pdev
  54. * @params: MLO ready params
  55. *
  56. * Return: QDF_STATUS code
  57. */
  58. QDF_STATUS wmi_mlo_ready_cmd_send(wmi_unified_t wmi_handle,
  59. struct wmi_mlo_ready_params *params)
  60. {
  61. if (wmi_handle->ops->mlo_ready_cmd_send)
  62. return wmi_handle->ops->mlo_ready_cmd_send(
  63. wmi_handle, params);
  64. return QDF_STATUS_E_FAILURE;
  65. }
  66. /**
  67. * wmi_extract_mlo_setup_cmpl_event() - Extract MLO setup completion event
  68. * @wmi_handle: WMI handle for this pdev
  69. * @buf: Event buffer
  70. * @params: MLO setup event params
  71. *
  72. * Return: QDF_STATUS code
  73. */
  74. QDF_STATUS
  75. wmi_extract_mlo_setup_cmpl_event(wmi_unified_t wmi_handle,
  76. uint8_t *buf,
  77. struct wmi_mlo_setup_complete_params *params)
  78. {
  79. if (wmi_handle->ops->extract_mlo_setup_cmpl_event)
  80. return wmi_handle->ops->extract_mlo_setup_cmpl_event(
  81. wmi_handle, buf, params);
  82. return QDF_STATUS_E_FAILURE;
  83. }
  84. /**
  85. * wmi_extract_mlo_teardown_cmpl_event() - Extract MLO teardown completion
  86. * @wmi_handle: WMI handle for this pdev
  87. * @buf: Event buffer
  88. * @param: MLO teardown event params
  89. *
  90. * Return: QDF_STATUS code
  91. */
  92. QDF_STATUS
  93. wmi_extract_mlo_teardown_cmpl_event(wmi_unified_t wmi_handle,
  94. uint8_t *buf,
  95. struct wmi_mlo_teardown_cmpl_params *param)
  96. {
  97. if (wmi_handle->ops->extract_mlo_teardown_cmpl_event)
  98. return wmi_handle->ops->extract_mlo_teardown_cmpl_event(
  99. wmi_handle, buf, param);
  100. return QDF_STATUS_E_FAILURE;
  101. }