qcacld-3.0: Fix bss scoring params

Currently the driver calculates the nss score
based upon the max capability of the AP, and not the
hw_mde config which would be there after connection
for example, the driver calculates the score for a
2x2 11n AP, and 1x1 VHT (11ac) AP, it connects to the
11n AP in 1x1 mode, if a concurrent connection is
present, which affects throughput

Fix is to check whether the current AP channel results
in DBS or not, if yes then change the NSS to 1 instead of
2

Change-Id: I902393be5ea9cf88def9da6b3458bb6048655ce7
CRs-Fixed: 2288362
This commit is contained in:
gaurank kathpalia 2018-10-04 01:35:18 +05:30 • committed by nshrivas
commit ae52c982e4

View file

@ -14034,6 +14034,8 @@ hdd_update_score_config(struct scoring_config *score_config,
struct hdd_config *cfg)
{
struct hdd_context *hdd_ctx;
bool enable2x2 = false;
QDF_STATUS status;
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (!hdd_ctx) {
@ -14045,7 +14047,15 @@ hdd_update_score_config(struct scoring_config *score_config,
score_config->cb_mode_24G = cfg->nChannelBondingMode24GHz;
score_config->cb_mode_5G = cfg->nChannelBondingMode5GHz;
score_config->nss = cfg->enable2x2 ? 2 : 1;
status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &enable2x2);
if (!QDF_IS_STATUS_SUCCESS(status))
hdd_err("unable to get enable2x2");
score_config->vdev_nss_24g =
enable2x2 ? CFG_STA_NSS(cfg->vdev_type_nss_2g) : 1;
score_config->vdev_nss_5g =
enable2x2 ? CFG_STA_NSS(cfg->vdev_type_nss_5g) : 1;
if (cfg->dot11Mode == eHDD_DOT11_MODE_AUTO ||
cfg->dot11Mode == eHDD_DOT11_MODE_11ax ||