summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2008-01-01 11:43:49 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2008-01-01 11:43:49 +0000
commit2f48c840bd06f0ef953613f836e9ba5c6e25448a (patch)
treecc1b309aaa805eb22c00d3d9144cc81fb9745f84 /sys/dev
parent6a0b40f2f5da3773add753a44d9b8f9a99682b72 (diff)
No watchdog operations if device is not running.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_upgt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index 053c9619b55..87cab92d933 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.10 2008/01/01 10:10:20 mglocker Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.11 2008/01/01 11:43:48 mglocker Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -1397,6 +1397,10 @@ void
upgt_watchdog(struct ifnet *ifp)
{
struct upgt_softc *sc = ifp->if_softc;
+ struct ieee80211com *ic = &sc->sc_ic;
+
+ if (ic->ic_state == IEEE80211_S_INIT)
+ return;
printf("%s: watchdog timeout!\n", sc->sc_dev.dv_xname);