From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95A2B30BBB3; Mon, 13 Oct 2025 15:02:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760367773; cv=none; b=LiZzqBEIgsT+sCNOk+6lOzHumPJ3Y8cLcYeiiiq/P3/9c+0relkhK24pSv2VXJEN/bE4Z3hudyZ+VI6w5mstmQ3RGquPBHuycoZq+RsYCF5Y0VizTacrAr+++QOqJl8/sna+A7I8cWpcC3KqqZRQnlRrXXtFb2f0tmERGDXh+qU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760367773; c=relaxed/simple; bh=YmHCrT86U6E5+hwd5CFjs4kfS439xL3vnxfgf9tfEhQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OWmsXM11uT4AbbVDkyw8YsMsds0yaAVrOEX+X5Za3x9hML6BSKPONtmhn8Doqbd+Z0NA51J4ZUes0iHbM07ighiU8a2YCNAUHrk5OILOUYDwpfSIZjGTGN+YGsKkr2PkyvPX+Hh2DAdDThDN5j2PMNHc4SS/duI53I6bMhD7e8s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=diSppZyj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="diSppZyj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B36ABC4CEE7; Mon, 13 Oct 2025 15:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760367773; bh=YmHCrT86U6E5+hwd5CFjs4kfS439xL3vnxfgf9tfEhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=diSppZyj0z0PtYnkAm1ccyhd2W6PorWbPoa/bQMwnuqw2cu8Ge9HquId4DVq9Nfxc ZDmZFxw3sKPT+MW2K9FDcEInmJpoPqda3KKu5aqk1tYPpx3GQi/Rma1MMPvM1e96jf Cgg/1UKQ40oCsCMqTnmcwcL59C/I+q8L4P5bYIsY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vasanthakumar Thiagarajan , Aditya Kumar Singh , Johannes Berg , Sasha Levin Subject: [PATCH 6.6 128/196] wifi: mac80211: fix Rx packet handling when pubsta information is not available Date: Mon, 13 Oct 2025 16:45:19 +0200 Message-ID: <20251013144319.940724412@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251013144315.184275491@linuxfoundation.org> References: <20251013144315.184275491@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aditya Kumar Singh [ Upstream commit 32d340ae675800672e1219444a17940a8efe5cca ] In ieee80211_rx_handle_packet(), if the caller does not provide pubsta information, an attempt is made to find the station using the address 2 (source address) field in the header. Since pubsta is missing, link information such as link_valid and link_id is also unavailable. Now if such a situation comes, and if a matching ML station entry is found based on the source address, currently the packet is dropped due to missing link ID in the status field which is not correct. Hence, to fix this issue, if link_valid is not set and the station is an ML station, make an attempt to find a link station entry using the source address. If a valid link station is found, derive the link ID and proceed with packet processing. Otherwise, drop the packet as per the existing flow. Fixes: ea9d807b5642 ("wifi: mac80211: add link information in ieee80211_rx_status") Suggested-by: Vasanthakumar Thiagarajan Signed-off-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250917-fix_data_packet_rx_with_mlo_and_no_pubsta-v1-1-8cf971a958ac@oss.qualcomm.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/rx.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 210337ef23cf5..164c6e8049826 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -5219,12 +5219,20 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, } rx.sdata = prev_sta->sdata; + if (!status->link_valid && prev_sta->sta.mlo) { + struct link_sta_info *link_sta; + + link_sta = link_sta_info_get_bss(rx.sdata, + hdr->addr2); + if (!link_sta) + continue; + + link_id = link_sta->link_id; + } + if (!ieee80211_rx_data_set_sta(&rx, prev_sta, link_id)) goto out; - if (!status->link_valid && prev_sta->sta.mlo) - continue; - ieee80211_prepare_and_rx_handle(&rx, skb, false); prev_sta = sta; @@ -5232,10 +5240,18 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, if (prev_sta) { rx.sdata = prev_sta->sdata; - if (!ieee80211_rx_data_set_sta(&rx, prev_sta, link_id)) - goto out; + if (!status->link_valid && prev_sta->sta.mlo) { + struct link_sta_info *link_sta; + + link_sta = link_sta_info_get_bss(rx.sdata, + hdr->addr2); + if (!link_sta) + goto out; - if (!status->link_valid && prev_sta->sta.mlo) + link_id = link_sta->link_id; + } + + if (!ieee80211_rx_data_set_sta(&rx, prev_sta, link_id)) goto out; if (ieee80211_prepare_and_rx_handle(&rx, skb, true)) -- 2.51.0