svn commit: r345751 - head/sys/dev/usb/wlan
Andriy Voskoboinyk
avos at FreeBSD.org
Tue Sep 3 14:06:14 UTC 2019
Author: avos
Date: Sun Mar 31 09:52:36 2019
New Revision: 345751
URL: https://svnweb.freebsd.org/changeset/base/345751
Log:
uath(4), urtw(4): restart driver if device does not respond after Tx request
MFC after: 1 week
Modified:
head/sys/dev/usb/wlan/if_uath.c
head/sys/dev/usb/wlan/if_urtw.c
Modified: head/sys/dev/usb/wlan/if_uath.c
==============================================================================
--- head/sys/dev/usb/wlan/if_uath.c Sun Mar 31 06:21:32 2019 (r345750)
+++ head/sys/dev/usb/wlan/if_uath.c Sun Mar 31 09:52:36 2019 (r345751)
@@ -1276,8 +1276,8 @@ 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! */
counter_u64_add(ic->ic_oerrors, 1);
+ ieee80211_restart_all(ic);
return;
}
callout_reset(&sc->watchdog_ch, hz, uath_watchdog, sc);
Modified: head/sys/dev/usb/wlan/if_urtw.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtw.c Sun Mar 31 06:21:32 2019 (r345750)
+++ head/sys/dev/usb/wlan/if_urtw.c Sun Mar 31 09:52:36 2019 (r345751)
@@ -1891,11 +1891,13 @@ static void
urtw_watchdog(void *arg)
{
struct urtw_softc *sc = arg;
+ struct ieee80211com *ic = &sc->sc_ic;
if (sc->sc_txtimer > 0) {
if (--sc->sc_txtimer == 0) {
device_printf(sc->sc_dev, "device timeout\n");
- counter_u64_add(sc->sc_ic.ic_oerrors, 1);
+ counter_u64_add(ic->ic_oerrors, 1);
+ ieee80211_restart_all(ic);
return;
}
callout_reset(&sc->sc_watchdog_ch, hz, urtw_watchdog, sc);
More information about the svn-src-all
mailing list