PERFORCE change 80725 for review

Sam Leffler sam at FreeBSD.org
Fri Jul 22 00:34:33 GMT 2005


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

Change 80725 by sam at sam_ebb on 2005/07/22 00:34:20

	don't try to use the scanner state from a previous mode
	when doing a check_scan; fixes assert failure when starting
	in sta mode then switching to ap mode

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_scan.c#2 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_scan.c#2 (text+ko) ====

@@ -451,7 +451,17 @@
 	}
 	IEEE80211_UNLOCK(ic);
 	if (checkscanlist) {
-		if (ss->ss_ops->scan_end(ss, ic)) {
+		const struct ieee80211_scanner *scan;
+
+		scan = ieee80211_scanner_get(ic->ic_opmode);
+		if (scan == NULL) {
+			IEEE80211_DPRINTF(ic, IEEE80211_MSG_SCAN,
+			    "%s: no scanner support for mode %u\n",
+			    __func__, ic->ic_opmode);
+			/* XXX stat */
+			return 0;
+		}
+		if (scan == ss->ss_ops && ss->ss_ops->scan_end(ss, ic)) {
 			/* found an ap, just clear the flag */
 			ic->ic_flags &= ~IEEE80211_F_SCAN;
 			return 1;


More information about the p4-projects mailing list