cfg_mlme_btm.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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 MLME BTM related CFG/INI Items.
  20. */
  21. #ifndef CFG_MLME_BTM_H_
  22. #define CFG_MLME_BTM_H_
  23. /*
  24. * <ini>
  25. * prefer_btm_query - Prefer btm query over 11k neighbor report
  26. * @Min: 0
  27. * @Max: 1
  28. * @Default: 1
  29. *
  30. * This ini is used to enable the STA to send BTM query instead of
  31. * 11k neighbor report.
  32. *
  33. * Supported Feature: STA
  34. *
  35. * Usage: External
  36. *
  37. * </ini>
  38. */
  39. #define CFG_PREFER_BTM_QUERY CFG_INI_BOOL( \
  40. "prefer_btm_query", \
  41. 1, \
  42. "prefer btm query over 11k neighbor report")
  43. /*
  44. * <ini>
  45. * prefer_roam_score_for_candidate_selection - choose to sort the candidates on
  46. * roam score or preferred AP
  47. * @Min: 0
  48. * @Max: 1
  49. * @Default: 1
  50. *
  51. * This ini is used to enable the the firmware to sort the candidates
  52. * based on the roam score rather than selecting APs as per the order
  53. * of the APs sent by the connected AP.
  54. *
  55. * Supported Feature: Roaming
  56. *
  57. * Usage: External
  58. *
  59. * </ini>
  60. */
  61. #define CFG_ENABLE_BTM_ABRIDGE CFG_INI_BOOL( \
  62. "prefer_roam_score_for_candidate_selection", \
  63. 1, \
  64. "sort candidate based on roam score")
  65. /*
  66. * <ini>
  67. * btm_offload_config - Configure BTM
  68. * @Min: 0x00000000
  69. * @Max: 0xFFFFFFFF
  70. * @Default: 0x00000001
  71. *
  72. * This ini is used to configure BTM
  73. *
  74. * Bit 0: Enable/Disable the BTM offload. Set this to 1 will
  75. * enable and 0 will disable BTM offload.
  76. *
  77. * BIT 2, 1: Action on non matching candidate with cache. If a BTM request
  78. * is received from AP then the candidate AP's may/may-not be present in
  79. * the firmware scan cache . Based on below config firmware will decide
  80. * whether to forward BTM frame to host or consume with firmware and proceed
  81. * with Roaming to candidate AP.
  82. * 00 scan and consume
  83. * 01 no scan and forward to host
  84. * 10, 11 reserved
  85. *
  86. * BIT 5, 4, 3: Roaming handoff decisions on multiple candidates match
  87. * 000 match if exact BSSIDs are found
  88. * 001 match if at least one top priority BSSID only
  89. * 010, 011, 100, 101, 110, 111 reserved
  90. *
  91. * BIT 6: Set this to 1 will send BTM query frame and 0 not sent.
  92. *
  93. * BIT 7-31: Reserved
  94. *
  95. * Supported Feature: STA
  96. *
  97. * Usage: External
  98. *
  99. * </ini>
  100. */
  101. #define CFG_BTM_ENABLE CFG_INI_UINT( \
  102. "btm_offload_config", \
  103. 0x00000000, \
  104. 0xffffffff, \
  105. 0x00000001, \
  106. CFG_VALUE_OR_DEFAULT, \
  107. "configure btm offload")
  108. /*
  109. * <ini>
  110. * btm_solicited_timeout - timeout value for waiting BTM request
  111. * @Min: 1
  112. * @Max: 10000
  113. * @Default: 100
  114. *
  115. * This ini is used to configure timeout value for waiting BTM request.
  116. * Unit: millionsecond
  117. *
  118. * Supported Feature: STA
  119. *
  120. * Usage: External
  121. *
  122. * </ini>
  123. */
  124. #define CFG_BTM_SOLICITED_TIMEOUT CFG_INI_UINT( \
  125. "btm_solicited_timeout", \
  126. 1, \
  127. 10000, \
  128. 100, \
  129. CFG_VALUE_OR_DEFAULT, \
  130. "configure timeout value for waiting BTM request")
  131. /*
  132. * <ini>
  133. * btm_max_attempt_cnt - Maximum attempt for sending BTM query to ESS
  134. * @Min: 1
  135. * @Max: 0xFFFFFFFF
  136. * @Default: 3
  137. *
  138. * This ini is used to configure maximum attempt for sending BTM query to ESS.
  139. *
  140. * Supported Feature: STA
  141. *
  142. * Usage: External
  143. *
  144. * </ini>
  145. */
  146. #define CFG_BTM_MAX_ATTEMPT_CNT CFG_INI_UINT( \
  147. "btm_max_attempt_cnt", \
  148. 1, \
  149. 0xFFFFFFFF, \
  150. 3, \
  151. CFG_VALUE_OR_DEFAULT, \
  152. "configure maximum attempt for sending BTM query to ESS")
  153. /*
  154. * <ini>
  155. * btm_sticky_time - Stick time after roaming to new AP by BTM
  156. * @Min: 0
  157. * @Max: 0x0000FFFF
  158. * @Default: 300
  159. *
  160. * This ini is used to configure Stick time after roaming to new AP by BTM.
  161. * Unit: seconds
  162. *
  163. * Supported Feature: STA
  164. *
  165. * Usage: External
  166. *
  167. * </ini>
  168. */
  169. #define CFG_BTM_STICKY_TIME CFG_INI_UINT( \
  170. "btm_sticky_time", \
  171. 0, \
  172. 0x0000FFFF, \
  173. 300, \
  174. CFG_VALUE_OR_DEFAULT, \
  175. "configure Stick time after roaming to new AP by BTM")
  176. /*
  177. * <ini>
  178. * roam_candidate_validity_timer - roam cache entries validity timer
  179. * @Min: 0
  180. * @Max: 0xffffffff
  181. * @Default: 0xffffffff
  182. *
  183. * This value is the timeout values for the cached roam candidate
  184. * entries in firmware. If this value is 0, then that entry is not
  185. * valid
  186. *
  187. * Supported Feature: Roaming
  188. *
  189. * Usage: External
  190. *
  191. * </ini>
  192. */
  193. #define CFG_BTM_VALIDITY_TIMER CFG_INI_UINT( \
  194. "roam_candidate_validity_timer", \
  195. 0, \
  196. 0xffffffff, \
  197. 0xffffffff, \
  198. CFG_VALUE_OR_DEFAULT, \
  199. "BTM validity timer")
  200. /*
  201. * <ini>
  202. * btm_disassoc_timer_threshold - Disassociation timer threshold to wait
  203. * after which the full scan for roaming can be started after the AP has sent
  204. * the disassoc imminent
  205. * @Min: 0
  206. * @Max: 0xffffffff
  207. * @Default: 0
  208. *
  209. * When AP sends, BTM request with disassoc imminent bit set, the STA should
  210. * roam to a new AP within the disassc timeout provided by the ap. If the Roam
  211. * scan period is less than the disassoc timeout value, then instead of
  212. * triggering the roam scan immediately, STA can wait for this
  213. * btm_disassoc_timer_threshold and then start roaming.
  214. *
  215. * Supported Feature: Roaming
  216. *
  217. * Usage: External
  218. *
  219. * </ini>
  220. */
  221. #define CFG_BTM_DISASSOC_TIMER_THRESHOLD CFG_INI_UINT( \
  222. "btm_disassoc_timer_threshold", \
  223. 0, \
  224. 0xffffffff, \
  225. 0, \
  226. CFG_VALUE_OR_DEFAULT, \
  227. "BTM disassociation timer threshold")
  228. #define CFG_BTM_ALL \
  229. CFG(CFG_PREFER_BTM_QUERY) \
  230. CFG(CFG_ENABLE_BTM_ABRIDGE) \
  231. CFG(CFG_BTM_ENABLE) \
  232. CFG(CFG_BTM_SOLICITED_TIMEOUT) \
  233. CFG(CFG_BTM_MAX_ATTEMPT_CNT) \
  234. CFG(CFG_BTM_STICKY_TIME) \
  235. CFG(CFG_BTM_VALIDITY_TIMER) \
  236. CFG(CFG_BTM_DISASSOC_TIMER_THRESHOLD)
  237. #endif /* CFG_MLME_BTM_H_ */