When an interface (legacy or MLD link) is deleted via userspace
tools (e.g., iw or ifconfig), the kernel indicates this through an
NL80211_CMD_STOP_AP event. hostapd marks the interface as stopped
and, for MLD, removes the corresponding link from the BSS list.
In MBSSID setups, if the deleted interface is the TX BSS,
the associated non‑TX BSSs are also removed.
However, hostapd does not update beacons of the remaining partner links
after this event. As a result, information about deleted/stopped BSSs
can persist in other beacons (e.g., as Reduced Neighbor Report entries),
which is incorrect.
Use the beacon_set_done flag to manage RNR/MBSSID beacon updates during
interface stop (NL_STOP_AP) and fix the issue by marking the stopped BSS
with beacon_set_done as zero, refreshing beacons for all active
interfaces, and ensuring stopped BSSs are excluded from RNR.
Signed-off-by: Karthik M <karthik.m@oss.qualcomm.com>
hostapd_switch_channel_fallback(hapd->iface,
&hapd->cs_freq_params);
}
+
+ /* Clear beacon_set_done so that the RNR and other beacon parameters
+ * are properly updated. */
+ hapd->beacon_set_done = 0;
}
#ifdef NEED_AP_MLME
case EVENT_INTERFACE_UNAVAILABLE:
hostapd_event_iface_unavailable(hapd);
+ /* Update beacon information in all other interfaces to cover
+ * removal/disabling of this BSS. */
+ hostapd_refresh_all_iface_beacons(hapd->iface);
break;
case EVENT_DFS_RADAR_DETECTED:
if (!data)
}
-static void hostapd_refresh_all_iface_beacons(struct hostapd_iface *hapd_iface)
+void hostapd_refresh_all_iface_beacons(struct hostapd_iface *hapd_iface)
{
size_t j;
void free_beacon_data(struct beacon_data *beacon);
int hostapd_fill_cca_settings(struct hostapd_data *hapd,
struct cca_settings *settings);
+void hostapd_refresh_all_iface_beacons(struct hostapd_iface *hapd_iface);
#ifdef CONFIG_IEEE80211BE
struct hostapd_data *bss = hapd->iface->bss[i];
bool ap_mld = false;
- if (!bss || !bss->conf || !bss->started)
+ if (!bss || !bss->conf || !bss->started ||
+ !bss->beacon_set_done)
continue;
#ifdef CONFIG_IEEE80211BE
#endif /* CONFIG_IEEE80211BE */
if (!bss || !bss->conf || !bss->started ||
- bss == reporting_hapd || bss->conf->ignore_broadcast_ssid)
+ bss == reporting_hapd || bss->conf->ignore_broadcast_ssid ||
+ !bss->beacon_set_done)
return false;
if (hostapd_skip_rnr(i, skip_profiles, ap_mld, tbtt_info_len,