From patchwork Mon Jan 29 18:26:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1892448 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=FajGEiyJ; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=WxgG+0oE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TNxbn4jfLz1yQ0 for ; Tue, 30 Jan 2024 05:27:15 +1100 (AEDT) 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=x+/VJAycNNyOMwpY0cEOzKwd/s5HgY7oAR6SN2QAJWM=; b=FajGEiyJe+P22F 0p5bI7Iem9XNELtPEQWxZxY18wg71pwIcEIwxnUvMFWpsh6ijOHKjBt7gMEgzfBPfhk7NmSI2mZcT /aOZ+RfIjjtS/J1Rcb9AJN7k71F6THcEGFTZ/j63PezP/mmhbbfyhwPgy0D1UJwp6CsGCN3vhAIeV igI2WFWkriqieBnZRzSvaaJY5LHsFaWLyd8bJ6RpsKLeNsSTrXKlyaGoNU0lAT3pLNVFa0ZSMo5sg zrqQgOjZ7K6dEk1Klui1P2QnVrKV+ET/tm3AGCUOFEAC9QWN+6p/nn40oGE+8nOQDeN/gGW7au1Zg ycWHX/Ourim0VJ9RJxKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUWLH-0000000Dvc0-2kGC; Mon, 29 Jan 2024 18:26:47 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUWLE-0000000DvbG-40Ga for hostap@lists.infradead.org; Mon, 29 Jan 2024 18:26:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=pXbTNptkkFzIgMIuy6z7bkWCjMbWT5oH8JGam/hAzp8=; t=1706552803; x=1707762403; b=WxgG+0oEct1nKg9bPrYNeo9eWZBY3loNhbxKzqe417gn5pvOWusCE5ZAu7v09cihM24rDVw3isa lW8oo5CS303h+I1zgwZPVRr7DMtlGDG/Ff72ttGLl8IOH2ME3HWKxiClmSKyER0eL2lFGumPeTi4H XfVEriPJrIqO83I7QmvbYvlXdTlCi47+CinhyqaL9cZGHyNiamG3EhNM4OXEeLL5dhSVfSGJNRkjP MT6O0xJJ4g5irKVErmAOgC9YtnU6nybw46Oa8M0cc/ZdIJhfJwVLQg6utIkopptJUICtdhM9znUgh 3jCjiSP2K3SMc8vVdyTKnQYtLq+cCzkcPPOQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rUWLA-00000004ym5-3hry; Mon, 29 Jan 2024 19:26:41 +0100 From: Johannes Berg To: hostap@lists.infradead.org Cc: Johannes Berg Subject: [PATCH] tests: eht: set valid configuration for puncturing tests Date: Mon, 29 Jan 2024 19:26:39 +0100 Message-ID: <20240129192638.2e7edb580322.Ic10566c44c1e37b835e874c9a421bfc34350cc63@changeid> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240129_102645_021276_4A5B79B2 X-CRM114-Status: GOOD ( 10.91 ) 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: From: Johannes Berg When puncturing is used on EHT, the HT/VHT/HE channel configuration must not encompass the punctured subchannel, so must use a lower bandwidth. Change the puncturing tests accordingly. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 From: Johannes Berg When puncturing is used on EHT, the HT/VHT/HE channel configuration must not encompass the punctured subchannel, so must use a lower bandwidth. Change the puncturing tests accordingly. Signed-off-by: Johannes Berg --- tests/hwsim/test_eht.py | 44 ++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py index 28e06dc76f1d..9c3720d5e80c 100644 --- a/tests/hwsim/test_eht.py +++ b/tests/hwsim/test_eht.py @@ -1123,7 +1123,13 @@ def _5ghz_chanwidth_to_bw(op): }.get(op, "20") def _test_eht_5ghz(dev, apdev, channel, chanwidth, ccfs1, ccfs2=0, - eht_oper_puncturing_override=None): + eht_oper_puncturing_override=None, + he_ccfs1=None, he_oper_chanwidth=None): + if he_ccfs1 is None: + he_ccfs1 = ccfs1 + if he_oper_chanwidth is None: + he_oper_chanwidth = chanwidth + try: params = {"ssid": "eht", "country_code": "US", @@ -1133,33 +1139,32 @@ def _test_eht_5ghz(dev, apdev, channel, chanwidth, ccfs1, ccfs2=0, "ieee80211ac": "1", "ieee80211ax": "1", "ieee80211be": "1", - "vht_oper_chwidth": str(chanwidth), - "vht_oper_centr_freq_seg0_idx": str(ccfs1), + "vht_oper_chwidth": str(he_oper_chanwidth), + "vht_oper_centr_freq_seg0_idx": str(he_ccfs1), "vht_oper_centr_freq_seg1_idx": str(ccfs2), - "he_oper_chwidth": str(chanwidth), + "he_oper_chwidth": str(he_oper_chanwidth), + "he_oper_centr_freq_seg0_idx": str(he_ccfs1), "he_oper_centr_freq_seg1_idx": str(ccfs2), - "he_oper_centr_freq_seg0_idx": str(ccfs1), "eht_oper_centr_freq_seg0_idx": str(ccfs1), "eht_oper_chwidth": str(chanwidth)} - if chanwidth == 0: - if channel == ccfs1: - bw = "20" - elif channel < ccfs1: + if he_oper_chanwidth == 0: + if channel < he_ccfs1: params["ht_capab"] = "[HT40+]" - else: + elif channel > he_ccfs1: params["ht_capab"] = "[HT40-]" else: - params["ht_capab"] = "[HT40+]" - if chanwidth == 2: - params["vht_capab"] = "[VHT160]" - elif chanwidth == 3: - params["vht_capab"] = "[VHT160-80PLUS80]" + params["ht_capab"] = "[HT40+]" + if he_oper_chanwidth == 2: + params["vht_capab"] = "[VHT160]" + elif he_oper_chanwidth == 3: + params["vht_capab"] = "[VHT160-80PLUS80]" if eht_oper_puncturing_override: params['eht_oper_puncturing_override'] = eht_oper_puncturing_override freq = 5000 + channel * 5 + bw = "20" if chanwidth != 0 or channel != ccfs1: bw = _5ghz_chanwidth_to_bw(chanwidth) @@ -1206,21 +1211,24 @@ def test_eht_5ghz_80mhz_puncturing_override_1(dev, apdev): # The 2nd 20 MHz is punctured _test_eht_5ghz(dev, apdev, 36, 1, 42, 0, - eht_oper_puncturing_override="0x0002") + eht_oper_puncturing_override="0x0002", + he_ccfs1=36, he_oper_chanwidth=0) def test_eht_5ghz_80mhz_puncturing_override_2(dev, apdev): """EHT with 80 MHz channel width on 5 GHz - primary=149 - puncturing override (3rd)""" # The 3rd 20 MHz is punctured _test_eht_5ghz(dev, apdev, 149, 1, 155, 0, - eht_oper_puncturing_override="0x0004") + eht_oper_puncturing_override="0x0004", + he_ccfs1=151, he_oper_chanwidth=0) def test_eht_5ghz_80mhz_puncturing_override_3(dev, apdev): """EHT with 80 MHz channel width on 5 GHz - primary=149 - puncturing override (4th)""" # The 4th 20 MHz is punctured _test_eht_5ghz(dev, apdev, 149, 1, 155, 0, - eht_oper_puncturing_override="0x0008") + eht_oper_puncturing_override="0x0008", + he_ccfs1=151, he_oper_chanwidth=0) def test_eht_5ghz_80p80mhz(dev, apdev): """EHT with 80+80 MHz channel width on 5 GHz"""