svn commit: r308785 - head/sys/net80211
Imre Vadász
ivadasz at FreeBSD.org
Thu Nov 17 21:52:01 UTC 2016
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
More information about the svn-src-all
mailing list