From owner-svn-src-head@FreeBSD.ORG Tue Nov 11 03:36:15 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB22A1065673; Tue, 11 Nov 2008 03:36:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C68908FC14; Tue, 11 Nov 2008 03:36:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAB3aF8g090034; Tue, 11 Nov 2008 03:36:15 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAB3aFEN090033; Tue, 11 Nov 2008 03:36:15 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200811110336.mAB3aFEN090033@svn.freebsd.org> From: Andrew Thompson Date: Tue, 11 Nov 2008 03:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184833 - head/sys/dev/if_ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 03:36:16 -0000 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); }