From patchwork Thu May 7 19:11:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 2234532 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=Z+vEe37I; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=I3OYCNMo; 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 4gBMNg11cBz1yCg for ; Fri, 08 May 2026 05:13:34 +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=brondJdUTunlG2AFidOlZNpjdtNlIVdsZghM9IRUyiY=; b=Z+vEe37ISlO1sw MhLRwyi8OSNNVhom+2fZ0hAB13PfezR8hnhWsctMzUi5qpjr0cHMQWTO4nS7Kq28oDl/VPaNrIDOm ElS0ckN0iOsxrc8qvHtVmShwbPOw/JPemvYq3ajTrpeA+I4+iccjLrWGuXAz8ht0LyQr8qeDQRlpR n7ZRVK+UsLYlOcvJDwEeBXcjbnaoIMpnRVnn/FYKfj05swdlF7lDql3z5KsWukl0OFEGdbUVe2cBL YgPp+ut/XN0EuNtaR72f/z0Qjx9bX8L1hc7esf0Ug03IwgBzBcjUMDDMyj5jrUYSsvneH6Zv2gsnG LhygAFVaVzE7S+WSWiug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wL48c-00000004fvo-3EKP; Thu, 07 May 2026 19:11:58 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wL48Z-00000004fuK-3ZJ1 for hostap@lists.infradead.org; Thu, 07 May 2026 19:11:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778181115; x=1809717115; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lX/SfJ7+hO+BeUK8CuduI8ss3kkCl4TSoqNvcGad8Zo=; b=I3OYCNMoK3w8VPL+PCD1m/55NyMNpFxQ+XFwA3Sd45Fbv1tY8oSsdyoG eibttWJ//LrM2+VLIOG9Z5KGpHkVkHxvrTjGBXAaCJUd0pu4m3zE2CMQw DpimfdINeiBnAOqXD9IExWKg+w9yxms4W1eb1SzHeLE9Tq15r2Ui2YE2v enVz9pkJTGQGLtXO2uohSW0yOSaxitpRCKWB24a1jkIFj4oklyvX1+cbf 5uyL86b2C4H4XoI9E0rNoyS7cSKWJgDcRHuEj9DcEEzFycSdJu1U3scDR 9jFm0sH4XdnKYBHWh49+FddCuidecr5qqNrNdJ1rpeMC5nITflKSVnqJm g==; X-CSE-ConnectionGUID: sm/8ekKHRDKxLZ6zgtNr6A== X-CSE-MsgGUID: ecaEKc3ETZey8m8jqNb0Ug== X-IronPort-AV: E=McAfee;i="6800,10657,11779"; a="101818682" X-IronPort-AV: E=Sophos;i="6.23,222,1770624000"; d="scan'208";a="101818682" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2026 12:11:46 -0700 X-CSE-ConnectionGUID: sVwze3d3SJ+w9EiSbgjspg== X-CSE-MsgGUID: PVilTFhHReCoPq+YKur4gg== X-ExtLoop1: 1 Received: from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com) ([10.167.28.6]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2026 12:11:45 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Andrei Otcheretianski Subject: [PATCH] NAN: Fix channel peer schedule channel filtering Date: Thu, 7 May 2026 22:11:28 +0300 Message-ID: <20260507191130.36955-2-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260507_121155_928241_EC270023 X-CRM114-Status: GOOD ( 10.78 ) X-Spam-Score: -4.8 (----) 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: Channel filtering should be done for any operating class of course. The code was misplaced. Fix it. Signed-off-by: Andrei Otcheretianski --- src/nan/nan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Content analysis details: (-4.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [198.175.65.9 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.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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.4 DKIMWL_WL_HIGH DKIMwl.org - High trust sender -0.0 DMARC_PASS DMARC pass policy 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 Channel filtering should be done for any operating class of course. The code was misplaced. Fix it. Signed-off-by: Andrei Otcheretianski --- src/nan/nan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nan/nan.c b/src/nan/nan.c index 140785729d..04cc47be90 100644 --- a/src/nan/nan.c +++ b/src/nan/nan.c @@ -2244,13 +2244,13 @@ nan_peer_get_committed_avail_add(const struct nan_data *nan, freq = freq - 70 + idx * 20; /* TODO: Missing support for 80 + 80 */ - - /* Skip channels that are not in local schedule */ - if (local_sched && - !nan_peer_channel_in_local_sched(nan, freq, local_sched)) - return; } + /* Skip channels that are not in local schedule */ + if (local_sched && + !nan_peer_channel_in_local_sched(nan, freq, local_sched)) + return; + /* Assume committed for conditional slots if setup is done */ committed = (avail->type == NAN_AVAIL_ENTRY_CTRL_TYPE_COMMITTED) || (avail->type == NAN_AVAIL_ENTRY_CTRL_TYPE_COND &&