From patchwork Wed Oct 7 01:19:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 52117 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n971QJwG026971 for ; Wed, 7 Oct 2009 01:26:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932743AbZJGBTu (ORCPT ); Tue, 6 Oct 2009 21:19:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758631AbZJGBTt (ORCPT ); Tue, 6 Oct 2009 21:19:49 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:33179 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758608AbZJGBTs (ORCPT ); Tue, 6 Oct 2009 21:19:48 -0400 Received: from mcgrof by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MvLBP-0008Rc-84; Wed, 07 Oct 2009 01:19:11 +0000 From: "Luis R. Rodriguez" To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, vasanth@atheros.com, "Luis R. Rodriguez" Subject: [PATCH 1/6] ath9k: move common->debug_mask setting to ath_init_softc() Date: Tue, 6 Oct 2009 21:19:06 -0400 Message-Id: <1254878351-32433-2-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.6.2.rc1.3.g81d3f In-Reply-To: <1254878351-32433-1-git-send-email-lrodriguez@atheros.com> References: <1254878351-32433-1-git-send-email-lrodriguez@atheros.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 25ae88e..84f4426 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -23,9 +23,6 @@ #define REG_READ_D(_ah, _reg) \ ath9k_hw_common(_ah)->ops->read((_ah), (_reg)) -static unsigned int ath9k_debug = ATH_DBG_DEFAULT; -module_param_named(debug, ath9k_debug, uint, 0); - static struct dentry *ath9k_debugfs_root; static int ath9k_debugfs_open(struct inode *inode, struct file *file) @@ -565,8 +562,6 @@ int ath9k_init_debug(struct ath_hw *ah) struct ath_common *common = ath9k_hw_common(ah); struct ath_softc *sc = (struct ath_softc *) common->priv; - common->debug_mask = ath9k_debug; - if (!ath9k_debugfs_root) return -ENOENT; diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 86374ad..7f90cb8 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -29,6 +29,10 @@ static int modparam_nohwcrypt; module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444); MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); +static unsigned int ath9k_debug = ATH_DBG_DEFAULT; +module_param_named(debug, ath9k_debug, uint, 0); +MODULE_PARM_DESC(ath9k_debug, "Debugging mask"); + /* We use the hw_value as an index into our private channel structure */ #define CHAN2G(_freq, _idx) { \ @@ -1637,6 +1641,7 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, common->ah = ah; common->hw = sc->hw; common->priv = sc; + common->debug_mask = ath9k_debug; /* * Cache line size is used to size and align various