From owner-svn-src-head@freebsd.org Fri Jun 5 00:16:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F0A4338261; Fri, 5 Jun 2020 00:16:55 +0000 (UTC) (envelope-from adrian@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dNVt6h3Hz4Nmj; Fri, 5 Jun 2020 00:16:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C55A68457; Fri, 5 Jun 2020 00:16:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0550Gsjb013652; Fri, 5 Jun 2020 00:16:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0550Gsnm013650; Fri, 5 Jun 2020 00:16:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202006050016.0550Gsnm013650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 5 Jun 2020 00:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361813 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 361813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 00:16:55 -0000 Author: adrian Date: Fri Jun 5 00:16:54 2020 New Revision: 361813 URL: https://svnweb.freebsd.org/changeset/base/361813 Log: [net80211] Add some more debugging during scanning I'm trying to chase down more weird "I am not doing an incremental scan when being asked" issues so these debugging statements help. Notably, I've added more debugging around reasons why the scan is skipped - eg because the cache is considered hot. This should be a no-op unless you care about the debugging output! Modified: head/sys/net80211/ieee80211_scan_sta.c head/sys/net80211/ieee80211_scan_sw.c Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Fri Jun 5 00:14:02 2020 (r361812) +++ head/sys/net80211/ieee80211_scan_sta.c Fri Jun 5 00:16:54 2020 (r361813) @@ -1276,6 +1276,8 @@ sta_pick_bss(struct ieee80211_scan_state *ss, struct i * handle notification that this has completed. */ ss->ss_flags &= ~IEEE80211_SCAN_NOPICK; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: nopick; return 1\n", __func__); return 1; } /* @@ -1285,7 +1287,9 @@ sta_pick_bss(struct ieee80211_scan_state *ss, struct i /* NB: unlocked read should be ok */ if (TAILQ_FIRST(&st->st_entry) == NULL) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: no scan candidate\n", __func__); + "%s: no scan candidate, join=%d, return 0\n", + __func__, + !! (ss->ss_flags & IEEE80211_SCAN_NOJOIN)); if (ss->ss_flags & IEEE80211_SCAN_NOJOIN) return 0; notfound: @@ -1310,6 +1314,8 @@ notfound: chan = demote11b(vap, chan); if (!ieee80211_sta_join(vap, chan, &selbs->base)) goto notfound; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: terminate scan; return 1\n", __func__); return 1; /* terminate scan */ } Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Fri Jun 5 00:14:02 2020 (r361812) +++ head/sys/net80211/ieee80211_scan_sw.c Fri Jun 5 00:16:54 2020 (r361813) @@ -298,6 +298,11 @@ ieee80211_swscan_check_scan(const struct ieee80211_sca * use. Also discard any frames that might come * in while temporarily marked as scanning. */ + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "cache hot; ic_lastscan=%d, scanvalid=%d, ticks=%d\n", + ic->ic_lastscan, + vap->iv_scanvalid, + ticks); SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD; ic->ic_flags |= IEEE80211_F_SCAN; @@ -307,6 +312,8 @@ ieee80211_swscan_check_scan(const struct ieee80211_sca ic->ic_flags &= ~IEEE80211_F_SCAN; SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_DISCARD; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: scan_end returned %d\n", __func__, result); if (result) { ieee80211_notify_scan_done(vap); return 1;