cfg_mlme_btm.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. * btm_offload_config - Configure BTM
  46. * @Min: 0x00000000
  47. * @Max: 0xFFFFFFFF
  48. * @Default: 0x00000001
  49. *
  50. * This ini is used to configure BTM
  51. *
  52. * Bit 0: Enable/Disable the BTM offload. Set this to 1 will
  53. * enable and 0 will disable BTM offload.
  54. *
  55. * BIT 2, 1: Action on non matching candidate with cache. If a BTM request
  56. * is received from AP then the candidate AP's may/may-not be present in
  57. * the firmware scan cache . Based on below config firmware will decide
  58. * whether to forward BTM frame to host or consume with firmware and proceed
  59. * with Roaming to candidate AP.
  60. * 00 scan and consume
  61. * 01 no scan and forward to host
  62. * 10, 11 reserved
  63. *
  64. * BIT 5, 4, 3: Roaming handoff decisions on multiple candidates match
  65. * 000 match if exact BSSIDs are found
  66. * 001 match if at least one top priority BSSID only
  67. * 010, 011, 100, 101, 110, 111 reserved
  68. *
  69. * BIT 6: Set this to 1 will send BTM query frame and 0 not sent.
  70. *
  71. * BIT 7-31: Reserved
  72. *
  73. * Supported Feature: STA
  74. *
  75. * Usage: External
  76. *
  77. * </ini>
  78. */
  79. #define CFG_BTM_ENABLE CFG_INI_UINT( \
  80. "btm_offload_config", \
  81. 0x00000000, \
  82. 0xffffffff, \
  83. 0x00000001, \
  84. CFG_VALUE_OR_DEFAULT, \
  85. "configure btm offload")
  86. /*
  87. * <ini>
  88. * btm_solicited_timeout - timeout value for waiting BTM request
  89. * @Min: 1
  90. * @Max: 10000
  91. * @Default: 100
  92. *
  93. * This ini is used to configure timeout value for waiting BTM request.
  94. * Unit: millionsecond
  95. *
  96. * Supported Feature: STA
  97. *
  98. * Usage: External
  99. *
  100. * </ini>
  101. */
  102. #define CFG_BTM_SOLICITED_TIMEOUT CFG_INI_UINT( \
  103. "btm_solicited_timeout", \
  104. 1, \
  105. 10000, \
  106. 100, \
  107. CFG_VALUE_OR_DEFAULT, \
  108. "configure timeout value for waiting BTM request")
  109. /*
  110. * <ini>
  111. * btm_max_attempt_cnt - Maximum attempt for sending BTM query to ESS
  112. * @Min: 1
  113. * @Max: 0xFFFFFFFF
  114. * @Default: 3
  115. *
  116. * This ini is used to configure maximum attempt for sending BTM query to ESS.
  117. *
  118. * Supported Feature: STA
  119. *
  120. * Usage: External
  121. *
  122. * </ini>
  123. */
  124. #define CFG_BTM_MAX_ATTEMPT_CNT CFG_INI_UINT( \
  125. "btm_max_attempt_cnt", \
  126. 1, \
  127. 0xFFFFFFFF, \
  128. 3, \
  129. CFG_VALUE_OR_DEFAULT, \
  130. "configure maximum attempt for sending BTM query to ESS")
  131. /*
  132. * <ini>
  133. * btm_sticky_time - Stick time after roaming to new AP by BTM
  134. * @Min: 0
  135. * @Max: 0x0000FFFF
  136. * @Default: 300
  137. *
  138. * This ini is used to configure Stick time after roaming to new AP by BTM.
  139. * Unit: seconds
  140. *
  141. * Supported Feature: STA
  142. *
  143. * Usage: External
  144. *
  145. * </ini>
  146. */
  147. #define CFG_BTM_STICKY_TIME CFG_INI_UINT( \
  148. "btm_sticky_time", \
  149. 0, \
  150. 0x0000FFFF, \
  151. 300, \
  152. CFG_VALUE_OR_DEFAULT, \
  153. "configure Stick time after roaming to new AP by BTM")
  154. #define CFG_BTM_ALL \
  155. CFG(CFG_PREFER_BTM_QUERY) \
  156. CFG(CFG_BTM_ENABLE) \
  157. CFG(CFG_BTM_SOLICITED_TIMEOUT) \
  158. CFG(CFG_BTM_MAX_ATTEMPT_CNT) \
  159. CFG(CFG_BTM_STICKY_TIME)
  160. #endif /* CFG_MLME_BTM_H_ */