wlan_tdls_api.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * Copyright (c) 2020, 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 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 FEATURE_SET
  27. /**
  28. * wlan_tdls_get_features_info() - Get tdls features info
  29. * @psoc: psoc context
  30. * @tdls_feature_set: TDLS feature set info structure
  31. *
  32. * Return: None
  33. */
  34. void wlan_tdls_get_features_info(struct wlan_objmgr_psoc *psoc,
  35. struct wlan_tdls_features *tdls_feature_set);
  36. #endif
  37. /**
  38. * wlan_tdls_teardown_links() - notify TDLS module to teardown all TDLS links
  39. * @psoc: psoc object
  40. *
  41. * Return: QDF_STATUS
  42. */
  43. QDF_STATUS wlan_tdls_teardown_links(struct wlan_objmgr_psoc *psoc);
  44. /**
  45. * wlan_tdls_teardown_links_sync() - teardown all the TDLS links
  46. * @psoc: psoc object
  47. *
  48. * Return: None
  49. */
  50. void wlan_tdls_teardown_links_sync(struct wlan_objmgr_psoc *psoc);
  51. /**
  52. * wlan_tdls_notify_sta_disconnect() - notify sta disconnect
  53. * @vdev_id: pointer to soc object
  54. * @lfr_roam: indicate, whether disconnect due to lfr roam
  55. * @bool user_disconnect: disconnect from user space
  56. * @vdev: vdev object manager
  57. *
  58. * Notify sta disconnect event to TDLS component
  59. *
  60. * Return: QDF_STATUS
  61. */
  62. void wlan_tdls_notify_sta_disconnect(uint8_t vdev_id,
  63. bool lfr_roam, bool user_disconnect,
  64. struct wlan_objmgr_vdev *vdev);
  65. /**
  66. * wlan_tdls_notify_sta_connect() - notify sta connect to TDLS
  67. * @vdev_id: pointer to soc object
  68. * @tdls_chan_swit_prohibited: indicates channel switch capability
  69. * @tdls_prohibited: indicates tdls allowed or not
  70. * @vdev: vdev object manager
  71. *
  72. * Notify sta connect event to TDLS component
  73. *
  74. * Return: None
  75. */
  76. void
  77. wlan_tdls_notify_sta_connect(uint8_t vdev_id,
  78. bool tdls_chan_swit_prohibited,
  79. bool tdls_prohibited,
  80. struct wlan_objmgr_vdev *vdev);
  81. /**
  82. * wlan_tdls_update_tx_pkt_cnt() - update tx pkt count
  83. * @vdev: tdls vdev object
  84. * @mac_addr: peer mac address
  85. *
  86. * Return: None
  87. */
  88. void wlan_tdls_update_tx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  89. struct qdf_mac_addr *mac_addr);
  90. /**
  91. * wlan_tdls_update_rx_pkt_cnt() - update rx pkt count
  92. * @vdev: tdls vdev object
  93. * @mac_addr: peer mac address
  94. * @dest_mac_addr: dest mac address
  95. *
  96. * Return: None
  97. */
  98. void wlan_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  99. struct qdf_mac_addr *mac_addr,
  100. struct qdf_mac_addr *dest_mac_addr);
  101. #else
  102. #ifdef FEATURE_SET
  103. static inline
  104. void wlan_tdls_get_features_info(struct wlan_objmgr_psoc *psoc,
  105. struct wlan_tdls_features *tdls_feature_set)
  106. {
  107. }
  108. #endif
  109. static inline QDF_STATUS wlan_tdls_teardown_links(struct wlan_objmgr_psoc *psoc)
  110. {
  111. return QDF_STATUS_SUCCESS;
  112. }
  113. static inline void wlan_tdls_teardown_links_sync(struct wlan_objmgr_psoc *psoc)
  114. {}
  115. static inline
  116. void wlan_tdls_notify_sta_disconnect(uint8_t vdev_id,
  117. bool lfr_roam, bool user_disconnect,
  118. struct wlan_objmgr_vdev *vdev)
  119. {}
  120. static inline void
  121. wlan_tdls_notify_sta_connect(uint8_t vdev_id,
  122. bool tdls_chan_swit_prohibited,
  123. bool tdls_prohibited,
  124. struct wlan_objmgr_vdev *vdev) {}
  125. static inline void
  126. wlan_tdls_update_tx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  127. struct qdf_mac_addr *mac_addr)
  128. {
  129. }
  130. static inline
  131. void wlan_tdls_update_rx_pkt_cnt(struct wlan_objmgr_vdev *vdev,
  132. struct qdf_mac_addr *mac_addr,
  133. struct qdf_mac_addr *dest_mac_addr)
  134. {
  135. }
  136. #endif
  137. #endif