Skip to contentSkip to conversation

ath11k: update the encoding before validation check

PATCH Applied Karthikeyan Periyasamy 2 participants 2 messages Apr 24, 2019 – May 2, 2019 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath11k: update the encoding before validation check

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.

---
 drivers/net/wireless/ath/ath11k/dp_rx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +2 -2
index b57cd30..0aeb67e 100644
@@ -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;
Signature · 7 lines
1.9.1


_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
Applied
#1 lore raw
Quoted 6 lines · 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.

Applied.

Signature · 6 lines
Kalle Valo

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k