diff options
Diffstat (limited to 'target/linux/mediatek/patches/1015-switch-vlan.patch')
-rw-r--r-- | target/linux/mediatek/patches/1015-switch-vlan.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches/1015-switch-vlan.patch b/target/linux/mediatek/patches/1015-switch-vlan.patch new file mode 100644 index 0000000..5b86a50 --- /dev/null +++ b/target/linux/mediatek/patches/1015-switch-vlan.patch @@ -0,0 +1,71 @@ +Index: linux-3.10.20/drivers/net/raeth/raether.c +=================================================================== +--- linux-3.10.20.orig/drivers/net/raeth/raether.c ++++ linux-3.10.20/drivers/net/raeth/raether.c +@@ -5738,21 +5738,26 @@ void LANWANPartition(void) + mii_mgr_write(31, 0x2204, 0xff0003);//port2 + mii_mgr_write(31, 0x2304, 0xff0003);//port3 + mii_mgr_write(31, 0x2404, 0xff0003);//port4 ++ mii_mgr_write(31, 0x2504, 0xff0003);//port5 ++ mii_mgr_write(31, 0x2604, 0xff0003);//port6 + + /*set PVID*/ + mii_mgr_write(31, 0x2014, 0x10002);//port0 ++ /* + mii_mgr_write(31, 0x2114, 0x10001);//port1 + mii_mgr_write(31, 0x2214, 0x10001);//port2 + mii_mgr_write(31, 0x2314, 0x10001);//port3 + mii_mgr_write(31, 0x2414, 0x10001);//port4 +- /*port6 */ ++ */ ++ mii_mgr_write(31, 0x2514, 0x10001);//port5 ++ + /*VLAN member*/ + IsSwitchVlanTableBusy(); +- mii_mgr_write(31, 0x94, 0x407e0001);//VAWD1 ++ mii_mgr_write(31, 0x94, 0x40de0001);//VAWD1 + mii_mgr_write(31, 0x90, 0x80001001);//VTCR, VID=1 + IsSwitchVlanTableBusy(); + +- mii_mgr_write(31, 0x94, 0x40610001);//VAWD1 ++ mii_mgr_write(31, 0x94, 0x40210001);//VAWD1 + mii_mgr_write(31, 0x90, 0x80001002);//VTCR, VID=2 + IsSwitchVlanTableBusy(); + #endif +@@ -5765,20 +5770,25 @@ void LANWANPartition(void) + mii_mgr_write(31, 0x2204, 0xff0003);//port2 + mii_mgr_write(31, 0x2304, 0xff0003);//port3 + mii_mgr_write(31, 0x2404, 0xff0003);//port4 ++ mii_mgr_write(31, 0x2504, 0xff0003);//port5 ++ mii_mgr_write(31, 0x2604, 0xff0003);//port6 + + /*set PVID*/ + mii_mgr_write(31, 0x2014, 0x10001);//port0 ++ /* + mii_mgr_write(31, 0x2114, 0x10001);//port1 + mii_mgr_write(31, 0x2214, 0x10001);//port2 + mii_mgr_write(31, 0x2314, 0x10001);//port3 + mii_mgr_write(31, 0x2414, 0x10002);//port4 ++ */ ++ mii_mgr_write(31, 0x2514, 0x10002);//port5 + + /*VLAN member*/ + IsSwitchVlanTableBusy(); +- mii_mgr_write(31, 0x94, 0x404f0001);//VAWD1 ++ mii_mgr_write(31, 0x94, 0x40cf0001);//VAWD1 + mii_mgr_write(31, 0x90, 0x80001001);//VTCR, VID=1 + IsSwitchVlanTableBusy(); +- mii_mgr_write(31, 0x94, 0x40500001);//VAWD1 ++ mii_mgr_write(31, 0x94, 0x40300001);//VAWD1 + mii_mgr_write(31, 0x90, 0x80001002);//VTCR, VID=2 + IsSwitchVlanTableBusy(); + #endif +@@ -6040,7 +6050,7 @@ void setup_internal_gsw(void) + #endif + + +- LANWANPartition(); ++ LANWANPartition(); + mt7530_phy_setting(); + for(i=0;i<=4;i++) + { |