wlan_scan_api.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /*
  2. * Copyright (c) 2017-2019 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: contains scan api
  20. */
  21. #ifndef _WLAN_SCAN_API_H_
  22. #define _WLAN_SCAN_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. /**
  28. * wlan_scan_cfg_set_active_dwelltime() - API to set scan active dwelltime
  29. * @psoc: pointer to psoc object
  30. * @dwell_time: scan active dwell time
  31. *
  32. * Return: none
  33. */
  34. void wlan_scan_cfg_set_active_dwelltime(struct wlan_objmgr_psoc *psoc,
  35. uint32_t dwell_time);
  36. /**
  37. * wlan_scan_cfg_get_active_dwelltime() - API to get active dwelltime
  38. * @psoc: pointer to psoc object
  39. * @dwell_time: scan active dwelltime
  40. *
  41. * Return: scan active dwell time
  42. */
  43. void wlan_scan_cfg_get_active_dwelltime(struct wlan_objmgr_psoc *psoc,
  44. uint32_t *dwell_time);
  45. /**
  46. * wlan_scan_cfg_set_passive_dwelltime() - API to set scan passive dwelltime
  47. * @psoc: pointer to psoc object
  48. * @dwell_time: scan passive dwell time
  49. *
  50. * Return: none
  51. */
  52. void wlan_scan_cfg_set_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
  53. uint32_t dwell_time);
  54. /**
  55. * wlan_scan_cfg_get_passive_dwelltime() - API to get passive dwelltime
  56. * @psoc: pointer to psoc object
  57. * @dwell_time: scan passive dwelltime
  58. *
  59. * Return: scan passive dwell time
  60. */
  61. void wlan_scan_cfg_get_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
  62. uint32_t *dwell_time);
  63. /**
  64. * wlan_scan_cfg_get_conc_active_dwelltime() - Get concurrent active dwelltime
  65. * @psoc: pointer to psoc object
  66. * @dwell_time: scan active dwelltime
  67. *
  68. * Return: scan concurrent active dwell time
  69. */
  70. void wlan_scan_cfg_get_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
  71. uint32_t *dwell_time);
  72. /**
  73. * wlan_scan_cfg_set_conc_active_dwelltime() - Set concurrent active dwelltime
  74. * @psoc: pointer to psoc object
  75. * @dwell_time: scan active dwelltime
  76. *
  77. * Return: scan concurrent active dwell time
  78. */
  79. void wlan_scan_cfg_set_conc_active_dwelltime(struct wlan_objmgr_psoc *psoc,
  80. uint32_t dwell_time);
  81. /**
  82. * wlan_scan_cfg_get_conc_passive_dwelltime() - Get passive concurrent dwelltime
  83. * @psoc: pointer to psoc object
  84. * @dwell_time: scan passive dwelltime
  85. *
  86. * Return: scan concurrent passive dwell time
  87. */
  88. void wlan_scan_cfg_get_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
  89. uint32_t *dwell_time);
  90. /**
  91. * wlan_scan_cfg_set_conc_passive_dwelltime() - Set passive concurrent dwelltime
  92. * @psoc: pointer to psoc object
  93. * @dwell_time: scan passive dwelltime
  94. *
  95. * Return: scan concurrent passive dwell time
  96. */
  97. void wlan_scan_cfg_set_conc_passive_dwelltime(struct wlan_objmgr_psoc *psoc,
  98. uint32_t dwell_time);
  99. /**
  100. * wlan_scan_cfg_honour_nl_scan_policy_flags() - API to get nl scan policy
  101. * flags honoured
  102. * @psoc: pointer to psoc object
  103. *
  104. * Return: nl scan policy flags honoured or not
  105. */
  106. bool wlan_scan_cfg_honour_nl_scan_policy_flags(struct wlan_objmgr_psoc *psoc);
  107. /**
  108. * wlan_scan_cfg_get_conc_max_resttime() - API to get max rest time
  109. * @psoc: pointer to psoc object
  110. * @rest_time: scan concurrent max resttime
  111. *
  112. * Return: scan concurrent max rest time
  113. */
  114. void wlan_scan_cfg_get_conc_max_resttime(struct wlan_objmgr_psoc *psoc,
  115. uint32_t *rest_time);
  116. /**
  117. * wlan_scan_cfg_get_dfs_chan_scan_allowed() - API to get dfs scan enabled
  118. * @psoc: pointer to psoc object
  119. * @enable_dfs_scan: DFS scan enabled or not.
  120. *
  121. * Return: None
  122. */
  123. void wlan_scan_cfg_get_dfs_chan_scan_allowed(struct wlan_objmgr_psoc *psoc,
  124. bool *enable_dfs_scan);
  125. /**
  126. * wlan_scan_cfg_set_dfs_chan_scan_allowed() - API to set dfs scan enabled.
  127. * @psoc: pointer to psoc object
  128. * @enable_dfs_scan: Set dfs scan enabled or not.
  129. *
  130. * Return: None
  131. */
  132. void wlan_scan_cfg_set_dfs_chan_scan_allowed(struct wlan_objmgr_psoc *psoc,
  133. bool enable_dfs_scan);
  134. /**
  135. * wlan_scan_cfg_get_conc_min_resttime() - API to get concurrent min rest time
  136. * @psoc: pointer to psoc object
  137. * @rest_time: scan concurrent min rest time
  138. *
  139. * Return: scan concurrent min rest time
  140. */
  141. void wlan_scan_cfg_get_conc_min_resttime(struct wlan_objmgr_psoc *psoc,
  142. uint32_t *rest_time);
  143. /**
  144. * wlan_scan_is_snr_monitor_enabled() - API to get SNR monitoring enabled or not
  145. * @psoc: pointer to psoc object
  146. *
  147. * Return: enable/disable snr monitor mode.
  148. */
  149. bool wlan_scan_is_snr_monitor_enabled(struct wlan_objmgr_psoc *psoc);
  150. /**
  151. * wlan_scan_process_bcn_probe_rx_sync() - handle bcn without posting to
  152. * scheduler thread
  153. * @psoc: psoc context
  154. * @buf: frame buf
  155. * @params: rx event params
  156. * @frm_type: frame type
  157. *
  158. * handle bcn without posting to scheduler thread, this should be called
  159. * while caller is already in scheduler thread context
  160. *
  161. * Return: success or error code.
  162. */
  163. QDF_STATUS
  164. wlan_scan_process_bcn_probe_rx_sync(struct wlan_objmgr_psoc *psoc,
  165. qdf_nbuf_t buf,
  166. struct mgmt_rx_event_params *rx_param,
  167. enum mgmt_frame_type frm_type);
  168. #endif