From owner-svn-src-all@freebsd.org Thu Nov 17 21:52:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3E04C4704C; Thu, 17 Nov 2016 21:52:01 +0000 (UTC) (envelope-from ivadasz@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 mx1.freebsd.org (Postfix) with ESMTPS id 9C8C41471; Thu, 17 Nov 2016 21:52:01 +0000 (UTC) (envelope-from ivadasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAHLq0qW032158; Thu, 17 Nov 2016 21:52:00 GMT (envelope-from ivadasz@FreeBSD.org) Received: (from ivadasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAHLq0eQ032144; Thu, 17 Nov 2016 21:52:00 GMT (envelope-from ivadasz@FreeBSD.org) Message-Id: <201611172152.uAHLq0eQ032144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ivadasz set sender to ivadasz@FreeBSD.org using -f From: =?UTF-8?Q?Imre_Vad=c3=a1sz?= Date: Thu, 17 Nov 2016 21:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308785 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2016 21:52:01 -0000 Author: ivadasz Date: Thu Nov 17 21:52:00 2016 New Revision: 308785 URL: https://svnweb.freebsd.org/changeset/base/308785 Log: [net80211] Don't check bgscanidle setting in net80211 for full-offload scan. If full-offload scan is used, the NIC driver (or rather the firmware of the NIC) should take care of interrupting and continuing the background scan. So net80211 should ignore the vap->iv_bgscanidle setting then, instead the NIC driver might look at this setting and pass it on to the firmware in some way if possible. Since full-offload scans won't be explicitly interrupted by net80211, it also doesn't really make sense to check the vap->iv_bgscanidle condition in that case, before starting a background scan. If the NIC driver advertises background scan support and full-offload scanning, the firmware should be able to execute that scan without interfering too much with our data traffic. Reviewed by: adrian, avos Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8539 Modified: head/sys/net80211/ieee80211_scan_sta.c head/sys/net80211/ieee80211_sta.c Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Thu Nov 17 21:36:18 2016 (r308784) +++ head/sys/net80211/ieee80211_scan_sta.c Thu Nov 17 21:52:00 2016 (r308785) @@ -1336,7 +1336,8 @@ sta_roam_check(struct ieee80211_scan_sta * XXX force immediate switch on scan complete */ if (!IEEE80211_IS_CHAN_DTURBO(ic->ic_curchan) && - ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle)) + ((vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) || + ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))) ieee80211_bg_scan(vap, 0); return; } Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Nov 17 21:36:18 2016 (r308784) +++ head/sys/net80211/ieee80211_sta.c Thu Nov 17 21:52:00 2016 (r308785) @@ -1230,6 +1230,7 @@ done: * o bg scan is active * o no channel switch is pending * o there has not been any traffic recently + * o no full-offload scan support (no need for explicitly continuing scan then) * * Note we do not check if there is an administrative enable; * this is only done to start the scan. We assume that any @@ -1243,6 +1244,7 @@ contbgscan(struct ieee80211vap *vap) return ((ic->ic_flags_ext & IEEE80211_FEXT_BGSCAN) && (ic->ic_flags & IEEE80211_F_CSAPENDING) == 0 && + !(vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) && vap->iv_state == IEEE80211_S_RUN && /* XXX? */ ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle)); } @@ -1253,7 +1255,7 @@ contbgscan(struct ieee80211vap *vap) * o no channel switch is pending * o we are not boosted on a dynamic turbo channel * o there has not been a scan recently - * o there has not been any traffic recently + * o there has not been any traffic recently (don't check if full-offload scan) */ static __inline int startbgscan(struct ieee80211vap *vap) @@ -1266,7 +1268,8 @@ startbgscan(struct ieee80211vap *vap) !IEEE80211_IS_CHAN_DTURBO(ic->ic_curchan) && #endif ieee80211_time_after(ticks, ic->ic_lastscan + vap->iv_bgscanintvl) && - ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle)); + ((vap->iv_flags_ext & IEEE80211_FEXT_SCAN_OFFLOAD) || + ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))); } static void