From patchwork Tue Sep 22 06:27:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilanka de Silva X-Patchwork-Id: 2310047 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=qI5OmDDd; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=pApNyXOg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) 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 4hqWql6PSwz1xyW for ; Wed, 23 Sep 2026 19:28: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=xgLUQYfjMN/2iE3M5KaksBZ9QhR5SIXMhT9MzXgpX7U=; b=qI5OmDDdBCCfb9 AYbRwTLU+kSIijWBFBK9EXhDIn9AH9ZHbGKN/q5xmnrF78hU5bdb9xG7PAjQDYOG2TplSdZzwAyv1 bDVLbiwwli596eDUL6ds5kxk3KMKAWLIXd5VbquCeJ2secGZs0C+YaxFSdN4jv4cjpk8CeclWpRcn vtvir8XQy2aivfDC+eCWbTXWnOQ/lSLxBekVMzmAwleLCZWBhmt63IoTfU9Omsgby0xTNwiVJLa/U FqY1IfJvxltP4jo6o3PGPtdBtkBIPXac7r1eNr74ysALJjVnwPms6z/3LaweJr7aTT7z0rmbD0WiV fD89voxV2JB31eiDBwIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x9JG6-00000007j4o-2dDG; Wed, 23 Sep 2026 09:27:22 +0000 Received: from mail-ej2-x10.google.com ([2a00:1450:4864:34::10]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x93Ky-00000006344-2Hdq for hostap@lists.infradead.org; Tue, 22 Sep 2026 16:27:22 +0000 Received: by mail-ej2-x10.google.com with SMTP id a640c23a62f3a-c254f55eff0so646302966b.0 for ; Tue, 22 Sep 2026 09:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790094438; x=1790699238; 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:content-type; bh=H48hpTpbk0aM80Orh9unWxWhzZ74ejDvYQHp2mBj2Gs=; b=pApNyXOgl4da9wBU8kKe2fodlYzKqt3R86Ptb/w3MB/telxO9zdwuB0CvyYON1byZ2 XTDKPQjh0cekUj3/KunqQ79oWgqkG2BhxypFBgSpnNoClKSyta4Ip1nYx3d5weyY5kqj 5gSEydRq6LmPR8+8/oTVweam5JLcIRAXM+bg7Emd284yJcjqDfQbuYTqQ90h67lifChc WHpLuj5cSBTKtfCCg/wdVzielirIfqIIu6n3/JDviBurHslgNiShPQ8x7dNXsgZ7/Bvs Dr4qwERPys2l9++8F9pjLhsIo9pGlQGwgT1XbU21h2CGTkWTp7Ym3vVUI6ixBvDdVWoT OIgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790094438; x=1790699238; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=H48hpTpbk0aM80Orh9unWxWhzZ74ejDvYQHp2mBj2Gs=; b=RbBE8BlHE1BjX1v5nY4ZJgABWKDNTPdDtgR3uLbAg0l+x+dVBhgdN9KQYm3J8tD/T6 /S+1HWf0eyodYSUCl2xmfdO9m+hYOdCsklk1fUFv60MuS9FpTsF3LYTNHru63HIG1c3V +TO/CHIZCQM++QHahsdubvz3qVCC0gw8x5Y4USngb5bLWer7b0RR3NJPmg8eTNOeunF1 WRMzwU88BQw/lo0yL7WQ2t6ETHwMY1fYUB6hkU5BNqakyCl1pRFRkM17zaNhnRMzE4aN 3YJ6bq7LlgC+1rhPeSmACPk1D5DM2VOIsFjPQ38RMexpfoPaaL/0tdPBmsurgtBiAbfD xN7g== X-Gm-Message-State: AFuF++nk1o1Ky6FrrYbWuzWBb4rUGZYxODftGcLyuXp7gOlwRksLaswz Z6mSGbmFRKiaW5CIcIc8GtjtgORRHVRqZpxmdJhmuU1V6hUfI+PomICPCiTawA== X-Gm-Gg: AYBFou1VAxVfSCCqadK4YmAkbijOtZs0PL82kTe3jLKhaVNe+gDqbWgxxc2QYZNZf3i v5xb/iMPleTMpZjEk7HylRq71lCmaebwTdN73X0+6ElyYhdlIQGuloQNe9XRKWlnAnw53f0l7mR BOu56Ow5jKIcx5aV1pQEeb44OOxxk5HbYL17MFn8sdgnh7F9ea5MumNp3RGR331H23CAFF5PTSb cU2pus0Sp6UDuQJdttBEpGipjc8JbrGn4/Mb8VPiznc0Cw2WAt9LjPnr4mGm244zPHoyFP7O8IC FwB8R7LjTpGxzjDOIOB923AikKITPDg83aJaLmw2IBdE5juu9baSu0QDj7cEhwoRzWbgXR7FS9h 5kiprjmW1+qM52MaKE+JiAzwe41GADfdV5Y9TL4vX21ohbmOSldiLQ/dV2BaPuvsqM9BuTZgmqe ynPfWb05WZZAWdg76SDs5uUvK8R5uUuMoPVVw5Kg8odW5M9qID+qVVUJbqxcCtlg44xVp9Bo6uc 0nvGBV0KQthXaVQ9HenKa68eDAn8nWIyhEEAGnXL1EkzVy+XRipkqvJSCnwibwXdqmqkWwuG8Xk vFn4ai8qdV+4St+iiWGWivKWUBtlH+m+VvecfXU1Yo3mz5Ye4L55OV5wsHnIr4Kb38She/B190Q KYVH1E7SP7Dk= X-Received: by 2002:a17:906:9c95:b0:c29:63ce:a796 with SMTP id a640c23a62f3a-c2a15828568mr1254305366b.46.1790094437958; Tue, 22 Sep 2026 09:27:17 -0700 (PDT) Received: from ndesilva--20250922-QTQPY (181-174-91-188.ftth.glasoperator.nl. [188.91.174.181]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2a9c62e8a5sm113423066b.61.2026.09.22.09.27.16 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 22 Sep 2026 09:27:17 -0700 (PDT) From: Nilanka de Silva To: hostap@lists.infradead.org Subject: [PATCH] AP MLD: Break the mutual ACS deferral between partner links Date: Tue, 22 Sep 2026 18:27:12 +0200 Message-ID: <20260922162712.94743-1-nilankadsilva@gmail.com> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260922_092720_597528_F8F5AAF8 X-CRM114-Status: GOOD ( 19.30 ) X-Spam-Score: -2.1 (--) 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: hostapd_driver_scan() refuses to start an ACS scan while any ML partner link's interface is in HAPD_IFACE_ACS state. When two links of the same MLD are configured with channel=0 they enter that state [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -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_AU Message has a valid DKIM or DK signature from author's domain -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_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.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [nilankadsilva(at)gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:34:0:0:0:10 listed in] [list.dnswl.org] -0.0 DMARC_PASS DMARC pass policy X-Mailman-Approved-At: Wed, 23 Sep 2026 02:27:20 -0700 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 hostapd_driver_scan() refuses to start an ACS scan while any ML partner link's interface is in HAPD_IFACE_ACS state. When two links of the same MLD are configured with channel=0 they enter that state at the same time, each sees the other "in ACS", and both return -EBUSY. acs.c retries every ACS_SCAN_RETRY_INTERVAL until ACS_SCAN_RETRY_MAX_COUNT, then one link fails ("ACS: Failed to request initial scan (all re-attempts failed)") and is disabled, leaving a single-link MLD. Nothing ever breaks the tie, because the state check does not distinguish a partner that is scanning from a partner that is also waiting to scan. Observed on MT7996 (one wiphy, 5 GHz + 6 GHz AP MLD links): both links log "ACS in progress in a partner link - try to scan later" and "Failed to request acs scan ret=-16 (Resource busy)" in lock step for the whole retry window. The behaviour is the same under different regulatory domains (NL, SA); a separate non-MLD BSS on the same wiphy completes ACS normally. Only defer while the partner really has a scan in flight (scan_cb set). When both links are still waiting to start, let the link with the lowest mld_link_id go first so the two ACS runs serialise. Tested on MT7996 with both MLD links on ACS: the second link logs "Partner link 1 starts ACS first - try to scan later", the first link completes ACS, then the second runs its own; both links are up about 50 s after start, on a reload and on a cold boot. Signed-off-by: Nilanka de Silva --- src/ap/ap_drv_ops.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index 0b83a67..5ab76d9 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -837,12 +837,28 @@ int hostapd_driver_scan(struct hostapd_data *hapd, h_hapd = h_iface->bss[0]; - if (hostapd_is_ml_partner(hapd, h_hapd) && - h_hapd->iface->state == HAPD_IFACE_ACS) { + if (!hostapd_is_ml_partner(hapd, h_hapd) || + h_hapd->iface->state != HAPD_IFACE_ACS) + continue; + + /* The partner has a scan in flight: wait for it. */ + if (h_hapd->iface->scan_cb) { wpa_printf(MSG_INFO, "ACS in progress in a partner link - try to scan later"); return -EBUSY; } + + /* + * Both links are still waiting to start their ACS scan: + * let the lowest link id go first so the scans serialise + * instead of deferring to each other forever. + */ + if (h_hapd->mld_link_id < hapd->mld_link_id) { + wpa_printf(MSG_INFO, + "Partner link %d starts ACS first - try to scan later", + h_hapd->mld_link_id); + return -EBUSY; + } } } #endif /* CONFIG_IEEE80211BE */