cfg_coex.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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_COEX_H
  22. #define __CFG_COEX_H
  23. /*
  24. * <ini>
  25. * gSetBTCMode - Config BTC mode
  26. * @Min: 0
  27. * @Max: 2
  28. * @Default: 0
  29. *
  30. * 0 - TDD
  31. * 1 - FDD
  32. * 2 - Hybrid
  33. *
  34. * Usage: External
  35. *
  36. * </ini>
  37. */
  38. #define CFG_BTC_MODE CFG_INI_UINT( \
  39. "gSetBTCMode", \
  40. 0, \
  41. 2, \
  42. 0, \
  43. CFG_VALUE_OR_DEFAULT, \
  44. "BTC mode")
  45. /*
  46. * <ini>
  47. * gSetAntennaIsolation - Set Antenna Isolation
  48. * @Min: 0
  49. * @Max: 255
  50. * @Default: 25
  51. *
  52. * Usage: External
  53. *
  54. * </ini>
  55. */
  56. #define CFG_ANTENNA_ISOLATION CFG_INI_UINT( \
  57. "gSetAntennaIsolation", \
  58. 0, \
  59. 255, \
  60. 25, \
  61. CFG_VALUE_OR_DEFAULT, \
  62. "Antenna Isolation")
  63. /*
  64. * <ini>
  65. * gSetMaxTxPowerForBTC - Set Max WLAN Tx power in COEX scenario
  66. * @Min: 0
  67. * @Max: 100
  68. * @Default: 100
  69. *
  70. * Usage: External
  71. *
  72. * </ini>
  73. */
  74. #define CFG_MAX_TX_POWER_FOR_BTC CFG_INI_UINT( \
  75. "gSetMaxTxPowerForBTC", \
  76. 0, \
  77. 100, \
  78. 100, \
  79. CFG_VALUE_OR_DEFAULT, \
  80. "Max Tx Power for BTC")
  81. /*
  82. * <ini>
  83. * gSetWlanLowRssiThreshold - Set WLAN low RSSI threshold for BTC mode switching
  84. * @Min: -100
  85. * @Max: 0
  86. * @Default: -80
  87. *
  88. * Usage: External
  89. *
  90. * </ini>
  91. */
  92. #define CFG_WLAN_LOW_RSSI_THRESHOLD CFG_INI_INT( \
  93. "gSetWlanLowRssiThreshold", \
  94. -100, \
  95. 0, \
  96. -80, \
  97. CFG_VALUE_OR_DEFAULT, \
  98. "WLAN Low RSSI Threshold")
  99. /*
  100. * <ini>
  101. * gSetBtLowRssiThreshold - Set BT low RSSI threshold for BTC mode switching
  102. * @Min: -100
  103. * @Max: 0
  104. * @Default: -80
  105. *
  106. * Usage: External
  107. *
  108. * </ini>
  109. */
  110. #define CFG_BT_LOW_RSSI_THRESHOLD CFG_INI_INT( \
  111. "gSetBtLowRssiThreshold", \
  112. -100, \
  113. 0, \
  114. -80, \
  115. CFG_VALUE_OR_DEFAULT, \
  116. "BT Low RSSI Threshold")
  117. /*
  118. * <ini>
  119. * gSetBtInterferenceLowLL - Set lower limit of low level BT interference
  120. * @Min: -100
  121. * @Max: 100
  122. * @Default: -25
  123. *
  124. * Usage: External
  125. *
  126. * </ini>
  127. */
  128. #define CFG_BT_INTERFERENCE_LOW_LL CFG_INI_INT( \
  129. "gSetBtInterferenceLowLL", \
  130. -100, \
  131. 100, \
  132. -25, \
  133. CFG_VALUE_OR_DEFAULT, \
  134. "BT Interference Low LL")
  135. /*
  136. * <ini>
  137. * gSetBtInterferenceLowUL - Set upper limit of low level BT interference
  138. * @Min: -100
  139. * @Max: 100
  140. * @Default: -21
  141. *
  142. * Usage: External
  143. *
  144. * </ini>
  145. */
  146. #define CFG_BT_INTERFERENCE_LOW_UL CFG_INI_INT( \
  147. "gSetBtInterferenceLowUL", \
  148. -100, \
  149. 100, \
  150. -21, \
  151. CFG_VALUE_OR_DEFAULT, \
  152. "BT Interference Low UL")
  153. /*
  154. * <ini>
  155. * gSetBtInterferenceMediumLL - Set lower limit of medium level BT interference
  156. * @Min: -100
  157. * @Max: 100
  158. * @Default: -20
  159. *
  160. * Usage: External
  161. *
  162. * </ini>
  163. */
  164. #define CFG_BT_INTERFERENCE_MEDIUM_LL CFG_INI_INT( \
  165. "gSetBtInterferenceMediumLL", \
  166. -100, \
  167. 100, \
  168. -20, \
  169. CFG_VALUE_OR_DEFAULT, \
  170. "BT Interference Medium LL")
  171. /*
  172. * <ini>
  173. * gSetBtInterferenceMediumUL - Set upper limit of medium level BT interference
  174. * @Min: -100
  175. * @Max: 100
  176. * @Default: -16
  177. *
  178. * Usage: External
  179. *
  180. * </ini>
  181. */
  182. #define CFG_BT_INTERFERENCE_MEDIUM_UL CFG_INI_INT( \
  183. "gSetBtInterferenceMediumUL", \
  184. -100, \
  185. 100, \
  186. -16, \
  187. CFG_VALUE_OR_DEFAULT, \
  188. "BT Interference Medium UL")
  189. /*
  190. * <ini>
  191. * gSetBtInterferenceHighLL - Set lower limit of high level BT interference
  192. * @Min: -100
  193. * @Max: 100
  194. * @Default: -15
  195. *
  196. * Usage: External
  197. *
  198. * </ini>
  199. */
  200. #define CFG_BT_INTERFERENCE_HIGH_LL CFG_INI_INT( \
  201. "gSetBtInterferenceHighLL", \
  202. -100, \
  203. 100, \
  204. -15, \
  205. CFG_VALUE_OR_DEFAULT, \
  206. "BT Interference High LL")
  207. /*
  208. * <ini>
  209. * gSetBtInterferenceHighUL - Set upper limit of high level BT interference
  210. * @Min: -100
  211. * @Max: 100
  212. * @Default: -11
  213. *
  214. * Usage: External
  215. *
  216. * </ini>
  217. */
  218. #define CFG_BT_INTERFERENCE_HIGH_UL CFG_INI_INT( \
  219. "gSetBtInterferenceHighUL", \
  220. -100, \
  221. 100, \
  222. -11, \
  223. CFG_VALUE_OR_DEFAULT, \
  224. "BT Interference High UL")
  225. #ifdef FEATURE_MPTA_HELPER
  226. /*
  227. * <ini>
  228. * gMPTAHelperEnable - Enable MPTA Helper
  229. * @Min: 0
  230. * @Max: 1
  231. * @Default: 0
  232. *
  233. * This ini is used to enable or disable coex MPTA Helper.
  234. *
  235. * Usage: External
  236. *
  237. * </ini>
  238. */
  239. #define CFG_COEX_MPTA_HELPER CFG_INI_BOOL( \
  240. "gMPTAHelperEnable", \
  241. 0, \
  242. "Enable/Disable MPTA Helper")
  243. #define COEX_MPTA_HELPER_CFG CFG(CFG_COEX_MPTA_HELPER)
  244. #else
  245. #define COEX_MPTA_HELPER_CFG
  246. #endif
  247. /*
  248. * <ini>
  249. * gBtScoAllowWlan2GScan - Allow wlan 2g scan when BT SCO connection is on
  250. * @Min: 0
  251. * @Max: 1
  252. * @Default: 1
  253. *
  254. * 0 - Disable
  255. * 1 - Enable
  256. *
  257. * This ini is used to enable or disable wlan 2g scan
  258. * when BT SCO connection is on.
  259. *
  260. *
  261. * Usage: External
  262. *
  263. * </ini>
  264. */
  265. #define CFG_BT_SCO_ALLOW_WLAN_2G_SCAN CFG_INI_BOOL( \
  266. "gBtScoAllowWlan2GScan", \
  267. 1, \
  268. "Bt Sco Allow Wlan 2G Scan")
  269. #define CFG_COEX_ALL \
  270. CFG(CFG_BTC_MODE) \
  271. CFG(CFG_ANTENNA_ISOLATION) \
  272. CFG(CFG_MAX_TX_POWER_FOR_BTC) \
  273. CFG(CFG_WLAN_LOW_RSSI_THRESHOLD) \
  274. CFG(CFG_BT_LOW_RSSI_THRESHOLD) \
  275. CFG(CFG_BT_INTERFERENCE_LOW_LL) \
  276. CFG(CFG_BT_INTERFERENCE_LOW_UL) \
  277. CFG(CFG_BT_INTERFERENCE_MEDIUM_LL) \
  278. CFG(CFG_BT_INTERFERENCE_MEDIUM_UL) \
  279. CFG(CFG_BT_INTERFERENCE_HIGH_LL) \
  280. CFG(CFG_BT_INTERFERENCE_HIGH_UL) \
  281. COEX_MPTA_HELPER_CFG \
  282. CFG(CFG_BT_SCO_ALLOW_WLAN_2G_SCAN)
  283. #endif