diff options
author | thompsa <thompsa@FreeBSD.org> | 2008-11-11 03:36:15 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2008-11-11 03:36:15 +0000 |
commit | d18d0c02e19d72221fda9c3a511640d1490e0243 (patch) | |
tree | 746e5375aa29fe2cab2fc07bf02d445010c785ba /sys/dev | |
parent | c41e43078ba5d6f7633bdd550e2f11e95f35fe93 (diff) | |
download | FreeBSD-src-d18d0c02e19d72221fda9c3a511640d1490e0243.zip FreeBSD-src-d18d0c02e19d72221fda9c3a511640d1490e0243.tar.gz |
Fake the assoc id so that ndis can work on the latest net80211.
PR: kern/128750
Submitted by: Paul B. Mahol
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index c833c4e..49ca7aa 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -2591,6 +2591,10 @@ ndis_get_assoc(sc, assoc) 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; @@ -2606,6 +2610,9 @@ ndis_get_assoc(sc, assoc) return(ENOENT); } + vap = TAILQ_FIRST(&ic->ic_vaps); + ni = vap->iv_bss; + len = sizeof(uint32_t) + (sizeof(ndis_wlan_bssid_ex) * 16); bl = malloc(len, M_TEMP, M_NOWAIT | M_ZERO); if (bl == NULL) @@ -2636,8 +2643,10 @@ ndis_get_assoc(sc, assoc) } 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); } |