target_if_p2p.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. * Copyright (c) 2017-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: offload lmac interface APIs for P2P
  20. */
  21. #ifndef _TARGET_IF_P2P_H_
  22. #define _TARGET_IF_P2P_H_
  23. #include <qdf_types.h>
  24. struct wlan_objmgr_psoc;
  25. struct p2p_ps_config;
  26. struct p2p_lo_start;
  27. #ifdef FEATURE_P2P_LISTEN_OFFLOAD
  28. /**
  29. * target_if_p2p_register_lo_event_handler() - Register lo event handler
  30. * @psoc: soc object
  31. * @arg: additional argument
  32. *
  33. * Target interface API to register P2P listen offload event handler.
  34. *
  35. * Return: QDF_STATUS_SUCCESS - in case of success
  36. */
  37. QDF_STATUS target_if_p2p_register_lo_event_handler(
  38. struct wlan_objmgr_psoc *psoc, void *arg);
  39. /**
  40. * target_if_p2p_unregister_lo_event_handler() - Unregister lo event handler
  41. * @psoc: soc object
  42. * @arg: additional argument
  43. *
  44. * Target interface API to unregister P2P listen offload event handler.
  45. *
  46. * Return: QDF_STATUS_SUCCESS - in case of success
  47. */
  48. QDF_STATUS target_if_p2p_unregister_lo_event_handler(
  49. struct wlan_objmgr_psoc *psoc, void *arg);
  50. /**
  51. * target_if_p2p_lo_start() - Start listen offload
  52. * @psoc: soc object
  53. * @lo_start: lo start information
  54. *
  55. * Target interface API to start listen offload.
  56. *
  57. * Return: QDF_STATUS_SUCCESS - in case of success
  58. */
  59. QDF_STATUS target_if_p2p_lo_start(struct wlan_objmgr_psoc *psoc,
  60. struct p2p_lo_start *lo_start);
  61. /**
  62. * target_if_p2p_lo_stop() - Stop listen offload
  63. * @psoc: soc object
  64. * @vdev_id: vdev id
  65. *
  66. * Target interface API to stop listen offload.
  67. *
  68. * Return: QDF_STATUS_SUCCESS - in case of success
  69. */
  70. QDF_STATUS target_if_p2p_lo_stop(struct wlan_objmgr_psoc *psoc,
  71. uint32_t vdev_id);
  72. #endif
  73. /**
  74. * target_if_p2p_register_tx_ops() - Register P2P component TX OPS
  75. * @tx_ops: lmac if transmit ops
  76. *
  77. * Return: None
  78. */
  79. void target_if_p2p_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
  80. /**
  81. * target_if_p2p_register_noa_event_handler() - Register noa event handler
  82. * @psoc: soc object
  83. * @arg: additional argument
  84. *
  85. * Target interface API to register P2P noa event handler.
  86. *
  87. * Return: QDF_STATUS_SUCCESS - in case of success
  88. */
  89. QDF_STATUS target_if_p2p_register_noa_event_handler(
  90. struct wlan_objmgr_psoc *psoc, void *arg);
  91. /**
  92. * target_if_p2p_unregister_noa_event_handler() - Unregister noa event handler
  93. * @psoc: soc object
  94. * @arg: additional argument
  95. *
  96. * Target interface API to unregister P2P listen offload event handler.
  97. *
  98. * Return: QDF_STATUS_SUCCESS - in case of success
  99. */
  100. QDF_STATUS target_if_p2p_unregister_noa_event_handler(
  101. struct wlan_objmgr_psoc *psoc, void *arg);
  102. /**
  103. * target_if_p2p_set_ps() - Set power save
  104. * @psoc: soc object
  105. * @arg: additional argument
  106. *
  107. * Target interface API to set power save.
  108. *
  109. * Return: QDF_STATUS_SUCCESS - in case of success
  110. */
  111. QDF_STATUS target_if_p2p_set_ps(struct wlan_objmgr_psoc *psoc,
  112. struct p2p_ps_config *ps_config);
  113. /**
  114. * target_if_p2p_set_noa() - Disable / Enable NOA
  115. * @psoc: soc object
  116. * @vdev_id: vdev id
  117. * @disable_noa: TRUE - Disable NoA, FALSE - Enable NoA
  118. *
  119. * Target interface API to Disable / Enable P2P NOA.
  120. *
  121. * Return: QDF_STATUS_SUCCESS - in case of success
  122. */
  123. QDF_STATUS target_if_p2p_set_noa(struct wlan_objmgr_psoc *psoc,
  124. uint32_t vdev_id, bool disable_noa);
  125. #endif /* _TARGET_IF_P2P_H_ */