ath9k: move common->debug_mask setting to ath_init_softc()
What this means is we can enable now debug prints without requiring CONFIG_ATH9K_DEBUG. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
8ce54c5a5f
commit
faa27fae7d
@@ -23,9 +23,6 @@
|
|||||||
#define REG_READ_D(_ah, _reg) \
|
#define REG_READ_D(_ah, _reg) \
|
||||||
ath9k_hw_common(_ah)->ops->read((_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 struct dentry *ath9k_debugfs_root;
|
||||||
|
|
||||||
static int ath9k_debugfs_open(struct inode *inode, struct file *file)
|
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_common *common = ath9k_hw_common(ah);
|
||||||
struct ath_softc *sc = (struct ath_softc *) common->priv;
|
struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||||
|
|
||||||
common->debug_mask = ath9k_debug;
|
|
||||||
|
|
||||||
if (!ath9k_debugfs_root)
|
if (!ath9k_debugfs_root)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
|
@@ -29,6 +29,10 @@ static int modparam_nohwcrypt;
|
|||||||
module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
|
module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
|
||||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
|
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 */
|
/* We use the hw_value as an index into our private channel structure */
|
||||||
|
|
||||||
#define CHAN2G(_freq, _idx) { \
|
#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->ah = ah;
|
||||||
common->hw = sc->hw;
|
common->hw = sc->hw;
|
||||||
common->priv = sc;
|
common->priv = sc;
|
||||||
|
common->debug_mask = ath9k_debug;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cache line size is used to size and align various
|
* Cache line size is used to size and align various
|
||||||
|
Reference in New Issue
Block a user