From 600758fada04af6ecf2dab879db132e45e27fd0b Mon Sep 17 00:00:00 2001 From: Arun Kumar Khandavalli Date: Thu, 10 Sep 2020 16:56:27 +0530 Subject: [PATCH] qcacld-3.0: sent the correct nss to the firmware The current contract between the host and the firmware is that 0 means 1x1 nss 1 means 2x2 nss with the new nl80211 interface the driver is sending 1 for 1x1 and 2 for 2x2 nss, so the command is failing for the 2x2 nss. Send the nss value as per the current expectation so that rate setting would take place. Change-Id: I3cb376704e7e3430fbce0015183812484127cbb8 CRs-Fixed: 2772297 --- core/hdd/src/wlan_hdd_cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 0c006bb8adcc..96f4f5fc0be9 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -24330,7 +24330,7 @@ static int __wlan_hdd_cfg80211_set_bitrate_mask(struct wiphy *wiphy, for (i = 0; i < QDF_ARRAY_SIZE(mask->control[band].ht_mcs); i++) { if (qdf_get_hweight8(mask->control[band].ht_mcs[i]) == 1) { - nss = i + 1; + nss = i; rate_index = (ffs(mask->control[band].ht_mcs[i]) - 1); bit_rate = hdd_assemble_rate_code(WMI_RATE_PREAMBLE_HT, nss, rate_index); @@ -24340,7 +24340,7 @@ static int __wlan_hdd_cfg80211_set_bitrate_mask(struct wiphy *wiphy, for (i = 0; i < QDF_ARRAY_SIZE(mask->control[band].vht_mcs); i++) { if (qdf_get_hweight16(mask->control[band].vht_mcs[i]) == 1) { - nss = i + 1; + nss = i; rate_index = (ffs(mask->control[band].vht_mcs[i]) - 1); bit_rate = hdd_assemble_rate_code(WMI_RATE_PREAMBLE_VHT, nss, rate_index);