blob: ef5395b958e64ba05871e598282c02672caaa45d [file] [log] [blame]
From f5cc0d52ec316c7b0069a209070b6cb78e34b37b Mon Sep 17 00:00:00 2001
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
Date: Wed, 4 Oct 2023 11:12:52 +0800
Subject: [PATCH] hostapd: mtk: Not to update beacon for 6 GHz co-location when
BSS load update
There are two reason to update beacon for 6 GHz co-location:
1. 6 GHz out-of-band discovery
2. MLD operational parameters update
BSS load update is unrelated with the above two reasons, so it is
unnecessary to update beacon for 6 GHz co-location.
Moreover, updating beacon for 6 GHz co-location when BSS load update
makes hostapd set beacon too frequently in a multiple BSSes case.
This patch adds a new function to update beacon only for current BSS,
and uses the function duriong BSS load update.
Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
---
src/ap/beacon.c | 6 ++++++
src/ap/beacon.h | 1 +
src/ap/bss_load.c | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index d160675..b74396a 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -2216,6 +2216,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;
diff --git a/src/ap/beacon.h b/src/ap/beacon.h
index c320825..b32b2a7 100644
--- a/src/ap/beacon.h
+++ b/src/ap/beacon.h
@@ -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);
diff --git a/src/ap/bss_load.c b/src/ap/bss_load.c
index 725d3cd..e9baafc 100644
--- a/src/ap/bss_load.c
+++ b/src/ap/bss_load.c
@@ -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;
--
2.25.1