ath9k: add a separate debug level for stuck beacons
authorFelix Fietkau <nbd@openwrt.org>
Mon, 2 Aug 2010 13:53:12 +0000 (15:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Aug 2010 19:26:38 +0000 (15:26 -0400)
Stuck beacons are a useful indicator for debugging various PHY
issues such as calibration. Putting them on the same debug level
as the other beacon stuff makes it hard to spot them in huge amounts
of spam.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/debug.h

index 4d4b22d52dfd230a7a61b3f0dd8b5b612c38af1f..102f1234f79470ae0d8e89019ba43faca92bf843 100644 (file)
@@ -359,11 +359,11 @@ void ath_beacon_tasklet(unsigned long data)
                sc->beacon.bmisscnt++;
 
                if (sc->beacon.bmisscnt < BSTUCK_THRESH) {
-                       ath_print(common, ATH_DBG_BEACON,
+                       ath_print(common, ATH_DBG_BSTUCK,
                                  "missed %u consecutive beacons\n",
                                  sc->beacon.bmisscnt);
                } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
-                       ath_print(common, ATH_DBG_BEACON,
+                       ath_print(common, ATH_DBG_BSTUCK,
                                  "beacon is officially stuck\n");
                        sc->sc_flags |= SC_OP_TSF_RESET;
                        ath_reset(sc, false);
@@ -373,7 +373,7 @@ void ath_beacon_tasklet(unsigned long data)
        }
 
        if (sc->beacon.bmisscnt != 0) {
-               ath_print(common, ATH_DBG_BEACON,
+               ath_print(common, ATH_DBG_BSTUCK,
                          "resume beacon xmit after %u misses\n",
                          sc->beacon.bmisscnt);
                sc->beacon.bmisscnt = 0;
index 873bf526e11f7f1ec5507112660bc53953c53436..fd3a020682dc2dee0dbb2339b4ea1b25d36c4303 100644 (file)
@@ -36,6 +36,7 @@
  * @ATH_DBG_PS: power save processing
  * @ATH_DBG_HWTIMER: hardware timer handling
  * @ATH_DBG_BTCOEX: bluetooth coexistance
+ * @ATH_DBG_BSTUCK: stuck beacons
  * @ATH_DBG_ANY: enable all debugging
  *
  * The debug level is used to control the amount and type of debugging output
@@ -60,6 +61,7 @@ enum ATH_DEBUG {
        ATH_DBG_HWTIMER         = 0x00001000,
        ATH_DBG_BTCOEX          = 0x00002000,
        ATH_DBG_WMI             = 0x00004000,
+       ATH_DBG_BSTUCK          = 0x00008000,
        ATH_DBG_ANY             = 0xffffffff
 };