diff mbox series

[v3,19/46] nl80211: Route MLME TX via PD wdev based on source address

Message ID 20260513100010.1947710-20-kavita.kavita@oss.qualcomm.com
State Deferred
Headers show
Series PR: Add nl80211 support and ranging for Proximity Detection | expand

Commit Message

Kavita Kavita May 13, 2026, 9:59 a.m. UTC
From: Veerendranath Jakkam <vjakkam@qti.qualcomm.com>

When sending MLME frames, check if the source address matches the active
PD wdev MAC address and if so, route the transmission via the PD BSS
with its associated link reference. This ensures management frames are
sent on the correct wdev when a PD interface is active.

Signed-off-by: Veerendranath Jakkam <vjakkam@qti.qualcomm.com>
---
 src/drivers/driver_nl80211.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index c392a4b64..75178fd03 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4994,6 +4994,17 @@  static int wpa_driver_nl80211_send_mlme(struct i802_bss *bss, const u8 *data,
 		   noack, freq, no_cck, offchanok, wait_time,
 		   no_encrypt, fc, fc2str(fc), drv->nlmode);
 
+#ifdef CONFIG_PR
+	/* Route MLME TX via PD wdev if source address matches */
+	if (drv->pd_bss && ether_addr_equal(mgmt->sa, drv->pd_bss->addr)) {
+		bss = drv->pd_bss;
+		wpa_printf(MSG_DEBUG,
+			   "nl80211: send_mlme - route via PD wdev sa=" MACSTR,
+			   MAC2STR(mgmt->sa));
+		link = bss->flink;
+	}
+#endif /* CONFIG_PR */
+
 	if ((is_sta_interface(drv->nlmode) ||
 	     drv->nlmode == NL80211_IFTYPE_P2P_DEVICE) &&
 	    WLAN_FC_GET_TYPE(fc) == WLAN_FC_TYPE_MGMT &&