kern/128750: BSS mode broken with ndis
Paul
onemda at gmail.com
Mon Nov 10 05:10:02 PST 2008
>Number: 128750
>Category: kern
>Synopsis: BSS mode broken with ndis
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 10 13:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Paul
>Release: FreeBSD 8.0 CURRENT
>Organization:
>Environment:
8.0-CURRENT FreeBSD i386
>Description:
ndis does not work properly in BSS mode. It does not set associd.
Fake one because ndis doesnt yet support HOSTAP mode.
>How-To-Repeat:
# kldload ndis if_ndis bcmwl5.ko
# ifconfig wlan8 create wlandev ndis0
# ifconfig wlan8 ssid SSID
# ifconfig wlan8 up
# dhclient wlan0 <-- here it display following type of messages if wlan debug messages are enabled:
wlan0: [ff:ff:ff:ff:ff:ff] discard frame, sta not associated (type 0x0800)
wlan0: [ff:ff:ff:ff:ff:ff] discard frame, sta not associated (type 0x0806)
>Fix:
--- /usr/src/sys/dev/if_ndis/if_ndis.c.orig 2008-11-10 13:43:12.000000000 +0100
+++ /usr/src/sys/dev/if_ndis/if_ndis.c 2008-11-10 13:53:51.000000000 +0100
@@ -2616,6 +2616,10 @@
struct ndis_softc *sc;
ndis_wlan_bssid_ex **assoc;
{
+ struct ifnet *ifp = sc->ifp;
+ struct ieee80211com *ic = ifp->if_l2com;
+ struct ieee80211vap *vap;
+ struct ieee80211_node *ni;
ndis_80211_bssid_list_ex *bl;
ndis_wlan_bssid_ex *bs;
ndis_80211_macaddr bssid;
@@ -2624,6 +2628,9 @@
if (!sc->ndis_link)
return(ENOENT);
+ vap = TAILQ_FIRST(&ic->ic_vaps);
+ ni = vap->iv_bss;
+
len = sizeof(bssid);
error = ndis_get_info(sc, OID_802_11_BSSID, &bssid, &len);
if (error) {
@@ -2654,6 +2661,8 @@
}
bcopy((char *)bs, (char *)*assoc, bs->nwbx_len);
free(bl, M_TEMP);
+ if (ic->ic_opmode == IEEE80211_M_STA)
+ ni->ni_associd = 1 | 0xc000; /* fake associd */
return(0);
}
bs = (ndis_wlan_bssid_ex *)((char *)bs + bs->nwbx_len);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list