wlan_scan_cfg.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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 centralized definitions of SCAN component
  20. */
  21. #ifndef __CONFIG_SCAN_H
  22. #define __CONFIG_SCAN_H
  23. #include "cfg_define.h"
  24. /*
  25. * <ini>
  26. * drop_bcn_on_chan_mismatch - drop the beacon for chan mismatch
  27. * @Min: 0
  28. * @Max: 1
  29. * @Default: 1
  30. *
  31. * This ini is used to decide drop the beacon or not if channel received
  32. * in metadata doesn't match the one in beacon.
  33. *
  34. * Related: None
  35. *
  36. * Usage: External
  37. *
  38. * </ini>
  39. */
  40. #define CFG_DROP_BCN_ON_CHANNEL_MISMATCH CFG_INI_BOOL(\
  41. "drop_bcn_on_chan_mismatch",\
  42. true,\
  43. "drop bcn on channel mismatch")
  44. /*
  45. * <ini>
  46. * gActiveMaxChannelTime - Set max channel time for active scan
  47. * @Min: 0
  48. * @Max: 10000
  49. * @Default: 40
  50. *
  51. * This ini is used to set maximum channel time in msecs spent in
  52. * active scan
  53. *
  54. * Related: None
  55. *
  56. * Usage: External
  57. *
  58. * </ini>
  59. */
  60. #define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  61. "gActiveMaxChannelTime",\
  62. 0, 10000, MCL_OR_WIN_VALUE(40, 105),\
  63. CFG_VALUE_OR_DEFAULT, "active dwell time")
  64. /*
  65. * <ini>
  66. * active_max_channel_time_2g - Set max time for active 2G channel scan
  67. * @Min: 0
  68. * @Max: 10000
  69. * @Default: 80
  70. *
  71. * This ini is used to set maximum time in msecs spent in active 2G channel scan
  72. * if it's not zero, in case of zero, CFG_ACTIVE_MAX_CHANNEL_TIME is used for 2G
  73. * channels also.
  74. *
  75. * Related: None
  76. *
  77. * Usage: External
  78. *
  79. * </ini>
  80. */
  81. #define CFG_ACTIVE_MAX_2G_CHANNEL_TIME CFG_INI_UINT(\
  82. "active_max_channel_time_2g",\
  83. 0, 10000, MCL_OR_WIN_VALUE(80, 0),\
  84. CFG_VALUE_OR_DEFAULT, "active dwell time for 2G channels")
  85. /*
  86. * <ini>
  87. * gPassiveMaxChannelTime - Set max channel time for passive scan
  88. * @Min: 0
  89. * @Max: 10000
  90. * @Default: 110
  91. *
  92. * This ini is used to set maximum channel time in msecs spent in
  93. * passive scan
  94. *
  95. * Related: None
  96. *
  97. * Usage: External
  98. *
  99. * </ini>
  100. */
  101. #define CFG_PASSIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  102. "gPassiveMaxChannelTime",\
  103. 0, 10000, MCL_OR_WIN_VALUE(100, 300),\
  104. CFG_VALUE_OR_DEFAULT, "passive dwell time")
  105. /*
  106. * <ini>
  107. * gScanNumProbes - Set the number of probes on each channel for active scan
  108. * @Min: 0
  109. * @Max: 20
  110. * @Default: 0
  111. *
  112. * This ini is used to set number of probes on each channel for
  113. * active scan
  114. */
  115. #define CFG_SCAN_NUM_PROBES CFG_INI_UINT(\
  116. "gScanNumProbes",\
  117. 0, 20, MCL_OR_WIN_VALUE(0, 5),\
  118. CFG_VALUE_OR_DEFAULT,\
  119. "number of probes on each channel")
  120. /*
  121. * <ini>
  122. * gScanProbeRepeatTime - Set the probe repeat time on each channel
  123. * @Min: 0
  124. * @Max: 30
  125. * @Default: 0
  126. *
  127. * This ini is used to set probe repeat time on each channel for
  128. * active scan
  129. *
  130. * Related: None
  131. *
  132. * Supported Feature: Scan
  133. *
  134. * Usage: External
  135. *
  136. * </ini>
  137. */
  138. #define CFG_SCAN_PROBE_REPEAT_TIME CFG_INI_UINT(\
  139. "gScanProbeRepeatTime",\
  140. 0, 30, MCL_OR_WIN_VALUE(20, 50),\
  141. CFG_VALUE_OR_DEFAULT,\
  142. "probe repeat time on each channel")
  143. /*
  144. * <ini>
  145. * hostscan_adaptive_dwell_mode - Enable adaptive dwell mode
  146. * during host scan with conneciton
  147. * @Min: 0
  148. * @Max: 4
  149. * @Default: 2
  150. *
  151. * This ini will set the algo used in dwell time optimization
  152. * during host scan with connection.
  153. * See enum wmi_dwelltime_adaptive_mode.
  154. * Acceptable values for this:
  155. * 0: Default (Use firmware default mode)
  156. * 1: Conservative optimization
  157. * 2: Moderate optimization
  158. * 3: Aggressive optimization
  159. * 4: Static
  160. *
  161. * Related: None
  162. *
  163. * Supported Feature: Scan
  164. *
  165. * Usage: External
  166. *
  167. * </ini>
  168. */
  169. #define CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_INI_UINT(\
  170. "hostscan_adaptive_dwell_mode",\
  171. 0, 4, 2,\
  172. CFG_VALUE_OR_DEFAULT,\
  173. "Enable adaptive dwell mode")
  174. /*
  175. * <ini>
  176. * is_bssid_hint_priority - Set priority for connection with bssid_hint
  177. * BSSID.
  178. * @Min: 0
  179. * @Max: 1
  180. * @Default: 1
  181. *
  182. * This ini is used to give priority to BSS for connection which comes
  183. * as part of bssid_hint
  184. *
  185. * Related: None
  186. *
  187. * Supported Feature: STA
  188. *
  189. * Usage: External
  190. *
  191. * </ini>
  192. */
  193. #define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\
  194. "is_bssid_hint_priority",\
  195. 0, 1, 0,\
  196. CFG_VALUE_OR_DEFAULT, \
  197. "Set priority for connection with bssid_hint")
  198. #define CFG_SCAN_ALL \
  199. CFG(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) \
  200. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  201. CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \
  202. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  203. CFG(CFG_SCAN_NUM_PROBES) \
  204. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  205. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  206. CFG(CFG_IS_BSSID_HINT_PRIORITY)
  207. #endif