From owner-p4-projects@FreeBSD.ORG Tue Jan 8 20:46:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5312C16A522; Tue, 8 Jan 2008 20:46:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AFB816A419 for ; Tue, 8 Jan 2008 20:46:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6386D13C458 for ; Tue, 8 Jan 2008 20:46:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m08KkJ10013148 for ; Tue, 8 Jan 2008 20:46:19 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m08KkJ5j013145 for perforce@freebsd.org; Tue, 8 Jan 2008 20:46:19 GMT (envelope-from sam@freebsd.org) Date: Tue, 8 Jan 2008 20:46:19 GMT Message-Id: <200801082046.m08KkJ5j013145@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 132810 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2008 20:46:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=132810 Change 132810 by sam@sam_ebb on 2008/01/08 20:46:14 nuke netbsd-specific code before trying to do vap conversion Affected files ... .. //depot/projects/vap/sys/dev/wi/if_wi.c#10 edit Differences ... ==== //depot/projects/vap/sys/dev/wi/if_wi.c#10 (text+ko) ==== @@ -334,8 +334,6 @@ ic->ic_ifp = ifp; ic->ic_phytype = IEEE80211_T_DS; - ic->ic_opmode = IEEE80211_M_STA; - ic->ic_state = IEEE80211_S_INIT; ic->ic_caps = IEEE80211_C_PMGT | IEEE80211_C_WEP /* everyone supports WEP */ ; @@ -573,55 +571,7 @@ return (0); } -#ifdef __NetBSD__ -int -wi_activate(struct device *self, enum devact act) -{ - struct wi_softc *sc = (struct wi_softc *)self; - int rv = 0, s; - - s = splnet(); - switch (act) { - case DVACT_ACTIVATE: - rv = EOPNOTSUPP; - break; - - case DVACT_DEACTIVATE: - if_deactivate(sc->sc_ifp); - break; - } - splx(s); - return rv; -} - void -wi_power(struct wi_softc *sc, int why) -{ - struct ifnet *ifp = sc->sc_ifp; - int s; - - s = splnet(); - switch (why) { - case PWR_SUSPEND: - case PWR_STANDBY: - wi_stop(ifp, 1); - break; - case PWR_RESUME: - if (ifp->if_flags & IFF_UP) { - wi_init(sc); - (void)wi_intr(sc); - } - break; - case PWR_SOFTSUSPEND: - case PWR_SOFTSTANDBY: - case PWR_SOFTRESUME: - break; - } - splx(s); -} -#endif /* __NetBSD__ */ - -void wi_shutdown(device_t dev) { struct wi_softc *sc = device_get_softc(dev); @@ -892,13 +842,8 @@ if (sc->sc_enabled && !sc->wi_gone) { CSR_WRITE_2(sc, WI_INT_EN, 0); wi_cmd(sc, WI_CMD_DISABLE | sc->sc_portnum, 0, 0, 0); - if (disable) { -#ifdef __NetBSD__ - if (sc->sc_disable) - (*sc->sc_disable)(sc); -#endif + if (disable) sc->sc_enabled = 0; - } } else if (sc->wi_gone && disable) /* gone --> not enabled */ sc->sc_enabled = 0;