Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2005 00:34:28 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 80725 for review
Message-ID:  <200507220034.j6M0YSJE034016@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

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

Change 80725 by sam@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;



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