aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 07dfb31f1749..7c91ba4dce41 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -362,7 +362,7 @@ struct ath_vif {
362 * number of BSSIDs) if a given beacon does not go out even after waiting this 362 * number of BSSIDs) if a given beacon does not go out even after waiting this
363 * number of beacon intervals, the game's up. 363 * number of beacon intervals, the game's up.
364 */ 364 */
365#define BSTUCK_THRESH (9 * ATH_BCBUF) 365#define BSTUCK_THRESH 9
366#define ATH_BCBUF 4 366#define ATH_BCBUF 4
367#define ATH_DEFAULT_BINTVAL 100 /* TU */ 367#define ATH_DEFAULT_BINTVAL 100 /* TU */
368#define ATH_DEFAULT_BMISS_LIMIT 10 368#define ATH_DEFAULT_BMISS_LIMIT 10
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 /*