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>
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;
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,