18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This file is part of wl12xx 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2011 Texas Instruments Inc. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef __WL12XX_CONF_H__ 98c2ecf20Sopenharmony_ci#define __WL12XX_CONF_H__ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* these are number of channels on the band divided by two, rounded up */ 128c2ecf20Sopenharmony_ci#define CONF_TX_PWR_COMPENSATION_LEN_2 7 138c2ecf20Sopenharmony_ci#define CONF_TX_PWR_COMPENSATION_LEN_5 18 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_cistruct wl12xx_conf_rf { 168c2ecf20Sopenharmony_ci /* 178c2ecf20Sopenharmony_ci * Per channel power compensation for 2.4GHz 188c2ecf20Sopenharmony_ci * 198c2ecf20Sopenharmony_ci * Range: s8 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2]; 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci /* 248c2ecf20Sopenharmony_ci * Per channel power compensation for 5GHz 258c2ecf20Sopenharmony_ci * 268c2ecf20Sopenharmony_ci * Range: s8 278c2ecf20Sopenharmony_ci */ 288c2ecf20Sopenharmony_ci u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5]; 298c2ecf20Sopenharmony_ci}; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_cistruct wl12xx_priv_conf { 328c2ecf20Sopenharmony_ci struct wl12xx_conf_rf rf; 338c2ecf20Sopenharmony_ci struct conf_memory_settings mem_wl127x; 348c2ecf20Sopenharmony_ci}; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cienum wl12xx_sg_params { 378c2ecf20Sopenharmony_ci /* 388c2ecf20Sopenharmony_ci * Configure the min and max time BT gains the antenna 398c2ecf20Sopenharmony_ci * in WLAN / BT master basic rate 408c2ecf20Sopenharmony_ci * 418c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 428c2ecf20Sopenharmony_ci */ 438c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_MASTER_MIN_BR = 0, 448c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_MASTER_MAX_BR, 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci /* 478c2ecf20Sopenharmony_ci * Configure the min and max time BT gains the antenna 488c2ecf20Sopenharmony_ci * in WLAN / BT slave basic rate 498c2ecf20Sopenharmony_ci * 508c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 518c2ecf20Sopenharmony_ci */ 528c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_BR, 538c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_BR, 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci /* 568c2ecf20Sopenharmony_ci * Configure the min and max time BT gains the antenna 578c2ecf20Sopenharmony_ci * in WLAN / BT master EDR 588c2ecf20Sopenharmony_ci * 598c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 608c2ecf20Sopenharmony_ci */ 618c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_MASTER_MIN_EDR, 628c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_MASTER_MAX_EDR, 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci /* 658c2ecf20Sopenharmony_ci * Configure the min and max time BT gains the antenna 668c2ecf20Sopenharmony_ci * in WLAN / BT slave EDR 678c2ecf20Sopenharmony_ci * 688c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 698c2ecf20Sopenharmony_ci */ 708c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_EDR, 718c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_EDR, 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci /* 748c2ecf20Sopenharmony_ci * The maximum time WLAN can gain the antenna 758c2ecf20Sopenharmony_ci * in WLAN PSM / BT master/slave BR 768c2ecf20Sopenharmony_ci * 778c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 788c2ecf20Sopenharmony_ci */ 798c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_BR, 808c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_BR, 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci /* 838c2ecf20Sopenharmony_ci * The maximum time WLAN can gain the antenna 848c2ecf20Sopenharmony_ci * in WLAN PSM / BT master/slave EDR 858c2ecf20Sopenharmony_ci * 868c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 878c2ecf20Sopenharmony_ci */ 888c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_EDR, 898c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_EDR, 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci /* TODO: explain these values */ 928c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR, 938c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR, 948c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR, 958c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR, 968c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR, 978c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR, 988c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR, 998c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR, 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR, 1028c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR, 1038c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_BR, 1048c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR, 1058c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_EDR, 1068c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR, 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci /* 1098c2ecf20Sopenharmony_ci * Compensation percentage of probe requests when scan initiated 1108c2ecf20Sopenharmony_ci * during BT voice/ACL link. 1118c2ecf20Sopenharmony_ci * 1128c2ecf20Sopenharmony_ci * Range: 0 - 255 (%) 1138c2ecf20Sopenharmony_ci */ 1148c2ecf20Sopenharmony_ci WL12XX_CONF_SG_AUTO_SCAN_PROBE_REQ, 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci /* 1178c2ecf20Sopenharmony_ci * Compensation percentage of probe requests when active scan initiated 1188c2ecf20Sopenharmony_ci * during BT voice 1198c2ecf20Sopenharmony_ci * 1208c2ecf20Sopenharmony_ci * Range: 0 - 255 (%) 1218c2ecf20Sopenharmony_ci */ 1228c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3, 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci /* 1258c2ecf20Sopenharmony_ci * Compensation percentage of WLAN active scan window if initiated 1268c2ecf20Sopenharmony_ci * during BT A2DP 1278c2ecf20Sopenharmony_ci * 1288c2ecf20Sopenharmony_ci * Range: 0 - 1000 (%) 1298c2ecf20Sopenharmony_ci */ 1308c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP, 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci /* 1338c2ecf20Sopenharmony_ci * Compensation percentage of WLAN passive scan window if initiated 1348c2ecf20Sopenharmony_ci * during BT A2DP BR 1358c2ecf20Sopenharmony_ci * 1368c2ecf20Sopenharmony_ci * Range: 0 - 1000 (%) 1378c2ecf20Sopenharmony_ci */ 1388c2ecf20Sopenharmony_ci WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_BR, 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci /* 1418c2ecf20Sopenharmony_ci * Compensation percentage of WLAN passive scan window if initiated 1428c2ecf20Sopenharmony_ci * during BT A2DP EDR 1438c2ecf20Sopenharmony_ci * 1448c2ecf20Sopenharmony_ci * Range: 0 - 1000 (%) 1458c2ecf20Sopenharmony_ci */ 1468c2ecf20Sopenharmony_ci WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_EDR, 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci /* 1498c2ecf20Sopenharmony_ci * Compensation percentage of WLAN passive scan window if initiated 1508c2ecf20Sopenharmony_ci * during BT voice 1518c2ecf20Sopenharmony_ci * 1528c2ecf20Sopenharmony_ci * Range: 0 - 1000 (%) 1538c2ecf20Sopenharmony_ci */ 1548c2ecf20Sopenharmony_ci WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_HV3, 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci /* TODO: explain these values */ 1578c2ecf20Sopenharmony_ci WL12XX_CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN, 1588c2ecf20Sopenharmony_ci WL12XX_CONF_SG_BCN_HV3_COLL_THR_IN_PASSIVE_SCAN, 1598c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TX_RX_PROTECT_BW_IN_PASSIVE_SCAN, 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci /* 1628c2ecf20Sopenharmony_ci * Defines whether the SG will force WLAN host to enter/exit PSM 1638c2ecf20Sopenharmony_ci * 1648c2ecf20Sopenharmony_ci * Range: 1 - SG can force, 0 - host handles PSM 1658c2ecf20Sopenharmony_ci */ 1668c2ecf20Sopenharmony_ci WL12XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO, 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci /* 1698c2ecf20Sopenharmony_ci * Defines antenna configuration (single/dual antenna) 1708c2ecf20Sopenharmony_ci * 1718c2ecf20Sopenharmony_ci * Range: 0 - single antenna, 1 - dual antenna 1728c2ecf20Sopenharmony_ci */ 1738c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ANTENNA_CONFIGURATION, 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci /* 1768c2ecf20Sopenharmony_ci * The threshold (percent) of max consecutive beacon misses before 1778c2ecf20Sopenharmony_ci * increasing priority of beacon reception. 1788c2ecf20Sopenharmony_ci * 1798c2ecf20Sopenharmony_ci * Range: 0 - 100 (%) 1808c2ecf20Sopenharmony_ci */ 1818c2ecf20Sopenharmony_ci WL12XX_CONF_SG_BEACON_MISS_PERCENT, 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci /* 1848c2ecf20Sopenharmony_ci * Protection time of the DHCP procedure. 1858c2ecf20Sopenharmony_ci * 1868c2ecf20Sopenharmony_ci * Range: 0 - 100000 (ms) 1878c2ecf20Sopenharmony_ci */ 1888c2ecf20Sopenharmony_ci WL12XX_CONF_SG_DHCP_TIME, 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci /* 1918c2ecf20Sopenharmony_ci * RX guard time before the beginning of a new BT voice frame during 1928c2ecf20Sopenharmony_ci * which no new WLAN trigger frame is transmitted. 1938c2ecf20Sopenharmony_ci * 1948c2ecf20Sopenharmony_ci * Range: 0 - 100000 (us) 1958c2ecf20Sopenharmony_ci */ 1968c2ecf20Sopenharmony_ci WL12XX_CONF_SG_RXT, 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_ci /* 1998c2ecf20Sopenharmony_ci * TX guard time before the beginning of a new BT voice frame during 2008c2ecf20Sopenharmony_ci * which no new WLAN frame is transmitted. 2018c2ecf20Sopenharmony_ci * 2028c2ecf20Sopenharmony_ci * Range: 0 - 100000 (us) 2038c2ecf20Sopenharmony_ci */ 2048c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TXT, 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ci /* 2078c2ecf20Sopenharmony_ci * Enable adaptive RXT/TXT algorithm. If disabled, the host values 2088c2ecf20Sopenharmony_ci * will be utilized. 2098c2ecf20Sopenharmony_ci * 2108c2ecf20Sopenharmony_ci * Range: 0 - disable, 1 - enable 2118c2ecf20Sopenharmony_ci */ 2128c2ecf20Sopenharmony_ci WL12XX_CONF_SG_ADAPTIVE_RXT_TXT, 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci /* TODO: explain this value */ 2158c2ecf20Sopenharmony_ci WL12XX_CONF_SG_GENERAL_USAGE_BIT_MAP, 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ci /* 2188c2ecf20Sopenharmony_ci * Number of consecutive BT voice frames not interrupted by WLAN 2198c2ecf20Sopenharmony_ci * 2208c2ecf20Sopenharmony_ci * Range: 0 - 100 2218c2ecf20Sopenharmony_ci */ 2228c2ecf20Sopenharmony_ci WL12XX_CONF_SG_HV3_MAX_SERVED, 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci /* 2258c2ecf20Sopenharmony_ci * The used WLAN legacy service period during active BT ACL link 2268c2ecf20Sopenharmony_ci * 2278c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 2288c2ecf20Sopenharmony_ci */ 2298c2ecf20Sopenharmony_ci WL12XX_CONF_SG_PS_POLL_TIMEOUT, 2308c2ecf20Sopenharmony_ci 2318c2ecf20Sopenharmony_ci /* 2328c2ecf20Sopenharmony_ci * The used WLAN UPSD service period during active BT ACL link 2338c2ecf20Sopenharmony_ci * 2348c2ecf20Sopenharmony_ci * Range: 0 - 255 (ms) 2358c2ecf20Sopenharmony_ci */ 2368c2ecf20Sopenharmony_ci WL12XX_CONF_SG_UPSD_TIMEOUT, 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci WL12XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD, 2398c2ecf20Sopenharmony_ci WL12XX_CONF_SG_STA_RX_WINDOW_AFTER_DTIM, 2408c2ecf20Sopenharmony_ci WL12XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME, 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ci /* AP params */ 2438c2ecf20Sopenharmony_ci WL12XX_CONF_AP_BEACON_MISS_TX, 2448c2ecf20Sopenharmony_ci WL12XX_CONF_AP_RX_WINDOW_AFTER_BEACON, 2458c2ecf20Sopenharmony_ci WL12XX_CONF_AP_BEACON_WINDOW_INTERVAL, 2468c2ecf20Sopenharmony_ci WL12XX_CONF_AP_CONNECTION_PROTECTION_TIME, 2478c2ecf20Sopenharmony_ci WL12XX_CONF_AP_BT_ACL_VAL_BT_SERVE_TIME, 2488c2ecf20Sopenharmony_ci WL12XX_CONF_AP_BT_ACL_VAL_WL_SERVE_TIME, 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci /* CTS Diluting params */ 2518c2ecf20Sopenharmony_ci WL12XX_CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH, 2528c2ecf20Sopenharmony_ci WL12XX_CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER, 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_1, 2558c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_2, 2568c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_3, 2578c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_4, 2588c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_5, 2598c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_6, 2608c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_7, 2618c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_8, 2628c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_9, 2638c2ecf20Sopenharmony_ci WL12XX_CONF_SG_TEMP_PARAM_10, 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci WL12XX_CONF_SG_PARAMS_MAX, 2668c2ecf20Sopenharmony_ci WL12XX_CONF_SG_PARAMS_ALL = 0xff 2678c2ecf20Sopenharmony_ci}; 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci#endif /* __WL12XX_CONF_H__ */ 270