wlan_scan_cfg.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. * gActiveMaxChannelTime - Set max channel time for active scan
  27. * @Min: 0
  28. * @Max: 10000
  29. * @Default: 40
  30. *
  31. * This ini is used to set maximum channel time in secs spent in
  32. * active scan
  33. *
  34. * Related: None
  35. *
  36. * Usage: External
  37. *
  38. * </ini>
  39. */
  40. #define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  41. "gActiveMaxChannelTime",\
  42. 0, 10000, MCL_OR_WIN_VALUE(40, 105),\
  43. CFG_VALUE_OR_DEFAULT, "active dwell time")
  44. /*
  45. * <ini>
  46. * gPassiveMaxChannelTime - Set max channel time for passive scan
  47. * @Min: 0
  48. * @Max: 10000
  49. * @Default: 110
  50. *
  51. * This ini is used to set maximum channel time in secs spent in
  52. * passive scan
  53. *
  54. * Related: None
  55. *
  56. * Usage: External
  57. *
  58. * </ini>
  59. */
  60. #define CFG_PASSIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\
  61. "gPassiveMaxChannelTime",\
  62. 0, 10000, MCL_OR_WIN_VALUE(100, 300),\
  63. CFG_VALUE_OR_DEFAULT, "passive dwell time")
  64. /*
  65. * <ini>
  66. * gScanNumProbes - Set the number of probes on each channel for active scan
  67. * @Min: 0
  68. * @Max: 20
  69. * @Default: 0
  70. *
  71. * This ini is used to set number of probes on each channel for
  72. * active scan
  73. */
  74. #define CFG_SCAN_NUM_PROBES CFG_INI_UINT(\
  75. "gScanNumProbes",\
  76. 0, 20, MCL_OR_WIN_VALUE(0, 5),\
  77. CFG_VALUE_OR_DEFAULT,\
  78. "number of probes on each channel")
  79. /*
  80. * <ini>
  81. * gScanProbeRepeatTime - Set the probe repeat time on each channel
  82. * @Min: 0
  83. * @Max: 30
  84. * @Default: 0
  85. *
  86. * This ini is used to set probe repeat time on each channel for
  87. * active scan
  88. *
  89. * Related: None
  90. *
  91. * Supported Feature: Scan
  92. *
  93. * Usage: External
  94. *
  95. * </ini>
  96. */
  97. #define CFG_SCAN_PROBE_REPEAT_TIME CFG_INI_UINT(\
  98. "gScanProbeRepeatTime",\
  99. 0, 30, MCL_OR_WIN_VALUE(20, 50),\
  100. CFG_VALUE_OR_DEFAULT,\
  101. "probe repeat time on each channel")
  102. /*
  103. * <ini>
  104. * hostscan_adaptive_dwell_mode - Enable adaptive dwell mode
  105. * during host scan with conneciton
  106. * @Min: 0
  107. * @Max: 4
  108. * @Default: 2
  109. *
  110. * This ini will set the algo used in dwell time optimization
  111. * during host scan with connection.
  112. * See enum wmi_dwelltime_adaptive_mode.
  113. * Acceptable values for this:
  114. * 0: Default (Use firmware default mode)
  115. * 1: Conservative optimization
  116. * 2: Moderate optimization
  117. * 3: Aggressive optimization
  118. * 4: Static
  119. *
  120. * Related: None
  121. *
  122. * Supported Feature: Scan
  123. *
  124. * Usage: External
  125. *
  126. * </ini>
  127. */
  128. #define CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_INI_UINT(\
  129. "hostscan_adaptive_dwell_mode",\
  130. 0, 4, 2,\
  131. CFG_VALUE_OR_DEFAULT,\
  132. "Enable adaptive dwell mode")
  133. /*
  134. * <ini>
  135. * is_bssid_hint_priority - Set priority for connection with bssid_hint
  136. * BSSID.
  137. * @Min: 0
  138. * @Max: 1
  139. * @Default: 1
  140. *
  141. * This ini is used to give priority to BSS for connection which comes
  142. * as part of bssid_hint
  143. *
  144. * Related: None
  145. *
  146. * Supported Feature: STA
  147. *
  148. * Usage: External
  149. *
  150. * </ini>
  151. */
  152. #define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\
  153. "is_bssid_hint_priority",\
  154. 0, 1, 0,\
  155. CFG_VALUE_OR_DEFAULT, \
  156. "Set priority for connection with bssid_hint")
  157. #define CFG_SCAN_ALL \
  158. CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \
  159. CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \
  160. CFG(CFG_SCAN_NUM_PROBES) \
  161. CFG(CFG_SCAN_PROBE_REPEAT_TIME) \
  162. CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \
  163. CFG(CFG_IS_BSSID_HINT_PRIORITY)
  164. #endif