wlan_cfg80211_p2p.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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: declares P2P functions interfacing with linux kernel
  20. */
  21. #ifndef _WLAN_CFG80211_P2P_H_
  22. #define _WLAN_CFG80211_P2P_H_
  23. #include <qdf_types.h>
  24. struct wlan_objmgr_psoc;
  25. struct wlan_objmgr_vdev;
  26. struct ieee80211_channel;
  27. /**
  28. * p2p_psoc_enable() - psoc API to enable p2p component
  29. * @psoc: soc object
  30. *
  31. * This function used to enable P2P component and register events.
  32. *
  33. * Return: QDF_STATUS_SUCCESS - in case of success
  34. */
  35. QDF_STATUS p2p_psoc_enable(struct wlan_objmgr_psoc *psoc);
  36. /**
  37. * p2p_psoc_disable() - psoc API to disable p2p component
  38. * @psoc: soc object
  39. *
  40. * This function used to disable P2P component and unregister events.
  41. *
  42. * Return: QDF_STATUS_SUCCESS - in case of success
  43. */
  44. QDF_STATUS p2p_psoc_disable(struct wlan_objmgr_psoc *psoc);
  45. /**
  46. * wlan_cfg80211_roc() - API to process cfg80211 roc request
  47. * @vdev: Pointer to vdev object
  48. * @chan: Pointer to channel
  49. * @duration: Duration for this roc request
  50. * @cookie: Pointer to return cookie to up layer
  51. *
  52. * API to trigger remain on channel request. It returns cookie
  53. * as the identifier of roc.
  54. *
  55. * Return: 0 for success, non zero for failure
  56. */
  57. int wlan_cfg80211_roc(struct wlan_objmgr_vdev *vdev,
  58. struct ieee80211_channel *chan, uint32_t duration,
  59. uint64_t *cookie);
  60. /**
  61. * wlan_cfg80211_cancel_roc() - API to process cfg80211 cancel remain
  62. * on channel request
  63. * @vdev: Pointer to vdev object
  64. * @cookie: Find out the roc request by cookie
  65. *
  66. * API to trigger cancel remain on channel request.
  67. *
  68. * Return: 0 for success, non zero for failure
  69. */
  70. int wlan_cfg80211_cancel_roc(struct wlan_objmgr_vdev *vdev,
  71. uint64_t cookie);
  72. /**
  73. * wlan_cfg80211_mgmt_tx() - API to process cfg80211 mgmt tx request
  74. * @vdev: Pointer to vdev object
  75. * @chan: Pointer to channel
  76. * @wait: wait time for this mgmt tx request
  77. * @buf: TX buffer
  78. * @len: Length of tx buffer
  79. * @no_cck: Required cck or not
  80. * @dont_wait_for_ack: Wait for ack or not
  81. * @cookie: Return the cookie to caller
  82. *
  83. * API to trigger mgmt frame tx request. It returns cookie as the
  84. * identifier of this tx.
  85. *
  86. * Return: 0 for success, non zero for failure
  87. */
  88. int wlan_cfg80211_mgmt_tx(struct wlan_objmgr_vdev *vdev,
  89. struct ieee80211_channel *chan, bool offchan, uint32_t wait,
  90. const uint8_t *buf, uint32_t len, bool no_cck,
  91. bool dont_wait_for_ack, uint64_t *cookie);
  92. /**
  93. * wlan_cfg80211_mgmt_tx_cancel() - API to process cfg80211 cancel to
  94. * wait mgmt tx
  95. * @vdev: Pointer to vdev object
  96. * @cookie: Find out the mgmt tx request by cookie
  97. *
  98. * API to trigger cancel mgmt frame tx request.
  99. *
  100. * Return: 0 for success, non zero for failure
  101. */
  102. int wlan_cfg80211_mgmt_tx_cancel(struct wlan_objmgr_vdev *vdev,
  103. uint64_t cookie);
  104. #endif /* _WLAN_CFG80211_P2P_H_ */