cfg_mlme_acs.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /*
  2. * Copyright (c) 2012-2019 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 converged configuration.
  20. */
  21. #ifndef __CFG_MLME_ACS_H
  22. #define __CFG_MLME_ACS_H
  23. /*
  24. * <ini>
  25. * acs_with_more_param- Enable acs calculation with more param.
  26. * @Min: 0
  27. * @Max: 1
  28. * @Default: 0
  29. *
  30. * This ini is used to enable acs calculation with more param.
  31. *
  32. * Related: NA
  33. *
  34. * Supported Feature: ACS
  35. *
  36. * Usage: Internal/External
  37. *
  38. * </ini>
  39. */
  40. #define CFG_ACS_WITH_MORE_PARAM CFG_INI_BOOL( \
  41. "acs_with_more_param", \
  42. 0, \
  43. "Enable ACS with more param")
  44. /*
  45. * <ini>
  46. * AutoChannelSelectWeight - ACS channel weight
  47. * @Min: 0
  48. * @Max: 0xFFFFFFFF
  49. * @Default: 0x000000FF
  50. *
  51. * This ini is used to adjust weight of factors in
  52. * acs algorithm.
  53. *
  54. * Supported Feature: ACS
  55. *
  56. * Usage: Internal/External
  57. *
  58. * bits 0-3: rssi weight
  59. * bits 4-7: bss count weight
  60. * bits 8-11: noise floor weight
  61. * bits 12-15: channel free weight
  62. * bits 16-19: tx power range weight
  63. * bits 20-23: tx power throughput weight
  64. * bits 24-31: reserved
  65. *
  66. * </ini>
  67. */
  68. #define CFG_AUTO_CHANNEL_SELECT_WEIGHT CFG_INI_UINT( \
  69. "AutoChannelSelectWeight", \
  70. 0, \
  71. 0xFFFFFFFF, \
  72. 0x000000FF, \
  73. CFG_VALUE_OR_DEFAULT, \
  74. "Adjust weight factor in ACS")
  75. /*
  76. * <ini>
  77. * gvendor_acs_support - vendor based channel selection manager
  78. * @Min: 0
  79. * @Max: 1
  80. * @Default: 0
  81. *
  82. * Enabling this parameter will force driver to use user application based
  83. * channel selection algo instead of driver based auto channel selection
  84. * logic.
  85. *
  86. * Supported Feature: ACS
  87. *
  88. * Usage: External/Internal
  89. *
  90. * </ini>
  91. */
  92. #define CFG_USER_AUTO_CHANNEL_SELECTION CFG_INI_BOOL( \
  93. "gvendor_acs_support", \
  94. 0, \
  95. "Vendor channel selection manager")
  96. /*
  97. * <ini>
  98. * gacs_support_for_dfs_lte_coex - acs support for lte coex and dfs event
  99. * @Min: 0
  100. * @Max: 1
  101. * @Default: 0
  102. *
  103. * Enabling this parameter will force driver to use user application based
  104. * channel selection algo for channel selection in case of dfs and lte
  105. * coex event.
  106. *
  107. * Supported Feature: ACS
  108. *
  109. * Usage: Internal
  110. *
  111. * </ini>
  112. */
  113. #define CFG_USER_ACS_DFS_LTE CFG_INI_BOOL( \
  114. "gacs_support_for_dfs_lte_coex", \
  115. 0, \
  116. "Acs support for lte coex and dfs")
  117. /*
  118. * <ini>
  119. * acs_policy - External ACS policy control
  120. * @Min: 0
  121. * @Max: 1
  122. * @Default: 1
  123. *
  124. * Values are per enum hdd_external_acs_policy.
  125. *
  126. * This ini is used to control the external ACS policy.
  127. *
  128. * 0 -Preferable for ACS to select a
  129. * channel with non-zero pcl weight.
  130. * 1 -Mandatory for ACS to select a
  131. * channel with non-zero pcl weight.
  132. *
  133. * Related: None
  134. *
  135. * Supported Feature: ACS
  136. *
  137. * Usage: Internal/External
  138. *
  139. * </ini>
  140. */
  141. #define CFG_EXTERNAL_ACS_POLICY CFG_INI_BOOL( \
  142. "acs_policy", \
  143. 1, \
  144. "External ACS Policy Control")
  145. #define CFG_ACS_ALL \
  146. CFG(CFG_ACS_WITH_MORE_PARAM) \
  147. CFG(CFG_AUTO_CHANNEL_SELECT_WEIGHT) \
  148. CFG(CFG_USER_AUTO_CHANNEL_SELECTION) \
  149. CFG(CFG_USER_ACS_DFS_LTE) \
  150. CFG(CFG_EXTERNAL_ACS_POLICY)
  151. #endif /* __CFG_MLME_ACS_H */