qcacld-3.0: Add INI to not consider TPE IE

Sometimes, the AP sends low values in the TPE IE resulting in low TX
power. This causes DUT to have throughput/connection issues. Add an INI
to skip over TPE IE only in 2g/5g case. TPE IE will always be considered
in 6G band.

Change-Id: Ia0750195bb0aabf304743e1ad89c8f6d0c9ef1a3
CRs-fixed: 2936492
This commit is contained in:
Lincoln Tran
2021-04-30 11:25:14 -07:00
committed by Madan Koyyalamudi
szülő 41f350b6a2
commit 3dc6bd54f5
5 fájl változott, egészen pontosan 51 új sor hozzáadva és 1 régi sor törölve

Fájl megtekintése

@@ -1899,6 +1899,7 @@ static void mlme_init_power_cfg(struct wlan_objmgr_psoc *psoc,
power->local_power_constraint =
(uint8_t)cfg_default(CFG_LOCAL_POWER_CONSTRAINT);
power->use_local_tpe = cfg_get(psoc, CFG_USE_LOCAL_TPE);
power->skip_tpe = cfg_get(psoc, CFG_SKIP_TPE_CONSIDERATION);
}
static void mlme_init_roam_scoring_cfg(struct wlan_objmgr_psoc *psoc,

Fájl megtekintése

@@ -167,6 +167,31 @@
#define CFG_USE_LOCAL_TPE CFG_INI_BOOL("use_local_tpe", false, \
"use local or regulatory TPE")
/*
* <ini>
* skip_tpe_consideration - honoring TPE IE value in tx power calculation for
* 2G/5G bands
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is to determine if the TPE IE should be considered in the Tx power
* calculation. If the ini is set, host will consider TPE IE in case of 6GHz
* only (skip over in 2GHz or 5GHz case). If the ini is not set, honor the TPE
* IE values in all bands.
*
* Related: None
*
* Supported Feature: Transmit power calculation (TPC)
*
* Usage: External
*
* </ini>
*/
#define CFG_SKIP_TPE_CONSIDERATION CFG_INI_BOOL("skip_tpe_consideration", \
false, \
"consider TPE IE in tx power")
#define CFG_MLME_POWER_ALL \
CFG(CFG_MAX_TX_POWER_2_4) \
CFG(CFG_MAX_TX_POWER_5) \
@@ -175,6 +200,7 @@
CFG(CFG_SET_TXPOWER_LIMIT5G) \
CFG(CFG_CURRENT_TX_POWER_LEVEL) \
CFG(CFG_LOCAL_POWER_CONSTRAINT) \
CFG(CFG_USE_LOCAL_TPE)
CFG(CFG_USE_LOCAL_TPE) \
CFG(CFG_SKIP_TPE_CONSIDERATION)
#endif /* __CFG_MLME_POWER_H */

Fájl megtekintése

@@ -3190,6 +3190,16 @@ mlme_is_twt_enabled(struct wlan_objmgr_psoc *psoc)
*/
bool wlan_mlme_is_local_tpe_pref(struct wlan_objmgr_psoc *psoc);
/**
* wlan_mlme_skip_tpe() - Get preference to not consider TPE in 2G/5G case
*
* @psoc: pointer to psoc object
*
* Return: True if host should not consider TPE IE in TX power calculation when
* operating in 2G/5G bands, false if host should always consider TPE IE values
*/
bool wlan_mlme_skip_tpe(struct wlan_objmgr_psoc *psoc);
/**
* wlan_mlme_is_data_stall_recovery_fw_supported() - Check if data stall
* recovery is supported by fw

Fájl megtekintése

@@ -2200,6 +2200,7 @@ struct mlme_power_usage {
* @current_tx_power_level: current tx power level
* @local_power_constraint: local power constraint
* @use_local_tpe: preference to use local or regulatory TPE
* @skip_tpe: option to not consider TPE values in 2.4G/5G bands
*/
struct wlan_mlme_power {
struct mlme_max_tx_power_24 max_tx_power_24;
@@ -2212,6 +2213,7 @@ struct wlan_mlme_power {
uint8_t current_tx_power_level;
uint8_t local_power_constraint;
bool use_local_tpe;
bool skip_tpe;
};
/*

Fájl megtekintése

@@ -4896,6 +4896,17 @@ bool wlan_mlme_is_local_tpe_pref(struct wlan_objmgr_psoc *psoc)
return mlme_obj->cfg.power.use_local_tpe;
}
bool wlan_mlme_skip_tpe(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
mlme_obj = mlme_get_psoc_ext_obj(psoc);
if (!mlme_obj)
return false;
return mlme_obj->cfg.power.skip_tpe;
}
#ifdef WLAN_FEATURE_11BE
QDF_STATUS mlme_cfg_get_eht_caps(struct wlan_objmgr_psoc *psoc,
tDot11fIEeht_cap *eht_cap)