X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e7448c7a3c73f1f4cad621b1491d9349d6e53cbb..9c1ef4da062c4e947bd02d6132d18974befeb6e0:/package/switch/src/switch-adm.c?ds=sidebyside diff --git a/package/switch/src/switch-adm.c b/package/switch/src/switch-adm.c index 0fb21ffaa..1f913a65b 100644 --- a/package/switch/src/switch-adm.c +++ b/package/switch/src/switch-adm.c @@ -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; @@ -524,9 +524,8 @@ static int detect_adm(void) eedi = 5; ret = 1; - } else - printk("BFL_ENETADM not set in boardflags. Use force=1 to ignore.\n"); - + } + if (eecs) eecs = (1 << eecs); if (eesk)