diff mbox series

AP: Do not iterate disabled interfaces when adding RNR

Message ID 20231226090625.477451-1-andrei.otcheretianski@intel.com
State Changes Requested
Headers show
Series AP: Do not iterate disabled interfaces when adding RNR | expand

Commit Message

Andrei Otcheretianski Dec. 26, 2023, 9:06 a.m. UTC
From: Ilan Peer <ilan.peer@intel.com>

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 src/ap/ieee802_11.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Jouni Malinen Jan. 13, 2024, 9:46 p.m. UTC | #1
On Tue, Dec 26, 2023 at 11:06:23AM +0200, Andrei Otcheretianski wrote:
> From: Ilan Peer <ilan.peer@intel.com>
> 
> Signed-off-by: Ilan Peer <ilan.peer@intel.com>

Could you please clarify why this should be done? That commit message
was not exactly helpful and these changes break the he_ap_ema test
case..
diff mbox series

Patch

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index a939ad35e2..dc41f87da6 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7403,6 +7403,9 @@  static size_t hostapd_eid_rnr_multi_iface_len(struct hostapd_data *hapd,
 		iface = hapd->iface->interfaces->iface[i];
 		bool ap_mld = false;
 
+		if (iface->state != HAPD_IFACE_ENABLED)
+			continue;
+
 #ifdef CONFIG_IEEE80211BE
 		if (hapd->conf->mld_ap && iface->bss[0]->conf->mld_ap &&
 		    hapd->conf->mld_id == iface->bss[0]->conf->mld_id)
@@ -7612,6 +7615,9 @@  static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
 	u8 tbtt_count = 0, op_class, channel;
 	bool ap_mld = false;
 
+	if (iface->state != HAPD_IFACE_ENABLED)
+		return eid;
+
 #ifdef CONFIG_IEEE80211BE
 	ap_mld = !!hapd->conf->mld_ap;
 #endif /* CONFIG_IEEE80211BE */
@@ -7676,6 +7682,9 @@  static u8 * hostapd_eid_rnr_multi_iface(struct hostapd_data *hapd, u8 *eid,
 		iface = hapd->iface->interfaces->iface[i];
 		bool ap_mld = false;
 
+		if (iface->state != HAPD_IFACE_ENABLED)
+			continue;
+
 #ifdef CONFIG_IEEE80211BE
 		if (hapd->conf->mld_ap && iface->bss[0]->conf->mld_ap &&
 		    hapd->conf->mld_id == iface->bss[0]->conf->mld_id)