fix adm switch misdetection, which led to bogus button events that caused the system...
authorFelix Fietkau <nbd@openwrt.org>
Fri, 16 Nov 2007 03:11:09 +0000 (03:11 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 16 Nov 2007 03:11:09 +0000 (03:11 +0000)
SVN-Revision: 9555

package/broadcom-diag/src/diag.c
package/switch/src/switch-adm.c

index c7b3ead3633a690eb618bc7a1737386de7c2eea2..94ab384d306bda3823c3a0766e4c23bf5e205f6a 100644 (file)
@@ -738,7 +738,7 @@ static struct platform_t __init *platform_detect(void)
                return &platforms[WR850GV2V3];
        }
 
-       if (!strcmp(boardnum, "44")) {  /* Trendware TEW-411BRP+ */
+       if (!strcmp(boardnum, "44") && !strcmp(getvar("boardflags"),"0x0388")) {  /* Trendware TEW-411BRP+ */
                return &platforms[TEW411BRPP];
        }
 
index 0fb21ffaafa2888748dd7c7f7d529448d5f8ac49..8d5de04b48f9da2e97fa96b456e31bc35943298c 100644 (file)
@@ -500,13 +500,13 @@ static int detect_adm(void)
        int boardflags = atoi(nvram_get("boardflags"));
         int boardnum = atoi(nvram_get("boardnum"));
 
-        if (boardnum == 44) {   /* Trendware TEW-411BRP+ */
-                ret = 1;
+       if ((boardnum == 44) && (boardflags == 0x0388)) {  /* Trendware TEW-411BRP+ */
+               ret = 1;
 
-                eecs = get_gpiopin("adm_eecs", 2);
-                eesk = get_gpiopin("adm_eesk", 3);
-                eedi = get_gpiopin("adm_eedi", 4);
-                eerc = get_gpiopin("adm_rc", 5);
+               eecs = get_gpiopin("adm_eecs", 2);
+               eesk = get_gpiopin("adm_eesk", 3);
+               eedi = get_gpiopin("adm_eedi", 4);
+               eerc = get_gpiopin("adm_rc", 5);
 
        } else if ((boardflags & 0x80) || force) {
                ret = 1;