wlan_tdls_api.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*
  2. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. /*
  18. * DOC: contains tdls link teardown declarations
  19. */
  20. #ifndef _WLAN_TDLS_API_H_
  21. #define _WLAN_TDLS_API_H_
  22. #include "wlan_objmgr_psoc_obj.h"
  23. #include "wlan_objmgr_pdev_obj.h"
  24. #include "wlan_objmgr_vdev_obj.h"
  25. #ifdef FEATURE_WLAN_TDLS
  26. #ifdef WLAN_FEATURE_11BE_MLO
  27. /**
  28. * wlan_tdls_is_fw_11be_mlo_capable() - Get TDLS 11be mlo capab
  29. * @psoc: psoc context
  30. *
  31. * Return: True if 11be mlo capable
  32. */
  33. bool wlan_tdls_is_fw_11be_mlo_capable(struct wlan_objmgr_psoc *psoc);
  34. #else
  35. static inline
  36. bool wlan_tdls_is_fw_11be_mlo_capable(struct wlan_objmgr_psoc *psoc)
  37. {
  38. return false;
  39. }
  40. #endif
  41. #ifdef FEATURE_SET
  42. /**
  43. * wlan_tdls_get_features_info() - Get tdls features info
  44. * @psoc: psoc context
  45. * @tdls_feature_set: TDLS feature set info structure
  46. *
  47. * Return: None
  48. */
  49. void wlan_tdls_get_features_info(struct wlan_objmgr_psoc *psoc,
  50. struct wlan_tdls_features *tdls_feature_set);
  51. #endif
  52. /**
  53. * wlan_tdls_teardown_links() - notify TDLS module to teardown all TDLS links
  54. * @psoc: psoc object
  55. *
  56. * Return: QDF_STATUS
  57. */
  58. QDF_STATUS wlan_tdls_teardown_links(struct wlan_objmgr_psoc *psoc);
  59. /**
  60. * wlan_tdls_teardown_links_sync() - teardown all the TDLS links
  61. * @psoc: psoc object
  62. *
  63. * Return: None
  64. */
  65. void wlan_tdls_teardown_links_sync(struct wlan_objmgr_psoc *psoc);
  66. /**
  67. * wlan_tdls_notify_sta_disconnect() - notify sta disconnect
  68. * @vdev_id: pointer to soc object
  69. * @lfr_roam: indicate, whether disconnect due to lfr roam
  70. * @user_disconnect: disconnect from user space
  71. * @vdev: vdev object manager
  72. *
  73. * Notify sta disconnect event to TDLS component
  74. *
  75. * Return: QDF_STATUS
  76. */
  77. void wlan_tdls_notify_sta_disconnect(uint8_t vdev_id,
  78. bool lfr_roam, bool user_disconnect,
  79. struct wlan_objmgr_vdev *vdev);
  80. /**
  81. * wlan_tdls_notify_sta_connect() - notify sta connect to TDLS
  82. * @vdev_id: pointer to soc object
  83. * @tdls_chan_swit_prohibited: indicates channel switch capability
  84. * @tdls_prohibited: indicates tdls allowed or not
  85. * @vdev: vdev object manager
  86. *
  87. * Notify sta connect event to TDLS component
  88. *
  89. * Return: None
  90. */
  91. void
  92. wlan_tdls_notify_sta_connect(uint8_t vdev_id,
  93. bool tdls_chan_swit_prohibited,
  94. bool tdls_prohibited,
  95. struct wlan_objmgr_vdev *vdev);
  96. /**
  97. * wlan_tdls_update_tx_pkt_cnt() - update tx pkt count
  98. * @vdev: tdls vdev object
  99. * @mac_addr: peer mac address
  100. *
  101. * Return: None
  102. */
  103. void wlan_tdls_update_tx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  104. struct qdf_mac_addr *mac_addr);
  105. /**
  106. * wlan_tdls_update_rx_pkt_cnt() - update rx pkt count
  107. * @vdev: tdls vdev object
  108. * @mac_addr: peer mac address
  109. * @dest_mac_addr: dest mac address
  110. *
  111. * Return: None
  112. */
  113. void wlan_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  114. struct qdf_mac_addr *mac_addr,
  115. struct qdf_mac_addr *dest_mac_addr);
  116. /**
  117. * wlan_tdls_notify_start_bss() - Notify TDLS module on start bss
  118. * @psoc: Pointer to PSOC object
  119. *
  120. * Return: None
  121. */
  122. void wlan_tdls_notify_start_bss(struct wlan_objmgr_psoc *psoc);
  123. #else
  124. #ifdef FEATURE_SET
  125. static inline
  126. void wlan_tdls_get_features_info(struct wlan_objmgr_psoc *psoc,
  127. struct wlan_tdls_features *tdls_feature_set)
  128. {
  129. }
  130. #endif
  131. static inline
  132. bool wlan_tdls_is_fw_11be_mlo_capable(struct wlan_objmgr_psoc *psoc)
  133. {
  134. return false;
  135. }
  136. static inline QDF_STATUS wlan_tdls_teardown_links(struct wlan_objmgr_psoc *psoc)
  137. {
  138. return QDF_STATUS_SUCCESS;
  139. }
  140. static inline void wlan_tdls_teardown_links_sync(struct wlan_objmgr_psoc *psoc)
  141. {}
  142. static inline
  143. void wlan_tdls_notify_sta_disconnect(uint8_t vdev_id,
  144. bool lfr_roam, bool user_disconnect,
  145. struct wlan_objmgr_vdev *vdev)
  146. {}
  147. static inline void
  148. wlan_tdls_notify_sta_connect(uint8_t vdev_id,
  149. bool tdls_chan_swit_prohibited,
  150. bool tdls_prohibited,
  151. struct wlan_objmgr_vdev *vdev) {}
  152. static inline void
  153. wlan_tdls_update_tx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  154. struct qdf_mac_addr *mac_addr)
  155. {
  156. }
  157. static inline
  158. void wlan_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  159. struct qdf_mac_addr *mac_addr,
  160. struct qdf_mac_addr *dest_mac_addr)
  161. {
  162. }
  163. static inline
  164. void wlan_tdls_notify_start_bss(struct wlan_objmgr_psoc *psoc)
  165. {}
  166. #endif
  167. #endif