conf.h 6.8 KB

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