osif_twt_internal.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 : osif_twt_internal.h
  20. *
  21. * WLAN Host Device Driver file for TWT (Target Wake Time) support.
  22. *
  23. */
  24. #ifndef _OSIF_TWT_INTERNAL_H_
  25. #define _OSIF_TWT_INTERNAL_H_
  26. #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
  27. /**
  28. * struct twt_conc_context: TWT concurrency args
  29. * @psoc: pointer to psoc
  30. */
  31. struct twt_conc_context {
  32. struct wlan_objmgr_psoc *psoc;
  33. };
  34. /**
  35. * osif_twt_send_requestor_enable_cmd() - Send TWT requestor enable command to
  36. * target
  37. * @psoc: pointer to global psoc structure
  38. * @pdev_id: pdev id
  39. *
  40. * Return: errno
  41. */
  42. int osif_twt_send_requestor_enable_cmd(struct wlan_objmgr_psoc *psoc,
  43. uint8_t pdev_id);
  44. /**
  45. * osif_twt_send_responder_enable_cmd() - Send TWT responder enable command to
  46. * target
  47. * @psoc: pointer to global psoc structure
  48. * @pdev_id: pdev id
  49. *
  50. * Return: errno
  51. */
  52. int osif_twt_send_responder_enable_cmd(struct wlan_objmgr_psoc *psoc,
  53. uint8_t pdev_id);
  54. /**
  55. * osif_twt_send_requestor_disable_cmd() - Send TWT requestor disable command
  56. * to target
  57. * @psoc: pointer to global psoc structure
  58. * @pdev_id: pdev id
  59. *
  60. * Return: errno
  61. */
  62. int osif_twt_send_requestor_disable_cmd(struct wlan_objmgr_psoc *psoc,
  63. uint8_t pdev_id);
  64. /**
  65. * osif_twt_send_responder_disable_cmd() - Send TWT responder disable command
  66. * to target
  67. * @psoc: pointer to global psoc structure
  68. * @pdev_id: pdev id
  69. *
  70. * Return: errno
  71. */
  72. int osif_twt_send_responder_disable_cmd(struct wlan_objmgr_psoc *psoc,
  73. uint8_t pdev_id);
  74. /**
  75. * osif_twt_concurrency_update_handler() - Handle TWT concurrency scenario
  76. * @psoc: pointer to global psoc structure
  77. * @pdev: pointer to pdev
  78. *
  79. * Return: none
  80. */
  81. void osif_twt_concurrency_update_handler(struct wlan_objmgr_psoc *psoc,
  82. struct wlan_objmgr_pdev *pdev);
  83. #else
  84. static inline
  85. int osif_twt_send_requestor_disable_cmd(struct wlan_objmgr_psoc *psoc,
  86. uint8_t pdev_id)
  87. {
  88. return 0;
  89. }
  90. static inline
  91. int osif_twt_send_requestor_enable_cmd(struct wlan_objmgr_psoc *psoc,
  92. uint8_t pdev_id)
  93. {
  94. return 0;
  95. }
  96. static inline
  97. int osif_twt_send_responder_enable_cmd(struct wlan_objmgr_psoc *psoc,
  98. uint8_t pdev_id)
  99. {
  100. return 0;
  101. }
  102. static inline
  103. void osif_twt_concurrency_update_handler(struct wlan_objmgr_psoc *psoc,
  104. struct wlan_objmgr_pdev *pdev)
  105. {
  106. }
  107. #endif
  108. #endif /* _OSIF_TWT_INTERNAL_H_ */