svn commit: r184833 - head/sys/dev/if_ndis
Andrew Thompson
thompsa at FreeBSD.org
Mon Nov 10 19:36:16 PST 2008
Author: thompsa
Date: Tue Nov 11 03:36:15 2008
New Revision: 184833
URL: http://svn.freebsd.org/changeset/base/184833
Log:
Fake the assoc id so that ndis can work on the latest net80211.
PR: kern/128750
Submitted by: Paul B. Mahol
Modified:
head/sys/dev/if_ndis/if_ndis.c
Modified: head/sys/dev/if_ndis/if_ndis.c
==============================================================================
--- head/sys/dev/if_ndis/if_ndis.c Tue Nov 11 02:13:21 2008 (r184832)
+++ head/sys/dev/if_ndis/if_ndis.c Tue Nov 11 03:36:15 2008 (r184833)
@@ -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);
}
More information about the svn-src-all
mailing list