diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-03-22 16:54:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-30 14:15:18 -0400 |
commit | c944daf46a8cfa50d6c1f54d4842180d0384c594 (patch) | |
tree | 3b83ef5e776af22c88075e01841e22101f44aff2 /drivers/net/wireless/ath/ath9k/beacon.c | |
parent | 87c510fe2d4f193cd4eb518364a2dfa5059b1218 (diff) |
ath9k: fix stuck beacon detection
Stuck beacon detection is supposed to trigger when 9 consecutive beacons
could not be sent by the hardware. When the driver runs only one active
AP mode interface, it still configures the hardware beacon timer for
4 (ATH_BCBUF) beacon slots slots, which causes stuck beacon detection
to be reset if ath9k_hw_stoptxdma clears the stuck frames between
SWBA intervals.
Fix this by not resetting the missed beacon count for empty slots and
multiplying the threshold not by the maximum number of beacon slots
but by the configured number of beacon interfaces.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 6ebeafe3a92f..74f33bc193fe 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -363,7 +363,7 @@ void ath_beacon_tasklet(unsigned long data) | |||
363 | if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0) { | 363 | if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0) { |
364 | sc->beacon.bmisscnt++; | 364 | sc->beacon.bmisscnt++; |
365 | 365 | ||
366 | if (sc->beacon.bmisscnt < BSTUCK_THRESH) { | 366 | if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) { |
367 | ath_dbg(common, ATH_DBG_BSTUCK, | 367 | ath_dbg(common, ATH_DBG_BSTUCK, |
368 | "missed %u consecutive beacons\n", | 368 | "missed %u consecutive beacons\n", |
369 | sc->beacon.bmisscnt); | 369 | sc->beacon.bmisscnt); |
@@ -380,13 +380,6 @@ void ath_beacon_tasklet(unsigned long data) | |||
380 | return; | 380 | return; |
381 | } | 381 | } |
382 | 382 | ||
383 | if (sc->beacon.bmisscnt != 0) { | ||
384 | ath_dbg(common, ATH_DBG_BSTUCK, | ||
385 | "resume beacon xmit after %u misses\n", | ||
386 | sc->beacon.bmisscnt); | ||
387 | sc->beacon.bmisscnt = 0; | ||
388 | } | ||
389 | |||
390 | /* | 383 | /* |
391 | * Generate beacon frames. we are sending frames | 384 | * Generate beacon frames. we are sending frames |
392 | * staggered so calculate the slot for this frame based | 385 | * staggered so calculate the slot for this frame based |
@@ -420,6 +413,13 @@ void ath_beacon_tasklet(unsigned long data) | |||
420 | bfaddr = bf->bf_daddr; | 413 | bfaddr = bf->bf_daddr; |
421 | bc = 1; | 414 | bc = 1; |
422 | } | 415 | } |
416 | |||
417 | if (sc->beacon.bmisscnt != 0) { | ||
418 | ath_dbg(common, ATH_DBG_BSTUCK, | ||
419 | "resume beacon xmit after %u misses\n", | ||
420 | sc->beacon.bmisscnt); | ||
421 | sc->beacon.bmisscnt = 0; | ||
422 | } | ||
423 | } | 423 | } |
424 | 424 | ||
425 | /* | 425 | /* |