merge r15290 to 8.09
authorFlorian Fainelli <florian@openwrt.org>
Mon, 20 Apr 2009 10:29:43 +0000 (10:29 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 20 Apr 2009 10:29:43 +0000 (10:29 +0000)
SVN-Revision: 15291

package/switch/Makefile
package/switch/src/switch-robo.c

index 43a4ee24b6de97f390379c8ad25d1edf918bfa08..d97d84c22df5d1a3e4309b9e361e5ee0932bd185 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=kmod-switch
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
index 779b89f615dd2daa396f0111a4114785a8f5fefc..002aa042890432f0f30bb15fb4d149a65e582d4e 100644 (file)
@@ -67,6 +67,9 @@
 #define bool int
 #endif
 
+
+extern char *nvram_get(const char *name);
+
 /* Data structure for a Roboswitch device. */
 struct robo_switch {
        char *device;                   /* The device name string (ethX) */
@@ -270,8 +273,9 @@ static int robo_switch_enable(void)
                        robo_write16(ROBO_CTRL_PAGE, i, 0);
        }
 
-       /* WAN port LED */
-       robo_write16(ROBO_CTRL_PAGE, 0x16, 0x1F);
+       /* WAN port LED, except for Netgear WGT634U */
+       if (strcmp(nvram_get("nvram_type"), "cfe"))
+               robo_write16(ROBO_CTRL_PAGE, 0x16, 0x1F);
 
        return 0;
 }