diff options
author | avos <avos@FreeBSD.org> | 2016-01-05 20:09:26 +0000 |
---|---|---|
committer | avos <avos@FreeBSD.org> | 2016-01-05 20:09:26 +0000 |
commit | b9b12bc7e68f18a93d3ab5d46473ef529c970706 (patch) | |
tree | 27b5908a4a8e6a93c734256fefd186ea2dd28431 /sys/dev/iwm/if_iwm.c | |
parent | 14b7155b883684caa7f973fd5dd7bc9e604e0dc2 (diff) | |
download | FreeBSD-src-b9b12bc7e68f18a93d3ab5d46473ef529c970706.zip FreeBSD-src-b9b12bc7e68f18a93d3ab5d46473ef529c970706.tar.gz |
iwm: revert r293178
This optimization is not proper (and causes kernel panic),
since driver checks fw_status to optimize away parsing stage
if it was already done.
Reported by: dchagin
Diffstat (limited to 'sys/dev/iwm/if_iwm.c')
-rw-r--r-- | sys/dev/iwm/if_iwm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 5556ca6..510491e 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -2041,7 +2041,6 @@ iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc, sc->sc_uc_current = ucode_type; error = iwm_start_fw(sc, ucode_type); - iwm_fw_info_free(&sc->sc_fw); if (error) { sc->sc_uc_current = old_type; return error; @@ -4937,6 +4936,7 @@ iwm_suspend(device_t dev) static int iwm_detach_local(struct iwm_softc *sc, int do_net80211) { + struct iwm_fw_info *fw = &sc->sc_fw; device_t dev = sc->sc_dev; int i; @@ -4953,6 +4953,10 @@ iwm_detach_local(struct iwm_softc *sc, int do_net80211) for (i = 0; i < nitems(sc->txq); i++) iwm_free_tx_ring(sc, &sc->txq[i]); + /* Free firmware */ + if (fw->fw_fp != NULL) + iwm_fw_info_free(fw); + /* Free scheduler */ iwm_free_sched(sc); if (sc->ict_dma.vaddr != NULL) |