diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-01-03 01:58:01 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-01-03 01:58:01 +0000 |
commit | c16de866d585eb25872732274d5109022193fed1 (patch) | |
tree | 147de1ffcec01ad83efa5ca17d804386368c7103 /package/switch/src/switch-adm.c | |
parent | 477d74b42bb34467481abab156f61345baf37681 (diff) | |
download | upstream-c16de866d585eb25872732274d5109022193fed1.tar.gz upstream-c16de866d585eb25872732274d5109022193fed1.tar.bz2 upstream-c16de866d585eb25872732274d5109022193fed1.zip |
switch: ROBO Switch Gigabit MII Support
I wrote this patch some time ago because I had a need for one of the
Gigabit ports (Linksys E3000) to be forced to 100FD. This is based
on the robocfg sources included w/ the RT-N16 sources from ASUS.
Since work is progressing on a BGMAC driver that could be included in
OpenWRT, this may be useful to someone else.
In testing, forcing the speed to 10/100 or 1000 worked fine; however,
when trying to force full-duplex mode, the result was always
half-duplex. I was not able to isolate the source of the problem
(this patch, driver or H/W limitation). The only way I could get it
to work was to set the port to Auto, but then only advertise 100FD
(not included in this patch).
I have a modified version of the robocfg package as well, I'd have to
clean it up a little first (remove the full-duplex hack) before
submitting it if there is interest.
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34992 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/switch/src/switch-adm.c')
-rw-r--r-- | package/switch/src/switch-adm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/switch/src/switch-adm.c b/package/switch/src/switch-adm.c index f21470ed53..2d0fcc35ab 100644 --- a/package/switch/src/switch-adm.c +++ b/package/switch/src/switch-adm.c @@ -386,7 +386,7 @@ static int handle_port_media_write(void *driver, char *buf, int nr) int media = switch_parse_media(buf); int reg = adm_rreg(0, port_conf[nr]); - if (media < 0) + if (media < 0 || media & SWITCH_MEDIA_1000) return -1; reg &= ~((1 << 1) | (1 << 2) | (1 << 3)); |