Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Feb 2016 20:41:10 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296229 - head/sys/net80211
Message-ID:  <201602292041.u1TKfAWp086119@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Mon Feb 29 20:41:10 2016
New Revision: 296229
URL: https://svnweb.freebsd.org/changeset/base/296229

Log:
  net80211: utilize ss_scanend variable from scan_state structure
  
  Approved by:	adrian (mentor)
  Differential Revision:	https://reviews.freebsd.org/D5140

Modified:
  head/sys/net80211/ieee80211_scan_sw.c

Modified: head/sys/net80211/ieee80211_scan_sw.c
==============================================================================
--- head/sys/net80211/ieee80211_scan_sw.c	Mon Feb 29 20:39:04 2016	(r296228)
+++ head/sys/net80211/ieee80211_scan_sw.c	Mon Feb 29 20:41:10 2016	(r296229)
@@ -597,7 +597,7 @@ scan_task(void *arg, int pending)
 	struct ieee80211vap *vap = ss->ss_vap;
 	struct ieee80211com *ic = ss->ss_ic;
 	struct ieee80211_channel *chan;
-	unsigned long maxdwell, scanend;
+	unsigned long maxdwell;
 	int scandone = 0;
 
 	IEEE80211_LOCK(ic);
@@ -631,7 +631,7 @@ scan_task(void *arg, int pending)
 		}
 	}
 
-	scanend = ticks + ss_priv->ss_duration;
+	ss_priv->ss_scanend = ticks + ss_priv->ss_duration;
 
 	/* XXX scan state can change! Re-validate scan state! */
 
@@ -651,7 +651,7 @@ scan_task(void *arg, int pending)
 
 		if (scandone || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) ||
 		    (ss_priv->ss_iflags & ISCAN_ABORT) ||
-		     time_after(ticks + ss->ss_mindwell, scanend))
+		     time_after(ticks + ss->ss_mindwell, ss_priv->ss_scanend))
 			break;
 
 		chan = ss->ss_chans[ss->ss_next++];
@@ -659,8 +659,8 @@ scan_task(void *arg, int pending)
 		/*
 		 * Watch for truncation due to the scan end time.
 		 */
-		if (time_after(ticks + ss->ss_maxdwell, scanend))
-			maxdwell = scanend - ticks;
+		if (time_after(ticks + ss->ss_maxdwell, ss_priv->ss_scanend))
+			maxdwell = ss_priv->ss_scanend - ticks;
 		else
 			maxdwell = ss->ss_maxdwell;
 
@@ -771,12 +771,12 @@ scan_task(void *arg, int pending)
 	if ((ss_priv->ss_iflags & ISCAN_CANCEL) == 0 &&
 	    !ss->ss_ops->scan_end(ss, vap) &&
 	    (ss->ss_flags & IEEE80211_SCAN_ONCE) == 0 &&
-	    time_before(ticks + ss->ss_mindwell, scanend)) {
+	    time_before(ticks + ss->ss_mindwell, ss_priv->ss_scanend)) {
 		IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
 		    "%s: done, restart "
 		    "[ticks %u, dwell min %lu scanend %lu]\n",
 		    __func__,
-		    ticks, ss->ss_mindwell, scanend);
+		    ticks, ss->ss_mindwell, ss_priv->ss_scanend);
 		ss->ss_next = 0;	/* reset to begining */
 		if (ss->ss_flags & IEEE80211_SCAN_ACTIVE)
 			vap->iv_stats.is_scan_active++;
@@ -796,7 +796,7 @@ scan_task(void *arg, int pending)
 	IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
 	    "%s: %s, [ticks %u, dwell min %lu scanend %lu]\n",
 	    __func__, scandone ? "done" : "stopped",
-	    ticks, ss->ss_mindwell, scanend);
+	    ticks, ss->ss_mindwell, ss_priv->ss_scanend);
 
 	/*
 	 * Since a cancellation may have occured during one of the
@@ -835,6 +835,7 @@ done:
 		}
 	}
 	ss_priv->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT);
+	ss_priv->ss_scanend = 0;
 	ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST);
 	IEEE80211_UNLOCK(ic);
 #undef ISCAN_REP



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602292041.u1TKfAWp086119>