[PATCH 07/16] hostapd: MLO: cache hostapd_data context in per link bss struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add changes to cache the corresponding hostapd_data struct context into
it. This will be useful for wpa events callback processing.

Signed-off-by: Aditya Kumar Singh <quic_adisi@xxxxxxxxxxx>
---
 src/ap/ap_drv_ops.h          | 2 +-
 src/drivers/driver.h         | 3 ++-
 src/drivers/driver_nl80211.c | 3 ++-
 src/drivers/driver_nl80211.h | 1 +
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index f38b1850aca3..b3a96447947a 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -455,7 +455,7 @@ static inline int hostapd_drv_link_add(struct hostapd_data *hapd,
 	if (!hapd->driver || !hapd->drv_priv || !hapd->driver->link_add)
 		return -1;
 
-	return hapd->driver->link_add(hapd->drv_priv, link_id, addr);
+	return hapd->driver->link_add(hapd->drv_priv, link_id, addr, hapd);
 
 }
 #endif /* CONFIG_IEEE80211BE */
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index eedc3f647dd9..8ffe487ae1c7 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -5137,9 +5137,10 @@ struct wpa_driver_ops {
 	 * @priv: Private driver interface data
 	 * @link_id: The link ID
 	 * @addr: The MAC address to use for the link
+	 * @bss_ctx: BSS context for %WPA_IF_AP_BSS interfaces
 	 * Returns: 0 on success, negative value on failure
 	 */
-	int (*link_add)(void *priv, u8 link_id, const u8 *addr);
+	int (*link_add)(void *priv, u8 link_id, const u8 *addr, void *bss_ctx);
 
 #ifdef CONFIG_TESTING_OPTIONS
 	int (*register_frame)(void *priv, u16 type,
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index b3e9e6f2fe5e..dc19ef1158b3 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -13760,7 +13760,7 @@ static int nl80211_dpp_listen(void *priv, bool enable)
 #endif /* CONFIG_DPP */
 
 
-static int nl80211_link_add(void *priv, u8 link_id, const u8 *addr)
+static int nl80211_link_add(void *priv, u8 link_id, const u8 *addr, void *bss_ctx)
 {
 	struct i802_bss *bss = priv;
 	struct wpa_driver_nl80211_data *drv = bss->drv;
@@ -13819,6 +13819,7 @@ static int nl80211_link_add(void *priv, u8 link_id, const u8 *addr)
 		bss->flink = &bss->links[link_id];
 
 	bss->valid_links |= BIT(link_id);
+	bss->links[link_id].ctx = bss_ctx;
 
 	wpa_printf(MSG_DEBUG, "nl80211: MLD: valid_links=0x%04x",
 		   bss->valid_links);
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
index 43a6625bbf7a..03d3c333b3d1 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -58,6 +58,7 @@ struct i802_link {
 	int freq;
 	int bandwidth;
 	u8 addr[ETH_ALEN];
+	void *ctx;
 };
 
 struct i802_bss {
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux