diff options
author | 2010-12-13 17:11:20 +0000 | |
---|---|---|
committer | 2010-12-13 17:11:20 +0000 | |
commit | 3423a3302dc3cec66426bcdb1a8b6352a852d133 (patch) | |
tree | c4a3bfbd2228c2f8826c7c57485231768a7e6588 | |
parent | Prefer '-l' over '-' which is deprecated. (diff) | |
download | wireguard-openbsd-3423a3302dc3cec66426bcdb1a8b6352a852d133.tar.xz wireguard-openbsd-3423a3302dc3cec66426bcdb1a8b6352a852d133.zip |
#undef RSU_DEBUG
print the firmware diagnostic messages only if IFF_DEBUG is set.
-rw-r--r-- | sys/dev/usb/if_rsu.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/usb/if_rsu.c b/sys/dev/usb/if_rsu.c index 273f42148e9..9bdcb616a3a 100644 --- a/sys/dev/usb/if_rsu.c +++ b/sys/dev/usb/if_rsu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rsu.c,v 1.3 2010/12/12 14:03:41 damien Exp $ */ +/* $OpenBSD: if_rsu.c,v 1.4 2010/12/13 17:11:20 damien Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> @@ -65,8 +65,6 @@ #define RSU_DEBUG #endif -#define RSU_DEBUG - #ifdef RSU_DEBUG #define DPRINTF(x) do { if (rsu_debug) printf x; } while (0) #define DPRINTFN(n, x) do { if (rsu_debug >= (n)) printf x; } while (0) @@ -1198,12 +1196,12 @@ rsu_rx_event(struct rsu_softc *sc, uint8_t code, uint8_t *buf, int len) case R92S_EVT_WPS_PBC: DPRINTF(("WPS PBC pushed.\n")); break; -#ifdef RSU_DEBUG case R92S_EVT_FWDBG: - buf[60] = '\0'; - printf("FWDBG: %s\n", (char *)buf); + if (ifp->if_flags & IFF_DEBUG) { + buf[60] = '\0'; + printf("FWDBG: %s\n", (char *)buf); + } break; -#endif } } @@ -2010,7 +2008,7 @@ rsu_load_firmware(struct rsu_softc *sc) /* Read firmware image from the filesystem. */ if ((error = loadfirmware("rsu-rtl8712fw", &fw, &size)) != 0) { printf("%s: failed loadfirmware of file %s (error %d)\n", - sc->sc_dev.dv_xname, "rsu-rtl8192su", error); + sc->sc_dev.dv_xname, "rsu-rtl8712fw", error); return (error); } if (size < sizeof(*hdr)) { |