* [PATCH] ath11k: fix vht guard interval mapping
@ 2019-11-13 10:13 Manikanta Pubbisetty
2019-11-22 10:41 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Manikanta Pubbisetty @ 2019-11-13 10:13 UTC (permalink / raw)
To: ath11k; +Cc: Manikanta Pubbisetty
Guard interval value which comes from VHT_SIG_A TLV has a mapping
where value 0 corresponds to LGI, 1 and 3 corresponds to SGI.
Value 3 which is SGI(0.4us) in VHT was incorrectly mapped to a GI
of 3.2us(only applicable in HE) resulting in incorrect rx GI stats.
Fixing the mapping.
Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/hal_rx.c | 16 +++++++++++++---
drivers/net/wireless/ath/ath11k/hal_rx.h | 6 ++++++
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c
index 2de4b38..70e693e 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.c
@@ -961,6 +961,7 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
(struct hal_rx_vht_sig_a_info *)tlv_data;
u32 nsts;
u32 group_id;
+ u8 gi_setting;
info0 = __le32_to_cpu(vht_sig->info0);
info1 = __le32_to_cpu(vht_sig->info1);
@@ -969,9 +970,18 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
info0);
ppdu_info->mcs = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_MCS,
info1);
- ppdu_info->gi =
- FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_GI_SETTING,
- info1);
+ gi_setting = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO1_GI_SETTING,
+ info1);
+ switch (gi_setting) {
+ case HAL_RX_VHT_SIG_A_NORMAL_GI:
+ ppdu_info->gi = HAL_RX_GI_0_8_US;
+ break;
+ case HAL_RX_VHT_SIG_A_SHORT_GI:
+ case HAL_RX_VHT_SIG_A_SHORT_GI_AMBIGUITY:
+ ppdu_info->gi = HAL_RX_GI_0_4_US;
+ break;
+ }
+
ppdu_info->is_stbc = info0 & HAL_RX_VHT_SIG_A_INFO_INFO0_STBC;
nsts = FIELD_GET(HAL_RX_VHT_SIG_A_INFO_INFO0_NSTS, info0);
if (ppdu_info->is_stbc && nsts > 0)
diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.h b/drivers/net/wireless/ath/ath11k/hal_rx.h
index 96555e4..a6eb3de 100644
--- a/drivers/net/wireless/ath/ath11k/hal_rx.h
+++ b/drivers/net/wireless/ath/ath11k/hal_rx.h
@@ -213,6 +213,12 @@ struct hal_rx_vht_sig_a_info {
__le32 info1;
} __packed;
+enum hal_rx_vht_sig_a_gi_setting {
+ HAL_RX_VHT_SIG_A_NORMAL_GI = 0,
+ HAL_RX_VHT_SIG_A_SHORT_GI = 1,
+ HAL_RX_VHT_SIG_A_SHORT_GI_AMBIGUITY = 3,
+};
+
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_MCS GENMASK(6, 3)
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_DCM BIT(7)
#define HAL_RX_HE_SIG_A_SU_INFO_INFO0_TRANSMIT_BW GENMASK(20, 19)
--
2.7.4
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: fix vht guard interval mapping
2019-11-13 10:13 [PATCH] ath11k: fix vht guard interval mapping Manikanta Pubbisetty
@ 2019-11-22 10:41 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-11-22 10:41 UTC (permalink / raw)
To: Manikanta Pubbisetty; +Cc: ath11k
Manikanta Pubbisetty <mpubbise@codeaurora.org> wrote:
> Guard interval value which comes from VHT_SIG_A TLV has a mapping
> where value 0 corresponds to LGI, 1 and 3 corresponds to SGI.
>
> Value 3 which is SGI(0.4us) in VHT was incorrectly mapped to a GI
> of 3.2us(only applicable in HE) resulting in incorrect rx GI stats.
> Fixing the mapping.
>
> Signed-off-by: Manikanta Pubbisetty <mpubbise@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath11k-post-bringup branch of ath.git, thanks.
d5296ae6ba6f ath11k: fix vht guard interval mapping
--
https://patchwork.kernel.org/patch/11241633/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-22 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-13 10:13 [PATCH] ath11k: fix vht guard interval mapping Manikanta Pubbisetty
2019-11-22 10:41 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox