wlan_cfg80211_p2p.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: declares P2P functions interfacing with linux kernel
  21. */
  22. #ifndef _WLAN_CFG80211_P2P_H_
  23. #define _WLAN_CFG80211_P2P_H_
  24. #include <qdf_types.h>
  25. struct wlan_objmgr_psoc;
  26. struct wlan_objmgr_vdev;
  27. struct ieee80211_channel;
  28. /**
  29. * p2p_psoc_enable() - psoc API to enable p2p component
  30. * @psoc: soc object
  31. *
  32. * This function used to enable P2P component and register events.
  33. *
  34. * Return: QDF_STATUS_SUCCESS - in case of success
  35. */
  36. QDF_STATUS p2p_psoc_enable(struct wlan_objmgr_psoc *psoc);
  37. /**
  38. * p2p_psoc_disable() - psoc API to disable p2p component
  39. * @psoc: soc object
  40. *
  41. * This function used to disable P2P component and unregister events.
  42. *
  43. * Return: QDF_STATUS_SUCCESS - in case of success
  44. */
  45. QDF_STATUS p2p_psoc_disable(struct wlan_objmgr_psoc *psoc);
  46. /**
  47. * wlan_cfg80211_roc() - API to process cfg80211 roc request
  48. * @vdev: Pointer to vdev object
  49. * @chan: Pointer to channel
  50. * @duration: Duration for this roc request
  51. * @cookie: Pointer to return cookie to up layer
  52. *
  53. * API to trigger remain on channel request. It returns cookie
  54. * as the identifier of roc.
  55. *
  56. * Return: 0 for success, non zero for failure
  57. */
  58. int wlan_cfg80211_roc(struct wlan_objmgr_vdev *vdev,
  59. struct ieee80211_channel *chan, uint32_t duration,
  60. uint64_t *cookie);
  61. /**
  62. * wlan_cfg80211_cancel_roc() - API to process cfg80211 cancel remain
  63. * on channel request
  64. * @vdev: Pointer to vdev object
  65. * @cookie: Find out the roc request by cookie
  66. *
  67. * API to trigger cancel remain on channel request.
  68. *
  69. * Return: 0 for success, non zero for failure
  70. */
  71. int wlan_cfg80211_cancel_roc(struct wlan_objmgr_vdev *vdev,
  72. uint64_t cookie);
  73. /**
  74. * wlan_cfg80211_mgmt_tx() - API to process cfg80211 mgmt tx request
  75. * @vdev: Pointer to vdev object
  76. * @chan: Pointer to channel
  77. * @offchan: true if this is an off-channel frame
  78. * @wait: wait time for this mgmt tx request
  79. * @buf: TX buffer
  80. * @len: Length of tx buffer
  81. * @no_cck: Required cck or not
  82. * @dont_wait_for_ack: Wait for ack or not
  83. * @cookie: Return the cookie to caller
  84. *
  85. * API to trigger mgmt frame tx request. It returns cookie as the
  86. * identifier of this tx.
  87. *
  88. * Return: 0 for success, non zero for failure
  89. */
  90. int wlan_cfg80211_mgmt_tx(struct wlan_objmgr_vdev *vdev,
  91. struct ieee80211_channel *chan, bool offchan, uint32_t wait,
  92. const uint8_t *buf, uint32_t len, bool no_cck,
  93. bool dont_wait_for_ack, uint64_t *cookie);
  94. /**
  95. * wlan_cfg80211_mgmt_tx_cancel() - API to process cfg80211 cancel to
  96. * wait mgmt tx
  97. * @vdev: Pointer to vdev object
  98. * @cookie: Find out the mgmt tx request by cookie
  99. *
  100. * API to trigger cancel mgmt frame tx request.
  101. *
  102. * Return: 0 for success, non zero for failure
  103. */
  104. int wlan_cfg80211_mgmt_tx_cancel(struct wlan_objmgr_vdev *vdev,
  105. uint64_t cookie);
  106. #endif /* _WLAN_CFG80211_P2P_H_ */