b2d44c5bb0bfb76f126ab640edf9ba657d86ee78
[openwrt-10.03/.git] / package / mac80211 / patches / 540-ath9k_bstuck_debug.patch
1 --- a/drivers/net/wireless/ath/debug.h
2 +++ b/drivers/net/wireless/ath/debug.h
3 @@ -36,6 +36,7 @@
4   * @ATH_DBG_PS: power save processing
5   * @ATH_DBG_HWTIMER: hardware timer handling
6   * @ATH_DBG_BTCOEX: bluetooth coexistance
7 + * @ATH_DBG_BSTUCK: stuck beacons
8   * @ATH_DBG_ANY: enable all debugging
9   *
10   * The debug level is used to control the amount and type of debugging output
11 @@ -60,6 +61,7 @@ enum ATH_DEBUG {
12         ATH_DBG_HWTIMER         = 0x00001000,
13         ATH_DBG_BTCOEX          = 0x00002000,
14         ATH_DBG_WMI             = 0x00004000,
15 +       ATH_DBG_BSTUCK          = 0x00008000,
16         ATH_DBG_ANY             = 0xffffffff
17  };
18  
19 --- a/drivers/net/wireless/ath/ath9k/beacon.c
20 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
21 @@ -359,11 +359,11 @@ void ath_beacon_tasklet(unsigned long da
22                 sc->beacon.bmisscnt++;
23  
24                 if (sc->beacon.bmisscnt < BSTUCK_THRESH) {
25 -                       ath_print(common, ATH_DBG_BEACON,
26 +                       ath_print(common, ATH_DBG_BSTUCK,
27                                   "missed %u consecutive beacons\n",
28                                   sc->beacon.bmisscnt);
29                 } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
30 -                       ath_print(common, ATH_DBG_BEACON,
31 +                       ath_print(common, ATH_DBG_BSTUCK,
32                                   "beacon is officially stuck\n");
33                         sc->sc_flags |= SC_OP_TSF_RESET;
34                         ath_reset(sc, false);
35 @@ -373,7 +373,7 @@ void ath_beacon_tasklet(unsigned long da
36         }
37  
38         if (sc->beacon.bmisscnt != 0) {
39 -               ath_print(common, ATH_DBG_BEACON,
40 +               ath_print(common, ATH_DBG_BSTUCK,
41                           "resume beacon xmit after %u misses\n",
42                           sc->beacon.bmisscnt);
43                 sc->beacon.bmisscnt = 0;