From nobody Mon Oct 09 23:16:08 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 4S4FJn42y6z4wgth; Mon, 9 Oct 2023 23:16:09 +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 4S4FJn1CKTz3Q0h; Mon, 9 Oct 2023 23:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696893369; 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=030GPIdNER5QcSiPtEIHf1P7ZT/KLotXiZiIiYvNF6o=; b=eAzU2ihM/iEFHSWZd+aAGdn5Oe0SrtIN0OgJ/dvHR4lHeKZ3pNXgK0WOyFSANvQjJBc6pY vzdCby+qb42I9gbz99fhOnZ4J4pE53waTfpNd+qWmpQQ059/clpng8v/Ov35Zt7T6kMvrC uJTXhLNPZUcAZoRJCfdR5f4t5inEzjYxnvUMG+pCwaifJLoVVA4L9RArwt6nWic7aT7tsr wWMBYu2kR9KxSHuWSSZsj7skpapyooSSMJ9Dh70PMzVjSO4ykYmCghgqmqd8jxEqQGGsBt OcQ/1EQSG2XcuYDDYLaN+ZaH2qxM45ymutSNz46ge/Jokx50vUwJmrzC6HWdcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696893369; a=rsa-sha256; cv=none; b=lj3qhsGnsNQh4TcXTuAbKCEi4rJw/RDIfLHEwRkN33E+InnmH1i1Xux6yPe0r7rQyVo/3y t+52NyW0I5ZM3TQ0qgt4bd0JvXXwzwN1NQWAr/Yek6g7tRHf/DCiyPJtBLBaU7yHrn7t8i D5QxACCYo7o/hdn37oETvG3I2sJYb5FcY5ASBAL4a7DFqorgYbyrpBst3WJ6mFZRETGb69 af6EsjQneLWfz/uSW2rGC3/XTT8y32ziaU5oZoKPqSmDHyq5om3xlDBNu2071IADyYxc67 xtDorGyyYfxCf5QfTb0G0QPrns0E4lcy+paVmr4ijz17qc4FrW9+K8RgO+V1hQ== 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=1696893369; 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=030GPIdNER5QcSiPtEIHf1P7ZT/KLotXiZiIiYvNF6o=; b=YzCERKjWgrxVkNdTuRYqB7K0kE8po33qiL3YpFkAPJ4xAtMU1dYnK8Olz8yjmQFgeStES1 r+T5eYT8VrMKaQIvY0mvwYUJk++AZLw33MbB2f1ho/3s8R7qpnhLjbfOA2nZTWBtn+KXoX jhhuIBrAmnKrbMDojYh/bNE4Vk5UH/yBvNTFaxAFRkXHUPm68Bg7fONiSSVfmuber7wLAd T4ACtO77Neyq879sTfKRMfEA0geSzvH5iSgL+aiznf38FIionjYKi2vxKHflu901vKSHSQ oEdmh5dztyqLRr26LpGo3VN0k9gmi7SefJ/TgzBLTiycWzHQxTkYQAQ8uiwgsQ== 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 4S4FJn0HQ9z19P; Mon, 9 Oct 2023 23:16:09 +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 399NG8v2070977; Mon, 9 Oct 2023 23:16:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399NG8AE070974; Mon, 9 Oct 2023 23:16:08 GMT (envelope-from git) Date: Mon, 9 Oct 2023 23:16:08 GMT Message-Id: <202310092316.399NG8AE070974@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: 61c5d5679ba8 - releng/14.0 - 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 61c5d5679ba8e9075f3486a08eb0bdfd507d1108 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=61c5d5679ba8e9075f3486a08eb0bdfd507d1108 commit 61c5d5679ba8e9075f3486a08eb0bdfd507d1108 Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 11:51:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-09 23:14:52 +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 Approved by: re (gjb) 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) (cherry picked from commit 6104a9f9c5206c9ba23eec29217dff642f26722c) --- 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 ac97b7c14cbc..744c8f6bf28e 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);