aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-11-28 11:49:02 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 09:35:08 -0500
commit88b126af946e7ea789f2a52d9d25aca681f93067 (patch)
tree0991493a6fc53675ca73d971bb92ae77fb628a48 /drivers/net/wireless/ath9k/main.c
parent04bd4638097c767278fdf12d50fecc8b60194d39 (diff)
ath9k: Add ATH9K_DEBUG configuration option
Make debugging configurable, and add a module parameter to give the debug mask. Add debug.c to hold all debug specific code. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index de059c38467..9e7045dd733 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -38,21 +38,6 @@ static struct pci_device_id ath_pci_id_table[] __devinitdata = {
38 38
39static void ath_detach(struct ath_softc *sc); 39static void ath_detach(struct ath_softc *sc);
40 40
41void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...)
42{
43 if (!sc)
44 return;
45
46 if (sc->sc_debug & dbg_mask) {
47 va_list args;
48
49 va_start(args, fmt);
50 printk(KERN_DEBUG "ath9k: ");
51 vprintk(fmt, args);
52 va_end(args);
53 }
54}
55
56/* return bus cachesize in 4B word units */ 41/* return bus cachesize in 4B word units */
57 42
58static void bus_read_cachesize(struct ath_softc *sc, int *csz) 43static void bus_read_cachesize(struct ath_softc *sc, int *csz)
@@ -1325,7 +1310,8 @@ static int ath_init(u16 devid, struct ath_softc *sc)
1325 1310
1326 /* XXX: hardware will not be ready until ath_open() being called */ 1311 /* XXX: hardware will not be ready until ath_open() being called */
1327 sc->sc_flags |= SC_OP_INVALID; 1312 sc->sc_flags |= SC_OP_INVALID;
1328 sc->sc_debug = DBG_DEFAULT; 1313
1314 ath9k_init_debug(sc);
1329 1315
1330 spin_lock_init(&sc->sc_resetlock); 1316 spin_lock_init(&sc->sc_resetlock);
1331 tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc); 1317 tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc);