diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 6e7a519d0a9c..fb4ff5512360 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -502,6 +502,19 @@ void ath_beacon_tasklet(unsigned long data) | |||
502 | } | 502 | } |
503 | } | 503 | } |
504 | 504 | ||
505 | static void ath9k_beacon_init(struct ath_softc *sc, | ||
506 | u32 next_beacon, | ||
507 | u32 beacon_period) | ||
508 | { | ||
509 | if (beacon_period & ATH9K_BEACON_RESET_TSF) | ||
510 | ath9k_ps_wakeup(sc); | ||
511 | |||
512 | ath9k_hw_beaconinit(sc->sc_ah, next_beacon, beacon_period); | ||
513 | |||
514 | if (beacon_period & ATH9K_BEACON_RESET_TSF) | ||
515 | ath9k_ps_restore(sc); | ||
516 | } | ||
517 | |||
505 | /* | 518 | /* |
506 | * For multi-bss ap support beacons are either staggered evenly over N slots or | 519 | * For multi-bss ap support beacons are either staggered evenly over N slots or |
507 | * burst together. For the former arrange for the SWBA to be delivered for each | 520 | * burst together. For the former arrange for the SWBA to be delivered for each |
@@ -534,7 +547,7 @@ static void ath_beacon_config_ap(struct ath_softc *sc, | |||
534 | /* Set the computed AP beacon timers */ | 547 | /* Set the computed AP beacon timers */ |
535 | 548 | ||
536 | ath9k_hw_set_interrupts(sc->sc_ah, 0); | 549 | ath9k_hw_set_interrupts(sc->sc_ah, 0); |
537 | ath9k_hw_beaconinit(sc->sc_ah, nexttbtt, intval); | 550 | ath9k_beacon_init(sc, nexttbtt, intval); |
538 | sc->beacon.bmisscnt = 0; | 551 | sc->beacon.bmisscnt = 0; |
539 | ath9k_hw_set_interrupts(sc->sc_ah, sc->imask); | 552 | ath9k_hw_set_interrupts(sc->sc_ah, sc->imask); |
540 | 553 | ||
@@ -707,7 +720,7 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, | |||
707 | /* Set the computed ADHOC beacon timers */ | 720 | /* Set the computed ADHOC beacon timers */ |
708 | 721 | ||
709 | ath9k_hw_set_interrupts(sc->sc_ah, 0); | 722 | ath9k_hw_set_interrupts(sc->sc_ah, 0); |
710 | ath9k_hw_beaconinit(sc->sc_ah, nexttbtt, intval); | 723 | ath9k_beacon_init(sc, nexttbtt, intval); |
711 | sc->beacon.bmisscnt = 0; | 724 | sc->beacon.bmisscnt = 0; |
712 | ath9k_hw_set_interrupts(sc->sc_ah, sc->imask); | 725 | ath9k_hw_set_interrupts(sc->sc_ah, sc->imask); |
713 | 726 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index de83d3c4b469..0893f23adaa8 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -4101,14 +4101,12 @@ void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64) | |||
4101 | 4101 | ||
4102 | void ath9k_hw_reset_tsf(struct ath_hw *ah) | 4102 | void ath9k_hw_reset_tsf(struct ath_hw *ah) |
4103 | { | 4103 | { |
4104 | ath9k_ps_wakeup(ah->ah_sc); | ||
4105 | if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0, | 4104 | if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0, |
4106 | AH_TSF_WRITE_TIMEOUT)) | 4105 | AH_TSF_WRITE_TIMEOUT)) |
4107 | DPRINTF(ah, ATH_DBG_RESET, | 4106 | DPRINTF(ah, ATH_DBG_RESET, |
4108 | "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); | 4107 | "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); |
4109 | 4108 | ||
4110 | REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); | 4109 | REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); |
4111 | ath9k_ps_restore(ah->ah_sc); | ||
4112 | } | 4110 | } |
4113 | 4111 | ||
4114 | void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting) | 4112 | void ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting) |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 42772d25491a..fe2888e4b8e9 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2893,7 +2893,11 @@ static void ath9k_reset_tsf(struct ieee80211_hw *hw) | |||
2893 | struct ath_softc *sc = aphy->sc; | 2893 | struct ath_softc *sc = aphy->sc; |
2894 | 2894 | ||
2895 | mutex_lock(&sc->mutex); | 2895 | mutex_lock(&sc->mutex); |
2896 | |||
2897 | ath9k_ps_wakeup(sc); | ||
2896 | ath9k_hw_reset_tsf(sc->sc_ah); | 2898 | ath9k_hw_reset_tsf(sc->sc_ah); |
2899 | ath9k_ps_restore(sc); | ||
2900 | |||
2897 | mutex_unlock(&sc->mutex); | 2901 | mutex_unlock(&sc->mutex); |
2898 | } | 2902 | } |
2899 | 2903 | ||