From fe65a521baca325225684749efe1684e5169ae02 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 3 Nov 2006 18:43:51 +0000 Subject: [PATCH] fix we800g hardware detection SVN-Revision: 5423 --- openwrt/target/linux/package/diag/src/diag.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openwrt/target/linux/package/diag/src/diag.c b/openwrt/target/linux/package/diag/src/diag.c index 695f56d6e4..4da257546b 100644 --- a/openwrt/target/linux/package/diag/src/diag.c +++ b/openwrt/target/linux/package/diag/src/diag.c @@ -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")))) { -- 2.30.2