Fix reverse polarity on WGT634U (was : green while booting, amber when ready)
[openwrt-10.03/.git] / package / broadcom-diag / src / diag.c
index 5b9ff027f261e0cadbee804531df6dc9159f1167..2441ce9ddac972f9458f0a4c6feb36de2a2de4bd 100644 (file)
@@ -503,7 +503,7 @@ static struct platform_t __initdata platforms[] = {
                        { .name = "reset",      .gpio = 1 << 2 },
                },
                .leds           = {
-                       { .name = "power",      .gpio = 1 << 3, .polarity = REVERSE },
+                       { .name = "power",      .gpio = 1 << 3, .polarity = NORMAL },
                },
        },
        /* Trendware */
@@ -539,8 +539,11 @@ static struct platform_t __init *platform_detect(void)
        boardnum = getvar("boardnum");
        boardtype = getvar("boardtype");
 
-       if (strncmp(getvar("model_no"), "WL700",5) == 0) {
-               return &platforms[WL700GE]; }
+       if (strcmp(getvar("nvram_type"), "cfe") == 0)
+               return &platforms[WGT634U];
+       
+       if (strncmp(getvar("model_no"), "WL700",5) == 0)
+               return &platforms[WL700GE];
 
        if (strncmp(getvar("pmon_ver"), "CFE", 3) == 0) {
                /* CFE based - newer hardware */