diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-06-25 19:45:51 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-06-25 19:45:51 +0000 |
commit | 2bfe8f251839cdf00a68b3b52d4aae4848db95b5 (patch) | |
tree | 8504db9b7eeab55800ed8b7152dff49810a40d26 /package/mac80211/patches/405-ath9k-make-use-ath9k_hw_wait-int-ath9k_hw_reset_tsf.patch | |
parent | 3eb59941fdab99670641e4ff7537aa8fc1578447 (diff) |
[packages] mac80211: add more ath9k patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16562 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/405-ath9k-make-use-ath9k_hw_wait-int-ath9k_hw_reset_tsf.patch')
-rw-r--r-- | package/mac80211/patches/405-ath9k-make-use-ath9k_hw_wait-int-ath9k_hw_reset_tsf.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/package/mac80211/patches/405-ath9k-make-use-ath9k_hw_wait-int-ath9k_hw_reset_tsf.patch b/package/mac80211/patches/405-ath9k-make-use-ath9k_hw_wait-int-ath9k_hw_reset_tsf.patch new file mode 100644 index 000000000..b46e20ae7 --- /dev/null +++ b/package/mac80211/patches/405-ath9k-make-use-ath9k_hw_wait-int-ath9k_hw_reset_tsf.patch @@ -0,0 +1,52 @@ +From 9a0a0221024ddb4ddf0e33bb6fdbb3b02eaaf292 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos <juhosg@openwrt.org> +Date: Sat, 20 Jun 2009 23:57:23 +0200 +Subject: [PATCH] ath9k: make use ath9k_hw_wait int ath9k_hw_reset_tsf + +We have a dedicated function for this kind of checks, use that +instead of duplicating the code. + +Changes-licensed-under: ISC +Signed-off-by: Gabor Juhos <juhosg@openwrt.org> +--- + drivers/net/wireless/ath/ath9k/hw.c | 17 +++++------------ + drivers/net/wireless/ath/ath9k/hw.h | 1 + + 2 files changed, 6 insertions(+), 12 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -3801,19 +3801,12 @@ void ath9k_hw_settsf64(struct ath_hw *ah + + void ath9k_hw_reset_tsf(struct ath_hw *ah) + { +- int count; +- + ath9k_ps_wakeup(ah->ah_sc); +- count = 0; +- while (REG_READ(ah, AR_SLP32_MODE) & AR_SLP32_TSF_WRITE_STATUS) { +- count++; +- if (count > 10) { +- DPRINTF(ah->ah_sc, ATH_DBG_RESET, +- "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); +- break; +- } +- udelay(10); +- } ++ if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0, ++ AH_TSF_WRITE_TIMEOUT)) ++ DPRINTF(ah->ah_sc, ATH_DBG_RESET, ++ "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); ++ + REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); + ath9k_ps_restore(ah->ah_sc); + } +--- a/drivers/net/wireless/ath/ath9k/hw.h ++++ b/drivers/net/wireless/ath/ath9k/hw.h +@@ -95,6 +95,7 @@ + + #define MAX_RATE_POWER 63 + #define AH_WAIT_TIMEOUT 100000 /* (us) */ ++#define AH_TSF_WRITE_TIMEOUT 100 /* (us) */ + #define AH_TIME_QUANTUM 10 + #define AR_KEYTABLE_SIZE 128 + #define POWER_UP_TIME 200000 |