conf.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * This file is part of wl12xx
  4. *
  5. * Copyright (C) 2011 Texas Instruments Inc.
  6. */
  7. #ifndef __WL12XX_CONF_H__
  8. #define __WL12XX_CONF_H__
  9. /* these are number of channels on the band divided by two, rounded up */
  10. #define CONF_TX_PWR_COMPENSATION_LEN_2 7
  11. #define CONF_TX_PWR_COMPENSATION_LEN_5 18
  12. struct wl12xx_conf_rf {
  13. /*
  14. * Per channel power compensation for 2.4GHz
  15. *
  16. * Range: s8
  17. */
  18. u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
  19. /*
  20. * Per channel power compensation for 5GHz
  21. *
  22. * Range: s8
  23. */
  24. u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
  25. };
  26. struct wl12xx_priv_conf {
  27. struct wl12xx_conf_rf rf;
  28. struct conf_memory_settings mem_wl127x;
  29. };
  30. enum wl12xx_sg_params {
  31. /*
  32. * Configure the min and max time BT gains the antenna
  33. * in WLAN / BT master basic rate
  34. *
  35. * Range: 0 - 255 (ms)
  36. */
  37. WL12XX_CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
  38. WL12XX_CONF_SG_ACL_BT_MASTER_MAX_BR,
  39. /*
  40. * Configure the min and max time BT gains the antenna
  41. * in WLAN / BT slave basic rate
  42. *
  43. * Range: 0 - 255 (ms)
  44. */
  45. WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_BR,
  46. WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_BR,
  47. /*
  48. * Configure the min and max time BT gains the antenna
  49. * in WLAN / BT master EDR
  50. *
  51. * Range: 0 - 255 (ms)
  52. */
  53. WL12XX_CONF_SG_ACL_BT_MASTER_MIN_EDR,
  54. WL12XX_CONF_SG_ACL_BT_MASTER_MAX_EDR,
  55. /*
  56. * Configure the min and max time BT gains the antenna
  57. * in WLAN / BT slave EDR
  58. *
  59. * Range: 0 - 255 (ms)
  60. */
  61. WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_EDR,
  62. WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_EDR,
  63. /*
  64. * The maximum time WLAN can gain the antenna
  65. * in WLAN PSM / BT master/slave BR
  66. *
  67. * Range: 0 - 255 (ms)
  68. */
  69. WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_BR,
  70. WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_BR,
  71. /*
  72. * The maximum time WLAN can gain the antenna
  73. * in WLAN PSM / BT master/slave EDR
  74. *
  75. * Range: 0 - 255 (ms)
  76. */
  77. WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_EDR,
  78. WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
  79. /* TODO: explain these values */
  80. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR,
  81. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR,
  82. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR,
  83. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR,
  84. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR,
  85. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR,
  86. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR,
  87. WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR,
  88. WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR,
  89. WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR,
  90. WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_BR,
  91. WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR,
  92. WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_EDR,
  93. WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR,
  94. /*
  95. * Compensation percentage of probe requests when scan initiated
  96. * during BT voice/ACL link.
  97. *
  98. * Range: 0 - 255 (%)
  99. */
  100. WL12XX_CONF_SG_AUTO_SCAN_PROBE_REQ,
  101. /*
  102. * Compensation percentage of probe requests when active scan initiated
  103. * during BT voice
  104. *
  105. * Range: 0 - 255 (%)
  106. */
  107. WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
  108. /*
  109. * Compensation percentage of WLAN active scan window if initiated
  110. * during BT A2DP
  111. *
  112. * Range: 0 - 1000 (%)
  113. */
  114. WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
  115. /*
  116. * Compensation percentage of WLAN passive scan window if initiated
  117. * during BT A2DP BR
  118. *
  119. * Range: 0 - 1000 (%)
  120. */
  121. WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_BR,
  122. /*
  123. * Compensation percentage of WLAN passive scan window if initiated
  124. * during BT A2DP EDR
  125. *
  126. * Range: 0 - 1000 (%)
  127. */
  128. WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_EDR,
  129. /*
  130. * Compensation percentage of WLAN passive scan window if initiated
  131. * during BT voice
  132. *
  133. * Range: 0 - 1000 (%)
  134. */
  135. WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_HV3,
  136. /* TODO: explain these values */
  137. WL12XX_CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN,
  138. WL12XX_CONF_SG_BCN_HV3_COLL_THR_IN_PASSIVE_SCAN,
  139. WL12XX_CONF_SG_TX_RX_PROTECT_BW_IN_PASSIVE_SCAN,
  140. /*
  141. * Defines whether the SG will force WLAN host to enter/exit PSM
  142. *
  143. * Range: 1 - SG can force, 0 - host handles PSM
  144. */
  145. WL12XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO,
  146. /*
  147. * Defines antenna configuration (single/dual antenna)
  148. *
  149. * Range: 0 - single antenna, 1 - dual antenna
  150. */
  151. WL12XX_CONF_SG_ANTENNA_CONFIGURATION,
  152. /*
  153. * The threshold (percent) of max consecutive beacon misses before
  154. * increasing priority of beacon reception.
  155. *
  156. * Range: 0 - 100 (%)
  157. */
  158. WL12XX_CONF_SG_BEACON_MISS_PERCENT,
  159. /*
  160. * Protection time of the DHCP procedure.
  161. *
  162. * Range: 0 - 100000 (ms)
  163. */
  164. WL12XX_CONF_SG_DHCP_TIME,
  165. /*
  166. * RX guard time before the beginning of a new BT voice frame during
  167. * which no new WLAN trigger frame is transmitted.
  168. *
  169. * Range: 0 - 100000 (us)
  170. */
  171. WL12XX_CONF_SG_RXT,
  172. /*
  173. * TX guard time before the beginning of a new BT voice frame during
  174. * which no new WLAN frame is transmitted.
  175. *
  176. * Range: 0 - 100000 (us)
  177. */
  178. WL12XX_CONF_SG_TXT,
  179. /*
  180. * Enable adaptive RXT/TXT algorithm. If disabled, the host values
  181. * will be utilized.
  182. *
  183. * Range: 0 - disable, 1 - enable
  184. */
  185. WL12XX_CONF_SG_ADAPTIVE_RXT_TXT,
  186. /* TODO: explain this value */
  187. WL12XX_CONF_SG_GENERAL_USAGE_BIT_MAP,
  188. /*
  189. * Number of consecutive BT voice frames not interrupted by WLAN
  190. *
  191. * Range: 0 - 100
  192. */
  193. WL12XX_CONF_SG_HV3_MAX_SERVED,
  194. /*
  195. * The used WLAN legacy service period during active BT ACL link
  196. *
  197. * Range: 0 - 255 (ms)
  198. */
  199. WL12XX_CONF_SG_PS_POLL_TIMEOUT,
  200. /*
  201. * The used WLAN UPSD service period during active BT ACL link
  202. *
  203. * Range: 0 - 255 (ms)
  204. */
  205. WL12XX_CONF_SG_UPSD_TIMEOUT,
  206. WL12XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
  207. WL12XX_CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
  208. WL12XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME,
  209. /* AP params */
  210. WL12XX_CONF_AP_BEACON_MISS_TX,
  211. WL12XX_CONF_AP_RX_WINDOW_AFTER_BEACON,
  212. WL12XX_CONF_AP_BEACON_WINDOW_INTERVAL,
  213. WL12XX_CONF_AP_CONNECTION_PROTECTION_TIME,
  214. WL12XX_CONF_AP_BT_ACL_VAL_BT_SERVE_TIME,
  215. WL12XX_CONF_AP_BT_ACL_VAL_WL_SERVE_TIME,
  216. /* CTS Diluting params */
  217. WL12XX_CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH,
  218. WL12XX_CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER,
  219. WL12XX_CONF_SG_TEMP_PARAM_1,
  220. WL12XX_CONF_SG_TEMP_PARAM_2,
  221. WL12XX_CONF_SG_TEMP_PARAM_3,
  222. WL12XX_CONF_SG_TEMP_PARAM_4,
  223. WL12XX_CONF_SG_TEMP_PARAM_5,
  224. WL12XX_CONF_SG_TEMP_PARAM_6,
  225. WL12XX_CONF_SG_TEMP_PARAM_7,
  226. WL12XX_CONF_SG_TEMP_PARAM_8,
  227. WL12XX_CONF_SG_TEMP_PARAM_9,
  228. WL12XX_CONF_SG_TEMP_PARAM_10,
  229. WL12XX_CONF_SG_PARAMS_MAX,
  230. WL12XX_CONF_SG_PARAMS_ALL = 0xff
  231. };
  232. #endif /* __WL12XX_CONF_H__ */