# Use the default kernel version if the Makefile doesn't override it LINUX_RELEASE?=1 ifeq ($(LINUX_VERSION),2.6.30.10) LINUX_KERNEL_MD5SUM:=eb6be465f914275967a5602cb33662f5 endif ifeq ($(LINUX_VERSION),2.6.31.14) LINUX_KERNEL_MD5SUM:=3e7feb224197d8e174a90dd3759979fd endif ifeq ($(LINUX_VERSION),2.6.32.33) LINUX_KERNEL_MD5SUM:=2b4e5ed210534d9b4f5a563089dfcc80 endif ifeq ($(LINUX_VERSION),2.6.34.8) LINUX_KERNEL_MD5SUM:=6dedac89df1af57b08981fcc6ad387db endif ifeq ($(LINUX_VERSION),2.6.35.11) LINUX_KERNEL_MD5SUM:=4c9ee33801f5ad0f4d5e615fac66d535 endif ifeq ($(LINUX_VERSION),2.6.36.4) LINUX_KERNEL_MD5SUM:=c05dd941d0e249695e9f72568888e1bf endif ifeq ($(LINUX_VERSION),2.6.37.6) LINUX_KERNEL_MD5SUM:=05970afdce8ec4323a10dcd42bc4fb0c endif ifeq ($(LINUX_VERSION),2.6.38.2) LINUX_KERNEL_MD5SUM:=5e9d0edae15053ea9acd932e6d162d03 endif # disable the md5sum check for unknown kernel versions LINUX_KERNEL_MD5SUM?=x split_version=$(subst ., ,$(1)) merge_version=$(subst $(space),.,$(1)) KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION))) KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE)))) KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE)))) on> upstream openwrtJames
aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/201-ath5k-WAR-for-AR71xx-PCI-bug.patch
blob: 21516ffde905c949713bb8f9dbdaf44cfc59bff8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/drivers/net/wireless/ath/ath5k/initvals.c
+++ b/drivers/net/wireless/ath/ath5k/initvals.c
@@ -62,8 +62,14 @@ static const struct ath5k_ini ar5210_ini
 	{ AR5K_IMR,		0 },
 	{ AR5K_IER,		AR5K_IER_DISABLE },
 	{ AR5K_BSR,		0, AR5K_INI_READ },
+#if !defined(CONFIG_ATHEROS_AR71XX) && !defined(CONFIG_ATH79)
 	{ AR5K_TXCFG,		AR5K_DMASIZE_128B },
 	{ AR5K_RXCFG,		AR5K_DMASIZE_128B },
+#else
+	/* WAR for AR71xx PCI bug */
+	{ AR5K_TXCFG,		AR5K_DMASIZE_128B },
+	{ AR5K_RXCFG,		AR5K_DMASIZE_4B },
+#endif
 	{ AR5K_CFG,		AR5K_INIT_CFG },
 	{ AR5K_TOPS,		8 },
 	{ AR5K_RXNOFRM,		8 },
--- a/drivers/net/wireless/ath/ath5k/dma.c
+++ b/drivers/net/wireless/ath/ath5k/dma.c
@@ -869,10 +869,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
 	 * guess we can tweak it and see how it goes ;-)
 	 */
 	if (ah->ah_version != AR5K_AR5210) {
+#if !defined(CONFIG_ATHEROS_AR71XX) && !defined(CONFIG_ATH79)
 		AR5K_REG_WRITE_BITS(ah, AR5K_TXCFG,
 			AR5K_TXCFG_SDMAMR, AR5K_DMASIZE_128B);
 		AR5K_REG_WRITE_BITS(ah, AR5K_RXCFG,
 			AR5K_RXCFG_SDMAMW, AR5K_DMASIZE_128B);
+#else
+		/* WAR for AR71xx PCI bug */
+		AR5K_REG_WRITE_BITS(ah, AR5K_TXCFG,
+			AR5K_TXCFG_SDMAMR, AR5K_DMASIZE_128B);
+		AR5K_REG_WRITE_BITS(ah, AR5K_RXCFG,
+			AR5K_RXCFG_SDMAMW, AR5K_DMASIZE_4B);
+#endif
 	}
 
 	/* Pre-enable interrupts on 5211/5212*/