Deleted Added
full compact
if_wl.c (148912) if_wl.c (150306)
1/*-
2 * Redistribution and use in source and binary forms, with or without
3 * modification, are permitted provided that the following conditions
4 * are met:
5 * 1. Redistributions of source code must retain all copyright
6 * notices, this list of conditions and the following disclaimer.
7 * 2. The names of the authors may not be used to endorse or promote products
8 * derived from this software without specific prior written permission

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

168IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
169CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
170LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
171NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
172WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
173*/
174
175#include <sys/cdefs.h>
1/*-
2 * Redistribution and use in source and binary forms, with or without
3 * modification, are permitted provided that the following conditions
4 * are met:
5 * 1. Redistributions of source code must retain all copyright
6 * notices, this list of conditions and the following disclaimer.
7 * 2. The names of the authors may not be used to endorse or promote products
8 * derived from this software without specific prior written permission

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

168IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
169CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
170LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
171NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
172WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
173*/
174
175#include <sys/cdefs.h>
176__FBSDID("$FreeBSD: head/sys/dev/wl/if_wl.c 148912 2005-08-10 03:56:31Z obrien $");
176__FBSDID("$FreeBSD: head/sys/dev/wl/if_wl.c 150306 2005-09-19 03:10:21Z imp $");
177
178/*
179 * NOTE:
180 * by rvb:
181 * 1. The best book on the 82586 is:
182 * LAN Components User's Manual by Intel
183 * The copy I found was dated 1984. This really tells you
184 * what the state machines are doing

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

584wldetach(device_t device)
585{
586 struct wl_softc *sc = device_get_softc(device);
587 device_t parent = device_get_parent(device);
588 struct ifnet *ifp;
589
590 ifp = sc->ifp;
591 ether_ifdetach(ifp);
177
178/*
179 * NOTE:
180 * by rvb:
181 * 1. The best book on the 82586 is:
182 * LAN Components User's Manual by Intel
183 * The copy I found was dated 1984. This really tells you
184 * what the state machines are doing

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

584wldetach(device_t device)
585{
586 struct wl_softc *sc = device_get_softc(device);
587 device_t parent = device_get_parent(device);
588 struct ifnet *ifp;
589
590 ifp = sc->ifp;
591 ether_ifdetach(ifp);
592 if_free(ifp);
593
594 WL_LOCK(sc);
595
596 /* reset the board */
597 sc->hacr = HACR_RESET;
598 CMD(sc);
599 sc->hacr = HACR_DEFAULT;
600 CMD(sc);
601
602 if (sc->intr_cookie != NULL) {
603 BUS_TEARDOWN_INTR(parent, device, sc->res_irq, sc->intr_cookie);
604 sc->intr_cookie = NULL;
605 }
606
607 bus_generic_detach(device);
608 wl_deallocate_resources(device);
609 WL_UNLOCK(sc);
592
593 WL_LOCK(sc);
594
595 /* reset the board */
596 sc->hacr = HACR_RESET;
597 CMD(sc);
598 sc->hacr = HACR_DEFAULT;
599 CMD(sc);
600
601 if (sc->intr_cookie != NULL) {
602 BUS_TEARDOWN_INTR(parent, device, sc->res_irq, sc->intr_cookie);
603 sc->intr_cookie = NULL;
604 }
605
606 bus_generic_detach(device);
607 wl_deallocate_resources(device);
608 WL_UNLOCK(sc);
609 if_free(ifp);
610 mtx_destroy(&sc->wl_mtx);
611 return (0);
612}
613
614static int
615wl_allocate_resources(device_t device)
616{
617 struct wl_softc *sc = device_get_softc(device);

--- 2032 unchanged lines hidden ---
610 mtx_destroy(&sc->wl_mtx);
611 return (0);
612}
613
614static int
615wl_allocate_resources(device_t device)
616{
617 struct wl_softc *sc = device_get_softc(device);

--- 2032 unchanged lines hidden ---