blob: 6399fc10b49fcf2e100a6fce664fe41a9b86a129 [file] [log] [blame]
From dd7f4e849efee36586e0b39f9f1e54a1a2000a49 Mon Sep 17 00:00:00 2001
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
Date: Wed, 24 Apr 2024 17:44:40 +0800
Subject: [PATCH 080/126] mtk: hostapd: add hidden SSID support
Add hidden SSID support for MLD AP. Now the parnter link's information is
included in RNR even if the link is hidden.
Note that the hidden links' information appear in both beacon and probe
response.
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
---
src/ap/ieee802_11.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index fbe3f582f..37a2c5ab8 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7483,16 +7483,21 @@ repeat_rnr_len:
for (i = start; i < hapd->iface->num_bss; i++) {
struct hostapd_data *bss = hapd->iface->bss[i];
bool ap_mld = false;
+ bool ignore_broadcast_ssid;
if (!bss || !bss->conf || !bss->started)
continue;
+ ignore_broadcast_ssid = bss->conf->ignore_broadcast_ssid;
#ifdef CONFIG_IEEE80211BE
ap_mld = bss->conf->mld_ap;
+ /* FIXME How to exclude the hidden link in beacon? */
+ ignore_broadcast_ssid &=
+ !hostapd_is_ml_partner(bss, reporting_hapd);
#endif /* CONFIG_IEEE80211BE */
if (bss == reporting_hapd ||
- bss->conf->ignore_broadcast_ssid)
+ ignore_broadcast_ssid)
continue;
if (hostapd_skip_rnr(i, skip_profiles, ap_mld,
@@ -7751,13 +7756,19 @@ static bool hostapd_eid_rnr_bss(struct hostapd_data *hapd,
u8 bss_param = 0;
bool ap_mld = false;
u8 *eid = *pos;
+ bool ignore_broadcast_ssid;
+ if (!bss || !bss->conf || !bss->started)
+ return false;
+
+ ignore_broadcast_ssid = bss->conf->ignore_broadcast_ssid;
#ifdef CONFIG_IEEE80211BE
ap_mld = !!hapd->conf->mld_ap;
+ /* FIXME How to exclude the hidden link in beacon? */
+ ignore_broadcast_ssid &= !hostapd_is_ml_partner(bss, reporting_hapd);
#endif /* CONFIG_IEEE80211BE */
- if (!bss || !bss->conf || !bss->started ||
- bss == reporting_hapd || bss->conf->ignore_broadcast_ssid)
+ if (bss == reporting_hapd || ignore_broadcast_ssid)
return false;
if (hostapd_skip_rnr(i, skip_profiles, ap_mld, tbtt_info_len,
--
2.18.0