From owner-svn-src-head@FreeBSD.ORG Mon Oct 27 17:19:39 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD052106566C; Mon, 27 Oct 2008 17:19:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABF258FC13; Mon, 27 Oct 2008 17:19:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHJdhk046596; Mon, 27 Oct 2008 17:19:39 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHJdjl046594; Mon, 27 Oct 2008 17:19:39 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271719.m9RHJdjl046594@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184353 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:19:39 -0000 Author: sam Date: Mon Oct 27 17:19:39 2008 New Revision: 184353 URL: http://svn.freebsd.org/changeset/base/184353 Log: shuffle debug setup to simplify debugging events during attach Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:19:14 2008 (r184352) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:19:39 2008 (r184353) @@ -238,10 +238,6 @@ SYSCTL_INT(_hw_ath, OID_AUTO, txbuf, CTL 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 */ @@ -266,6 +262,11 @@ enum { 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)) @@ -331,6 +332,9 @@ ath_attach(u_int16_t devid, struct ath_s } 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. @@ -6635,7 +6639,6 @@ ath_sysctlattach(struct ath_softc *sc) "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");