mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +00:00
38 lines
1.3 KiB
Diff
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
|
|
|