hostapd: hold the beacons that the driver refuses during a removal

Patch 822 holds every beacon update of the AP MLD while the driver
counts the AP Removal Timer. It also refuses a removal whose count is no
whole number of seconds, and a removal while another one runs. Only a
driver that takes the timer of each new beacon as a new start needs the
hold, and hostapd cannot tell such a driver from one that counts the
timer per TBTT.

mac80211 now refuses the beacon changes of the AP MLD with -EBUSY for a
driver that needs the hold. Change patch 822 to take a refused beacon
set as held, and to start a link whose start was refused at the expiry.
Drop the whole-second check and the refusal of a second removal. End
the removal of every link that an expiry event reports.

mac80211 also refuses a channel switch on the channel of a held AP MLD.
Stop the ubus channel switch at the first BSS that refuses it, as the
ucode one does, so that DFS takes its fallback.

Refresh patches 827 to 883.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau committed 2026-11-15 11:17:21 +00:00
1 parent 6a73e0c5d3
commit a23edaa4ea
12 files changed
+183 -126

No files matched your search

@@ -5,7 +5,8 @@ Subject: [PATCH] AP MLD: let the driver count the AP Removal Timer
Depends on 602-ap-mld-announce-the-removal-of-an-affiliated-ap.patch,
603-ap-mld-remove-an-affiliated-ap-at-the-expiry.patch, 608 and 609,
and on the mac80211 patches that add
NL80211_EXT_FEATURE_AP_REMOVAL_TIMER_OFFLOAD.
NL80211_EXT_FEATURE_AP_REMOVAL_TIMER_OFFLOAD and that refuse beacon
changes during an offloaded AP removal.
Patch 602 counts the AP Removal Timer on the host: at each beacon
interval it sets the beacons of every link of the AP MLD with the next
@@ -16,24 +17,33 @@ whole countdown, past the DTIM Beacon that ends it (IEEE 802.11be-2024
Where the driver declares NL80211_EXT_FEATURE_AP_REMOVAL_TIMER_OFFLOAD,
set the beacons once at the start of the removal and let the driver
count the timer. Until the expiry, no beacon of the AP MLD is set, as
the driver counts from the beacons it took at the start, like the
MediaTek SDK does. The host timer sets no beacon, and keeps the count of
count the timer. The host timer sets no beacon, and keeps the count of
the Probe Response frames and the times of the ucode link_remove method
current.
current. Without the feature, the count of 602 stays.
A link of the AP MLD that starts during the countdown, for example at a
restart of its radio, sends its first Beacon frame at the expiry, before
the other links drop the element. A link that stops again before the
expiry stays stopped. Where the removal ends without the expiry, for
example at a disable of the radio of the removed link, such a link
starts then. The removed link itself does not start at the expiry, also
where it restarted during the countdown.
A driver that counts from the beacons it took at the start, like the
MediaTek SDK does, takes the timer of each new beacon as a new start.
For such a driver mac80211 refuses a beacon update, the start of a link,
a channel switch and a colour change of the AP MLD with -EBUSY until the
expiry. Take a beacon that the driver refuses so during an offloaded
removal as held: the expiry sets the beacons of the links that stay
again. A link whose start the driver refuses, for example at a restart
of its radio, sends its first Beacon frame at the expiry, before the
other links drop the element. A link that stops again before the expiry
stays stopped. The removed link itself does not start at the expiry,
also where it restarted during the countdown. A channel switch and a
colour change fail with the error of the driver and a log line, and DFS
takes its fallback, which restarts the radio, so that the link starts at
the expiry on the new channel.
A removal can end without the expiry, for example at a disable of the
radio of the removed link. It ends for the driver when the link goes,
after the teardown, so the held links start then.
NL80211_CMD_LINKS_REMOVED on the AP interface reports the expiry, which
the driver sends after the Beacon frame with the count 1 and before the
removal TBTT, once it stopped the TX of the link. That event ends the
removal. At the event the other links drop the Reconfiguration
removal of each link that it reports. At the event the other links drop the Reconfiguration
element, so that no frame at or after the removal TBTT carries it.
The stations get their frames and the link stops after the removal TBTT
(IEEE 802.11be-2024 35.3.6.3). hostapd sees no TBTT, but the first
@@ -52,12 +62,6 @@ links are not held for ever. If the driver takes no beacon of the
removed link at the start, it does not count the timer, so the removal
fails and the beacons are set again without the element.
The driver times the expiry in whole seconds and counts one removal of
an AP MLD at a time. With the feature, a removal whose count of beacon
intervals is not a whole number of seconds is refused, and so is a
removal while another link of the AP MLD is being removed. Without the
feature, the count of 602 stays.
By IEEE 802.11be-2024 35.3.6.3, a non-AP MLD whose only setup link is
the removed one counts itself disassociated at the removal TBTT. At the
expiry event, which comes before that TBTT, clear the authorized flag
@@ -74,25 +78,31 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -2808,6 +2808,9 @@ static int __ieee802_11_set_beacon(struc
hapd->mld_link_id);
return 0;
}
+
+ if (hostapd_link_remove_beacon_held(hapd))
+ return 0;
#endif /* CONFIG_IEEE80211BE */
@@ -2792,6 +2792,9 @@ static int __ieee802_11_set_beacon(struc
bool twt_he_responder = false;
int res, ret = -1, i;
struct hostapd_hw_modes *mode;
+#ifdef CONFIG_IEEE80211BE
+ bool was_set = hapd->beacon_set_done;
+#endif /* CONFIG_IEEE80211BE */
if (hapd->csa_in_progress) {
@@ -2917,6 +2920,11 @@ static int __ieee802_11_set_beacon(struc
if (hostapd_beacon_held(hapd))
return 0;
@@ -2913,10 +2916,17 @@ static int __ieee802_11_set_beacon(struc
res = hostapd_drv_set_ap(hapd, &params);
hostapd_free_ap_extra_ies(hapd, beacon, proberesp, assocresp);
+#ifdef CONFIG_IEEE80211BE
+ if (res == -EBUSY && hostapd_link_remove_beacon_held(hapd, was_set))
+ res = 0;
+ else if (!res)
+ hostapd_link_remove_beacon_set(hapd);
+#endif /* CONFIG_IEEE80211BE */
if (res)
wpa_printf(MSG_ERROR, "Failed to set beacon parameters");
else
ret = 0;
+
+#ifdef CONFIG_IEEE80211BE
+ if (!res)
+ hostapd_link_remove_beacon_set(hapd);
+#endif /* CONFIG_IEEE80211BE */
fail:
ieee802_11_free_ap_params(&params);
return ret;
@@ -167,7 +177,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static u64 hostapd_link_remove_expiry_us(struct hostapd_data *hapd)
{
struct os_reltime now, left;
@@ -575,21 +617,111 @@ u64 hostapd_link_remove_expiry_ms(struct
@@ -575,21 +617,86 @@ u64 hostapd_link_remove_expiry_ms(struct
* caller commits no earlier than the link stops. */
u64 hostapd_link_remove_ms(struct hostapd_data *hapd)
{
@@ -219,17 +229,20 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+}
+
+
+/* The driver counts the AP Removal Timer from the Beacon frames it took at the
+ * start, so no link of the AP MLD gets another one until the expiry. */
+bool hostapd_link_remove_beacon_held(struct hostapd_data *hapd)
+/* A driver that counts the AP Removal Timer from the Beacon frames it had at
+ * the start refuses another one until the expiry, which sets the Beacon frames
+ * of the started links again. A link whose start it refused starts then. */
+bool hostapd_link_remove_beacon_held(struct hostapd_data *hapd, bool was_set)
+{
+ struct hostapd_data *removed = hostapd_link_remove_offload_link(hapd);
+
+ if (!removed)
+ return false;
+
+ if (!hapd->beacon_set_done)
+ if (!was_set) {
+ hapd->beacon_set_done = 0;
+ hapd->eht_mld_beacon_start_held = true;
+ }
+
+ wpa_printf(MSG_DEBUG,
+ "MLD: No Beacon update for link_id=%u while the driver counts the removal of link_id=%u",
@@ -249,39 +262,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ hostapd_link_remove_offload_expire(hapd);
+}
+
+
+/* The driver times the expiry in whole seconds, and counts one removal of an
+ * AP MLD at a time */
+static bool hostapd_link_remove_offload_check(struct hostapd_data *hapd,
+ u32 count)
+{
+ struct hostapd_data *link_bss;
+
+ if ((hapd->iconf->beacon_int * count) % 1000) {
+ wpa_printf(MSG_INFO,
+ "MLD: Do not remove link_id=%u in %u beacons, the driver needs a whole number of seconds",
+ hapd->mld_link_id, count);
+ return false;
+ }
+
+ for_each_mld_link(link_bss, hapd) {
+ if (link_bss == hapd || !hostapd_link_remove_pending(link_bss))
+ continue;
+
+ wpa_printf(MSG_INFO,
+ "MLD: Do not remove link_id=%u while link_id=%u is being removed",
+ hapd->mld_link_id, link_bss->mld_link_id);
+ return false;
+ }
+
+ return true;
+}
+
+
static struct hostapd_data *
hostapd_link_remove_partner(struct hostapd_data *hapd, struct sta_info *sta)
{
@@ -741,21 +873,28 @@ static void hostapd_link_remove_notify_s
@@ -741,21 +848,28 @@ static void hostapd_link_remove_notify_s
}
@@ -314,7 +299,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
hostapd_free_link_stas(hapd);
hostapd_link_remove_notify_stas(hapd);
@@ -773,6 +912,111 @@ static void hostapd_link_remove_expire(s
@@ -773,6 +887,144 @@ static void hostapd_link_remove_expire(s
}
@@ -395,6 +380,39 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+}
+
+
+static void hostapd_link_remove_held_start(void *eloop_data, void *user_ctx)
+{
+ struct hostapd_data *hapd = eloop_data;
+ unsigned int removed = (uintptr_t) user_ctx;
+
+ if (!hapd->eht_mld_beacon_start_held)
+ return;
+
+ hapd->eht_mld_beacon_start_held = false;
+ wpa_printf(MSG_DEBUG,
+ "MLD: Start link_id=%u after the removal of link_id=%u",
+ hapd->mld_link_id, removed);
+ ieee802_11_set_beacon_per_bss_only(hapd);
+}
+
+
+/* A removal that ends without its expiry ends for the driver where the link
+ * goes, after the teardown that calls this */
+static void hostapd_link_remove_start_held_later(struct hostapd_data *hapd)
+{
+ struct hostapd_data *link_bss;
+
+ for_each_mld_link(link_bss, hapd) {
+ if (link_bss == hapd || !link_bss->eht_mld_beacon_start_held)
+ continue;
+
+ eloop_register_timeout(0, 0, hostapd_link_remove_held_start,
+ link_bss,
+ (void *) (uintptr_t) hapd->mld_link_id);
+ }
+}
+
+
+/* The expiry comes before the removal TBTT, after the driver stopped the TX of
+ * the link. The other links drop the element before that TBTT, and the
+ * stations get their frames and the link stops after it (IEEE Std
@@ -426,7 +444,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* hostapd sees no TBTT: the countdown runs from the return of the first
* Beacon update and expires before the TBTT that the count names. */
static void hostapd_link_remove_timeout_handler(void *eloop_data,
@@ -780,7 +1024,9 @@ static void hostapd_link_remove_timeout_
@@ -780,7 +1032,9 @@ static void hostapd_link_remove_timeout_
{
struct hostapd_data *hapd = (struct hostapd_data *) eloop_data;
@@ -437,7 +455,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return;
hapd->eht_mld_link_removal_count--;
@@ -788,6 +1034,14 @@ static void hostapd_link_remove_timeout_
@@ -788,6 +1042,14 @@ static void hostapd_link_remove_timeout_
hapd->mld_link_id,
hapd->eht_mld_link_removal_count);
@@ -452,18 +470,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!hapd->eht_mld_link_removal_count) {
hostapd_link_remove_expire(hapd);
return;
@@ -850,6 +1104,10 @@ int hostapd_link_remove(struct hostapd_d
return -1;
}
+ if (hostapd_link_remove_offload(hapd) &&
+ !hostapd_link_remove_offload_check(hapd, count))
+ return -1;
+
wpa_printf(MSG_DEBUG,
"MLD: Remove link_id=%u in %u beacons",
hapd->mld_link_id, count);
@@ -861,13 +1119,87 @@ int hostapd_link_remove(struct hostapd_d
@@ -861,13 +1123,82 @@ int hostapd_link_remove(struct hostapd_d
hapd->eht_mld_bss_param_change = 0;
hostapd_mld_crit_update_start(hapd);
@@ -516,43 +523,38 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+}
+
+
+/* One removal runs at a time on an AP MLD, see
+ * hostapd_link_remove_offload_check(). The expiry can free the BSS of the
+ * link and end the AP MLD of hapd. */
+void hostapd_link_remove_expired(struct hostapd_data *hapd, u16 links)
+{
+ struct hostapd_data *link_bss, *removed = NULL;
+ struct hostapd_data *link_bss;
+ bool found = false;
+
+ if (!hapd->conf->mld_ap || !hapd->mld)
+ return;
+
+ for_each_mld_link(link_bss, hapd) {
+ if ((links & BIT(link_bss->mld_link_id)) &&
+ link_bss->eht_mld_link_removal_offload) {
+ removed = link_bss;
+ break;
+ }
+ if (!(links & BIT(link_bss->mld_link_id)) ||
+ !link_bss->eht_mld_link_removal_offload)
+ continue;
+
+ found = true;
+ wpa_printf(MSG_DEBUG,
+ "MLD: The driver reported the expiry of the AP Removal Timer of link_id=%u, %u beacons left",
+ link_bss->mld_link_id,
+ link_bss->eht_mld_link_removal_count);
+ hostapd_link_remove_offload_expire(link_bss);
+ }
+
+ if (!removed) {
+ if (!found)
+ wpa_printf(MSG_DEBUG,
+ "MLD: No removal of links 0x%x runs, ignore their expiry",
+ links);
+ return;
+ }
+
+ wpa_printf(MSG_DEBUG,
+ "MLD: The driver reported the expiry of the AP Removal Timer of link_id=%u, %u beacons left",
+ removed->mld_link_id, removed->eht_mld_link_removal_count);
+
+ hostapd_link_remove_offload_expire(removed);
+}
+
+
/* Unlike switch_link_hapd(), a link that hostapd no longer has is not
* replaced by the first link */
void hostapd_crit_update_done(struct hostapd_data *hapd, int link_id, u32 id)
@@ -1164,12 +1496,22 @@ void hostapd_adv_ttlm_event(struct hosta
@@ -1164,12 +1495,24 @@ static void hostapd_bss_radius_deinit(st
void hostapd_free_hapd_data(struct hostapd_data *hapd)
{
#ifdef CONFIG_IEEE80211BE
@@ -562,6 +564,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
eloop_cancel_timeout(hostapd_link_remove_finish, hapd, NULL);
+ eloop_cancel_timeout(hostapd_link_remove_offload_missing, hapd, NULL);
+ eloop_cancel_timeout(hostapd_link_remove_offload_tbtt, hapd, NULL);
+ eloop_cancel_timeout(hostapd_link_remove_held_start, hapd,
+ ELOOP_ALL_CTX);
hapd->eht_mld_link_removal_count = 0;
+ hapd->eht_mld_link_removal_offload = false;
+ hapd->eht_mld_link_removal_start_pending = false;
@@ -571,10 +575,63 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
hapd->eht_mld_crit_update = false;
+ /* The removal ends here without the expiry that starts these links */
+ if (removal_offload && hapd->conf && hapd->conf->mld_ap && hapd->mld)
+ hostapd_link_remove_start_held(hapd);
+ hostapd_link_remove_start_held_later(hapd);
#endif /* CONFIG_IEEE80211BE */
os_free(hapd->probereq_cb);
@@ -5729,6 +6072,29 @@ void hostapd_chan_switch_config(struct h
}
+/* A driver that holds the Beacon frames of an AP MLD while it counts the AP
+ * Removal Timer refuses a switch on the channel of each link until the
+ * expiry */
+static void hostapd_switch_refused(struct hostapd_data *hapd,
+ const char *name, int err)
+{
+#ifdef CONFIG_IEEE80211BE
+ struct hostapd_data *removed = hostapd_link_remove_offload_link(hapd);
+
+ if (err == -EBUSY && removed) {
+ wpa_printf(MSG_INFO,
+ "MLD: No %s on link_id=%u while the driver counts the removal of link_id=%u",
+ name, hapd->mld_link_id, removed->mld_link_id);
+ return;
+ }
+#endif /* CONFIG_IEEE80211BE */
+
+ if (err == -EBUSY)
+ wpa_printf(MSG_INFO, "%s: The driver is busy, no %s",
+ hapd->conf->iface, name);
+}
+
+
int hostapd_switch_channel(struct hostapd_data *hapd,
struct csa_settings *settings)
{
@@ -5751,6 +6117,7 @@ int hostapd_switch_channel(struct hostap
#endif /* CONFIG_IEEE80211AX */
if (ret) {
+ hostapd_switch_refused(hapd, "channel switch", ret);
/* if we failed, clean cs parameters */
hostapd_cleanup_cs_params(hapd);
return ret;
@@ -5958,10 +6325,12 @@ int hostapd_cca_start(struct hostapd_ifa
}
ret = hostapd_drv_switch_color(bss, &settings);
- if (ret)
+ if (ret) {
+ hostapd_switch_refused(bss, "colour change", ret);
hostapd_cleanup_cca_params(bss);
- else
+ } else {
started++;
+ }
free_beacon_data(&settings.beacon_cca);
free_beacon_data(&settings.beacon_after);
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -555,6 +555,16 @@ struct hostapd_data {
@@ -599,7 +656,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
void hostapd_mld_beacons_update(struct hostapd_data *hapd);
void hostapd_link_remove_tx_status(struct hostapd_data *hapd, const u8 *addr);
+void hostapd_link_remove_expired(struct hostapd_data *hapd, u16 links);
+bool hostapd_link_remove_beacon_held(struct hostapd_data *hapd);
+bool hostapd_link_remove_beacon_held(struct hostapd_data *hapd, bool was_set);
+void hostapd_link_remove_beacon_set(struct hostapd_data *hapd);
bool hostapd_is_ml_partner(struct hostapd_data *hapd1,
struct hostapd_data *hapd2);
@@ -780,10 +837,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ * element in the beacon of an AP MLD link announces (IEEE 802.11be-2024,
+ * 35.3.6.3), in the Beacon frames of every link that carries the element,
+ * and reports its expiry with %NL80211_CMD_LINKS_REMOVED on the AP
+ * interface. User space sets the beacons with the element once. Until
+ * the expiry, the driver can keep later beacon updates of the links of
+ * the AP MLD from the device, so user space sets the beacons of the links
+ * that stay again after the event. The expiry comes before the TBTT at
+ * interface. Until the expiry, a beacon update, the start of a link, a
+ * channel switch and a colour change of the AP MLD can fail with
+ * -EBUSY, so user space sets the beacons of the links that stay again
+ * after the event. The expiry comes before the TBTT at
+ * which the timer reaches 0, and the removed links keep running until
+ * user space stops them.
*
@@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+++ b/src/ap/hostapd.h
@@ -1046,6 +1046,7 @@ void hostapd_link_remove_tx_status(struc
void hostapd_link_remove_expired(struct hostapd_data *hapd, u16 links);
bool hostapd_link_remove_beacon_held(struct hostapd_data *hapd);
bool hostapd_link_remove_beacon_held(struct hostapd_data *hapd, bool was_set);
void hostapd_link_remove_beacon_set(struct hostapd_data *hapd);
+bool hostapd_link_remove_pending(struct hostapd_data *hapd);
bool hostapd_is_ml_partner(struct hostapd_data *hapd1,
@@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -765,6 +765,39 @@ void hostapd_mld_beacons_update(struct h
@@ -740,6 +740,39 @@ void hostapd_mld_beacons_update(struct h
}
@@ -115,7 +115,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void hostapd_link_remove_finish(void *eloop_data, void *user_ctx)
{
struct hostapd_data *hapd = eloop_data;
@@ -780,7 +813,18 @@ static void hostapd_link_remove_finish(v
@@ -755,7 +788,18 @@ static void hostapd_link_remove_finish(v
wpa_printf(MSG_DEBUG, "MLD: Removal timer expired, link_id=%u stopped",
hapd->mld_link_id);
@@ -134,7 +134,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
hostapd_mld_beacons_update(hapd);
hostapd_ucode_bss_cb(hapd, "bss_link_removed");
@@ -4317,6 +4361,8 @@ void hostapd_interface_free(struct hosta
@@ -4318,6 +4362,8 @@ void hostapd_interface_free(struct hosta
if (iface->bss[j])
hostapd_mld_ref_dec(iface->bss[j]);
#endif /* CONFIG_IEEE80211BE */
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -879,8 +879,70 @@ void hostapd_link_remove_tx_status(struc
@@ -854,8 +854,70 @@ void hostapd_link_remove_tx_status(struc
}
@@ -113,7 +113,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void hostapd_link_remove_notify_stas(struct hostapd_data *hapd)
{
struct hostapd_data *tx_hapd;
@@ -940,6 +1002,7 @@ static void hostapd_link_remove_expire_s
@@ -915,6 +977,7 @@ static void hostapd_link_remove_expire_s
unsigned int wait_us;
hostapd_free_link_stas(hapd);
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int hostapd_maclist_found(struct mac_acl_entry *list, int num_entries,
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -1766,14 +1766,15 @@ void hostapd_free_hapd_data(struct hosta
@@ -1767,14 +1767,15 @@ void hostapd_free_hapd_data(struct hosta
/* hostapd_mld_move_vlan_list - Move the VLAN list to the new first bss
*
* This function is used to copy the reference to the VLAN list from the old
@@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
#endif /* CONFIG_IEEE80211BE */
@@ -6866,16 +6867,9 @@ int hostapd_mld_remove_link(struct hosta
@@ -6893,16 +6894,9 @@ int hostapd_mld_remove_link(struct hosta
if (dl_list_empty(&mld->links)) {
mld->fbss = NULL;
} else {
@@ -219,7 +219,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
* @NL80211_CMD_ASSOC_MLO_RECONF: For a non-AP MLD station, request to
* add/remove links to/from the association. To indicate link
@@ -7416,6 +7421,11 @@ enum nl80211_feature_flags {
* that stay again after the event. The expiry comes before the TBTT at
* after the event. The expiry comes before the TBTT at
* which the timer reaches 0, and the removed links keep running until
* user space stops them.
+ * @NL80211_EXT_FEATURE_AP_NEG_TTLM: The driver applies the TID-to-link
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -1407,10 +1407,13 @@ int hostapd_adv_ttlm_request(struct host
@@ -1406,10 +1406,13 @@ int hostapd_adv_ttlm_request(struct host
ret = hostapd_drv_adv_ttlm_request(hapd, links, switch_time, duration,
&hapd->mld->adv_ttlm_cookie);
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2016,6 +2016,21 @@ void hostapd_bss_deinit_no_free(struct h
@@ -2017,6 +2017,21 @@ void hostapd_bss_deinit_no_free(struct h
}
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2006,10 +2006,19 @@ static int hostapd_flush_old_stations(st
@@ -2007,10 +2007,19 @@ static int hostapd_flush_old_stations(st
}
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#ifdef CONFIG_WEP
hostapd_clear_wep(hapd);
#endif /* CONFIG_WEP */
@@ -2020,12 +2029,7 @@ void hostapd_bss_deinit_no_free(struct h
@@ -2021,12 +2030,7 @@ void hostapd_bss_deinit_no_free(struct h
* free them first. The keys of the BSS stay for the next start. */
void hostapd_bss_stop_ap(struct hostapd_data *hapd)
{
@@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0;
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -2008,10 +2008,7 @@ static int hostapd_flush_old_stations(st
@@ -2009,10 +2009,7 @@ static int hostapd_flush_old_stations(st
static void hostapd_bss_stas_leave(struct hostapd_data *hapd)
{
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -955,8 +955,10 @@ static void hostapd_link_remove_notify_stas(struct hostapd_data *hapd)
@@ -930,8 +930,10 @@ static void hostapd_link_remove_notify_stas(struct hostapd_data *hapd)
/* Stop new data before the frame ends State 3 or 4 (IEEE Std
* 802.11-2024, 11.3.3) */
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (ap_sta_is_mld(hapd, sta)) {
tx_hapd = hostapd_link_remove_partner(hapd, sta);
@@ -1054,19 +1056,25 @@ static bool hostapd_link_remove_sta_single_link(struct hostapd_data *hapd,
@@ -1029,19 +1031,25 @@ static bool hostapd_link_remove_sta_single_link(struct hostapd_data *hapd,
/* A non-AP MLD whose only setup link is the removed one counts itself
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
MAC2STR(sta->addr), hapd->mld_link_id);
ap_sta_set_authorized(hapd, sta, 0);
hostapd_set_sta_flags(hapd, sta);
@@ -1099,7 +1107,8 @@ static void hostapd_link_remove_start_held(struct hostapd_data *hapd)
@@ -1107,7 +1115,8 @@ static void hostapd_link_remove_start_held(struct hostapd_data *hapd)
/* The expiry comes before the removal TBTT, after the driver stopped the TX of
* the link. The other links drop the element before that TBTT, and the
* stations get their frames and the link stops after it (IEEE Std
@@ -81,7 +81,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void hostapd_link_remove_offload_expire(struct hostapd_data *hapd)
{
u64 us;
@@ -1107,20 +1116,21 @@ static void hostapd_link_remove_offload_expire(struct hostapd_data *hapd)
@@ -1115,20 +1124,21 @@ static void hostapd_link_remove_offload_expire(struct hostapd_data *hapd)
eloop_cancel_timeout(hostapd_link_remove_timeout_handler, hapd, NULL);
eloop_cancel_timeout(hostapd_link_remove_offload_missing, hapd, NULL);
us = hostapd_link_remove_tbtt_after_us(hapd);
@@ -1407,7 +1407,7 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
NULL,
hostapd_get_punct_bitmap(hapd));
for (i = 0; i < hapd->iface->num_bss; i++) {
for (i = 0; i < hapd->iface->num_bss && !ret; i++) {
struct hostapd_data *bss = hapd->iface->bss[i];
if (hostapd_switch_channel(bss, &css) != 0)