diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 2be4c2252047..babfd3780a9a 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -23,12 +23,12 @@ module_param_named(debug, ath9k_debug, uint, 0); | |||
23 | 23 | ||
24 | static struct dentry *ath9k_debugfs_root; | 24 | static struct dentry *ath9k_debugfs_root; |
25 | 25 | ||
26 | void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...) | 26 | void DPRINTF(struct ath_hw *ah, int dbg_mask, const char *fmt, ...) |
27 | { | 27 | { |
28 | if (!sc) | 28 | if (!ah->ah_sc) |
29 | return; | 29 | return; |
30 | 30 | ||
31 | if (sc->debug.debug_mask & dbg_mask) { | 31 | if (ah->ah_sc->debug.debug_mask & dbg_mask) { |
32 | va_list args; | 32 | va_list args; |
33 | 33 | ||
34 | va_start(args, fmt); | 34 | va_start(args, fmt); |
@@ -568,8 +568,10 @@ static const struct file_operations fops_xmit = { | |||
568 | .owner = THIS_MODULE | 568 | .owner = THIS_MODULE |
569 | }; | 569 | }; |
570 | 570 | ||
571 | int ath9k_init_debug(struct ath_softc *sc) | 571 | int ath9k_init_debug(struct ath_hw *ah) |
572 | { | 572 | { |
573 | struct ath_softc *sc = ah->ah_sc; | ||
574 | |||
573 | sc->debug.debug_mask = ath9k_debug; | 575 | sc->debug.debug_mask = ath9k_debug; |
574 | 576 | ||
575 | if (!ath9k_debugfs_root) | 577 | if (!ath9k_debugfs_root) |
@@ -619,12 +621,14 @@ int ath9k_init_debug(struct ath_softc *sc) | |||
619 | 621 | ||
620 | return 0; | 622 | return 0; |
621 | err: | 623 | err: |
622 | ath9k_exit_debug(sc); | 624 | ath9k_exit_debug(ah); |
623 | return -ENOMEM; | 625 | return -ENOMEM; |
624 | } | 626 | } |
625 | 627 | ||
626 | void ath9k_exit_debug(struct ath_softc *sc) | 628 | void ath9k_exit_debug(struct ath_hw *ah) |
627 | { | 629 | { |
630 | struct ath_softc *sc = ah->ah_sc; | ||
631 | |||
628 | debugfs_remove(sc->debug.debugfs_xmit); | 632 | debugfs_remove(sc->debug.debugfs_xmit); |
629 | debugfs_remove(sc->debug.debugfs_wiphy); | 633 | debugfs_remove(sc->debug.debugfs_wiphy); |
630 | debugfs_remove(sc->debug.debugfs_rcstat); | 634 | debugfs_remove(sc->debug.debugfs_rcstat); |