[package] fix strange LED behavior with Netgear WGT634U (#3552)
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 20 Apr 2009 10:27:46 +0000 (10:27 +0000)
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 20 Apr 2009 10:27:46 +0000 (10:27 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15290 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index 1a5f46f..a9b881c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=kmod-switch
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=kmod-switch
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 
 
 include $(INCLUDE_DIR)/package.mk
 
index 5733d50..46abc94 100644 (file)
@@ -68,6 +68,9 @@
 #define bool int
 #endif
 
 #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) */
 /* Data structure for a Roboswitch device. */
 struct robo_switch {
        char *device;                   /* The device name string (ethX) */
@@ -271,8 +274,9 @@ static int robo_switch_enable(void)
                        robo_write16(ROBO_CTRL_PAGE, i, 0);
        }
 
                        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;
 }
 
        return 0;
 }
This page took 0.045485 seconds and 4 git commands to generate.