wlan_tdls_api.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /*
  17. * DOC: contains tdls link teardown declarations
  18. */
  19. #ifndef _WLAN_TDLS_API_H_
  20. #define _WLAN_TDLS_API_H_
  21. #include "wlan_objmgr_psoc_obj.h"
  22. #include "wlan_objmgr_pdev_obj.h"
  23. #include "wlan_objmgr_vdev_obj.h"
  24. #ifdef FEATURE_WLAN_TDLS
  25. /**
  26. * wlan_tdls_teardown_links() - notify TDLS module to teardown all TDLS links
  27. * @psoc: psoc object
  28. *
  29. * Return: QDF_STATUS
  30. */
  31. QDF_STATUS wlan_tdls_teardown_links(struct wlan_objmgr_psoc *psoc);
  32. /**
  33. * wlan_tdls_teardown_links_sync() - teardown all the TDLS links
  34. * @psoc: psoc object
  35. *
  36. * Return: None
  37. */
  38. void wlan_tdls_teardown_links_sync(struct wlan_objmgr_psoc *psoc);
  39. /**
  40. * wlan_tdls_notify_sta_disconnect() - notify sta disconnect
  41. * @vdev_id: pointer to soc object
  42. * @lfr_roam: indicate, whether disconnect due to lfr roam
  43. * @bool user_disconnect: disconnect from user space
  44. * @vdev: vdev object manager
  45. *
  46. * Notify sta disconnect event to TDLS component
  47. *
  48. * Return: QDF_STATUS
  49. */
  50. void wlan_tdls_notify_sta_disconnect(uint8_t vdev_id,
  51. bool lfr_roam, bool user_disconnect,
  52. struct wlan_objmgr_vdev *vdev);
  53. /**
  54. * wlan_tdls_notify_sta_connect() - notify sta connect to TDLS
  55. * @vdev_id: pointer to soc object
  56. * @tdls_chan_swit_prohibited: indicates channel switch capability
  57. * @tdls_prohibited: indicates tdls allowed or not
  58. * @vdev: vdev object manager
  59. *
  60. * Notify sta connect event to TDLS component
  61. *
  62. * Return: None
  63. */
  64. void
  65. wlan_tdls_notify_sta_connect(uint8_t vdev_id,
  66. bool tdls_chan_swit_prohibited,
  67. bool tdls_prohibited,
  68. struct wlan_objmgr_vdev *vdev);
  69. #else
  70. static inline QDF_STATUS wlan_tdls_teardown_links(struct wlan_objmgr_psoc *psoc)
  71. {
  72. return QDF_STATUS_SUCCESS;
  73. }
  74. static inline void wlan_tdls_teardown_links_sync(struct wlan_objmgr_psoc *psoc)
  75. {}
  76. static inline
  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. static inline void
  82. wlan_tdls_notify_sta_connect(uint8_t vdev_id,
  83. bool tdls_chan_swit_prohibited,
  84. bool tdls_prohibited,
  85. struct wlan_objmgr_vdev *vdev) {}
  86. #endif
  87. #endif