PERFORCE change 77355 for review

Sam Leffler sam at FreeBSD.org
Mon May 23 19:11:42 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=77355

Change 77355 by sam at sam_ebb on 2005/05/23 19:11:35

	o savchan should always be ic_bsschan so just eliminate it (from andy)
	o don't print beacon frames when !scanning so it's safe to turn on
	  scan debug again

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_scan.c#7 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_scan.c#7 (text+ko) ====

@@ -53,7 +53,6 @@
 struct scan_state {
 	struct ieee80211_scan_state base;	/* public state */
 
-	struct ieee80211_channel *ss_savchan;	/* saved channel setting */
 	unsigned long	ss_scanend;		/* time scan must stop */
 	unsigned long	ss_chanmindwell;	/* " " " on curchan */
 	struct callout	ss_scan_timer;		/* scan timer */
@@ -258,7 +257,6 @@
 		}
 	}
 
-	ss->ss_savchan = ic->ic_curchan;
 	ic->ic_scan_start(ic);		/* notify driver */
 	ss->ss_scanend = ticks + delay + duration;
 	callout_reset(&ss->ss_scan_timer, delay, scan_next, &ss->base);
@@ -315,7 +313,6 @@
 				vap->iv_stats.is_scan_active++;
 			else
 				vap->iv_stats.is_scan_passive++;
-			SCAN_PRIVATE(ss)->ss_savchan = ic->ic_curchan;
 			if (flags & IEEE80211_SCAN_FLUSH)
 				ss->ss_ops->scan_flush(ss);
 
@@ -584,9 +581,11 @@
 		 */
 		if (scandone)
 			ic->ic_lastscan = ticks;
-		/* return to the original channel */
-		if (SCAN_PRIVATE(ss)->ss_savchan != ic->ic_curchan)
-			change_channel(ic, SCAN_PRIVATE(ss)->ss_savchan);
+		/* return to the bss channel */
+		/* XXX resync beacon timers? */
+		if (ic->ic_bsschan != IEEE80211_CHAN_ANYC &&
+		    ic->ic_curchan != ic->ic_bsschan)
+			change_channel(ic, ic->ic_bsschan);
 		/* clear mindwell lock and initial channel change flush */
 		ss->ss_flags &=
 			~(IEEE80211_SCAN_MINDWELL | IEEE80211_SCAN_DISCARD);
@@ -708,7 +707,7 @@
 	if (ss->ss_flags & IEEE80211_SCAN_DISCARD)
 		return;
 #ifdef IEEE80211_DEBUG
-	if (ieee80211_msg_scan(vap))
+	if (ieee80211_msg_scan(vap) && (ic->ic_flags & IEEE80211_F_SCAN))
 		dump_probe_beacon(subtype, 1, wh->i_addr2, sp);
 #endif
 	if (ss->ss_ops != NULL &&


More information about the p4-projects mailing list