From patchwork Tue Jun 30 14:23:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Bar X-Patchwork-Id: 1319926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=celeno.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=oC4bx+uC; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=celeno.com header.i=@celeno.com header.a=rsa-sha256 header.s=selector2 header.b=g/KBw3Ii; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49x68L11Y1z9sDX for ; Wed, 1 Jul 2020 00:25:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=RaixF0azYs+6/XCBIRh8KPMNrFEskojooy6fOJXRFaI=; b=oC4bx+uC01ekLeWwwoeUFI5VyR ZTNWyUuB6ZGfHaAFeOqnOpEn0idW+qL5o+ZINk6A3o+9nf/HVUWjqu9cMDe/FhGuAJQpNoVfwfYNk iZyTZ8O6r7SHTvAkmHasR9Kn882QEipALNZ50XZdfb4MtEeNAa4S3olq5nGCWYR5YEb8eICAz6FUm YFMwG6mQoDIDqShgphDTbDY0d9ZTLVae3N7aoWJo+1vSWWTiFuzXOsf0Q1uXMwM+xhGod4l1DfV0J r1SMVWlnABszH7HslkMYU+TjDijpECMxy/Cr6I3bcJRaRLzu0vpX8DAXD1PYkP4ga77GemnM0LL/W VbNrHFhA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqHBT-00031R-DS; Tue, 30 Jun 2020 14:24:27 +0000 Received: from mail-vi1eur05on2062.outbound.protection.outlook.com ([40.107.21.62] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqHBO-0002zt-0r for hostap@lists.infradead.org; Tue, 30 Jun 2020 14:24:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CM9mn+L/M0gHlEBJUAq41uWNdFZxzS63pFaFw7uWy1y0jXCxXgs9afWnzRJVKy+odPjQ/CEByvGmTkUq+nyCO5NyIftYWsehhSAyF/uM7WFwKlMtpeezQX+5PCFQRnS8IPdqqPMIppwrI5fnXgwJatRnBc1VLufWfntZmRdZ6/EUUy1yr7lPYCjKd/aHSJRZJRmsdcmtz3g25DszopSY39N6LO77UhR2L/5+6+d4y8XxWoAxzlWEd6Ww13KcXtp9FDPO2RUxsmgNloZKleLFj3sfIx1JZlUv0a3TCToYHiLYlB74oOwJTPaZ9BKqxFkldSYKK1K0QctRDZAuOIU4sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xsIxCV9qhgLhHeNUsoX/7fMP76P4Xcr1oGK7CqehqHI=; b=Ev3ULalXt1HJHM0lYRsD4MhyxqLRInlGekB0JUnKnrPINCo2+judREOD/0ETJP8ALPlbFviq4P7ZB/UpYP5Sw8HqD3CcRTHkUpXR0V9gE6w0goJCnEVY4UJSPIpB7DtMpra8sQJCk82iHVhNEbQYNPr+SXyExr3UaWgox3iVGJAGlHV+0JdIsl09dD45QxzmiFKa6eT1D3+UaO2lZDtIwnywtXvAP6e8T6nJSf3OaSut/BWRzljQAXt+Fl4kWL+clxb5Pc71PBE9iEMHFHV62LbdnaEzir0ztWXhLE1wcVJcbOTHscNKT2g99jsMCXrHeWgTmmDr+F1jV1VqsyK2AA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=celeno.com; dmarc=pass action=none header.from=celeno.com; dkim=pass header.d=celeno.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=celeno.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xsIxCV9qhgLhHeNUsoX/7fMP76P4Xcr1oGK7CqehqHI=; b=g/KBw3IiptO8iKsBfOdJy5HyQOsuLF8amaT1KAEAxIFvWMYFppKJ/4JgBtguBxFuZX/7DZgXSVvx5BenbnPIJAE4hHGZQ2Tpei6k55WKMgaXPFe9+VUFrETgqdjviFQeM7YFERZKvsp3hfTPqIzZz/U85jwyuSnw6ctGjX+NGl4= Authentication-Results: w1.fi; dkim=none (message not signed) header.d=none;w1.fi; dmarc=none action=none header.from=celeno.com; Received: from AM0P192MB0468.EURP192.PROD.OUTLOOK.COM (2603:10a6:208:45::15) by AM0P192MB0339.EURP192.PROD.OUTLOOK.COM (2603:10a6:208:48::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.25; Tue, 30 Jun 2020 14:24:18 +0000 Received: from AM0P192MB0468.EURP192.PROD.OUTLOOK.COM ([fe80::5cae:415:1979:1de1]) by AM0P192MB0468.EURP192.PROD.OUTLOOK.COM ([fe80::5cae:415:1979:1de1%5]) with mapi id 15.20.3131.028; Tue, 30 Jun 2020 14:24:18 +0000 From: Shay Bar To: Jouni Malinen Subject: [PATCH] hostapd: Add ability to disable HT/VHT/HE per BSS Date: Tue, 30 Jun 2020 17:23:46 +0300 Message-Id: <20200630142346.4499-1-shay.bar@celeno.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: LO3P123CA0017.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:ba::22) To AM0P192MB0468.EURP192.PROD.OUTLOOK.COM (2603:10a6:208:45::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (87.71.73.65) by LO3P123CA0017.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:ba::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23 via Frontend Transport; Tue, 30 Jun 2020 14:24:17 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [87.71.73.65] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c0de0b4-eea1-4315-0bd9-08d81d014645 X-MS-TrafficTypeDiagnostic: AM0P192MB0339: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-Forefront-PRVS: 0450A714CB X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aNDs0bOJ48B9a1CLxHq6NbMjA0h8oPH80Mb/wF3Efv1abSTgUhftelpm1ESAXjKpGcdyypFAe9TdxZurKDDEjUrpJg/qwpLlI1/4ckHb29W2D+84IzCiaBt4N4Tj0XYgQkg4sG5aBNmgJqtZ6BwBtfkKUJSH6Z3KyaUQetBymXQUG5knqFF6Oxl1wmRiUtdRJnM/zAOQnRYfwi9XqZl9qEyD77qJNE2TBFclNIMyEQvO6FbGBB9L3e3IApS5yHiQh06LnZFXFe6jAG/yTDd/lqDmcMe9jM2Oq+40VwiN+sOWH4mxp9c/8FSwRjTOY6+iE6JwlxCngUOTMARp8ZTjUp3EDGh9TFsJKpW9U184rkzGeVdpM6fUrVdHL7wC9GkcCdvZanDi1u/abfK9VH13cACJSxxJkVEEZVZbi69JD7ivcCo1rL8lN/329Fnr2CHn X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0P192MB0468.EURP192.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(136003)(366004)(396003)(376002)(346002)(39840400004)(52116002)(86362001)(69590400007)(44832011)(2616005)(956004)(26005)(6506007)(5660300002)(16526019)(186003)(316002)(4326008)(8676002)(6486002)(107886003)(6512007)(30864003)(6666004)(2906002)(83380400001)(6916009)(66556008)(36756003)(66476007)(1076003)(8936002)(66946007)(478600001)(781001)(309714004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UXW4iMCfjDOn5Vidwmwd95wZk/IHczI+WfM9rdzLG8iaQHVeR5D2432UCKl0p02mYX22X3VumW2fezH20u/dTrD/sFyhY0LEJjMC4q381rACaJl6w0FhVgFEuXQgL+Pa3/uTuOettPsqf+heWHZa1ZOg4IqUowulJXtN/FAOaqJWmxSd7zDPoecLw1RMX6rSfQVlfj6ZuYhK6/9ZXqRLljGmeG7jcLFxkN0O/vn2KMvIjfeWKdOPjyxiqg5B99S79kS7l2CIxI7/HvB6JkNYtQJplkbRVRsbI1xpKXtlqajcvxhfCCBKKULaM7XiN3P4p8AGMpxWshvp0q4BlPYv4nx2HFvcLFAHsrNAX6hsL/7Tp3d8Rv2Z7y4Knk3zyDpovITWHbIzDr2Yg9JEoGq63R+EErvbdsaS3P6p8rZnKkQylrVPHSkDWPko5eIhFuigfq5LglWl6SL2vG1etj8CjbRdY3+Ss6vM8w1CKTBoU+Q= X-OriginatorOrg: celeno.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c0de0b4-eea1-4315-0bd9-08d81d014645 X-MS-Exchange-CrossTenant-AuthSource: AM0P192MB0468.EURP192.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2020 14:24:18.7226 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f313103b-4c9f-4fd3-b5cf-b97f91c4afa8 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 92RKGkLugQtK7q+ObO1V0mONoeO6WnUHh/JJcE0y6GwEFmcW0O/oOROCObMCmDOTM9fnitFAfXSNvRKkSVug0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P192MB0339 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.21.62 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.21.62 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shay.bar@celeno.com, hostap@lists.infradead.org, eliav.farber@celeno.com Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add the ability to disable HT/VHT/HE for specific BSS from hostapd.conf. - Add disable_11ax boolean to hostapd_bss_config. - Change disable_11n and disable_11ac to boolean in hostapd_bss_config. Signed-off-by: Shay Bar --- hostapd/config_file.c | 6 ++++++ hostapd/hostapd.conf | 9 +++++++++ src/ap/ap_config.c | 10 +++++----- src/ap/ap_config.h | 5 +++-- src/ap/beacon.c | 12 ++++++------ src/ap/ctrl_iface_ap.c | 5 +++-- src/ap/ieee802_11.c | 2 +- src/ap/ieee802_11_he.c | 4 +++- src/ap/neighbor_db.c | 2 +- 9 files changed, 37 insertions(+), 18 deletions(-) -- 2.17.1 diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 9b78594ac..bf64781bf 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4577,6 +4577,12 @@ static int hostapd_config_fill(struct hostapd_config *conf, } bss->mka_psk_set |= MKA_PSK_SET_CKN; #endif /* CONFIG_MACSEC */ + } else if (os_strcmp(buf, "disable_11n") == 0) { + bss->disable_11n = !!atoi(pos); + } else if (os_strcmp(buf, "disable_11ac") == 0) { + bss->disable_11ac = !!atoi(pos); + } else if (os_strcmp(buf, "disable_11ax") == 0) { + bss->disable_11ax = !!atoi(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 367077370..8c5263b07 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -590,6 +590,9 @@ wmm_ac_vo_acm=0 # Note: hw_mode=g (2.4 GHz) and hw_mode=a (5 GHz) is used to specify the band. #ieee80211n=1 +# disable_11n: Boolean to disable HT for specific BSS +#disable_11n=0 + # ht_capab: HT capabilities (list of flags) # LDPC coding capability: [LDPC] = supported # Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary @@ -642,6 +645,9 @@ wmm_ac_vo_acm=0 # Note: hw_mode=a is used to specify that 5 GHz band is used with VHT. #ieee80211ac=1 +# disable_11ac: Boolean to disable VHT for specific BSS +#disable_11ac=0 + # vht_capab: VHT capabilities (list of flags) # # vht_max_mpdu_len: [MAX-MPDU-7991] [MAX-MPDU-11454] @@ -796,6 +802,9 @@ wmm_ac_vo_acm=0 # 1 = enabled #ieee80211ax=1 +# disable_11ax: Boolean to disable HE for specific BSS +#disable_11ax=0 + #he_su_beamformer: HE single user beamformer support # 0 = not supported (default) # 1 = supported diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index 1c6b4a00e..b2250c78a 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -1217,7 +1217,7 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, if (full_config && conf->ieee80211n && conf->hw_mode == HOSTAPD_MODE_IEEE80211B) { - bss->disable_11n = 1; + bss->disable_11n = true; wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) in 11b mode is not " "allowed, disabling HT capabilities"); } @@ -1225,7 +1225,7 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, #ifdef CONFIG_WEP if (full_config && conf->ieee80211n && bss->ssid.security_policy == SECURITY_STATIC_WEP) { - bss->disable_11n = 1; + bss->disable_11n = true; wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) with WEP is not " "allowed, disabling HT capabilities"); } @@ -1236,7 +1236,7 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP | WPA_CIPHER_CCMP_256 | WPA_CIPHER_GCMP_256))) { - bss->disable_11n = 1; + bss->disable_11n = true; wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) with WPA/WPA2 " "requires CCMP/GCMP to be enabled, disabling HT " "capabilities"); @@ -1246,7 +1246,7 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, #ifdef CONFIG_WEP if (full_config && conf->ieee80211ac && bss->ssid.security_policy == SECURITY_STATIC_WEP) { - bss->disable_11ac = 1; + bss->disable_11ac = true; wpa_printf(MSG_ERROR, "VHT (IEEE 802.11ac) with WEP is not allowed, disabling VHT capabilities"); } @@ -1257,7 +1257,7 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP | WPA_CIPHER_CCMP_256 | WPA_CIPHER_GCMP_256))) { - bss->disable_11ac = 1; + bss->disable_11ac = true; wpa_printf(MSG_ERROR, "VHT (IEEE 802.11ac) with WPA/WPA2 requires CCMP/GCMP to be enabled, disabling VHT capabilities"); } diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 3859ccbe0..ae289157e 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -534,8 +534,9 @@ struct hostapd_bss_config { #define TDLS_PROHIBIT BIT(0) #define TDLS_PROHIBIT_CHAN_SWITCH BIT(1) int tdls; - int disable_11n; - int disable_11ac; + bool disable_11n; + bool disable_11ac; + bool disable_11ax; /* IEEE 802.11v */ int time_advertisement; diff --git a/src/ap/beacon.c b/src/ap/beacon.c index b3b33b7fa..1ca1eb0df 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -458,7 +458,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, } #ifdef CONFIG_IEEE80211AX - if (hapd->iconf->ieee80211ax) { + if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) { buflen += 3 + sizeof(struct ieee80211_he_capabilities) + 3 + sizeof(struct ieee80211_he_operation) + 3 + sizeof(struct ieee80211_he_mu_edca_parameter_set) + @@ -564,14 +564,14 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, #endif /* CONFIG_IEEE80211AC */ if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) || - hapd->iconf->ieee80211ax) + (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) pos = hostapd_eid_wb_chsw_wrapper(hapd, pos); pos = hostapd_eid_fils_indic(hapd, pos, 0); pos = hostapd_get_rsnxe(hapd, pos, epos - pos); #ifdef CONFIG_IEEE80211AX - if (hapd->iconf->ieee80211ax) { + if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) { pos = hostapd_eid_he_capab(hapd, pos, IEEE80211_MODE_AP); pos = hostapd_eid_he_operation(hapd, pos); pos = hostapd_eid_spatial_reuse(hapd, pos); @@ -1163,7 +1163,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, #endif /* CONFIG_IEEE80211AC */ #ifdef CONFIG_IEEE80211AX - if (hapd->iconf->ieee80211ax) { + if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) { tail_len += 3 + sizeof(struct ieee80211_he_capabilities) + 3 + sizeof(struct ieee80211_he_operation) + 3 + sizeof(struct ieee80211_he_mu_edca_parameter_set) + @@ -1288,14 +1288,14 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, #endif /* CONFIG_IEEE80211AC */ if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) || - hapd->iconf->ieee80211ax) + (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos); tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0); tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos); #ifdef CONFIG_IEEE80211AX - if (hapd->iconf->ieee80211ax) { + if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) { tailpos = hostapd_eid_he_capab(hapd, tailpos, IEEE80211_MODE_AP); tailpos = hostapd_eid_he_operation(hapd, tailpos); diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c index ef53a8254..b3d6d62e4 100644 --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c @@ -748,7 +748,8 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf, iface->conf->ieee80211n && !hapd->conf->disable_11n, iface->conf->ieee80211ac && !hapd->conf->disable_11ac, - iface->conf->ieee80211ax, + iface->conf->ieee80211ax && + !hapd->conf->disable_11ax, iface->conf->beacon_int, hapd->conf->dtim_period); if (os_snprintf_error(buflen - len, ret)) @@ -756,7 +757,7 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf, len += ret; #ifdef CONFIG_IEEE80211AX - if (iface->conf->ieee80211ax) { + if (iface->conf->ieee80211ax && !hapd->conf->disable_11ax) { ret = os_snprintf(buf + len, buflen - len, "he_oper_chwidth=%d\n" "he_oper_centr_freq_seg0_idx=%d\n" diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index b91640070..c73bb66e8 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3847,7 +3847,7 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta, #endif /* CONFIG_IEEE80211AC */ #ifdef CONFIG_IEEE80211AX - if (hapd->iconf->ieee80211ax) { + if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) { p = hostapd_eid_he_capab(hapd, p, IEEE80211_MODE_AP); p = hostapd_eid_he_operation(hapd, p); p = hostapd_eid_spatial_reuse(hapd, p); diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c index 85b714090..275008f65 100644 --- a/src/ap/ieee802_11_he.c +++ b/src/ap/ieee802_11_he.c @@ -418,7 +418,8 @@ u16 copy_sta_he_capab(struct hostapd_data *hapd, struct sta_info *sta, enum ieee80211_op_mode opmode, const u8 *he_capab, size_t he_capab_len) { - if (!he_capab || !hapd->iconf->ieee80211ax || + if (!he_capab || + !hapd->iconf->ieee80211ax || hapd->conf->disable_11ax || !check_valid_he_mcs(hapd, he_capab, opmode) || ieee80211_invalid_he_cap_size(he_capab, he_capab_len) || he_capab_len > sizeof(struct ieee80211_he_capabilities)) { @@ -448,6 +449,7 @@ u16 copy_sta_he_6ghz_capab(struct hostapd_data *hapd, struct sta_info *sta, const u8 *he_6ghz_capab) { if (!he_6ghz_capab || !hapd->iconf->ieee80211ax || + hapd->conf->disable_11ax || !is_6ghz_op_class(hapd->iconf->op_class)) { sta->flags &= ~WLAN_STA_6GHZ; os_free(sta->he_6ghz_capab); diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c index 01bf88623..2bbe31859 100644 --- a/src/ap/neighbor_db.c +++ b/src/ap/neighbor_db.c @@ -220,7 +220,7 @@ void hostapd_neighbor_set_own_report(struct hostapd_data *hapd) u16 capab = hostapd_own_capab_info(hapd); int ht = hapd->iconf->ieee80211n && !hapd->conf->disable_11n; int vht = hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac; - int he = hapd->iconf->ieee80211ax; + int he = hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax; struct wpa_ssid_value ssid; u8 channel, op_class; u8 center_freq1_idx = 0, center_freq2_idx = 0;