wlan_p2p_tgt_api.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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: Contains p2p south bound interface definitions
  20. */
  21. #ifndef _WLAN_P2P_TGT_API_H_
  22. #define _WLAN_P2P_TGT_API_H_
  23. #include <qdf_types.h>
  24. #include <qdf_nbuf.h>
  25. struct scan_event;
  26. struct wlan_objmgr_psoc;
  27. struct wlan_objmgr_peer;
  28. struct p2p_noa_info;
  29. struct p2p_lo_event;
  30. struct mgmt_rx_event_params;
  31. enum mgmt_frame_type;
  32. /**
  33. * tgt_p2p_register_lo_ev_handler() - register lo event
  34. * @psoc: soc object
  35. *
  36. * p2p tgt api to register listen offload event handler.
  37. *
  38. * Return: QDF_STATUS_SUCCESS - in case of success
  39. */
  40. QDF_STATUS tgt_p2p_register_lo_ev_handler(
  41. struct wlan_objmgr_psoc *psoc);
  42. /**
  43. * tgt_p2p_register_noa_ev_handler() - register noa event
  44. * @psoc: soc object
  45. *
  46. * p2p tgt api to register noa event handler.
  47. *
  48. * Return: QDF_STATUS_SUCCESS - in case of success
  49. */
  50. QDF_STATUS tgt_p2p_register_noa_ev_handler(
  51. struct wlan_objmgr_psoc *psoc);
  52. /**
  53. * tgt_p2p_unregister_lo_ev_handler() - unregister lo event
  54. * @psoc: soc object
  55. *
  56. * p2p tgt api to unregister listen offload event handler.
  57. *
  58. * Return: QDF_STATUS_SUCCESS - in case of success
  59. */
  60. QDF_STATUS tgt_p2p_unregister_lo_ev_handler(
  61. struct wlan_objmgr_psoc *psoc);
  62. /**
  63. * tgt_p2p_unregister_noa_ev_handler() - unregister noa event
  64. * @psoc: soc object
  65. *
  66. * p2p tgt api to unregister noa event handler.
  67. *
  68. * Return: QDF_STATUS_SUCCESS - in case of success
  69. */
  70. QDF_STATUS tgt_p2p_unregister_noa_ev_handler(
  71. struct wlan_objmgr_psoc *psoc);
  72. /**
  73. * tgt_p2p_scan_event_cb() - Callback for scan event
  74. * @vdev: vdev object
  75. * @event: event information
  76. * @arg: registered arguments
  77. *
  78. * This function gets called from scan component when getting P2P
  79. * scan event.
  80. *
  81. * Return: None
  82. */
  83. void tgt_p2p_scan_event_cb(struct wlan_objmgr_vdev *vdev,
  84. struct scan_event *event, void *arg);
  85. /**
  86. * tgt_p2p_mgmt_download_comp_cb() - Callback for mgmt frame tx
  87. * complete
  88. * @context: tx context
  89. * @buf: buffer address
  90. * @free: need to free or not
  91. *
  92. * This function gets called from mgmt tx/rx component when mgmt
  93. * frame tx complete.
  94. *
  95. * Return: QDF_STATUS_SUCCESS - in case of success
  96. */
  97. QDF_STATUS tgt_p2p_mgmt_download_comp_cb(void *context,
  98. qdf_nbuf_t buf, bool free);
  99. /**
  100. * tgt_p2p_mgmt_ota_comp_cb() - Callback for mgmt frame tx ack
  101. * @context: tx context
  102. * @buf: buffer address
  103. * @status: tx status
  104. * @tx_compl_params: tx complete parameters
  105. *
  106. * This function gets called from mgmt tx/rx component when getting
  107. * mgmt frame tx ack.
  108. *
  109. * Return: QDF_STATUS_SUCCESS - in case of success
  110. */
  111. QDF_STATUS tgt_p2p_mgmt_ota_comp_cb(void *context, qdf_nbuf_t buf,
  112. uint32_t status, void *tx_compl_params);
  113. /**
  114. * tgt_p2p_mgmt_frame_rx_cb() - Callback for rx mgmt frame
  115. * @psoc: soc context
  116. * @peer: peer context
  117. * @buf: rx buffer
  118. * @mgmt_rx_params: mgmt rx parameters
  119. * @frm_type: frame type
  120. *
  121. * This function gets called from mgmt tx/rx component when rx mgmt
  122. * frame.
  123. *
  124. * Return: QDF_STATUS_SUCCESS - in case of success
  125. */
  126. QDF_STATUS tgt_p2p_mgmt_frame_rx_cb(struct wlan_objmgr_psoc *psoc,
  127. struct wlan_objmgr_peer *peer, qdf_nbuf_t buf,
  128. struct mgmt_rx_event_params *mgmt_rx_params,
  129. enum mgmt_frame_type frm_type);
  130. /**
  131. * tgt_p2p_noa_event_cb() - Callback for noa event
  132. * @psoc: soc object
  133. * @event_info: noa event information
  134. *
  135. * This function gets called from target interface.
  136. *
  137. * Return: QDF_STATUS_SUCCESS - in case of success
  138. */
  139. QDF_STATUS tgt_p2p_noa_event_cb(struct wlan_objmgr_psoc *psoc,
  140. struct p2p_noa_info *event_info);
  141. /**
  142. * tgt_p2p_lo_event_cb() - Listen offload stop request
  143. * @psoc: soc object
  144. * @event_info: lo stop event buffer
  145. *
  146. * This function gets called from target interface.
  147. *
  148. * Return: QDF_STATUS_SUCCESS - in case of success
  149. */
  150. QDF_STATUS tgt_p2p_lo_event_cb(struct wlan_objmgr_psoc *psoc,
  151. struct p2p_lo_event *event_info);
  152. #endif /* _WLAN_P2P_TGT_API_H_ */