PERFORCE change 151822 for review
Sam Leffler
sam at FreeBSD.org
Thu Oct 23 19:29:05 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=151822
Change 151822 by sam at sam_ebb on 2008/10/23 19:28:27
o shuffle ath_debug declaration to below the debug flag definitions
so it's possible to reference them in setting an initial value
for ath_debug
o initialize sc_debug early in attach so we can set debug flags that
are honored during attach work
Affected files ...
.. //depot/projects/vap/sys/dev/ath/if_ath.c#115 edit
Differences ...
==== //depot/projects/vap/sys/dev/ath/if_ath.c#115 (text+ko) ====
@@ -239,10 +239,6 @@
TUNABLE_INT("hw.ath.txbuf", &ath_txbuf);
#ifdef ATH_DEBUG
-static int ath_debug = 0;
-SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug,
- 0, "control debugging printfs");
-TUNABLE_INT("hw.ath.debug", &ath_debug);
enum {
ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */
ATH_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */
@@ -267,6 +263,11 @@
ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */
ATH_DEBUG_ANY = 0xffffffff
};
+static int ath_debug = 0;
+SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug,
+ 0, "control debugging printfs");
+TUNABLE_INT("hw.ath.debug", &ath_debug);
+
#define IFF_DUMPPKTS(sc, m) \
((sc->sc_debug & (m)) || \
(sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2))
@@ -333,6 +334,9 @@
}
sc->sc_ah = ah;
sc->sc_invalid = 0; /* ready to go, enable interrupt handling */
+#ifdef ATH_DEBUG
+ sc->sc_debug = ath_debug;
+#endif
/*
* Check if the MAC has multi-rate retry support.
@@ -6731,7 +6735,6 @@
"regdomain", CTLFLAG_RD, &sc->sc_eerd, 0,
"EEPROM regdomain code");
#ifdef ATH_DEBUG
- sc->sc_debug = ath_debug;
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"debug", CTLFLAG_RW, &sc->sc_debug, 0,
"control debugging printfs");
More information about the p4-projects
mailing list