Skip to content

Commit e2578eb

Browse files
Sathishkumar Muruganandamgregkh
authored andcommitted
ath10k: fix VHT NSS calculation when STBC is enabled
[ Upstream commit 99f41b8 ] When STBC is enabled, NSTS_SU value need to be accounted for VHT NSS calculation for SU case. Without this fix, 1SS + STBC enabled case was reported wrongly as 2SS in radiotap header on monitor mode capture. Tested-on: QCA9984 10.4-3.10-00047 Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1597392971-3897-1-git-send-email-murugana@codeaurora.org Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 663992d commit e2578eb

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/net/wireless/ath/ath10k/htt_rx.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,7 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
949949
u8 preamble = 0;
950950
u8 group_id;
951951
u32 info1, info2, info3;
952+
u32 stbc, nsts_su;
952953

953954
info1 = __le32_to_cpu(rxd->ppdu_start.info1);
954955
info2 = __le32_to_cpu(rxd->ppdu_start.info2);
@@ -993,11 +994,16 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
993994
*/
994995
bw = info2 & 3;
995996
sgi = info3 & 1;
997+
stbc = (info2 >> 3) & 1;
996998
group_id = (info2 >> 4) & 0x3F;
997999

9981000
if (GROUP_ID_IS_SU_MIMO(group_id)) {
9991001
mcs = (info3 >> 4) & 0x0F;
1000-
nss = ((info2 >> 10) & 0x07) + 1;
1002+
nsts_su = ((info2 >> 10) & 0x07);
1003+
if (stbc)
1004+
nss = (nsts_su >> 2) + 1;
1005+
else
1006+
nss = (nsts_su + 1);
10011007
} else {
10021008
/* Hardware doesn't decode VHT-SIG-B into Rx descriptor
10031009
* so it's impossible to decode MCS. Also since

0 commit comments

Comments
 (0)