From e3a81c46a5b399e5579144aec5222d3c82055a63 Mon Sep 17 00:00:00 2001 From: hauke Date: Thu, 3 Jan 2013 01:58:01 +0000 Subject: 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34992 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/switch/src/switch-core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'package/switch/src/switch-core.h') diff --git a/package/switch/src/switch-core.h b/package/switch/src/switch-core.h index a2114cf92..7192f7b0f 100644 --- a/package/switch/src/switch-core.h +++ b/package/switch/src/switch-core.h @@ -8,6 +8,7 @@ #define SWITCH_MEDIA_AUTO 1 #define SWITCH_MEDIA_100 2 #define SWITCH_MEDIA_FD 4 +#define SWITCH_MEDIA_1000 8 typedef int (*switch_handler)(void *driver, char *buf, int nr); -- cgit v1.2.3 From d8af1489e0e3cbeba49897e8f6dee1572295dd43 Mon Sep 17 00:00:00 2001 From: hauke Date: Thu, 14 Feb 2013 12:36:52 +0000 Subject: switch: export name of device found via /proc git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35596 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/switch/src/switch-core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'package/switch/src/switch-core.h') diff --git a/package/switch/src/switch-core.h b/package/switch/src/switch-core.h index 7192f7b0f..cc520e493 100644 --- a/package/switch/src/switch-core.h +++ b/package/switch/src/switch-core.h @@ -4,6 +4,7 @@ #include #include #define SWITCH_MAX_BUFSZ 4096 +#define SWITCH_NAME_BUFSZ 16 #define SWITCH_MEDIA_AUTO 1 #define SWITCH_MEDIA_100 2 @@ -28,6 +29,7 @@ typedef struct { const switch_config *driver_handlers, *port_handlers, *vlan_handlers; void *data; void *priv; + char dev_name[SWITCH_NAME_BUFSZ]; } switch_driver; typedef struct { -- cgit v1.2.3