]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Reset beacon state after stop_ap
authorAloka Dixit <aloka.dixit@oss.qualcomm.com>
Wed, 3 Sep 2025 20:27:23 +0000 (13:27 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 4 Sep 2025 09:59:22 +0000 (12:59 +0300)
Each MLD link reload results in ieee802_11_set_beacon() sending
NL80211_CMD_START_AP to the kernel for partner links as well. The kernel
may reject it based on which parameters changed. For example, SSID
changes between stop_ap() and reload_config result in an error because
the kernel compares the new link SSID with the old configured SSID for
partner links even though the links are stopped.

Set 'beacon_set_done' to 0 for each link when stop_ap() succeeds
to avoid setting beacon for stopped links.

Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
src/ap/ap_drv_ops.h

index 1468697eda32fa927101b25c3bb163e77367bf21..517c16e35c082b810d44b1497a2ef00145f2202c 100644 (file)
@@ -399,7 +399,7 @@ static inline int hostapd_drv_vendor_cmd(struct hostapd_data *hapd,
 
 static inline int hostapd_drv_stop_ap(struct hostapd_data *hapd)
 {
-       int link_id = -1;
+       int link_id = -1, ret;
 
        if (!hapd->driver || !hapd->driver->stop_ap || !hapd->drv_priv)
                return 0;
@@ -407,7 +407,13 @@ static inline int hostapd_drv_stop_ap(struct hostapd_data *hapd)
        if (hapd->conf->mld_ap)
                link_id = hapd->mld_link_id;
 #endif /* CONFIG_IEEE80211BE */
-       return hapd->driver->stop_ap(hapd->drv_priv, link_id);
+
+       ret = hapd->driver->stop_ap(hapd->drv_priv, link_id);
+       if (ret)
+               return ret;
+
+       hapd->beacon_set_done = 0;
+       return 0;
 }
 
 static inline int hostapd_drv_channel_info(struct hostapd_data *hapd,