Deleted Added
full compact
if_an.c (147380) if_an.c (148454)
1/*-
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

33 * Aironet 4500/4800 802.11 PCMCIA/ISA/PCI driver for FreeBSD.
34 *
35 * Written by Bill Paul <wpaul@ctr.columbia.edu>
36 * Electrical Engineering Department
37 * Columbia University, New York City
38 */
39
40#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

33 * Aironet 4500/4800 802.11 PCMCIA/ISA/PCI driver for FreeBSD.
34 *
35 * Written by Bill Paul <wpaul@ctr.columbia.edu>
36 * Electrical Engineering Department
37 * Columbia University, New York City
38 */
39
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/sys/dev/an/if_an.c 147380 2005-06-14 14:50:40Z delphij $");
41__FBSDID("$FreeBSD: head/sys/dev/an/if_an.c 148454 2005-07-27 21:03:35Z emax $");
42
43/*
44 * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form.
45 * This driver supports all three device types (PCI devices are supported
46 * through an extra PCI shim: /sys/dev/an/if_an_pci.c). ISA devices can be
47 * supported either using hard-coded IO port/IRQ settings or via Plug
48 * and Play. The 4500 series devices support 1Mbps and 2Mbps data rates.
49 * The 4800 devices support 1, 2, 5.5 and 11Mbps rates.

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

821}
822
823int
824an_detach(device_t dev)
825{
826 struct an_softc *sc = device_get_softc(dev);
827 struct ifnet *ifp = sc->an_ifp;
828
42
43/*
44 * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form.
45 * This driver supports all three device types (PCI devices are supported
46 * through an extra PCI shim: /sys/dev/an/if_an_pci.c). ISA devices can be
47 * supported either using hard-coded IO port/IRQ settings or via Plug
48 * and Play. The 4500 series devices support 1Mbps and 2Mbps data rates.
49 * The 4800 devices support 1, 2, 5.5 and 11Mbps rates.

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

821}
822
823int
824an_detach(device_t dev)
825{
826 struct an_softc *sc = device_get_softc(dev);
827 struct ifnet *ifp = sc->an_ifp;
828
829 AN_LOCK(sc);
829 if (sc->an_gone) {
830 if (sc->an_gone) {
831 AN_UNLOCK(sc);
830 device_printf(dev,"already unloaded\n");
831 return(0);
832 }
832 device_printf(dev,"already unloaded\n");
833 return(0);
834 }
833 AN_LOCK(sc);
834 an_stop(sc);
835 an_stop(sc);
836 sc->an_gone = 1;
835 ifmedia_removeall(&sc->an_ifmedia);
836 ifp->if_flags &= ~IFF_RUNNING;
837 ifmedia_removeall(&sc->an_ifmedia);
838 ifp->if_flags &= ~IFF_RUNNING;
839 AN_UNLOCK(sc);
837 ether_ifdetach(ifp);
838 if_free(ifp);
840 ether_ifdetach(ifp);
841 if_free(ifp);
839 sc->an_gone = 1;
840 AN_UNLOCK(sc);
841 bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
842 an_release_resources(dev);
843 mtx_destroy(&sc->an_mtx);
844 return (0);
845}
846
847static void
848an_rxeof(sc)

--- 2902 unchanged lines hidden ---
842 bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
843 an_release_resources(dev);
844 mtx_destroy(&sc->an_mtx);
845 return (0);
846}
847
848static void
849an_rxeof(sc)

--- 2902 unchanged lines hidden ---