developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 1 | From dd7f4e849efee36586e0b39f9f1e54a1a2000a49 Mon Sep 17 00:00:00 2001 |
| 2 | From: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 3 | Date: Wed, 24 Apr 2024 17:44:40 +0800 |
| 4 | Subject: [PATCH 080/126] mtk: hostapd: add hidden SSID support |
| 5 | |
| 6 | Add hidden SSID support for MLD AP. Now the parnter link's information is |
| 7 | included in RNR even if the link is hidden. |
| 8 | Note that the hidden links' information appear in both beacon and probe |
| 9 | response. |
| 10 | |
| 11 | Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 12 | --- |
| 13 | src/ap/ieee802_11.c | 17 ++++++++++++++--- |
| 14 | 1 file changed, 14 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c |
| 17 | index fbe3f582f..37a2c5ab8 100644 |
| 18 | --- a/src/ap/ieee802_11.c |
| 19 | +++ b/src/ap/ieee802_11.c |
| 20 | @@ -7483,16 +7483,21 @@ repeat_rnr_len: |
| 21 | for (i = start; i < hapd->iface->num_bss; i++) { |
| 22 | struct hostapd_data *bss = hapd->iface->bss[i]; |
| 23 | bool ap_mld = false; |
| 24 | + bool ignore_broadcast_ssid; |
| 25 | |
| 26 | if (!bss || !bss->conf || !bss->started) |
| 27 | continue; |
| 28 | |
| 29 | + ignore_broadcast_ssid = bss->conf->ignore_broadcast_ssid; |
| 30 | #ifdef CONFIG_IEEE80211BE |
| 31 | ap_mld = bss->conf->mld_ap; |
| 32 | + /* FIXME How to exclude the hidden link in beacon? */ |
| 33 | + ignore_broadcast_ssid &= |
| 34 | + !hostapd_is_ml_partner(bss, reporting_hapd); |
| 35 | #endif /* CONFIG_IEEE80211BE */ |
| 36 | |
| 37 | if (bss == reporting_hapd || |
| 38 | - bss->conf->ignore_broadcast_ssid) |
| 39 | + ignore_broadcast_ssid) |
| 40 | continue; |
| 41 | |
| 42 | if (hostapd_skip_rnr(i, skip_profiles, ap_mld, |
| 43 | @@ -7751,13 +7756,19 @@ static bool hostapd_eid_rnr_bss(struct hostapd_data *hapd, |
| 44 | u8 bss_param = 0; |
| 45 | bool ap_mld = false; |
| 46 | u8 *eid = *pos; |
| 47 | + bool ignore_broadcast_ssid; |
| 48 | |
| 49 | + if (!bss || !bss->conf || !bss->started) |
| 50 | + return false; |
| 51 | + |
| 52 | + ignore_broadcast_ssid = bss->conf->ignore_broadcast_ssid; |
| 53 | #ifdef CONFIG_IEEE80211BE |
| 54 | ap_mld = !!hapd->conf->mld_ap; |
| 55 | + /* FIXME How to exclude the hidden link in beacon? */ |
| 56 | + ignore_broadcast_ssid &= !hostapd_is_ml_partner(bss, reporting_hapd); |
| 57 | #endif /* CONFIG_IEEE80211BE */ |
| 58 | |
| 59 | - if (!bss || !bss->conf || !bss->started || |
| 60 | - bss == reporting_hapd || bss->conf->ignore_broadcast_ssid) |
| 61 | + if (bss == reporting_hapd || ignore_broadcast_ssid) |
| 62 | return false; |
| 63 | |
| 64 | if (hostapd_skip_rnr(i, skip_profiles, ap_mld, tbtt_info_len, |
| 65 | -- |
| 66 | 2.18.0 |
| 67 | |