diff options
author | gjb <gjb@FreeBSD.org> | 2015-05-28 17:06:50 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2015-05-28 17:06:50 +0000 |
commit | 03d84058c3a2a1f69cd43d180104c0cee5dc3920 (patch) | |
tree | 325b15bf87a318f4858724f04b5fd7a7970dee1a /sys/dev/if_ndis | |
parent | fff6c6a5b79cfb6b01358f15d19bf4d2ea200b96 (diff) | |
parent | 67b3bbe09c36f09dda55d0e010c9d1bf12cc6073 (diff) | |
download | FreeBSD-src-03d84058c3a2a1f69cd43d180104c0cee5dc3920.zip FreeBSD-src-03d84058c3a2a1f69cd43d180104c0cee5dc3920.tar.gz |
MFH: r282615-r283655
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/if_ndis')
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 8f23527..9c57aed 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -159,8 +159,8 @@ static void ndis_tick (void *); static void ndis_ticktask (device_object *, void *); static int ndis_raw_xmit (struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static void ndis_update_mcast (struct ifnet *ifp); -static void ndis_update_promisc (struct ifnet *ifp); +static void ndis_update_mcast (struct ieee80211com *); +static void ndis_update_promisc (struct ieee80211com *); static void ndis_start (struct ifnet *); static void ndis_starttask (device_object *, void *); static void ndis_resettask (device_object *, void *); @@ -558,7 +558,7 @@ ndis_attach(dev) InitializeListHead(&sc->ndis_shlist); InitializeListHead(&sc->ndisusb_tasklist); InitializeListHead(&sc->ndisusb_xferdonelist); - callout_init(&sc->ndis_stat_callout, CALLOUT_MPSAFE); + callout_init(&sc->ndis_stat_callout, 1); if (sc->ndis_iftype == PCMCIABus) { error = ndis_alloc_amem(sc); @@ -734,10 +734,12 @@ ndis_attach(dev) uint32_t arg; int r; - callout_init(&sc->ndis_scan_callout, CALLOUT_MPSAFE); + callout_init(&sc->ndis_scan_callout, 1); ifp->if_ioctl = ndis_ioctl_80211; ic->ic_ifp = ifp; + ic->ic_softc = sc; + ic->ic_name = device_get_nameunit(dev); ic->ic_opmode = IEEE80211_M_STA; ic->ic_phytype = IEEE80211_T_DS; ic->ic_caps = IEEE80211_C_8023ENCAP | @@ -1771,15 +1773,15 @@ ndis_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, } static void -ndis_update_mcast(struct ifnet *ifp) +ndis_update_mcast(struct ieee80211com *ic) { - struct ndis_softc *sc = ifp->if_softc; + struct ndis_softc *sc = ic->ic_softc; ndis_setmulti(sc); } static void -ndis_update_promisc(struct ifnet *ifp) +ndis_update_promisc(struct ieee80211com *ic) { /* not supported */ } @@ -3316,7 +3318,7 @@ done: DPRINTF(("scan: bssid %s chan %dMHz (%d/%d) rssi %d\n", ether_sprintf(wb->nwbx_macaddr), freq, sp.bchan, chanflag, rssi)); - ieee80211_add_scan(vap, &sp, &wh, 0, rssi, noise); + ieee80211_add_scan(vap, ic->ic_curchan, &sp, &wh, 0, rssi, noise); wb = (ndis_wlan_bssid_ex *)((char *)wb + wb->nwbx_len); } free(bl, M_DEVBUF); |