From patchwork Wed Jun 28 12:17:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Escande X-Patchwork-Id: 1801028 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4hZUiBP9; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=X89s6LHG; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qrgc350Bbz20bN for ; Wed, 28 Jun 2023 22:18:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :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=/KhMlUFWVUSshyhqGwgndjmREj+6sz9l2jkjZuSjuZk=; b=4hZUiBP91pOKfY j0AnjHUcWHZsTv/Em4G4tP3f7amLBpewFJHs1qgC19gPpSt11NR5qoYUiY/muVYs71ElHoLc7ReMd OOwROVlew6dVqFAS82LbTqI/NskO839sKBQGSO2wZrNmLwJey8pDcc/HQ2IiNummmY93MZehSM77Q CpSKhcrO4ESgpDv8D0D6Vc1e94imiEyH30zb/vCqqtEAwOfxXTMOa8xpJD+9ofTniUY02OBNHRYE9 bTF15CVPT8chUisHTn32FnF7LefmEr1Xzh72CLbuB/6B/3mzpvfT5EJoGDSp31ONvtpr7n+pxeYmV shvKBezYvIvvDbZrp5aQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qEU7A-00Fd8u-33; Wed, 28 Jun 2023 12:17:40 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qEU76-00Fd8Z-2W for hostap@lists.infradead.org; Wed, 28 Jun 2023 12:17:38 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fba64d9296so19850055e9.3 for ; Wed, 28 Jun 2023 05:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687954651; x=1690546651; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UKzgNjnObrEPckTWhm02ey/HPvYSeIDEZ2gROE+54FQ=; b=X89s6LHGLw5m97lWB+FdgYZbzFsgi2ilgAot3pYjoFR5nJTbOTEMb0/5J4H8Jx1xFR EPxgWJ+nn2cM5uJI3pgS0SC+ICCxJavJAyWcJhVOh71vXD5y9uMGmxItf7AuNTz+4209 DJfpZd8e3ove4w8fl6VNhuIhAqIkrvVfZGDfvGEJwPdzOKGZf95tbnVwBGFNZe8kjjb/ Qa9KsWNztgyor1xEl+0WJfjkQEk6TcqSZ/OnQ1KuxbCDI9eXbh1eo/VSV/xr+muQX/8a bbuE3Wce+tSxK2CiJfkJQpVTilUJYCUwGchjTfznTcWzhjWhdh6Tyu9Dk5ZmkI0HK5b+ b2IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687954651; x=1690546651; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UKzgNjnObrEPckTWhm02ey/HPvYSeIDEZ2gROE+54FQ=; b=C9lk9w+PH7FeYkseaVKYfcb06JMmPf2RjP9ZibcoWfead2dEkXdoeNhxoVMoUG9Vdn coOFVEUuP0inJ+ATbBO5lDUBh0tEMMTB5BTaHkbbBXA5xgkuc3VbCubwpduEm9HocFw9 Stk/hoQwho6oIj59aLfw+lZYUqJfl6MLXWliy2LHnaBLY172tMQElP5RPhJUWvrL8jQZ 5MaDnvgZmEOCLMkPycXz1VTEpke3OhT8GWiILKDjfcIecC8RxulOwgp6h3KW2FY8Yvtn M6x6++m+uNoZ8CJH70OaALY/ty28KyOLegVMflsXGZy5UQvh1n8etIL11C/kHbNQjt1I vfng== X-Gm-Message-State: AC+VfDyM8yXUrCt5BfWiIfVhqO+6BOWT0jpIE6rV+PyavJ26o7vjElbH k7Meht5PunVqOsBP4rFieGy1CPTZBPo= X-Google-Smtp-Source: ACHHUZ5tOzVuHvTqq0BAIIaL2GMXr4Z5Hg23Psycx9I7lucyVWrdcPAC1S2wQnUdN6xEwQLO2JhETA== X-Received: by 2002:a5d:4fd2:0:b0:313:f0e3:2fdc with SMTP id h18-20020a5d4fd2000000b00313f0e32fdcmr6964436wrw.2.1687954650562; Wed, 28 Jun 2023 05:17:30 -0700 (PDT) Received: from syracuse.iliad.local (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id g6-20020a5d6986000000b0031130b9b173sm13134035wru.34.2023.06.28.05.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 05:17:30 -0700 (PDT) From: Nicolas Escande To: hostap@lists.infradead.org Cc: Nicolas Escande Subject: [PATCH] wpa_supplicant: respect disable_ht40/disable_vht/disable_he in ap/mesh mode Date: Wed, 28 Jun 2023 14:17:04 +0200 Message-ID: <20230628121704.301305-1-nico.escande@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230628_051737_020491_5FF47BB0 X-CRM114-Status: GOOD ( 11.79 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When using wpa_supplicant to connect to a mesh network or to create an ap, the current code doesn't respect all CONFIG_XXX_OVERRIDES network parameters, just disable_ht in CONFIG_HT_OVERRIDES. This patch adds support for some of the others modulation related disable flags: - disable_ht40 with CONFIG_HT_OVERRIDES - disable_vht with CONFIG_VHT_OVERRIDES - disable_he with CONFIG_HE_OVERRIDES Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:332 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [nico.escande[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org When using wpa_supplicant to connect to a mesh network or to create an ap, the current code doesn't respect all CONFIG_XXX_OVERRIDES network parameters, just disable_ht in CONFIG_HT_OVERRIDES. This patch adds support for some of the others modulation related disable flags: - disable_ht40 with CONFIG_HT_OVERRIDES - disable_vht with CONFIG_VHT_OVERRIDES - disable_he with CONFIG_HE_OVERRIDES Signed-off-by: Nicolas Escande --- wpa_supplicant/ap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index ff7c75644..2fc9f453b 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -314,8 +314,20 @@ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, #ifdef CONFIG_HT_OVERRIDES if (ssid->disable_ht) ssid->ht = 0; + if (ssid->disable_ht40) + ssid->ht40 = 0; #endif /* CONFIG_HT_OVERRIDES */ +#ifdef CONFIG_VHT_OVERRIDES + if (ssid->disable_vht) + ssid->vht = 0; +#endif /* CONFIG_VHT_OVERRIDES */ + +#ifdef CONFIG_HE_OVERRIDES + if (ssid->disable_he) + ssid->he = 0; +#endif /* CONFIG_HE_OVERRIDES */ + if (!ssid->ht) { wpa_printf(MSG_DEBUG, "HT not enabled in network profile");