Date: Mon, 7 Dec 2009 14:21:42 +0100 From: Paul B Mahol <onemda@gmail.com> To: net <net@freebsd.org> Subject: ndis: broken scan Message-ID: <3a142e750912070521u2804992fy2534e25a37ceb626@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Patch attached to fix scan results.
Bug is obvious if you use -v flag:
ifconfig -v wlan0 list scan
It is interesting, that it never got noticed. I got hit with this one
when working on WPA instead of WPA2(RSN). In that case wpa_supplicant
would never pick AP because it doesnt see WPA, it could see only RSN,
now with this patch it see much more, like WME; and
ifconfig wlan0 list scan
output is more useful.
[-- Attachment #2 --]
--- /sys/dev/if_ndis/if_ndis.c 2009-12-02 19:09:58.000000000 +0000
+++ if_ndis.c 2009-12-02 20:40:15.000000000 +0000
@@ -3299,24 +3299,11 @@
efrm = frm + wb->nwbx_ielen;
if (efrm - frm < 12)
goto done;
- sp.tstamp = frm;
- frm += 8;
- sp.bintval = le16toh(*(uint16_t *)frm);
- frm += 2;
- sp.capinfo = le16toh(*(uint16_t *)frm);
- frm += 2;
-
- /* Grab variable length ies */
- while (efrm - frm > 1) {
- if (efrm - frm < frm[1] + 2)
- break;
- switch (*frm) {
- case IEEE80211_ELEMID_RSN:
- sp.rsn = frm;
- break;
- }
- frm += frm[1] + 2;
- }
+ sp.tstamp = frm; frm += 8;
+ sp.bintval = le16toh(*(uint16_t *)frm); frm += 2;
+ sp.capinfo = le16toh(*(uint16_t *)frm); frm += 2;
+ sp.ies = frm;
+ sp.ies_len = efrm - frm;
}
done:
DPRINTF(("scan: bssid %s chan %dMHz (%d/%d) rssi %d\n",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3a142e750912070521u2804992fy2534e25a37ceb626>
