wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/833-wifi-ath12k-fix-use-of-uninitialized-variable-valid_.patch
John Crispin 144c5d00f4 ipq95xx/mac80211: update to ATH12.3-CS
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00

38 lines
1.3 KiB
Diff

From 5318c4ce35dbf9bb734be108855bbefb696989b0 Mon Sep 17 00:00:00 2001
From: Hari Chandrakanthan <quic_haric@quicinc.com>
Date: Thu, 21 Sep 2023 17:37:55 +0530
Subject: [PATCH] wifi: ath12k: fix use of uninitialized variable valid_link
link_valid member of struct ieee80211_rx_status is set in ath12k_dp_mon_rx_deliver_msdu
only if peer is available. If peer is not available, link_valid may contain junk value.
mac80211 consumes the link_valid member.
Wrong value in link_valid can lead to improper handling
of rx skb in mac80211.
Fix it by initializing the link_valid member.
Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index 25a087105890..d490cac7a6f5 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -2175,6 +2175,9 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
if (!(status->flag & RX_FLAG_ONLY_MONITOR))
decap = ppduinfo->cmn_mpdu_info.mon_mpdu[mpdu_idx].msdu_info[0].decap_format;
+
+ status->link_valid = 0;
+
spin_lock_bh(&ar->ab->base_lock);
peer = ath12k_dp_rx_h_find_peer(ar->ab, msdu, rx_info);
if (peer && peer->sta) {
--
2.7.4