diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-13 22:15:31 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-13 22:15:31 +0000 |
commit | e1523b5504fcc690ed26c0a5d60056b98e22ccf4 (patch) | |
tree | f7be99d443be32fcb60d6969d2d8a501a796dac2 /package/kernel/switch/files/switch.sh | |
parent | dd3f451d55a7c7983778e62c413fa050fcd226b0 (diff) | |
download | mtk-20170518-e1523b5504fcc690ed26c0a5d60056b98e22ccf4.zip mtk-20170518-e1523b5504fcc690ed26c0a5d60056b98e22ccf4.tar.gz mtk-20170518-e1523b5504fcc690ed26c0a5d60056b98e22ccf4.tar.bz2 |
switch: remove old switch driver
The switch driver is not used by brcm47xx any more and can be removed,
instead of this switch driver b53 is used now.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 38387
Diffstat (limited to 'package/kernel/switch/files/switch.sh')
-rw-r--r-- | package/kernel/switch/files/switch.sh | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/package/kernel/switch/files/switch.sh b/package/kernel/switch/files/switch.sh deleted file mode 100644 index 2563d41..0000000 --- a/package/kernel/switch/files/switch.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006-2010 OpenWrt.org - -setup_switch_hw() { - local dev="$1" - local enable reset evlan - - config_get_bool enable "$dev" enable 1 - config_get_bool evlan "$dev" enable_vlan 1 - config_get_bool reset "$dev" reset 1 - - local proc="/proc/switch/$dev" - [ -d "$proc" ] && { - ifconfig "$dev" up - echo "$reset" > "$proc/reset" - echo "$evlan" > "$proc/enable_vlan" - [ -f "$proc/enable" ] && echo "$enable" > "$proc/enable" - } - - local vlan - for vlan in `seq 0 15`; do - proc="/proc/switch/$dev/vlan/$vlan/ports" - [ -f "$proc" ] && echo "" > "$proc" - done -} - -setup_switch_vlan() { - local s="$1" - local dev vlan ports - - config_get dev "$s" device - config_get vlan "$s" vlan - config_get ports "$s" ports - - [ -n "$dev" ] && [ -n "$vlan" ] && { - ports="${ports%\*}" - - [ "$_vlan_pvid_set" = 1 ] || { - ports="$ports*" - _vlan_pvid_set=1 - } - - local proc="/proc/switch/$dev/vlan/$vlan/ports" - [ -f "$proc" ] && echo "$ports" > "$proc" - } -} - -setup_switch() { - _vlan_pvid_set=0 - config_load network - config_foreach setup_switch_hw switch - config_foreach setup_switch_vlan switch_vlan -} |