cfg_mlme_dfs.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. /*
  2. * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: This file contains centralized definitions of converged configuration.
  21. */
  22. #ifndef __CFG_MLME_DFS_H
  23. #define __CFG_MLME_DFS_H
  24. /*
  25. * <ini>
  26. * gsap_tx_leakage_threshold - sap tx leakage threshold
  27. * @Min: 100
  28. * @Max: 1000
  29. * @Default: 310
  30. *
  31. * customer can set this value from 100 to 1000 which means
  32. * sap tx leakage threshold is -10db to -100db
  33. *
  34. * Related: none
  35. *
  36. * Usage: External
  37. *
  38. * </ini>
  39. */
  40. #define CFG_SAP_TX_LEAKAGE_THRESHOLD CFG_INI_UINT( \
  41. "gsap_tx_leakage_threshold", \
  42. 100, \
  43. 1000, \
  44. 310, \
  45. CFG_VALUE_OR_DEFAULT, \
  46. "sap tx leakage threshold")
  47. /*
  48. * <ini>
  49. * gDFSradarMappingPriMultiplier - dfs pri multiplier
  50. * @Min: 1
  51. * @Max: 10
  52. * @Default: 2
  53. *
  54. * customer can set this value from 1 to 10 which means
  55. * host could handle missing pulses while there is high
  56. * channel loading, for example: 30% ETSI and 50% Japan W53
  57. *
  58. * Related: none
  59. *
  60. * Usage: External
  61. *
  62. * </ini>
  63. */
  64. #define CFG_DFS_RADAR_PRI_MULTIPLIER CFG_INI_UINT( \
  65. "gDFSradarMappingPriMultiplier", \
  66. 1, \
  67. 10, \
  68. 2, \
  69. CFG_VALUE_OR_DEFAULT, \
  70. "dfs pri multiplier")
  71. /*
  72. * <ini>
  73. * gDfsBeaconTxEnhanced - beacon tx enhanced
  74. * @Min: 0
  75. * @Max: 1
  76. * @Default: 0
  77. *
  78. * This ini is used to enhance dfs beacon tx
  79. *
  80. * Related: none
  81. *
  82. * Usage: External
  83. *
  84. * </ini>
  85. */
  86. #define CFG_DFS_BEACON_TX_ENHANCED CFG_INI_BOOL( \
  87. "gDfsBeaconTxEnhanced", \
  88. 0, \
  89. "beacon tx enhanced")
  90. /*
  91. * <ini>
  92. * gPreferNonDfsChanOnRadar - During random channel selection prefer non dfs
  93. * @Min: 0
  94. * @Max: 1
  95. * @Default: 0
  96. *
  97. * During random channel selection prefer non dfs.
  98. *
  99. * Related: none
  100. *
  101. * Usage: External
  102. *
  103. * </ini>
  104. */
  105. #define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR CFG_INI_BOOL( \
  106. "gPreferNonDfsChanOnRadar", \
  107. 0, \
  108. "channel selection prefer non dfs")
  109. /*
  110. * <ini>
  111. * dfsPhyerrFilterOffload - Enable dfs phyerror filtering offload in FW
  112. * @Min: 0
  113. * @Max: 1
  114. * @Default: 0
  115. *
  116. * This ini is used to to enable dfs phyerror filtering offload to firmware
  117. * Enabling it will cause basic phy error to be discarding in firmware.
  118. * Related: NA.
  119. *
  120. * Supported Feature: DFS
  121. *
  122. * Usage: External
  123. *
  124. * </ini>
  125. */
  126. #define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD CFG_INI_BOOL( \
  127. "dfsPhyerrFilterOffload", \
  128. 0, \
  129. "dfs phyerror filtering offload")
  130. /*
  131. * <ini>
  132. * gIgnoreCAC - Used to ignore CAC
  133. * @Min: 0
  134. * @Max: 1
  135. * @Default: 0
  136. *
  137. * This ini is used to set default CAC
  138. *
  139. * Related: None
  140. *
  141. * Supported Feature: DFS
  142. *
  143. * Usage: External
  144. *
  145. * </ini>
  146. */
  147. #define CFG_IGNORE_CAC CFG_INI_BOOL( \
  148. "gIgnoreCAC", \
  149. 0, \
  150. "ignore CAC on DFS channel")
  151. /*
  152. * <ini>
  153. * gDisableDFSChSwitch - Disable channel switch if radar is found
  154. * @Min: 0
  155. * @Max: 1
  156. * @Default: 0
  157. *
  158. * This ini is used to disable channel switch if radar is found
  159. * on that channel.
  160. * Related: NA.
  161. *
  162. * Supported Feature: DFS
  163. *
  164. * Usage: Internal
  165. *
  166. * </ini>
  167. */
  168. #define CFG_DISABLE_DFS_CH_SWITCH CFG_INI_BOOL( \
  169. "gDisableDFSChSwitch", \
  170. 0, \
  171. "Disable channel switch on radar")
  172. /*
  173. * <ini>
  174. * gEnableDFSMasterCap - Enable DFS master capability
  175. * @Min: 0
  176. * @Max: 1
  177. * @Default: 0
  178. *
  179. * This ini is used to enable/disable the DFS master capability.
  180. * Disabling it will cause driver to not advertise the spectrum
  181. * management capability
  182. * Related: NA.
  183. *
  184. * Supported Feature: DFS
  185. *
  186. * Usage: External
  187. *
  188. * </ini>
  189. */
  190. #define CFG_ENABLE_DFS_MASTER_CAPABILITY CFG_INI_BOOL( \
  191. "gEnableDFSMasterCap", \
  192. 0, \
  193. "DFS master mode capability")
  194. /*
  195. * <ini>
  196. * gDisableDfsJapanW53 - Block W53 channels in random channel selection
  197. * @Min: 0
  198. * @Max: 1
  199. * @Default: 0
  200. *
  201. * This ini is used to block W53 Japan channel in random channel selection
  202. *
  203. * Related: none
  204. *
  205. * Supported Feature: DFS
  206. *
  207. * Usage: External
  208. *
  209. * </ini>
  210. */
  211. #define CFG_DISABLE_DFS_JAPAN_W53 CFG_INI_BOOL( \
  212. "gDisableDfsJapanW53", \
  213. 0, \
  214. "Block W53 channels in random selection")
  215. #define CFG_DFS_ALL \
  216. CFG(CFG_IGNORE_CAC) \
  217. CFG(CFG_DISABLE_DFS_CH_SWITCH) \
  218. CFG(CFG_DFS_BEACON_TX_ENHANCED) \
  219. CFG(CFG_SAP_TX_LEAKAGE_THRESHOLD) \
  220. CFG(CFG_DFS_RADAR_PRI_MULTIPLIER) \
  221. CFG(CFG_ENABLE_NON_DFS_CHAN_ON_RADAR) \
  222. CFG(CFG_ENABLE_DFS_MASTER_CAPABILITY) \
  223. CFG(CFG_DISABLE_DFS_JAPAN_W53) \
  224. CFG(CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD)
  225. #endif /* __CFG_MLME_DFS_H */