diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-09-15 00:03:22 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-09-15 00:03:22 +0200 |
commit | 21e43093670b22302fc4d7166544290498a991b4 (patch) | |
tree | 4010e5b2880163890a1014becff925a8d5a7d084 /target/linux/mediatek/base-files/usr/sbin/switch-llllw.sh | |
parent | de1230ab3be91cea8e4a51211b0d1ce24cc85d81 (diff) | |
download | mtk-20170518-21e43093670b22302fc4d7166544290498a991b4.zip mtk-20170518-21e43093670b22302fc4d7166544290498a991b4.tar.gz mtk-20170518-21e43093670b22302fc4d7166544290498a991b4.tar.bz2 |
target/linux/mediatek: add all base-files
Diffstat (limited to 'target/linux/mediatek/base-files/usr/sbin/switch-llllw.sh')
-rwxr-xr-x | target/linux/mediatek/base-files/usr/sbin/switch-llllw.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/mediatek/base-files/usr/sbin/switch-llllw.sh b/target/linux/mediatek/base-files/usr/sbin/switch-llllw.sh new file mode 100755 index 0000000..d09812d --- /dev/null +++ b/target/linux/mediatek/base-files/usr/sbin/switch-llllw.sh @@ -0,0 +1,42 @@ +#!/bin/sh + + echo "restore GSW to dump switch mode" + #port matrix mode + switch reg w 2004 ff0000 #port0 + switch reg w 2104 ff0000 #port1 + switch reg w 2204 ff0000 #port2 + switch reg w 2304 ff0000 #port3 + switch reg w 2404 ff0000 #port4 + switch reg w 2504 ff0000 #port5 + switch reg w 2604 ff0000 #port6 + switch reg w 2704 ff0000 #port7 + + #LAN/WAN ports as transparent mode + switch reg w 2010 810000c0 #port0 + switch reg w 2110 810000c0 #port1 + switch reg w 2210 810000c0 #port2 + switch reg w 2310 810000c0 #port3 + switch reg w 2410 810000c0 #port4 + switch reg w 2510 810000c0 #port5 + switch reg w 2610 810000c0 #port6 + switch reg w 2710 810000c0 #port7 + + #clear mac table if vlan configuration changed + switch clear + switch vlan clear + + + #VLAN member port + switch vlan set 1 1 11110011 + switch vlan set 2 2 00001100 + #set PVID + switch pvid 4 2 + switch pvid 5 2 + #LAN/WAN ports as security mode + switch reg w 2004 ff0003 #port0 + switch reg w 2104 ff0003 #port1 + switch reg w 2204 ff0003 #port2 + switch reg w 2304 ff0003 #port3 + switch reg w 2404 ff0003 #port4 + switch reg w 2504 ff0003 #port5 + switch reg w 2604 ff0003 #port6
\ No newline at end of file |