cfg_mlme_btm.h 3.6 KB

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