wlan_extscan_api.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2023 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: This file contains APIs of EXTSCAN component
  21. */
  22. #ifndef _WLAN_EXTSCAN_API_H_
  23. #define _WLAN_EXTSCAN_API_H_
  24. #include <wlan_objmgr_psoc_obj.h>
  25. #include <wlan_objmgr_pdev_obj.h>
  26. #include <wlan_objmgr_vdev_obj.h>
  27. #include "../../core/src/wlan_scan_main.h"
  28. #ifdef FEATURE_WLAN_EXTSCAN
  29. /**
  30. * extscan_get_enable() - API to get extscan enable value
  31. * @psoc: pointer to psoc object
  32. *
  33. * Return: true if enabled else false.
  34. */
  35. bool extscan_get_enable(struct wlan_objmgr_psoc *psoc);
  36. /**
  37. * extscan_get_passive_max_time() - API to get passive
  38. * max channel time
  39. * @psoc: pointer to psoc object
  40. * @passive_max_chn_time: extscan passive max channel time
  41. *
  42. * Return: none
  43. */
  44. void extscan_get_passive_max_time(struct wlan_objmgr_psoc *psoc,
  45. uint32_t *passive_max_chn_time);
  46. /**
  47. * extscan_get_active_max_time() - API to get active
  48. * max channel time
  49. * @psoc: pointer to psoc object
  50. * @active_max_chn_time: extscan active max channel time
  51. *
  52. * Return: none
  53. */
  54. void extscan_get_active_max_time(struct wlan_objmgr_psoc *psoc,
  55. uint32_t *active_max_chn_time);
  56. /**
  57. * extscan_get_active_min_time() - API to set active
  58. * min channel time
  59. * @psoc: pointer to psoc object
  60. * @active_min_chn_time: extscan active min channel time
  61. *
  62. * Return: none
  63. */
  64. void extscan_get_active_min_time(struct wlan_objmgr_psoc *psoc,
  65. uint32_t *active_min_chn_time);
  66. /**
  67. * wlan_extscan_global_init() - Initialize extscan
  68. * @psoc: pointer to psoc object
  69. * @scan_obj: pointer to scan object
  70. *
  71. * Return: QDF_STATUS
  72. */
  73. QDF_STATUS
  74. wlan_extscan_global_init(struct wlan_objmgr_psoc *psoc,
  75. struct wlan_scan_obj *scan_obj);
  76. /**
  77. * wlan_extscan_global_deinit() - Deinitialize extscan
  78. *
  79. * Return: QDF_STATUS
  80. */
  81. QDF_STATUS
  82. wlan_extscan_global_deinit(void);
  83. #else
  84. static inline
  85. bool cfg_extscan_get_enable(struct wlan_objmgr_psoc *psoc)
  86. {
  87. return false;
  88. }
  89. static inline
  90. void cfg_extscan_get_passive_max_time(struct wlan_objmgr_psoc *psoc,
  91. uint32_t *passive_max_chn_time)
  92. {
  93. }
  94. static inline
  95. void cfg_extscan_get_active_max_time(struct wlan_objmgr_psoc *psoc,
  96. uint32_t *active_max_chn_time)
  97. {
  98. }
  99. static inline
  100. void cfg_extscan_get_active_min_time(struct wlan_objmgr_psoc *psoc,
  101. uint32_t *active_min_chn_time)
  102. {
  103. }
  104. static inline QDF_STATUS
  105. wlan_extscan_global_init(struct wlan_objmgr_psoc *psoc,
  106. struct wlan_scan_obj *scan_obj)
  107. {
  108. return QDF_STATUS_SUCCESS;
  109. }
  110. static inline QDF_STATUS wlan_extscan_global_deinit(void)
  111. {
  112. return QDF_STATUS_SUCCESS;
  113. }
  114. #endif
  115. #endif