diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2006-08-04 22:24:47 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2006-08-04 22:24:47 +0000 |
commit | ebc6fb08987ba6d852237bad1853e90fc7228a89 (patch) | |
tree | bed323ce9c60904d3ba15c2b5bd5d142f6ede496 /sys/dev/ic | |
parent | ea82f6c5f6d4bb51c9e3a60e414082c516d798a7 (diff) |
Make driver more silent when ACX_DEBUG is off.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/acx.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 3414338ba4c..16dc6c5754a 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.13 2006/08/04 17:49:42 damien Exp $ */ +/* $OpenBSD: acx.c,v 1.14 2006/08/04 22:24:46 mglocker Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -139,18 +139,19 @@ int acxdebug = 1; #endif - -#define ACX_ENABLE_TXCHAN(sc, chan) \ +#define ACX_ENABLE_TXCHAN(sc, chan, ifname) \ do { \ if (acx_enable_txchan((sc), (chan)) != 0) { \ - printf("enable TX on channel %d failed\n", (chan)); \ + printf("%s: enable TX on channel %d failed\n", \ + (ifname), (chan)); \ } \ } while (0) -#define ACX_ENABLE_RXCHAN(sc, chan) \ +#define ACX_ENABLE_RXCHAN(sc, chan, ifname) \ do { \ if (acx_enable_rxchan((sc), (chan)) != 0) { \ - printf("enable RX on channel %d failed\n", (chan)); \ + printf("%s: enable RX on channel %d failed\n", \ + (ifname), (chan)); \ } \ } while (0) @@ -900,9 +901,9 @@ acx_start(struct ifnet *ifp) struct acx_node *node; if (ic->ic_state != IEEE80211_S_RUN) { - printf("%s: data packet dropped due to " - "not RUN. Current state %d\n", - ifp->if_xname, ic->ic_state); + DPRINTF(("%s: data packet dropped due to " + "not RUN. Current state %d\n", + ifp->if_xname, ic->ic_state)); break; } @@ -1833,8 +1834,8 @@ acx_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) uint8_t chan; chan = ieee80211_chan2ieee(ic, ic->ic_bss->ni_chan); - ACX_ENABLE_TXCHAN(sc, chan); - ACX_ENABLE_RXCHAN(sc, chan); + ACX_ENABLE_TXCHAN(sc, chan, ifp->if_xname); + ACX_ENABLE_RXCHAN(sc, chan, ifp->if_xname); timeout_add(&sc->sc_chanscan_timer, hz / acx_chanscan_rate); |