]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Avoid unnecessary Beacon frame update for co-location
authorMichael-CY Lee <michael-cy.lee@mediatek.com>
Wed, 1 Nov 2023 09:00:00 +0000 (17:00 +0800)
committerJouni Malinen <j@w1.fi>
Thu, 2 Nov 2023 14:18:36 +0000 (16:18 +0200)
When it comes to set some BSS's beacon, there are two reasons to
update the beacon of co-located hostapd_iface(s) at the same time:
1. 6 GHz out-of-band discovery
2. MLD operational parameters update

BSS load update is unrelated with the above two reasons, and therefore
is not the case to update beacon for co-location. Moreover, updating
beacon for co-location when BSS load update makes hostapd set beacon too
frequently, which makes hostapd busy setting beacon in a multi-BSS case.

Add a new function to update beacon only for current BSS and use the
function during BSS load update.

Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
Signed-off-by: Money Wang <money.wang@mediatek.com>
src/ap/beacon.c
src/ap/beacon.h
src/ap/bss_load.c

index ea8c88d59cab45cb9cb0d1f25da3110fd985d150..b88aeb03caf90ce6645c4af3be6d88f919b679e3 100644 (file)
@@ -2266,6 +2266,12 @@ fail:
 }
 
 
+void ieee802_11_set_beacon_per_bss_only(struct hostapd_data *hapd)
+{
+       __ieee802_11_set_beacon(hapd);
+}
+
+
 int ieee802_11_set_beacon(struct hostapd_data *hapd)
 {
        struct hostapd_iface *iface = hapd->iface;
index c320825f3570c9a77400d61831221e9e1711c27a..b32b2a7d0ecca1f4e61acb86d21ddb6f48bebf8b 100644 (file)
@@ -15,6 +15,7 @@ struct ieee80211_mgmt;
 void handle_probe_req(struct hostapd_data *hapd,
                      const struct ieee80211_mgmt *mgmt, size_t len,
                      int ssi_signal);
+void ieee802_11_set_beacon_per_bss_only(struct hostapd_data *hapd);
 int ieee802_11_set_beacon(struct hostapd_data *hapd);
 int ieee802_11_set_beacons(struct hostapd_iface *iface);
 int ieee802_11_update_beacons(struct hostapd_iface *iface);
index 725d3cd3469bad25285a40002ef69307e24129f0..e9baafc962b993d4dcc549e2b17ba219994c60ab 100644 (file)
@@ -55,7 +55,7 @@ static void update_channel_utilization(void *eloop_data, void *user_data)
                return;
        }
 
-       ieee802_11_set_beacon(hapd);
+       ieee802_11_set_beacon_per_bss_only(hapd);
 
        if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
                return;