cfg_mlme_acs.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /*
  2. * Copyright (c) 2012-2020 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 ACS_WEIGHT_MAX_STR_LEN 500
  146. /*
  147. * <ini>
  148. * normalize_acs_weight - Used to control the ACS channel weightage.
  149. *
  150. * This ini is used to specify the weight percentage of the channel. Channel
  151. * weights can be controlled by user to prioritize or de-prioritize channels.
  152. *
  153. * Related: ACS
  154. *
  155. * Supported Feature: ACS
  156. *
  157. * Usage: External
  158. *
  159. * </ini>
  160. */
  161. #define CFG_NORMALIZE_ACS_WEIGHT CFG_INI_STRING( \
  162. "normalize_acs_weight", \
  163. 0, \
  164. ACS_WEIGHT_MAX_STR_LEN, \
  165. "5940-7105=0, 5965=100, 6045=100, 6125=100, 6205=100, 6285=100, 6365=100, 6605=100, 6685=100, 6765=100, 6845=100", \
  166. "Used to specify the channel weights")
  167. /*
  168. * <ini>
  169. * force_start_sap- Enable the SAP even if no channel is suitable for SAP
  170. * @Min: 0
  171. * @Max: 1
  172. * @Default: 0
  173. *
  174. * This ini is used to enable the SAP even if no channel is found suitable
  175. * for SAP by ACS.
  176. *
  177. * Related: NA
  178. *
  179. * Supported Feature: ACS
  180. *
  181. * Usage: Internal
  182. *
  183. * </ini>
  184. */
  185. #define CFG_ACS_FORCE_START_SAP CFG_INI_BOOL( \
  186. "force_start_sap", \
  187. 0, \
  188. "Force start SAP")
  189. #define CFG_ACS_ALL \
  190. CFG(CFG_ACS_WITH_MORE_PARAM) \
  191. CFG(CFG_AUTO_CHANNEL_SELECT_WEIGHT) \
  192. CFG(CFG_USER_AUTO_CHANNEL_SELECTION) \
  193. CFG(CFG_USER_ACS_DFS_LTE) \
  194. CFG(CFG_EXTERNAL_ACS_POLICY) \
  195. CFG(CFG_NORMALIZE_ACS_WEIGHT) \
  196. CFG(CFG_ACS_FORCE_START_SAP)
  197. #endif /* __CFG_MLME_ACS_H */