summaryrefslogtreecommitdiff
path: root/package/madwifi/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-12-22 03:52:48 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-12-22 03:52:48 +0000
commit6a300004856da29f3ada41ff7bbf443ef591598b (patch)
treeb1b7e02e8368dae2a03cb3b8f9c58e52cbb52414 /package/madwifi/patches
parent2d2c5f6fdc9169f32107d29359c9e02693ddde30 (diff)
downloadmtk-20170518-6a300004856da29f3ada41ff7bbf443ef591598b.zip
mtk-20170518-6a300004856da29f3ada41ff7bbf443ef591598b.tar.gz
mtk-20170518-6a300004856da29f3ada41ff7bbf443ef591598b.tar.bz2
update madwifi SoC support patch, add device ids for 2317 (will be functional after a hal upgrade)
SVN-Revision: 5887
Diffstat (limited to 'package/madwifi/patches')
-rw-r--r--package/madwifi/patches/109-soc_platform.patch92
1 files changed, 83 insertions, 9 deletions
diff --git a/package/madwifi/patches/109-soc_platform.patch b/package/madwifi/patches/109-soc_platform.patch
index d677c04..2cc338b 100644
--- a/package/madwifi/patches/109-soc_platform.patch
+++ b/package/madwifi/patches/109-soc_platform.patch
@@ -1,6 +1,6 @@
diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
---- madwifi.old/ath/if_ath_ahb.c 2006-12-16 00:57:08.000000000 +0100
-+++ madwifi.dev/ath/if_ath_ahb.c 2006-12-16 01:29:38.000000000 +0100
+--- madwifi.old/ath/if_ath_ahb.c 2006-12-22 03:57:28.000000000 +0100
++++ madwifi.dev/ath/if_ath_ahb.c 2006-12-22 04:09:48.000000000 +0100
@@ -17,6 +17,9 @@
#include <linux/if.h>
#include <linux/netdevice.h>
@@ -28,7 +28,27 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
/* set bus cachesize in 4B word units */
void
bus_read_cachesize(struct ath_softc *sc, u_int8_t *csz)
-@@ -295,7 +301,7 @@
+@@ -180,7 +186,8 @@
+ u_int32_t reset;
+ u_int32_t enable;
+
+- if ((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) {
++ if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
++ ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ)) {
+ u_int32_t reg;
+ u_int32_t *en = (u_int32_t *) AR5315_AHB_ARB_CTL;
+
+@@ -241,7 +248,8 @@
+ ahb_disable_wmac(u_int16_t devid, u_int16_t wlanNum)
+ {
+ u_int32_t enable;
+- if ((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) {
++ if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
++ ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ)) {
+ u_int32_t *en = (u_int32_t *) AR5315_AHB_ARB_CTL;
+
+ KASSERT(wlanNum == 0, ("invalid wlan # %d", wlanNum) );
+@@ -295,7 +303,7 @@
}
int
@@ -37,7 +57,17 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
{
const char *athname;
struct net_device *dev;
-@@ -352,12 +358,7 @@
+@@ -329,7 +337,8 @@
+
+ switch (wlanNum) {
+ case AR531X_WLAN0_NUM:
+- if ((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) {
++ if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
++ ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ)) {
+ dev->irq = AR5315_IRQ_WLAN0_INTRS;
+ dev->mem_start = AR5315_WLAN0;
+ } else {
+@@ -352,12 +361,7 @@
goto bad3;
}
@@ -51,7 +81,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
goto bad4;
athname = ath_hal_probe(ATHEROS_VENDOR_ID, devid);
printk(KERN_INFO "%s: %s: mem=0x%lx, irq=%d\n",
-@@ -379,13 +380,55 @@
+@@ -379,24 +383,63 @@
return -ENODEV;
}
@@ -107,7 +137,9 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
if (!strcmp(sysType,"Atheros AR5315")) {
devid = (u_int16_t) (sysRegRead(AR5315_SREV) &
(AR5315_REV_MAJ_M | AR5315_REV_MIN_M));
-@@ -393,10 +436,6 @@
+- if ((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ)
++ if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
++ ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ))
return init_ath_wmac(devid, 0);
}
@@ -118,7 +150,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
devid = (u_int16_t) ((sysRegRead(AR531X_REV) >>8) &
(AR531X_REV_MAJ | AR531X_REV_MIN));
switch (devid) {
-@@ -420,6 +459,7 @@
+@@ -420,6 +463,7 @@
return 0;
}
@@ -126,7 +158,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
/*
* Module glue.
-@@ -460,13 +500,19 @@
+@@ -460,13 +504,19 @@
{
printk(KERN_INFO "%s: %s\n", dev_info, version);
@@ -146,7 +178,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
return 0;
}
module_init(init_ath_ahb);
-@@ -477,8 +523,13 @@
+@@ -477,8 +527,13 @@
#ifdef CONFIG_SYSCTL
ath_sysctl_unregister();
#endif
@@ -160,3 +192,45 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
printk(KERN_INFO "%s: driver unloaded\n", dev_info);
}
+diff -ur madwifi.old/ath/if_ath_ahb.h madwifi.dev/ath/if_ath_ahb.h
+--- madwifi.old/ath/if_ath_ahb.h 2006-12-22 03:57:28.000000000 +0100
++++ madwifi.dev/ath/if_ath_ahb.h 2006-12-22 04:07:47.000000000 +0100
+@@ -59,6 +59,7 @@
+ #define AR5315_SREV 0xb1000014
+
+ #define AR5315_REV_MAJ 0x0080
++#define AR5317_REV_MAJ 0x0090
+ #define AR5315_REV_MAJ_M 0x00f0
+ #define AR5315_REV_MAJ_S 4
+ #define AR5315_REV_MIN_M 0x000f
+diff -urN madwifi-0.9.2.old/ath/if_ath.c madwifi-0.9.2.dev/ath/if_ath.c
+--- madwifi-0.9.2.old/ath/if_ath.c 2006-08-29 20:38:48.000000000 +0200
++++ madwifi-0.9.2.dev/ath/if_ath.c 2006-08-29 20:38:48.000000000 +0200
+@@ -658,7 +658,10 @@
+ * 5211 minipci cards. Users can also manually enable/disable
+ * support with a sysctl.
+ */
+- sc->sc_softled = (devid == AR5212_DEVID_IBM || devid == AR5211_DEVID);
++ sc->sc_softled = ((devid == AR5212_DEVID_IBM) || (devid == AR5211_DEVID) ||
++ (devid == AR5212_AR2315_REV6) || (devid == AR5212_AR2315_REV7) ||
++ (devid == AR5212_AR2317_REV1) || (devid == AR5212_AR2317_REV2));
++
+ if (sc->sc_softled) {
+ ath_hal_gpioCfgOutput(ah, sc->sc_ledpin);
+ ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon);
+diff -urN madwifi-0.9.2.old/hal/ah_devid.h madwifi-0.9.2.dev/hal/ah_devid.h
+--- madwifi-0.9.2.old/hal/ah_devid.h 2006-02-11 13:04:39.000000000 +0100
++++ madwifi-0.9.2.dev/hal/ah_devid.h 2006-08-29 20:38:48.000000000 +0200
+@@ -68,9 +68,10 @@
+ #define AR5212_AR5312_REV2 0x0052 /* AR5312 WMAC (AP31) */
+ #define AR5212_AR5312_REV7 0x0057 /* AR5312 WMAC (AP30-040) */
+ #define AR5212_AR2313_REV8 0x0058 /* AR2313 WMAC (AP43-030) */
+-#define AR5212_AR2315_REV6 0x0086 /* AR2315 WMAC (AP51-Light) */
++#define AR5212_AR2315_REV6 0x0086 /* AR2315 WMAC (AP51-Lite) */
+ #define AR5212_AR2315_REV7 0x0087 /* AR2315 WMAC (AP51-Full) */
+-#define AR5212_AR2317_REV1 0x0091 /* AR2317 WMAC (AP61) */
++#define AR5212_AR2317_REV1 0x0090 /* AR2317 WMAC (AP61-Lite) */
++#define AR5212_AR2317_REV2 0x0091 /* AR2317 WMAC (AP61-Full) */
+
+ /* AR5212 compatible devid's also attach to 5212 */
+ #define AR5212_DEVID_0014 0x0014