fix we800g hardware detection
authorFelix Fietkau <nbd@openwrt.org>
Fri, 3 Nov 2006 18:43:51 +0000 (18:43 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 3 Nov 2006 18:43:51 +0000 (18:43 +0000)
SVN-Revision: 5423

openwrt/target/linux/package/diag/src/diag.c

index 695f56d6e440a8fb4da606b403ee379447975313..4da257546b3523adf11e0e35aef5501446f49919 100644 (file)
@@ -516,11 +516,12 @@ static struct platform_t __init *platform_detect(void)
                        return &platforms[ASUS_4702];
 
                if ((simple_strtoul(getvar("GemtekPmonVer"), NULL, 0) == 9) &&
-                       (simple_strtoul(getvar("et0phyaddr"), NULL, 0) == 30) &&
-                       (!strncmp(getvar("ModelId"),"WE800G", 6)))
-                       return &platforms[WR850GV1];
-               else
-                       return &platforms[WE800G];
+                       (simple_strtoul(getvar("et0phyaddr"), NULL, 0) == 30)) {
+                       if (!strncmp(getvar("ModelId"),"WE800G", 6))
+                               return &platforms[WE800G];
+                       else
+                               return &platforms[WR850GV1];
+               }
        }
 
        if ((buf = (nvram_get("melco_id") ?: nvram_get("buffalo_id")))) {