conf.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. /*
  2. * This file is part of wl18xx
  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 __WL18XX_CONF_H__
  22. #define __WL18XX_CONF_H__
  23. #define WL18XX_CONF_MAGIC 0x10e100ca
  24. #define WL18XX_CONF_VERSION (WLCORE_CONF_VERSION | 0x0007)
  25. #define WL18XX_CONF_MASK 0x0000ffff
  26. #define WL18XX_CONF_SIZE (WLCORE_CONF_SIZE + \
  27. sizeof(struct wl18xx_priv_conf))
  28. #define NUM_OF_CHANNELS_11_ABG 150
  29. #define NUM_OF_CHANNELS_11_P 7
  30. #define SRF_TABLE_LEN 16
  31. #define PIN_MUXING_SIZE 2
  32. #define WL18XX_TRACE_LOSS_GAPS_TX 10
  33. #define WL18XX_TRACE_LOSS_GAPS_RX 18
  34. struct wl18xx_mac_and_phy_params {
  35. u8 phy_standalone;
  36. u8 spare0;
  37. u8 enable_clpc;
  38. u8 enable_tx_low_pwr_on_siso_rdl;
  39. u8 auto_detect;
  40. u8 dedicated_fem;
  41. u8 low_band_component;
  42. /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */
  43. u8 low_band_component_type;
  44. u8 high_band_component;
  45. /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */
  46. u8 high_band_component_type;
  47. u8 number_of_assembled_ant2_4;
  48. u8 number_of_assembled_ant5;
  49. u8 pin_muxing_platform_options[PIN_MUXING_SIZE];
  50. u8 external_pa_dc2dc;
  51. u8 tcxo_ldo_voltage;
  52. u8 xtal_itrim_val;
  53. u8 srf_state;
  54. u8 srf1[SRF_TABLE_LEN];
  55. u8 srf2[SRF_TABLE_LEN];
  56. u8 srf3[SRF_TABLE_LEN];
  57. u8 io_configuration;
  58. u8 sdio_configuration;
  59. u8 settings;
  60. u8 rx_profile;
  61. u8 per_chan_pwr_limit_arr_11abg[NUM_OF_CHANNELS_11_ABG];
  62. u8 pwr_limit_reference_11_abg;
  63. u8 per_chan_pwr_limit_arr_11p[NUM_OF_CHANNELS_11_P];
  64. u8 pwr_limit_reference_11p;
  65. u8 spare1;
  66. u8 per_chan_bo_mode_11_abg[13];
  67. u8 per_chan_bo_mode_11_p[4];
  68. u8 primary_clock_setting_time;
  69. u8 clock_valid_on_wake_up;
  70. u8 secondary_clock_setting_time;
  71. u8 board_type;
  72. /* enable point saturation */
  73. u8 psat;
  74. /* low/medium/high Tx power in dBm for STA-HP BG */
  75. s8 low_power_val;
  76. s8 med_power_val;
  77. s8 high_power_val;
  78. s8 per_sub_band_tx_trace_loss[WL18XX_TRACE_LOSS_GAPS_TX];
  79. s8 per_sub_band_rx_trace_loss[WL18XX_TRACE_LOSS_GAPS_RX];
  80. u8 tx_rf_margin;
  81. /* low/medium/high Tx power in dBm for other role */
  82. s8 low_power_val_2nd;
  83. s8 med_power_val_2nd;
  84. s8 high_power_val_2nd;
  85. u8 padding[1];
  86. } __packed;
  87. enum wl18xx_ht_mode {
  88. /* Default - use MIMO, fallback to SISO20 */
  89. HT_MODE_DEFAULT = 0,
  90. /* Wide - use SISO40 */
  91. HT_MODE_WIDE = 1,
  92. /* Use SISO20 */
  93. HT_MODE_SISO20 = 2,
  94. };
  95. struct wl18xx_ht_settings {
  96. /* DEFAULT / WIDE / SISO20 */
  97. u8 mode;
  98. } __packed;
  99. struct conf_ap_sleep_settings {
  100. /* Duty Cycle (20-80% of staying Awake) for IDLE AP
  101. * (0: disable)
  102. */
  103. u8 idle_duty_cycle;
  104. /* Duty Cycle (20-80% of staying Awake) for Connected AP
  105. * (0: disable)
  106. */
  107. u8 connected_duty_cycle;
  108. /* Maximum stations that are allowed to be connected to AP
  109. * (255: no limit)
  110. */
  111. u8 max_stations_thresh;
  112. /* Timeout till enabling the Sleep Mechanism after data stops
  113. * [unit: 100 msec]
  114. */
  115. u8 idle_conn_thresh;
  116. } __packed;
  117. struct wl18xx_priv_conf {
  118. /* Module params structures */
  119. struct wl18xx_ht_settings ht;
  120. /* this structure is copied wholesale to FW */
  121. struct wl18xx_mac_and_phy_params phy;
  122. struct conf_ap_sleep_settings ap_sleep;
  123. } __packed;
  124. enum wl18xx_sg_params {
  125. WL18XX_CONF_SG_PARAM_0 = 0,
  126. /* Configuration Parameters */
  127. WL18XX_CONF_SG_ANTENNA_CONFIGURATION,
  128. WL18XX_CONF_SG_ZIGBEE_COEX,
  129. WL18XX_CONF_SG_TIME_SYNC,
  130. WL18XX_CONF_SG_PARAM_4,
  131. WL18XX_CONF_SG_PARAM_5,
  132. WL18XX_CONF_SG_PARAM_6,
  133. WL18XX_CONF_SG_PARAM_7,
  134. WL18XX_CONF_SG_PARAM_8,
  135. WL18XX_CONF_SG_PARAM_9,
  136. WL18XX_CONF_SG_PARAM_10,
  137. WL18XX_CONF_SG_PARAM_11,
  138. WL18XX_CONF_SG_PARAM_12,
  139. WL18XX_CONF_SG_PARAM_13,
  140. WL18XX_CONF_SG_PARAM_14,
  141. WL18XX_CONF_SG_PARAM_15,
  142. WL18XX_CONF_SG_PARAM_16,
  143. WL18XX_CONF_SG_PARAM_17,
  144. WL18XX_CONF_SG_PARAM_18,
  145. WL18XX_CONF_SG_PARAM_19,
  146. WL18XX_CONF_SG_PARAM_20,
  147. WL18XX_CONF_SG_PARAM_21,
  148. WL18XX_CONF_SG_PARAM_22,
  149. WL18XX_CONF_SG_PARAM_23,
  150. WL18XX_CONF_SG_PARAM_24,
  151. WL18XX_CONF_SG_PARAM_25,
  152. /* Active Scan Parameters */
  153. WL18XX_CONF_SG_AUTO_SCAN_PROBE_REQ,
  154. WL18XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
  155. WL18XX_CONF_SG_PARAM_28,
  156. /* Passive Scan Parameters */
  157. WL18XX_CONF_SG_PARAM_29,
  158. WL18XX_CONF_SG_PARAM_30,
  159. WL18XX_CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
  160. /* Passive Scan in Dual Antenna Parameters */
  161. WL18XX_CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN,
  162. WL18XX_CONF_SG_BEACON_HV3_COLL_TH_IN_PASSIVE_SCAN,
  163. WL18XX_CONF_SG_TX_RX_PROTECT_BW_IN_PASSIVE_SCAN,
  164. /* General Parameters */
  165. WL18XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO,
  166. WL18XX_CONF_SG_PARAM_36,
  167. WL18XX_CONF_SG_BEACON_MISS_PERCENT,
  168. WL18XX_CONF_SG_PARAM_38,
  169. WL18XX_CONF_SG_RXT,
  170. WL18XX_CONF_SG_UNUSED,
  171. WL18XX_CONF_SG_ADAPTIVE_RXT_TXT,
  172. WL18XX_CONF_SG_GENERAL_USAGE_BIT_MAP,
  173. WL18XX_CONF_SG_HV3_MAX_SERVED,
  174. WL18XX_CONF_SG_PARAM_44,
  175. WL18XX_CONF_SG_PARAM_45,
  176. WL18XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
  177. WL18XX_CONF_SG_GEMINI_PARAM_47,
  178. WL18XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME,
  179. /* AP Parameters */
  180. WL18XX_CONF_SG_AP_BEACON_MISS_TX,
  181. WL18XX_CONF_SG_PARAM_50,
  182. WL18XX_CONF_SG_AP_BEACON_WINDOW_INTERVAL,
  183. WL18XX_CONF_SG_AP_CONNECTION_PROTECTION_TIME,
  184. WL18XX_CONF_SG_PARAM_53,
  185. WL18XX_CONF_SG_PARAM_54,
  186. /* CTS Diluting Parameters */
  187. WL18XX_CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH,
  188. WL18XX_CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER,
  189. WL18XX_CONF_SG_TEMP_PARAM_1,
  190. WL18XX_CONF_SG_TEMP_PARAM_2,
  191. WL18XX_CONF_SG_TEMP_PARAM_3,
  192. WL18XX_CONF_SG_TEMP_PARAM_4,
  193. WL18XX_CONF_SG_TEMP_PARAM_5,
  194. WL18XX_CONF_SG_TEMP_PARAM_6,
  195. WL18XX_CONF_SG_TEMP_PARAM_7,
  196. WL18XX_CONF_SG_TEMP_PARAM_8,
  197. WL18XX_CONF_SG_TEMP_PARAM_9,
  198. WL18XX_CONF_SG_TEMP_PARAM_10,
  199. WL18XX_CONF_SG_PARAMS_MAX,
  200. WL18XX_CONF_SG_PARAMS_ALL = 0xff
  201. };
  202. #endif /* __WL18XX_CONF_H__ */