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 7B84E26B0B6; Tue, 27 May 2025 17:28:52 +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=1748366932; cv=none; b=TrV+uPmRkV6WQn5z1NIGElmd9GbBfR4eKzRrKRSO5F/u9tmUey3D/rsmAicLHJ9IqXQ7GfqgPxLD3d+8QTAT2ZeZja0cYTCkRK6PLaZeAHEOLexXavR/7aYw+MtquqybYcOpztqnvfLu7iQ0J8KOE8VMVVyIYL4JaH04pBZREdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748366932; c=relaxed/simple; bh=cWz0B2UaP/ahVKuH2TRaQBfPVzjYj2BfkMwPUk/mu7M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qqJVrmXb3UDfSNz1RqVMHahBVDsCURe5l8Dcxm/VYCj4K2mzi2pKNN5RCkkh13KxZhnBgmczMpvdDwnU4vmR6ZE8J3xbTP/wEDhktypS6+r5IkD1Worq0Emaf0gCTtu4UxXaF0LPPU5xUIj6XJuJ/OGQ5DV1lW2QyAG0hlRUDTs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gM5QlUBg; 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="gM5QlUBg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED80CC4CEE9; Tue, 27 May 2025 17:28:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748366932; bh=cWz0B2UaP/ahVKuH2TRaQBfPVzjYj2BfkMwPUk/mu7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gM5QlUBgAW/WTbY74s/nsDBmnGRL/G3b9S4vZmHBrER4zFgnmnzYLU667py/wvSNO LDBOmOFTImtDjL4RWRBqCZU4F9QkOSMH6Ih9qICs/1moVrihZvZce2rp08TKxHy/Ss +EL9r45fvmWrka2I0e8ijfrqHUG2Zj15cXa9xg4o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ilan Peer , Miri Korenblit , Johannes Berg , Sasha Levin Subject: [PATCH 6.14 224/783] wifi: mac80211_hwsim: Fix MLD address translation Date: Tue, 27 May 2025 18:20:21 +0200 Message-ID: <20250527162522.242994940@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162513.035720581@linuxfoundation.org> References: <20250527162513.035720581@linuxfoundation.org> User-Agent: quilt/0.68 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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilan Peer [ Upstream commit 65bff0be9b154621b617fc2e4bd89f1e18e97cdb ] Do address translations only between shared links. It is possible that while an non-AP MLD station and an AP MLD station have shared links, the frame is intended to be sent on a link which is not shared (for example when sending a probe response). Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20250308225541.1aa461270bb6.Ic21592e1b1634653f02b80628cb2152f6e9de367@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/virtual/mac80211_hwsim.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index cf6a331d40427..a68530344d205 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -4,7 +4,7 @@ * Copyright (c) 2008, Jouni Malinen * Copyright (c) 2011, Javier Lopez * Copyright (c) 2016 - 2017 Intel Deutschland GmbH - * Copyright (C) 2018 - 2024 Intel Corporation + * Copyright (C) 2018 - 2025 Intel Corporation */ /* @@ -1983,11 +1983,13 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, return; } - if (sta && sta->mlo) { - if (WARN_ON(!link_sta)) { - ieee80211_free_txskb(hw, skb); - return; - } + /* Do address translations only between shared links. It is + * possible that while an non-AP MLD station and an AP MLD + * station have shared links, the frame is intended to be sent + * on a link which is not shared (for example when sending a + * probe response). + */ + if (sta && sta->mlo && link_sta) { /* address translation to link addresses on TX */ ether_addr_copy(hdr->addr1, link_sta->addr); ether_addr_copy(hdr->addr2, bss_conf->addr); -- 2.39.5