Date: Sun, 4 May 2008 19:34:43 GMT From: Andrew Thompson <thompsa@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 141158 for review Message-ID: <200805041934.m44JYhjm069202@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=141158 Change 141158 by thompsa@thompsa_burger on 2008/05/04 19:34:00 Keep ic_curchan in sync with the scan results. Affected files ... .. //depot/projects/vap/sys/dev/if_ndis/if_ndis.c#21 edit Differences ... ==== //depot/projects/vap/sys/dev/if_ndis/if_ndis.c#21 (text+ko) ==== @@ -3237,6 +3237,7 @@ ndis_wlan_bssid_ex *wb; struct ieee80211_scanparams sp; struct ieee80211_frame wh; + struct ieee80211_channel *saved_chan; int i, j; int error, len, rssi, noise, freq, chanflag; static long rstamp; @@ -3246,6 +3247,7 @@ ic = sc->ifp->if_l2com; vap = TAILQ_FIRST(&ic->ic_vaps); + saved_chan = ic->ic_curchan; noise = -96; len = sizeof(uint32_t) + (sizeof(ndis_wlan_bssid_ex) * 16); @@ -3306,6 +3308,11 @@ chanflag = ndis_nettype_chan(wb->nwbx_nettype); freq = wb->nwbx_config.nc_dsconfig / 1000; sp.chan = sp.bchan = ieee80211_mhz2ieee(freq, chanflag); + /* Hack ic->ic_curchan to be in sync with the scan result */ + ic->ic_curchan = ieee80211_find_channel(ic, freq, chanflag); + if (ic->ic_curchan == NULL) + ic->ic_curchan = &ic->ic_channels[0]; + /* Process extended info from AP */ if (wb->nwbx_len > sizeof(ndis_wlan_bssid)) { @@ -3340,6 +3347,8 @@ wb = (ndis_wlan_bssid_ex *)((char *)wb + wb->nwbx_len); } free(bl, M_DEVBUF); + /* Restore the channel after messing with it */ + ic->ic_curchan = saved_chan; } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805041934.m44JYhjm069202>