From nobody Wed Nov 29 16:38:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SgQ4R1Dw2z52wvQ; Wed, 29 Nov 2023 16:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SgQ4Q62nGz3Jf1; Wed, 29 Nov 2023 16:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCyRUeWepkpiwxU15TkQ5QGg+2+LQ9IzZZrKOv0rj1g=; b=Vqpv5EoxOCXwu3sOx71M/ka2BR+bUPJ5KcAOW29fA35eOHZ1PJ8NzzmJ+9n7GOQjg7qRKM 7pfhm0BDY6fzwsd/g+1/tPJ5s/wqRYd4IkMB8ijJZAxuk8x8E7fyx2p9F4Sjv5FxgTbDKO GCde628R/b+LsC39P7rqhHziuZVACy8RAlzFnr2exNlVF6eftX38gAWZOsn/HUVLoImkZ0 ukymW+qbjWKJLCYCzfzQTkOlhLfe1k0kQrRd3JqOkh/d1ecGGG849M5hH9FttEKqLJdM0b 8c0ME1sGAmfvO/Wo38TboGGHxG6RvhYQB+F8OyI4eUQR0AvBN6u3+R05CS0wrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCyRUeWepkpiwxU15TkQ5QGg+2+LQ9IzZZrKOv0rj1g=; b=Eqlywtft+xRpFbyoK9yDu2Mu5YFzhgwM9DyO+t3IJiG/W5Wx9NcufTpJADFKZw1scrTPw8 ZoEJpJPojijncjZawztEefW382bhKcD7DW7JH6AtR9v0CMVSLdDrOXpooAxEz4vehysAgQ rBaiQQcHk0g5Vo0WlNftutwPCUp7kZuXbC2dQRnTzLsvd1PMW7JbajrkM3iStuPOKMW+Ot AZpnBMxO4z4xSjlFmMHl+icANdztfNjmZx4u4wovPOa8MJIZX/MzdlWDeEg1rODdSavJAI GpiHGInb4tAdm5cZlNB4f8X7NpnOd4f2ENoTJY/CJ5pm5JaUP/B96LoBQDJ39A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701275910; a=rsa-sha256; cv=none; b=nJM77ECv8qyaUjiIVLfPnXkFzYVnMB6FpWW+Q74MTYPnzInXlsFdJqEbqlK0vrxNjQOSWT 75yiRPZ/W3kaplw/ejMqnwzm8E47HOkGh89T3g+Iu8gUDEU76WNC3zRHfhAlJk7HXD9dRa X0idup60NXmZKOkyqzqwotfgwtxyN2UGxGWSHxTIBLAkaVjOxnE+oHx1Ig6kbvuAFuXYBe oCNYvzjBET9g6KuASInb+uMQY9f6KjTt3huOqUG8Uy62yEV6tXa4BIZ3q07fZc90y2xoLH prPPn9c0whHwdWEVyvE0l2lMm4mRU93vHxZtLhmR7n4jOcmKNv2Z7gNzYZE/cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SgQ4Q56jvz1Bwm; Wed, 29 Nov 2023 16:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ATGcU3N046014; Wed, 29 Nov 2023 16:38:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ATGcUig046012; Wed, 29 Nov 2023 16:38:30 GMT (envelope-from git) Date: Wed, 29 Nov 2023 16:38:30 GMT Message-Id: <202311291638.3ATGcUig046012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 6a40b366fce7 - stable/13 - net80211: introduce two extra ieee80211_notify_scan_done() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a40b366fce73c8e825c8a134d07f00e3a9387fe Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6a40b366fce73c8e825c8a134d07f00e3a9387fe commit 6a40b366fce73c8e825c8a134d07f00e3a9387fe Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 11:51:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-29 16:36:08 +0000 net80211: introduce two extra ieee80211_notify_scan_done() We have multiple problems with scanning currently, one being that an initial scan restarts itself and we are unable to start another scan. wpa_supplicant in that case never shows scan results. Starting wpa_cli you may see: <3>CTRL-EVENT-SCAN-FAILED ret=-1 retry=1 messages. Add two extra calls to ieee80211_notify_scan_done() at the end of scans (before possible restarts). That will get wpa_supplicant to get scan results and possibly start associating to a BSSID and get us out of scan. This is kind-of a bandaid but on short notice may help to improve the situation for some. Based on analysis by: enweiwu Submitted by: enweiwu (initial version) Sponsored by: The FreeBSD Foundation (cherry picked from commit 3f382eb23b9fee75d05276a44feb5351d956238e) --- sys/net80211/ieee80211_scan_sw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c index 60e9a635b94d..3b47f08ad359 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -387,9 +387,10 @@ ieee80211_swscan_bg_scan(const struct ieee80211_scanner *scan, * scan_start method to populate it. */ ss->ss_next = 0; - if (ss->ss_last != 0) + if (ss->ss_last != 0) { + ieee80211_notify_scan_done(vap); ss->ss_ops->scan_restart(ss, vap); - else { + } else { ss->ss_ops->scan_start(ss, vap); #ifdef IEEE80211_DEBUG if (ieee80211_msg_scan(vap)) @@ -856,6 +857,7 @@ scan_end(struct ieee80211_scan_state *ss, int scandone) else vap->iv_stats.is_scan_passive++; + ieee80211_notify_scan_done(vap); ss->ss_ops->scan_restart(ss, vap); /* XXX? */ ieee80211_runtask(ic, &ss_priv->ss_scan_start); IEEE80211_UNLOCK(ic);