wlan_extscan_api.h 3.3 KB

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