From owner-p4-projects@FreeBSD.ORG Thu Oct 23 19:29:05 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9FF3B106567C; Thu, 23 Oct 2008 19:29:05 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6364F106567A for ; Thu, 23 Oct 2008 19:29:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5239D8FC1E for ; Thu, 23 Oct 2008 19:29:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9NJT5ln087060 for ; Thu, 23 Oct 2008 19:29:05 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9NJT566087058 for perforce@freebsd.org; Thu, 23 Oct 2008 19:29:05 GMT (envelope-from sam@freebsd.org) Date: Thu, 23 Oct 2008 19:29:05 GMT Message-Id: <200810231929.m9NJT566087058@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 151822 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2008 19:29:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=151822 Change 151822 by sam@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");