Deleted Added
full compact
if_iwi.c (150245) if_iwi.c (150306)
1/* $FreeBSD: head/sys/dev/iwi/if_iwi.c 150245 2005-09-17 12:41:05Z damien $ */
1/* $FreeBSD: head/sys/dev/iwi/if_iwi.c 150306 2005-09-19 03:10:21Z imp $ */
2
3/*-
4 * Copyright (c) 2004, 2005
5 * Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
2
3/*-
4 * Copyright (c) 2004, 2005
5 * Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

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

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/iwi/if_iwi.c 150245 2005-09-17 12:41:05Z damien $");
31__FBSDID("$FreeBSD: head/sys/dev/iwi/if_iwi.c 150306 2005-09-19 03:10:21Z imp $");
32
33/*-
34 * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
35 * http://www.intel.com/network/connectivity/products/wireless/prowireless_mobile.htm
36 */
37
38#include <sys/param.h>
39#include <sys/sysctl.h>

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

462
463 iwi_stop(sc);
464
465 iwi_free_firmware(sc);
466
467 if (ifp != NULL) {
468 bpfdetach(ifp);
469 ieee80211_ifdetach(ic);
32
33/*-
34 * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
35 * http://www.intel.com/network/connectivity/products/wireless/prowireless_mobile.htm
36 */
37
38#include <sys/param.h>
39#include <sys/sysctl.h>

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

462
463 iwi_stop(sc);
464
465 iwi_free_firmware(sc);
466
467 if (ifp != NULL) {
468 bpfdetach(ifp);
469 ieee80211_ifdetach(ic);
470 if_free(ifp);
471 }
472
473 iwi_free_cmd_ring(sc, &sc->cmdq);
474 iwi_free_tx_ring(sc, &sc->txq[0]);
475 iwi_free_tx_ring(sc, &sc->txq[1]);
476 iwi_free_tx_ring(sc, &sc->txq[2]);
477 iwi_free_tx_ring(sc, &sc->txq[3]);
478 iwi_free_rx_ring(sc, &sc->rxq);
479
480 if (sc->irq != NULL) {
481 bus_teardown_intr(dev, sc->irq, sc->sc_ih);
482 bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq);
483 }
484
485 if (sc->mem != NULL)
486 bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem);
487
470 }
471
472 iwi_free_cmd_ring(sc, &sc->cmdq);
473 iwi_free_tx_ring(sc, &sc->txq[0]);
474 iwi_free_tx_ring(sc, &sc->txq[1]);
475 iwi_free_tx_ring(sc, &sc->txq[2]);
476 iwi_free_tx_ring(sc, &sc->txq[3]);
477 iwi_free_rx_ring(sc, &sc->rxq);
478
479 if (sc->irq != NULL) {
480 bus_teardown_intr(dev, sc->irq, sc->sc_ih);
481 bus_release_resource(dev, SYS_RES_IRQ, sc->irq_rid, sc->irq);
482 }
483
484 if (sc->mem != NULL)
485 bus_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem);
486
487 if (ifp != NULL)
488 if_free(ifp);
488 mtx_destroy(&sc->sc_mtx);
489
490 return 0;
491}
492
493static void
494iwi_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
495{

--- 2071 unchanged lines hidden ---
489 mtx_destroy(&sc->sc_mtx);
490
491 return 0;
492}
493
494static void
495iwi_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
496{

--- 2071 unchanged lines hidden ---