Index: head/sys/dev/iwm/if_iwm.c =================================================================== --- head/sys/dev/iwm/if_iwm.c +++ head/sys/dev/iwm/if_iwm.c @@ -234,13 +234,9 @@ bus_size_t, bus_size_t); static void iwm_dma_contig_free(struct iwm_dma_info *); static int iwm_alloc_fwmem(struct iwm_softc *); -static void iwm_free_fwmem(struct iwm_softc *); static int iwm_alloc_sched(struct iwm_softc *); -static void iwm_free_sched(struct iwm_softc *); static int iwm_alloc_kw(struct iwm_softc *); -static void iwm_free_kw(struct iwm_softc *); static int iwm_alloc_ict(struct iwm_softc *); -static void iwm_free_ict(struct iwm_softc *); static int iwm_alloc_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); static void iwm_disable_rx_dma(struct iwm_softc *); static void iwm_reset_rx_ring(struct iwm_softc *, struct iwm_rx_ring *); @@ -902,12 +898,6 @@ sc->sc_fwdmasegsz, 16); } -static void -iwm_free_fwmem(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->fw_dma); -} - /* tx scheduler rings. not used? */ static int iwm_alloc_sched(struct iwm_softc *sc) @@ -917,12 +907,6 @@ nitems(sc->txq) * sizeof(struct iwm_agn_scd_bc_tbl), 1024); } -static void -iwm_free_sched(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->sched_dma); -} - /* keep-warm page is used internally by the card. see iwl-fh.h for more info */ static int iwm_alloc_kw(struct iwm_softc *sc) @@ -930,12 +914,6 @@ return iwm_dma_contig_alloc(sc->sc_dmat, &sc->kw_dma, 4096, 4096); } -static void -iwm_free_kw(struct iwm_softc *sc) -{ - iwm_dma_contig_free(&sc->kw_dma); -} - /* interrupt cause table */ static int iwm_alloc_ict(struct iwm_softc *sc) @@ -944,12 +922,6 @@ IWM_ICT_SIZE, 1<ict_dma); -} - static int iwm_alloc_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) { @@ -6174,13 +6146,10 @@ iwm_fw_info_free(fw); /* Free scheduler */ - iwm_free_sched(sc); - if (sc->ict_dma.vaddr != NULL) - iwm_free_ict(sc); - if (sc->kw_dma.vaddr != NULL) - iwm_free_kw(sc); - if (sc->fw_dma.vaddr != NULL) - iwm_free_fwmem(sc); + iwm_dma_contig_free(&sc->sched_dma); + iwm_dma_contig_free(&sc->ict_dma); + iwm_dma_contig_free(&sc->kw_dma); + iwm_dma_contig_free(&sc->fw_dma); /* Finished with the hardware - detach things */ iwm_pci_detach(dev);