ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath11k: update the encoding before validation check
@ 2019-04-24  4:48 Karthikeyan Periyasamy
  2019-05-02 13:32 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Karthikeyan Periyasamy @ 2019-04-24  4:48 UTC (permalink / raw)
  To: ath11k; +Cc: Karthikeyan Periyasamy

In the rate handler, when invalid rate occurs encoding is not
updated. so the ieee80211_rx_status hold the default encoding
(RX_ENC_LEGACY). Update the correct encoding before validation
check, so that ieee80211_rx_status hold the correct encoding.

Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/dp_rx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index b57cd30..0aeb67e 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -1643,23 +1643,23 @@ static void ath11k_dp_rx_h_rate(struct ath11k *ar, void *rx_desc,
 								is_cck);
 		break;
 	case RX_MSDU_START_PKT_TYPE_11N:
+		rx_status->encoding = RX_ENC_HT;
 		if (rate_mcs > 7) {
 			ath11k_warn(ar->ab, "Received with invalid mcs in HT mode %d\n", rate_mcs);
 			break;
 		}
 		rx_status->rate_idx = rate_mcs + (8 * (nss - 1));
-		rx_status->encoding = RX_ENC_HT;
 		if (sgi)
 			rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
 		rx_status->bw = ath11k_bw_to_mac80211_bw(bw);
 		break;
 	case RX_MSDU_START_PKT_TYPE_11AC:
+		rx_status->encoding = RX_ENC_VHT;
 		rx_status->rate_idx = rate_mcs;
 		if (rate_mcs > 9) {
 			ath11k_warn(ar->ab, "Received with invalid mcs in VHT mode %d\n", rate_mcs);
 			break;
 		}
-		rx_status->encoding = RX_ENC_VHT;
 		rx_status->nss = nss;
 		if (sgi)
 			rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
-- 
1.9.1


_______________________________________________
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: update the encoding before validation check
  2019-04-24  4:48 [PATCH] ath11k: update the encoding before validation check Karthikeyan Periyasamy
@ 2019-05-02 13:32 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-05-02 13:32 UTC (permalink / raw)
  To: Karthikeyan Periyasamy; +Cc: ath11k

Karthikeyan Periyasamy <periyasa@codeaurora.org> writes:

> In the rate handler, when invalid rate occurs encoding is not
> updated. so the ieee80211_rx_status hold the default encoding
> (RX_ENC_LEGACY). Update the correct encoding before validation
> check, so that ieee80211_rx_status hold the correct encoding.
>
> Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>

Applied.

-- 
Kalle Valo

_______________________________________________
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-05-02 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-24  4:48 [PATCH] ath11k: update the encoding before validation check Karthikeyan Periyasamy
2019-05-02 13:32 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox