Date: Fri, 5 Jun 2020 00:16:54 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361813 - head/sys/net80211 Message-ID: <202006050016.0550Gsnm013650@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006050016.0550Gsnm013650>