Deleted Added
full compact
if_an_pccard.c (77217) if_an_pccard.c (83270)
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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/dev/an/if_an_pccard.c 77217 2001-05-26 09:27:08Z phk $
32 * $FreeBSD: head/sys/dev/an/if_an_pccard.c 83270 2001-09-10 02:36:18Z brooks $
33 */
34
35/*
36 * Aironet 4500/4800 802.11 PCMCIA/ISA/PCI driver for FreeBSD.
37 *
38 * Written by Bill Paul <wpaul@ctr.columbia.edu>
39 * Electrical Engineering Department
40 * Columbia University, New York City

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

63#include <net/if_arp.h>
64#include <net/ethernet.h>
65#include <net/if_dl.h>
66#include <net/if_types.h>
67#include <net/if_media.h>
68
69#ifndef lint
70static const char rcsid[] =
33 */
34
35/*
36 * Aironet 4500/4800 802.11 PCMCIA/ISA/PCI driver for FreeBSD.
37 *
38 * Written by Bill Paul <wpaul@ctr.columbia.edu>
39 * Electrical Engineering Department
40 * Columbia University, New York City

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

63#include <net/if_arp.h>
64#include <net/ethernet.h>
65#include <net/if_dl.h>
66#include <net/if_types.h>
67#include <net/if_media.h>
68
69#ifndef lint
70static const char rcsid[] =
71 "$FreeBSD: head/sys/dev/an/if_an_pccard.c 77217 2001-05-26 09:27:08Z phk $";
71 "$FreeBSD: head/sys/dev/an/if_an_pccard.c 83270 2001-09-10 02:36:18Z brooks $";
72#endif
73
74#include <dev/an/if_aironet_ieee.h>
75#include <dev/an/if_anreg.h>
76
77/*
78 * Support for PCMCIA cards.
79 */

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

96 an_pccard_methods,
97 sizeof(struct an_softc)
98};
99
100static devclass_t an_pccard_devclass;
101
102DRIVER_MODULE(if_an, pccard, an_pccard_driver, an_pccard_devclass, 0, 0);
103
72#endif
73
74#include <dev/an/if_aironet_ieee.h>
75#include <dev/an/if_anreg.h>
76
77/*
78 * Support for PCMCIA cards.
79 */

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

96 an_pccard_methods,
97 sizeof(struct an_softc)
98};
99
100static devclass_t an_pccard_devclass;
101
102DRIVER_MODULE(if_an, pccard, an_pccard_driver, an_pccard_devclass, 0, 0);
103
104static int
104static int
105an_pccard_detach(device_t dev)
106{
107 struct an_softc *sc = device_get_softc(dev);
108 struct ifnet *ifp = &sc->arpcom.ac_if;
109
110 if (sc->an_gone) {
111 device_printf(dev,"already unloaded\n");
112 return(0);

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

138
139
140static int
141an_pccard_attach(device_t dev)
142{
143 struct an_softc *sc = device_get_softc(dev);
144 int flags = device_get_flags(dev);
145 int error;
105an_pccard_detach(device_t dev)
106{
107 struct an_softc *sc = device_get_softc(dev);
108 struct ifnet *ifp = &sc->arpcom.ac_if;
109
110 if (sc->an_gone) {
111 device_printf(dev,"already unloaded\n");
112 return(0);

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

138
139
140static int
141an_pccard_attach(device_t dev)
142{
143 struct an_softc *sc = device_get_softc(dev);
144 int flags = device_get_flags(dev);
145 int error;
146
146
147 an_alloc_port(dev, sc->port_rid, AN_IOSIZ);
148 an_alloc_irq(dev, sc->irq_rid, 0);
147 an_alloc_port(dev, sc->port_rid, AN_IOSIZ);
148 an_alloc_irq(dev, sc->irq_rid, 0);
149
149
150 error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
151 an_intr, sc, &sc->irq_handle);
152 if (error) {
153 printf("setup intr failed %d \n", error);
154 an_release_resources(dev);
155 return (error);
156 }
150 error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
151 an_intr, sc, &sc->irq_handle);
152 if (error) {
153 printf("setup intr failed %d \n", error);
154 an_release_resources(dev);
155 return (error);
156 }
157
157
158 sc->an_bhandle = rman_get_bushandle(sc->port_res);
159 sc->an_btag = rman_get_bustag(sc->port_res);
160 sc->an_dev = dev;
161
162 error = an_attach(sc, device_get_unit(dev), flags);
163 return (error);
158 sc->an_bhandle = rman_get_bushandle(sc->port_res);
159 sc->an_btag = rman_get_bustag(sc->port_res);
160 sc->an_dev = dev;
161
162 error = an_attach(sc, device_get_unit(dev), flags);
163 return (error);
164}
164}
165
165