This call may be used when device cannot continue to operate normally (e.g., throws firmware error, watchdog timer expires) and need to be restarted.
Details
- Reviewers
adrian - Commits
- rS290058: net80211: add ieee80211_restart_all() call.
Tested with patched wpi(4) (Intel 3945ABG).
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
ok, so i'm in theory ok with this, but so far I've been .. unhappy with how things like wpi/iwn firmware restarts work.
I think I'm okay with this, but I think right now it should just default to moving all VAPs back to the INIT state so the driver does a full reset. Eg, iwn restart is actually broken and doesn't work with 11n enabled. I know going back to INIT isn't ideal, but i think that's better than contstantly panicing things.
What do you think?
Few places, where it can be used:
bwn(4):
static void
bwn_watchdog(void *arg)
{
struct bwn_softc *sc = arg; if (sc->sc_watchdog_timer != 0 && --sc->sc_watchdog_timer == 0) { device_printf(sc->sc_dev, "device timeout\n"); (here) <<< counter_u64_add(sc->sc_ic.ic_oerrors, 1); } callout_schedule(&sc->sc_watchdog_ch, hz);
}
iwm(4):
static void
iwm_intr(void *arg)
...
device_printf(sc->sc_dev, "fatal firmware error\n"); iwm_stop(sc); <<< here rv = 1; goto out; }
upgt(4):
static void
upgt_watchdog(void *arg)
...
if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { device_printf(sc->sc_dev, "watchdog timeout\n"); /* upgt_init(sc); XXX needs a process context ? */ <<< here counter_u64_add(ic->ic_oerrors, 1); return; } callout_reset(&sc->sc_watchdog_ch, hz, upgt_watchdog, sc); }
}
uath(4):
static void
uath_watchdog(void *arg)
...
if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { device_printf(sc->sc_dev, "device timeout\n"); /*uath_init(sc); XXX needs a process context! */ <<< here counter_u64_add(ic->ic_oerrors, 1); return; } callout_reset(&sc->watchdog_ch, hz, uath_watchdog, sc); }
}
ral(4) (rt2860.c):
static void
rt2860_watchdog(void *arg)
...
if (sc->sc_tx_timer > 0 && --sc->sc_tx_timer == 0) { device_printf(sc->sc_dev, "device timeout\n"); rt2860_stop_locked(sc); <<< probably, rt2860_init_locked(sc); <<< here too counter_u64_add(sc->sc_ic.ic_oerrors, 1); return; } callout_reset(&sc->watchdog_ch, hz, rt2860_watchdog, sc);
}