diff options
author | claudio <claudio@openbsd.org> | 2019-11-26 23:04:28 +0000 |
---|---|---|
committer | claudio <claudio@openbsd.org> | 2019-11-26 23:04:28 +0000 |
commit | bb90795629c3e359dbaad387708ecb8c1797eddf (patch) | |
tree | e8c092669027126900ba99d1ffdb45c43f94d9da /sys/dev/usb/if_umb.c | |
parent | some corrections to CDPATH; (diff) | |
download | wireguard-openbsd-bb90795629c3e359dbaad387708ecb8c1797eddf.tar.xz wireguard-openbsd-bb90795629c3e359dbaad387708ecb8c1797eddf.zip |
When there is no network around the state timeout fires over and over again.
Change the printf into a log and only under IFF_DEBUG to reduce dmesg spam.
Loudly requested by beck@ OK deraadt@
Diffstat (limited to 'sys/dev/usb/if_umb.c')
-rw-r--r-- | sys/dev/usb/if_umb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c index 2684daba7c3..2f771539c61 100644 --- a/sys/dev/usb/if_umb.c +++ b/sys/dev/usb/if_umb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_umb.c,v 1.30 2019/11/24 07:54:30 claudio Exp $ */ +/* $OpenBSD: if_umb.c,v 1.31 2019/11/26 23:04:28 claudio Exp $ */ /* * Copyright (c) 2016 genua mbH @@ -928,9 +928,12 @@ void umb_statechg_timeout(void *arg) { struct umb_softc *sc = arg; + struct ifnet *ifp = GET_IFP(sc); if (sc->sc_info.regstate != MBIM_REGSTATE_ROAMING || sc->sc_roaming) - printf("%s: state change timeout\n", DEVNAM(sc)); + if (ifp->if_flags & IFF_DEBUG) + log(LOG_DEBUG, "%s: state change timeout\n", + DEVNAM(sc)); usb_add_task(sc->sc_udev, &sc->sc_umb_task); } |