Deleted Added
full compact
if_upgt.c (191983) if_upgt.c (192419)
1/* $OpenBSD: if_upgt.c,v 1.35 2008/04/16 18:32:15 damien Exp $ */
1/* $OpenBSD: if_upgt.c,v 1.35 2008/04/16 18:32:15 damien Exp $ */
2/* $FreeBSD: head/sys/dev/usb/wlan/if_upgt.c 191983 2009-05-11 02:39:49Z weongyo $ */
2/* $FreeBSD: head/sys/dev/usb/wlan/if_upgt.c 192419 2009-05-20 03:49:16Z weongyo $ */
3
4/*
5 * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *

--- 1986 unchanged lines hidden (view full) ---

1997 struct upgt_softc *sc = device_get_softc(dev);
1998 struct ifnet *ifp = sc->sc_ifp;
1999 struct ieee80211com *ic = ifp->if_l2com;
2000
2001 if (!device_is_attached(dev))
2002 return 0;
2003
2004 upgt_stop(sc);
3
4/*
5 * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *

--- 1986 unchanged lines hidden (view full) ---

1997 struct upgt_softc *sc = device_get_softc(dev);
1998 struct ifnet *ifp = sc->sc_ifp;
1999 struct ieee80211com *ic = ifp->if_l2com;
2000
2001 if (!device_is_attached(dev))
2002 return 0;
2003
2004 upgt_stop(sc);
2005 ieee80211_ifdetach(ic);
2006
2007 callout_drain(&sc->sc_led_ch);
2008 callout_drain(&sc->sc_watchdog_ch);
2009
2010 usb2_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS);
2005
2006 callout_drain(&sc->sc_led_ch);
2007 callout_drain(&sc->sc_watchdog_ch);
2008
2009 usb2_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS);
2010 ieee80211_ifdetach(ic);
2011 upgt_free_rx(sc);
2012 upgt_free_tx(sc);
2013
2014 bpfdetach(ifp);
2015 if_free(ifp);
2016 mtx_destroy(&sc->sc_mtx);
2017
2018 return (0);

--- 386 unchanged lines hidden ---
2011 upgt_free_rx(sc);
2012 upgt_free_tx(sc);
2013
2014 bpfdetach(ifp);
2015 if_free(ifp);
2016 mtx_destroy(&sc->sc_mtx);
2017
2018 return (0);

--- 386 unchanged lines hidden ---