* [PATCH] ath10k: fix VHT NSS calculation when STBC is enabled
@ 2020-08-14 8:16 Sathishkumar Muruganandam
2020-08-18 9:49 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Sathishkumar Muruganandam @ 2020-08-14 8:16 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Sathishkumar Muruganandam
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>
---
drivers/net/wireless/ath/ath10k/htt_rx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 69ad4ca1a87c..a00498338b1c 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -949,6 +949,7 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
u8 preamble = 0;
u8 group_id;
u32 info1, info2, info3;
+ u32 stbc, nsts_su;
info1 = __le32_to_cpu(rxd->ppdu_start.info1);
info2 = __le32_to_cpu(rxd->ppdu_start.info2);
@@ -993,11 +994,16 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
*/
bw = info2 & 3;
sgi = info3 & 1;
+ stbc = (info2 >> 3) & 1;
group_id = (info2 >> 4) & 0x3F;
if (GROUP_ID_IS_SU_MIMO(group_id)) {
mcs = (info3 >> 4) & 0x0F;
- nss = ((info2 >> 10) & 0x07) + 1;
+ nsts_su = ((info2 >> 10) & 0x07);
+ if (stbc)
+ nss = (nsts_su >> 2) + 1;
+ else
+ nss = (nsts_su + 1);
} else {
/* Hardware doesn't decode VHT-SIG-B into Rx descriptor
* so it's impossible to decode MCS. Also since
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath10k: fix VHT NSS calculation when STBC is enabled
2020-08-14 8:16 [PATCH] ath10k: fix VHT NSS calculation when STBC is enabled Sathishkumar Muruganandam
@ 2020-08-18 9:49 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-08-18 9:49 UTC (permalink / raw)
To: Sathishkumar Muruganandam
Cc: ath10k, linux-wireless, Sathishkumar Muruganandam
Sathishkumar Muruganandam <murugana@codeaurora.org> wrote:
> 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>
Patch applied to ath-next branch of ath.git, thanks.
99f41b8e43b8 ath10k: fix VHT NSS calculation when STBC is enabled
--
https://patchwork.kernel.org/patch/11713837/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-18 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 8:16 [PATCH] ath10k: fix VHT NSS calculation when STBC is enabled Sathishkumar Muruganandam
2020-08-18 9:49 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).