Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340914
b: refs/heads/master
c: 424749c
h: refs/heads/master
v: v3
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Oct 19, 2012
1 parent 6caf5df commit 1589c66
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4764c809a306ea37b6409494896e919bbb5ec5f
refs/heads/master: 424749c75daf3611a68a49eca5940ac2b74e4406
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ void ath9k_set_beacon(struct ath_softc *sc);
#define ATH_LONG_CALINTERVAL_INT 1000 /* 1000 ms */
#define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */
#define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */
#define ATH_ANI_MAX_SKIP_COUNT 10

#define ATH_PAPRD_TIMEOUT 100 /* msecs */
#define ATH_PLL_WORK_INTERVAL 100
Expand Down Expand Up @@ -642,6 +643,7 @@ enum sc_op_flags {
#define PS_WAIT_FOR_PSPOLL_DATA BIT(2)
#define PS_WAIT_FOR_TX_ACK BIT(3)
#define PS_BEACON_SYNC BIT(4)
#define PS_WAIT_FOR_ANI BIT(5)

struct ath_rate_table;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ struct ath_hw {
int coarse_low[5];
int firpwr[5];
enum ath9k_ani_cmd ani_function;
u32 ani_skip_count;

#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
struct ath_btcoex_hw btcoex_hw;
Expand Down
12 changes: 11 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,18 @@ void ath_ani_calibrate(unsigned long data)
ATH_AP_SHORT_CALINTERVAL : ATH_STA_SHORT_CALINTERVAL;

/* Only calibrate if awake */
if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE)
if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) {
if (++ah->ani_skip_count >= ATH_ANI_MAX_SKIP_COUNT) {
spin_lock_irqsave(&sc->sc_pm_lock, flags);
sc->ps_flags |= PS_WAIT_FOR_ANI;
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
}
goto set_timer;
}
ah->ani_skip_count = 0;
spin_lock_irqsave(&sc->sc_pm_lock, flags);
sc->ps_flags &= ~PS_WAIT_FOR_ANI;
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);

ath9k_ps_wakeup(sc);

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ void ath9k_ps_restore(struct ath_softc *sc)
!(sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB |
PS_WAIT_FOR_PSPOLL_DATA |
PS_WAIT_FOR_TX_ACK))) {
PS_WAIT_FOR_TX_ACK |
PS_WAIT_FOR_ANI))) {
mode = ATH9K_PM_NETWORK_SLEEP;
if (ath9k_hw_btcoex_is_enabled(sc->sc_ah))
ath9k_btcoex_stop_gen_timer(sc);
Expand Down

0 comments on commit 1589c66

Please sign in to comment.