X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/66f1d0c29bc2bcf9ae98b7c7287573fd816d3e4b..680764b28fdbbaae921ac89a033f30fffa948791:/target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch?ds=sidebyside diff --git a/target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch b/target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch index 3da85ce98..42b64584d 100644 --- a/target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch +++ b/target/linux/linux-2.4/patches/ar7/003-net_driver_cpmac.patch @@ -2902,7 +2902,7 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/cpmac.c linux.dev/drivers/net/av + /* OS Needs to supply CORRECT frequency */ + if(cpmac_ci_strcmp(action, "Get") == 0 && value != NULL) + { -+ *(unsigned int *)value = CONFIG_AR7_SYS_FREQUENCY * 1000 * 1000; ++ *(unsigned int *)value = CONFIG_AR7_SYS * 1000 * 1000; + ret_val = 0; + } + } @@ -2921,7 +2921,7 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/cpmac.c linux.dev/drivers/net/av + /* For Sangam MdioBusFreq is off the PBUS */ + if(cpmac_ci_strcmp(action, "Get") == 0 && value != NULL) + { -+ *(unsigned int *)value = CONFIG_AR7_SYS_FREQUENCY * 1000 * 1000; ++ *(unsigned int *)value = CONFIG_AR7_SYS * 1000 * 1000; + ret_val = 0; + } + } @@ -3143,7 +3143,7 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/cpmac.c linux.dev/drivers/net/av + int instance_count = CONFIG_MIPS_CPMAC_PORTS; + + //cpmac_cpu_freq = avalanche_clkc_get_freq(CLKC_MIPS); -+ cpmac_cpu_freq = CONFIG_AR7_CPU_FREQUENCY * 1000 * 1000; ++ cpmac_cpu_freq = CONFIG_AR7_CPU * 1000 * 1000; + + build_psp_config(); + @@ -3736,6 +3736,8 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/cpmacHalLx.c linux.dev/drivers/n +#include +#include + ++#include ++ +#include "cpmacHalLx.h" +#include "cpmac.h" + @@ -3743,8 +3745,6 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/cpmacHalLx.c linux.dev/drivers/n +#include "psp_config_parse.h" +#include "psp_config_mgr.h" + -+/* Probe Debug Section*/ -+ +/* debug */ +extern int cpmac_debug_mode; +#define dbgPrint if (cpmac_debug_mode) printk @@ -11171,7 +11171,7 @@ diff -urN linux.old/drivers/net/avalanche_cpmac/psp_config_build.c linux.dev/dri + unsigned int j= 0, detected_phy_map = 0, auto_select = SELECT_INT_PHY_MAC; + + *reset_cntl |= (1 << AVALANCHE_MDIO_RESET_BIT) | (1 << AVALANCHE_LOW_CPMAC_RESET_BIT) | (1 << AVALANCHE_HIGH_CPMAC_RESET_BIT) | (1 << AVALANCHE_LOW_EPHY_RESET_BIT); -+ *mdio_cntl = (1 << 30) | ((CONFIG_AR7_SYS_FREQUENCY * 1000)/2200); ++ *mdio_cntl = (1 << 30) | ((CONFIG_AR7_SYS * 1000)/2200); + + for(j=0;j < 300000; j++) + { @@ -13317,3 +13317,25 @@ diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile # link order important here # obj-$(CONFIG_PLIP) += plip.o +--- linux.old/drivers/net/avalanche_cpmac/cpmac.c 2005-08-25 10:56:33.702931008 +0200 ++++ linux.dev/drivers/net/avalanche_cpmac/cpmac.c 2005-08-25 11:08:45.027451520 +0200 +@@ -2158,17 +2158,16 @@ + CPMAC_PRIVATE_INFO_T *p_cpmac_priv = p_dev->priv; + CPMAC_DRV_HAL_INFO_T *p_drv_hal = p_cpmac_priv->drv_hal; + struct sk_buff *p_skb = fragList[0].OsInfo; +- p_skb->len = fragList[0].len; + + /* invalidate the cache. */ + dma_cache_inv((unsigned long)p_skb->data, fragList[0].len); + #ifdef CPMAC_TEST +- xdump(p_skb->data, p_skb->len, "recv"); ++ xdump(p_skb->data, fragList[0].len, "recv"); + #endif + #ifdef CPMAC_8021Q_SUPPORT + /* 802.1q stuff, just does the basic checking here. */ + if(!p_cpmac_priv->enable_802_1q && +- p_skb->len > TCI_END_OFFSET && ++ fragList[0].len > TCI_END_OFFSET && + IS_802_1Q_FRAME(p_skb->data + TPID_START_OFFSET)) + { + goto cpmac_hal_recv_frame_mismatch;