From 4d1bd8cff837cb6668c385df1062cd1e0e3e3f42 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 19 Nov 2006 00:18:56 +0000 Subject: [PATCH] fix motorola we800g misdetection SVN-Revision: 5579 --- openwrt/target/linux/package/diag/src/diag.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/openwrt/target/linux/package/diag/src/diag.c b/openwrt/target/linux/package/diag/src/diag.c index f1812b2b55..027f408b2d 100644 --- a/openwrt/target/linux/package/diag/src/diag.c +++ b/openwrt/target/linux/package/diag/src/diag.c @@ -420,6 +420,13 @@ static struct platform_t __init *platform_detect(void) if (!strcmp(boardnum, "10496")) return &platforms[USR5461]; } else { /* PMON based - old stuff */ + if ((simple_strtoul(getvar("GemtekPmonVer"), NULL, 0) == 9) && + (simple_strtoul(getvar("et0phyaddr"), NULL, 0) == 30)) { + if (!strncmp(getvar("ModelId"),"WE800G", 6)) + return &platforms[WE800G]; + else + return &platforms[WR850GV1]; + } if (!strncmp(boardtype, "bcm94710dev", 11)) { if (!strcmp(boardnum, "42")) return &platforms[WRT54GV1]; @@ -441,14 +448,6 @@ static struct platform_t __init *platform_detect(void) /* unknown asus stuff, probably bcm4702 */ if (!strncmp(boardnum, "asusX", 5)) return &platforms[ASUS_4702]; - - if ((simple_strtoul(getvar("GemtekPmonVer"), NULL, 0) == 9) && - (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")))) { -- 2.30.2