From patchwork Mon Apr 29 10:13:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Escande X-Patchwork-Id: 1928887 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=ApKNtWNB; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=VQk1GJqR; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VSfMf108Hz23jG for ; Mon, 29 Apr 2024 20:14:51 +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:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PT0pJsG0O/yzm9sw6Mst7PhR8ZJ6HGQ32NSR9HQw7fY=; b=ApKNtWNBPfVuVB t1sTYJTMIcYq5jI5Yhdky3nT1DEcWqM5aOj/ZMjLvG+WkxmDG6wRHk8SyAazcU35qPN2tnLHW1I9P IWODZc3OXp+2dMtvqApSC9pDs2R0srUMAdB/Bkcor1MVCCPng/WbyiNXktDLscGJeb7envBcTQUcs sMb6O64dmm4ZPxhD79N3DuoupYl7ZPRfHcbvou88vayGQX4vlZYZSSyTXdAcn7JRCjpGj5QDmpTao 8Wu9YUQngQjyLNzU7ZOjCcgYUbnkeqd723UZfYCj4vP/ZKNkkXgLV81wkfIZJUjfFPF0TAvp/2BMf qxtodtEOlFvL06zcXVUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1O1Y-00000002DGI-31fT; Mon, 29 Apr 2024 10:14:16 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1O1T-00000002DFe-3qO1 for hostap@lists.infradead.org; Mon, 29 Apr 2024 10:14:13 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-41b79451128so22832885e9.0 for ; Mon, 29 Apr 2024 03:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714385646; x=1714990446; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=lP8rACO+FMb9zFmGW0y7yELEqP/ubxrMBhqij0KaQfA=; b=VQk1GJqRJMG3JJWbXfkDqkxHxr23cfF8ymN9jF1JiZZrHbI2lLquVbTQtBumSfdDOU rS67Tz6lMUsXgEJQlLZNIpZ9bgvuEkPUfAnm6XOJJw4KI5+r8U6YS6AYaDTOQlGHsWEe 07MztByN+yAiyMQwlOsVMpwJ5qbB659/2Kh8mAVNjUdkPMk7ExnYUKs14q6wqAKUTNnc o77+JzMkBU5GntDHRLQgfBdcqNmYS8Gbl7JYd5WJwiWdM+RlPM5tkEztND77Pc45+szc GUC0QQVKQCyS7GO+tPLbg+Q2KKXnbFxTo7Fc5RRICbXMIuCS6W8EaTqtDHkgcFsKLQKK 9cEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714385646; x=1714990446; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lP8rACO+FMb9zFmGW0y7yELEqP/ubxrMBhqij0KaQfA=; b=R1FmMoOk4XdYsovL6cnxQF8vqSPMRWXfvtZ1gd8vT6SOePOabVasN/F290eHjloNEw X5SiQKWa3bHCoePAcygtJ6S6xKnKemsxQRWo9yWXlWd+KHgol5bMnVqPUWI20J7Swr0c v3pk+H0IkWY/EY/1OdwHKhWYSAO4EyVTbrFqCwy21yg282p3Sdq+OznDXzt5Rb0PyArd mV0Hg5LkLqpetSdLMv96Z7DhY7jcgxCJVt/V7xSpIYAhoen6/tAU0AhTfgaPVq72PqU5 qtwTK6JZgvPwGmqJJb30L1/abpxRGMnoLn2IXlN4aStnltqnaBPoDLyBbuiz7g8rr6GK lKyA== X-Gm-Message-State: AOJu0YyxFhMsK6mNrUqILFvxTEC8i5EwsrvALsorfotfdNaSn8Frvv7G w2814+cP43a5LkAInlByUMdvnglglS3on4Uq4f6zx7ZoxRQ39rj5+gggTg== X-Google-Smtp-Source: AGHT+IHC+nw9yRyNL6s0kJRTZ4ceu8U4nqah3PFgWrMGh4pp9XOHgLrgtw9Zqhs6dh21i9cvIMg4CQ== X-Received: by 2002:a5d:58d8:0:b0:34a:1cc5:ee0c with SMTP id o24-20020a5d58d8000000b0034a1cc5ee0cmr3569994wrf.26.1714385645995; Mon, 29 Apr 2024 03:14:05 -0700 (PDT) Received: from syracuse.iliad.local (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id c5-20020a056000184500b0034d1fe44278sm904718wri.39.2024.04.29.03.14.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 03:14:05 -0700 (PDT) From: Nicolas Escande To: hostap@lists.infradead.org Subject: [PATCH] hostapd: respect obss_interval on 40MHz intolerant disconnect Date: Mon, 29 Apr 2024 12:13:25 +0200 Message-ID: <20240429101405.99454-1-nico.escande@gmail.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_031411_982326_577147E1 X-CRM114-Status: GOOD ( 12.20 ) 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 an AP is configured for HT operation on 40MHz but has overlapping BSS on the secondary channel, it will fallback to 20MHz only. Also a 40MHz AP will downgrade to 20MHz while at least 1 40MHz into [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -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.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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [nico.escande(at)gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:336 listed in] [list.dnswl.org] 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 an AP is configured for HT operation on 40MHz but has overlapping BSS on the secondary channel, it will fallback to 20MHz only. Also a 40MHz AP will downgrade to 20MHz while at least 1 40MHz intolerant STA is connected. However in the current code, on such an AP, we do not check the obss_interval parameter on the last 40MHz intolerant STA disconnect & start a timer that will unconditionnaly bring the AP to 40MHz operation even if it had overlapping BSS. Signed-off-by: Nicolas Escande --- src/ap/ieee802_11_ht.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c index f90f1254e..af3ff9110 100644 --- a/src/ap/ieee802_11_ht.c +++ b/src/ap/ieee802_11_ht.c @@ -417,6 +417,7 @@ void ht40_intolerant_remove(struct hostapd_iface *iface, struct sta_info *sta) iface->num_sta_ht40_intolerant--; if (iface->num_sta_ht40_intolerant == 0 && + iface->conf->obss_interval && (iface->conf->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET) && (iface->drv_flags & WPA_DRIVER_FLAGS_HT_2040_COEX)) { unsigned int delay_time = OVERLAPPING_BSS_TRANS_DELAY_FACTOR *