rename patches-r3776 to patches-testing
[openwrt/svn-archive/archive.git] / package / madwifi / patches-testing / 330-bstuck_thresh.patch
1 --- a/ath/if_ath.c
2 +++ b/ath/if_ath.c
3 @@ -354,6 +354,7 @@
4 static int ath_outdoor = AH_FALSE; /* enable outdoor use */
5 static int ath_xchanmode = AH_TRUE; /* enable extended channels */
6 static int ath_maxvaps = ATH_MAXVAPS_DEFAULT; /* set default maximum vaps */
7 +static int bstuck_thresh = BSTUCK_THRESH; /* Stuck beacon count required for reset */
8 static char *autocreate = "sta";
9 static char *ratectl = DEF_RATE_CTL;
10 static int rfkill = 0;
11 @@ -397,6 +398,7 @@
12 #ifdef ATH_CAP_TPC
13 MODULE_PARM(hal_tpc, "i");
14 #endif
15 +MODULE_PARM(bstuck_thresh, "i");
16 MODULE_PARM(autocreate, "s");
17 MODULE_PARM(ratectl, "s");
18 #else
19 @@ -410,6 +412,7 @@
20 #ifdef ATH_CAP_TPC
21 module_param(hal_tpc, int, 0600);
22 #endif
23 +module_param(bstuck_thresh, int, 0600);
24 module_param(autocreate, charp, 0600);
25 module_param(ratectl, charp, 0600);
26 #endif
27 @@ -422,6 +425,7 @@
28 MODULE_PARM_DESC(hal_tpc, "Disables manual per-packet transmit power control and "
29 "lets this be managed by the HAL. Default is OFF.");
30 #endif
31 +MODULE_PARM_DESC(bstuck_thresh, "Override default stuck beacon threshold");
32 MODULE_PARM_DESC(autocreate, "Create ath device in "
33 "[sta|ap|wds|adhoc|ahdemo|monitor] mode. defaults to sta, use "
34 "'none' to disable");
35 @@ -5239,7 +5243,7 @@
36 DPRINTF(sc, ATH_DEBUG_BEACON_PROC,
37 "Missed %u consecutive beacons (n_beacon=%u)\n",
38 sc->sc_bmisscount, n_beacon);
39 - if (sc->sc_bmisscount > BSTUCK_THRESH)
40 + if (sc->sc_bmisscount > bstuck_thresh)
41 ATH_SCHEDULE_TQUEUE(&sc->sc_bstucktq, needmark);
42 return;
43 }
44 @@ -5410,7 +5414,7 @@
45 * check will be true, in which case return
46 * without resetting the driver.
47 */
48 - if (sc->sc_bmisscount <= BSTUCK_THRESH)
49 + if (sc->sc_bmisscount <= bstuck_thresh)
50 return;
51 EPRINTF(sc, "Stuck beacon; resetting (beacon miss count: %u)\n",
52 sc->sc_bmisscount);