target_if_twt.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: target_if_twt.h
  20. */
  21. #ifndef _TARGET_IF_TWT_H_
  22. #define _TARGET_IF_TWT_H_
  23. #include <wmi_unified_param.h>
  24. #include <wlan_lmac_if_def.h>
  25. #include <target_if.h>
  26. #include <wlan_twt_public_structs.h>
  27. #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
  28. /**
  29. * target_if_twt_set_twt_ack_support() - set ack support
  30. * @psoc: psoc handle
  31. * @val: value
  32. *
  33. * return: QDF_STATUS
  34. */
  35. QDF_STATUS
  36. target_if_twt_set_twt_ack_support(struct wlan_objmgr_psoc *psoc,
  37. bool val);
  38. /**
  39. * target_if_twt_fill_tgt_caps() - fill twt target caps
  40. * @psoc: psoc handle
  41. * @wmi_handle: wmi handle
  42. *
  43. * This function populates twt target capability info in twt private psoc object
  44. *
  45. * return: QDF_STATUS
  46. */
  47. QDF_STATUS
  48. target_if_twt_fill_tgt_caps(struct wlan_objmgr_psoc *psoc,
  49. wmi_unified_t wmi_handle);
  50. /**
  51. * target_if_twt_register_tx_ops() - Register twt tx ops
  52. * @tx_ops: tx_ops structure
  53. *
  54. * return: QDF_STATUS
  55. */
  56. QDF_STATUS
  57. target_if_twt_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
  58. /**
  59. * target_if_twt_register_events() - Register twt wmi events
  60. * @psoc: psoc handle
  61. *
  62. * Register TWT WMI events
  63. *
  64. * return: QDF_STATUS
  65. */
  66. QDF_STATUS
  67. target_if_twt_register_events(struct wlan_objmgr_psoc *psoc);
  68. /**
  69. * target_if_twt_deregister_events() - De-register twt wmi events
  70. * @psoc: psoc handle
  71. *
  72. * De-register TWT WMI events
  73. *
  74. * return: QDF_STATUS
  75. */
  76. QDF_STATUS
  77. target_if_twt_deregister_events(struct wlan_objmgr_psoc *psoc);
  78. #else
  79. static inline
  80. QDF_STATUS target_if_twt_set_twt_ack_support(struct wlan_objmgr_psoc *psoc,
  81. bool val)
  82. {
  83. return QDF_STATUS_SUCCESS;
  84. }
  85. static inline
  86. QDF_STATUS target_if_twt_fill_tgt_caps(struct wlan_objmgr_psoc *psoc,
  87. wmi_unified_t wmi_handle)
  88. {
  89. return QDF_STATUS_SUCCESS;
  90. }
  91. static inline
  92. QDF_STATUS target_if_twt_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
  93. {
  94. return QDF_STATUS_SUCCESS;
  95. }
  96. static inline
  97. QDF_STATUS target_if_twt_register_events(struct wlan_objmgr_psoc *psoc)
  98. {
  99. return QDF_STATUS_SUCCESS;
  100. }
  101. static inline
  102. QDF_STATUS target_if_twt_deregister_events(struct wlan_objmgr_psoc *psoc)
  103. {
  104. return QDF_STATUS_SUCCESS;
  105. }
  106. #endif
  107. #endif /* _TARGET_IF_TWT_H_ */