diff options
author | adrian <adrian@FreeBSD.org> | 2016-04-03 23:39:58 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2016-04-03 23:39:58 +0000 |
commit | 917849e830a10ba98b24f3512922e98244493b04 (patch) | |
tree | d107517b967c511364589f431f5708b94c3c78fb | |
parent | ff4b317e50c440e338a1db9fbd17e286b3d44791 (diff) | |
download | FreeBSD-src-917849e830a10ba98b24f3512922e98244493b04.zip FreeBSD-src-917849e830a10ba98b24f3512922e98244493b04.tar.gz |
[iwn] Don't try to seamlessly recover from a firmware panic; just restart
the interface.
I know this may be unpopular, but iwn is not yet completely ready for
a transparent firmware restart. I have this thing panic my laptop
reliably because 11n state isn't kept in sync and the TX completion
path ends up trying to free a null node reference.
-rw-r--r-- | sys/dev/iwn/if_iwn.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 93b2ea1..bffa8de 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -8701,7 +8701,9 @@ iwn_panicked(void *arg0, int pending) struct iwn_softc *sc = arg0; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); +#if 0 int error; +#endif if (vap == NULL) { printf("%s: null vap\n", __func__); @@ -8709,8 +8711,18 @@ iwn_panicked(void *arg0, int pending) } device_printf(sc->sc_dev, "%s: controller panicked, iv_state = %d; " - "resetting...\n", __func__, vap->iv_state); + "restarting\n", __func__, vap->iv_state); + /* + * This is not enough work. We need to also reinitialise + * the correct transmit state for aggregation enabled queues, + * which has a very specific requirement of + * ring index = 802.11 seqno % 256. If we don't do this (which + * we definitely don't!) then the firmware will just panic again. + */ +#if 1 + ieee80211_restart_all(ic); +#else IWN_LOCK(sc); iwn_stop_locked(sc); @@ -8727,6 +8739,7 @@ iwn_panicked(void *arg0, int pending) } IWN_UNLOCK(sc); +#endif } static void |