target_if_p2p.h 3.9 KB

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