Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2008 13:07:55 GMT
From:      Paul <onemda@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/128750: BSS mode broken with ndis
Message-ID:  <200811101307.mAAD7t86032015@www.freebsd.org>
Resent-Message-ID: <200811101310.mAADA1pe042583@freefall.freebsd.org>

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

>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:



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