diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-02-13 16:04:18 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-02-13 16:04:18 +0000 |
commit | 9d90fe15277634750310a67453cd2b98d486906f (patch) | |
tree | 21d010d96715f5e8b4929f2710b73d5755f2afff /package/switch | |
parent | 8e4b44416699772bc8ca77e8e9ddc1d0ec5a2620 (diff) | |
download | master-187ad058-9d90fe15277634750310a67453cd2b98d486906f.tar.gz master-187ad058-9d90fe15277634750310a67453cd2b98d486906f.tar.bz2 master-187ad058-9d90fe15277634750310a67453cd2b98d486906f.zip |
switch: improve robo_switch_enable()
This is based on a patch by jcharest and the Broadcom SDK.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35583 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/switch')
-rw-r--r-- | package/switch/src/switch-robo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch-robo.c index 0e39c8fe56..41f0c1826d 100644 --- a/package/switch/src/switch-robo.c +++ b/package/switch/src/switch-robo.c @@ -237,10 +237,14 @@ static int robo_switch_enable(void) return -EBUSY; } + /* No spanning tree for unmanaged mode */ last_port = (robo.devid == ROBO_DEVICE_ID_5398) ? - ROBO_PORT6_CTRL : ROBO_PORT3_CTRL; - for (i = ROBO_PORT0_CTRL; i < last_port + 1; i++) + ROBO_PORT7_CTRL : ROBO_PORT4_CTRL; + for (i = ROBO_PORT0_CTRL; i <= last_port; i++) robo_write16(ROBO_CTRL_PAGE, i, 0); + + /* No spanning tree on IMP port too */ + robo_write16(ROBO_CTRL_PAGE, ROBO_IM_PORT_CTRL, 0); } #ifdef CONFIG_BCM47XX |