qcacld-3.0: Add INI support to configure BT Coex traffic Shaping

Add ini support to configure traffic shaping for COEX
i.e. coex_tput_shaping_enable.Host sends this INI to
Firmware via WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING.
Based on this enabled value, FW will do power save with AP
when BT page scan is enabled.

The default behaviour is to do a free run without notifying
a power save to the AP during the BT Page scan.

Change-Id: I4934c98911b66c7c834899ad7cdc72063e9c5153
CRs-Fixed: 3066980
This commit is contained in:
Krupali Dhanvijay
2021-12-09 18:50:33 +05:30
committed by Madan Koyyalamudi
parent 32596d0b63
commit 8a01b9d7ec
4 changed files with 49 additions and 1 deletions

View File

@@ -82,6 +82,8 @@ enum wlan_fwol_southbound_event {
* config legacy feature
* @ble_scan_coex_policy: BLE Scan policy, true - better BLE scan result, false
* better wlan throughput
* @coex_tput_shaping_enable: wifi traffic shaping enable, true - enable,
* false - disable
*/
struct wlan_fwol_coex_config {
uint8_t btc_mode;
@@ -103,6 +105,9 @@ struct wlan_fwol_coex_config {
bool btc_three_way_coex_config_legacy_enable;
#endif
bool ble_scan_coex_policy;
#ifdef FEATURE_COEX_TPUT_SHAPING_CONFIG
bool coex_tput_shaping_enable;
#endif
};
#define FWOL_THERMAL_LEVEL_MAX 4

View File

@@ -110,6 +110,10 @@ fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc,
fwol_three_way_coex_config_legacy_config_get(psoc, coex_config);
coex_config->ble_scan_coex_policy = cfg_get(psoc,
CFG_BLE_SCAN_COEX_POLICY);
#ifdef FEATURE_COEX_TPUT_SHAPING_CONFIG
coex_config->coex_tput_shaping_enable =
cfg_get(psoc, CFG_TPUT_SHAPING_ENABLE);
#endif
}
#ifdef THERMAL_STATS_SUPPORT

View File

@@ -375,6 +375,32 @@
#define SET_INIT_CHAIN_MODE_FOR_BTC_CFG
#endif
#ifdef FEATURE_COEX_TPUT_SHAPING_CONFIG
/*
* <ini>
* coex_tput_shaping_enable - Ini to enable wifi configure traffic shaping
* @Min: 0
* @Max: 1
* @Default: 0
*
* 0 - traffic shaping is disable
* 1 - traffic shaping is enable
*
* This ini is used to enable and disable wifi traffic shaping
*
* Usage: External
*
* </ini>
*/
#define CFG_TPUT_SHAPING_ENABLE CFG_INI_BOOL( \
"coex_tput_shaping_enable", \
0, \
"coex_tput_shaping_enable")
#define TPUT_SHAPING_ENABLE_CFG CFG(CFG_TPUT_SHAPING_ENABLE)
#else
#define TPUT_SHAPING_ENABLE_CFG
#endif
#define CFG_COEX_ALL \
CFG(CFG_BTC_MODE) \
CFG(CFG_ANTENNA_ISOLATION) \
@@ -391,5 +417,6 @@
CFG(CFG_BT_SCO_ALLOW_WLAN_2G_SCAN) \
THREE_WAY_COEX_CONFIG_LEGACY_CFG \
SET_INIT_CHAIN_MODE_FOR_BTC_CFG \
CFG(CFG_BLE_SCAN_COEX_POLICY)
CFG(CFG_BLE_SCAN_COEX_POLICY) \
TPUT_SHAPING_ENABLE_CFG
#endif

View File

@@ -7010,6 +7010,18 @@ static int hdd_send_coex_config_params(struct hdd_context *hdd_ctx,
goto err;
}
#ifdef FEATURE_COEX_TPUT_SHAPING_CONFIG
coex_cfg_params.config_type =
WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING;
coex_cfg_params.config_arg1 = config.coex_tput_shaping_enable;
status = sme_send_coex_config_cmd(&coex_cfg_params);
if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("Failed to send coex traffic shaping value %d",
coex_cfg_params.config_arg1);
goto err;
}
#endif
return 0;
err:
return -EINVAL;