mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
	Ilan Peer <ilan.peer@intel.com>,
	Miri Korenblit <miriam.rachel.korenblit@intel.com>,
	Sasha Levin <sashal@kernel.org>,
	johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: [PATCH AUTOSEL 6.12 05/13] wifi: mac80211: fix SA Query processing in MLO
Date: Mon, 17 Mar 2025 12:38:10 -0400	[thread overview]
Message-ID: <20250317163818.1893102-5-sashal@kernel.org> (raw)
In-Reply-To: <20250317163818.1893102-1-sashal@kernel.org>

From: Johannes Berg <johannes.berg@intel.com>

[ Upstream commit 9a267ce4a3fca93a34a8881046f97bcf472228c8 ]

When MLO is used and SA Query processing isn't done by
userspace (e.g. wpa_supplicant w/o CONFIG_OCV), then
the mac80211 code kicks in but uses the wrong addresses.
Fix them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250306123626.bab48bb49061.I9391b22f1360d20ac8c4e92604de23f27696ba8f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mac80211/rx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 6f3a86040cfcd..8e1fbdd3bff10 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -6,7 +6,7 @@
  * Copyright 2007-2010	Johannes Berg <johannes@sipsolutions.net>
  * Copyright 2013-2014  Intel Mobile Communications GmbH
  * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
- * Copyright (C) 2018-2024 Intel Corporation
+ * Copyright (C) 2018-2025 Intel Corporation
  */
 
 #include <linux/jiffies.h>
@@ -3323,8 +3323,8 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata,
 		return;
 	}
 
-	if (!ether_addr_equal(mgmt->sa, sdata->deflink.u.mgd.bssid) ||
-	    !ether_addr_equal(mgmt->bssid, sdata->deflink.u.mgd.bssid)) {
+	if (!ether_addr_equal(mgmt->sa, sdata->vif.cfg.ap_addr) ||
+	    !ether_addr_equal(mgmt->bssid, sdata->vif.cfg.ap_addr)) {
 		/* Not from the current AP or not associated yet. */
 		return;
 	}
@@ -3340,9 +3340,9 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata,
 
 	skb_reserve(skb, local->hw.extra_tx_headroom);
 	resp = skb_put_zero(skb, 24);
-	memcpy(resp->da, mgmt->sa, ETH_ALEN);
+	memcpy(resp->da, sdata->vif.cfg.ap_addr, ETH_ALEN);
 	memcpy(resp->sa, sdata->vif.addr, ETH_ALEN);
-	memcpy(resp->bssid, sdata->deflink.u.mgd.bssid, ETH_ALEN);
+	memcpy(resp->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);
 	resp->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
 					  IEEE80211_STYPE_ACTION);
 	skb_put(skb, 1 + sizeof(resp->u.action.u.sa_query));
-- 
2.39.5


  parent reply	other threads:[~2025-03-17 16:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 16:38 [PATCH AUTOSEL 6.12 01/13] x86/hyperv/vtl: Stop kernel from probing VTL0 low memory Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 02/13] ASoC: codecs: wsa884x: report temps to hwmon in millidegree of Celsius Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 03/13] ASoC: rt1320: set wake_capable = 0 explicitly Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 04/13] wifi: mac80211: flush the station before moving it to UN-AUTHORIZED state Sasha Levin
2025-03-17 16:38 ` Sasha Levin [this message]
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 06/13] locking/semaphore: Use wake_q to wake up processes outside lock critical section Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 07/13] x86/hyperv: Fix output argument to hypercall that changes page visibility Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 08/13] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 09/13] nvme-pci: fix stuck reset on concurrent DPC and HP Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 10/13] drm/amd: Keep display off while going into S4 Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 11/13] net: devmem: do not WARN conditionally after netdev_rx_queue_restart() Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 12/13] selftests: netfilter: skip br_netfilter queue tests if kernel is tainted Sasha Levin
2025-03-17 16:38 ` [PATCH AUTOSEL 6.12 13/13] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250317163818.1893102-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=ilan.peer@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®