From nobody Wed Oct 04 15:23:42 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 4S0z3z1yqTz4w6QT; Wed, 4 Oct 2023 15:23:43 +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 4S0z3z0LbYz4Ml0; Wed, 4 Oct 2023 15:23:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433023; 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=dqgSCC54bhwHJNsif5Asp6eR+o+y7caihu6+wWcXrtc=; b=FcmliHtghKWXAdbErukTYeNeGNgSs3LGOzI1rDodH6O/fxG+wNPyUeU+jcvkX85D5xSaZI 5gAHWGxyNW3BqHtioK3VxbWTkK5tsGWXPxlEAuRgKsdkMRxw1I2nQe8MkEE8iMb3mn2Hfj sAbPYB+M8rMdUi4dlLlBRPY7u+y/Z1XtQLepYJ6UhwXFKPoz4pNV1PhE1LKRVlxU8CKExt fRMVPtM2/Kmez8VxyJvd+ijdOBFBdB61lW9pAuoJkbh6dqlC2ciQ11+hssGglKUnJJ8YjO bdsrrJ5n28TPiR5E8SAnxHsn/+1RfW9xa28Xx6NgJzwHPgIsSyLTMkc+SfGuZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433023; a=rsa-sha256; cv=none; b=WpvPFeBGEEYEFk0Nvd3zgo7ABaC0/mZVlwrHVAygzSDSF3aUsTVWBHl1m9DhisWOQ0G4ur +1rjmoI18m2in4ouw0Fc+4QhcJps5o4/PAlXHaoU3osRhhC+6rFqzV54SXiZupGWDyizXc F03dLc6JIN2ivegc5hay2/ozg0e/WwLtfgb1UeS3ypZIZ/CSfujC3pjSxXa0w8U08awOJ0 z04cmrlQvRPwhCGiohZmyEIzY5H20/K/a0UsiNnLrygo6CG7WhVERCkqYiN05MxWHkGLhF beyzj7ZbdosQgWuKmgRVCO35TOWQ7vYLG7+j3oxnN/KDxdmqPzW8N+aX2afb3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433023; 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=dqgSCC54bhwHJNsif5Asp6eR+o+y7caihu6+wWcXrtc=; b=OmauEb8JdzI10K5LcazLlB4eQ4gvPhS98WjY3nqGXRVvBnJZ3l+acXk8m/kS0pvMaI8wYn pJPjWJa5G90FlbggAXTd5zEjE238gsVEwtHth35tSVa7KKz5YUF1luhNjwHNXMFD6jI3st A7H9JFqdKdUKvds3nCI3zlom8DsUA3EEX3aPvwBpXol5ET8l8He1YvonlbMb77ga9tx/LR o0zFkQd4YcbALdlkMTTye6mFTQxblau0TvZgRnnOD1lWMMl31ggurVuMorpWu5IzUJHV26 NG+DS7Eucs384uFOjarvIlqwWDM1gaR3r4ft/eHT3TfkGS+Ve2DI74yl8jHBdw== 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 4S0z3y6YgLzjVJ; Wed, 4 Oct 2023 15:23:42 +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 394FNgLK086855; Wed, 4 Oct 2023 15:23:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNg8A086852; Wed, 4 Oct 2023 15:23:42 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:42 GMT Message-Id: <202310041523.394FNg8A086852@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: 6104a9f9c520 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 6104a9f9c5206c9ba23eec29217dff642f26722c Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6104a9f9c5206c9ba23eec29217dff642f26722c commit 6104a9f9c5206c9ba23eec29217dff642f26722c Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 11:51:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +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 Tested by: cy, (others I cannot find email/PR for anymore) Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D38661 (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 0aaa80a6c48d..62f6bf24d42a 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -388,9 +388,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)) @@ -857,6 +858,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);