Page MenuHomeFreeBSD

net80211: add ieee80211_restart_all() call
ClosedPublic

Authored by avos on Oct 24 2015, 6:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 12:19 AM
Unknown Object (File)
Thu, Dec 12, 3:51 AM
Unknown Object (File)
Thu, Nov 28, 7:26 PM
Unknown Object (File)
Thu, Nov 28, 7:26 PM
Unknown Object (File)
Wed, Nov 27, 1:35 AM
Unknown Object (File)
Oct 3 2024, 4:01 AM
Unknown Object (File)
Oct 2 2024, 10:23 PM
Unknown Object (File)
Oct 1 2024, 3:19 PM
Subscribers

Details

Summary

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.

Test Plan

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

avos retitled this revision from to net80211: add ieee80211_restart_all() call.
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added a reviewer: adrian.
avos set the repository for this revision to rS FreeBSD src repository - subversion.

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);

}

adrian edited edge metadata.

Cool, let's do it.

This revision is now accepted and ready to land.Oct 27 2015, 8:22 PM
This revision was automatically updated to reflect the committed changes.