From fa24781c58c9a807bbd64c47e65add6cae095649 Mon Sep 17 00:00:00 2001 From: juhosg Date: Tue, 13 Jan 2009 13:01:26 +0000 Subject: [package] mac80211: update ath9k patches git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14023 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...remove-u16-casts-from-rtc-register-access.patch | 43 +++++++++++++++++----- 1 file changed, 33 insertions(+), 10 deletions(-) (limited to 'package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch') diff --git a/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch b/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch index a767c8227..1bea258bd 100644 --- a/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch +++ b/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch @@ -1,16 +1,19 @@ -From 891bd8d155bbdabac3c69486fc854984ee90761c Mon Sep 17 00:00:00 2001 +From 480e7cbba032b1710768ffa1f067f34f99016a73 Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Mon, 5 Jan 2009 11:11:28 +0100 -Subject: [PATCH v2 08/11] ath9k: remove (u16) casts from rtc register access +Subject: [PATCH v3 08/11] ath9k: remove (u16) casts from rtc register access The RTC register offsets don't fit into 'u16' on the AR913x, so we have to remove the existing casts. +Changes-licensed-under: ISC + Signed-off-by: Gabor Juhos Signed-off-by: Imre Kaloz --- - drivers/net/wireless/ath9k/hw.c | 14 +++++++------- - 1 files changed, 7 insertions(+), 7 deletions(-) + drivers/net/wireless/ath9k/hw.c | 14 +++++++------- + drivers/net/wireless/ath9k/reg.h | 4 ++-- + 2 files changed, 9 insertions(+), 9 deletions(-) --- a/drivers/net/wireless/ath9k/hw.c +++ b/drivers/net/wireless/ath9k/hw.c @@ -19,7 +22,7 @@ Signed-off-by: Imre Kaloz } } - REG_WRITE(ah, (u16) (AR_RTC_PLL_CONTROL), pll); -+ REG_WRITE(ah, (AR_RTC_PLL_CONTROL), pll); ++ REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll); udelay(RTC_PLL_SETTLE_DELAY); @@ -28,13 +31,13 @@ Signed-off-by: Imre Kaloz } - REG_WRITE(ah, (u16) (AR_RTC_RC), rst_flags); -+ REG_WRITE(ah, (AR_RTC_RC), rst_flags); ++ REG_WRITE(ah, AR_RTC_RC, rst_flags); udelay(50); - REG_WRITE(ah, (u16) (AR_RTC_RC), 0); - if (!ath9k_hw_wait(ah, (u16) (AR_RTC_RC), AR_RTC_RC_M, 0)) { -+ REG_WRITE(ah, (AR_RTC_RC), 0); -+ if (!ath9k_hw_wait(ah, (AR_RTC_RC), AR_RTC_RC_M, 0)) { ++ REG_WRITE(ah, AR_RTC_RC, 0); ++ if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0)) { DPRINTF(ah->ah_sc, ATH_DBG_RESET, "RTC stuck in MAC reset\n"); return false; @@ -44,8 +47,8 @@ Signed-off-by: Imre Kaloz - REG_WRITE(ah, (u16) (AR_RTC_RESET), 0); - REG_WRITE(ah, (u16) (AR_RTC_RESET), 1); -+ REG_WRITE(ah, (AR_RTC_RESET), 0); -+ REG_WRITE(ah, (AR_RTC_RESET), 1); ++ REG_WRITE(ah, AR_RTC_RESET, 0); ++ REG_WRITE(ah, AR_RTC_RESET, 1); if (!ath9k_hw_wait(ah, AR_RTC_STATUS, @@ -58,3 +61,23 @@ Signed-off-by: Imre Kaloz AR_RTC_RESET_EN); } } +--- a/drivers/net/wireless/ath9k/reg.h ++++ b/drivers/net/wireless/ath9k/reg.h +@@ -953,7 +953,7 @@ enum { + + #define AR_RTC_BASE 0x00020000 + #define AR_RTC_RC \ +- (AR_SREV_9100(ah)) ? (AR_RTC_BASE + 0x0000) : 0x7000 ++ ((AR_SREV_9100(ah)) ? (AR_RTC_BASE + 0x0000) : 0x7000) + #define AR_RTC_RC_M 0x00000003 + #define AR_RTC_RC_MAC_WARM 0x00000001 + #define AR_RTC_RC_MAC_COLD 0x00000002 +@@ -961,7 +961,7 @@ enum { + #define AR_RTC_RC_WARM_RESET 0x00000008 + + #define AR_RTC_PLL_CONTROL \ +- (AR_SREV_9100(ah)) ? (AR_RTC_BASE + 0x0014) : 0x7014 ++ ((AR_SREV_9100(ah)) ? (AR_RTC_BASE + 0x0014) : 0x7014) + + #define AR_RTC_PLL_DIV 0x0000001f + #define AR_RTC_PLL_DIV_S 0 -- cgit v1.2.3