Hello,
the original code in diag.c does not detect my WRT610N because it checks for
the nvram variable "wsc_modelname" which does not exist on my device. Several
CFE-Revisions exist which might be the cause that some models may have
"wsc_modelname" and others don't. It is also possible that the original
linksys-firmware creates that variable. However, I know for fact that on
CFE 4.175.64.16, a cleaned nvram does definitely not have that variable.
As a result, I added a check which works similar to the one of the WRT300N.
Also, I did double-check if "pmon_ver" actually is available during early init.
This patch is tested by me and works for trunk.
Signed-off-by: Christian Lachner <gladiac_at_gmail.com>
---
--- trunk/package/broadcom-diag/src/diag.c 2013-02-15 09:28:48.022049099
+0100
+++ trunk-newdiag/package/broadcom-diag/src/diag.c 2013-02-15
09:42:11.546546464 +0100
@@ -1055,7 +1055,15 @@ static struct platform_t __init *platfor
return &platforms[DIR330];
}
- /* Based on "wsc_modelname */
+ /*
+ * Based on "wsc_modelname"
+ * This method seems not to work on every model. Several CFE-Revisions
+ * exist which might be the cause that some models seem to have the
+ * nvram-variable "wsc_modelname" and others don't. It is also
+ * possible that the original linksys-firmware creates that variable.
+ * However, it is known that on CFE 4.175.64.16, a cleaned nvram does
+ * definitely not have that variable.
+ */
if ((buf = nvram_get("wsc_modelname"))) {
if (!strcmp(buf, "WRT610N"))
return &platforms[WRT610N];
@@ -1149,6 +1157,9 @@ static struct platform_t __init *platfor
if (!strcmp(boardtype, "0x478") &&
!strcmp(getvar("boot_hw_model"), "WRT300N") && !strcmp(getvar("boot_hw_ver"),
"1.1"))
return &platforms[WRT300NV11];
+ if (!strcmp(boardtype, "0x478") &&
!strcmp(getvar("boot_hw_model"), "WRT610N") && !strcmp(getvar("boot_hw_ver"),
"1.0"))
+ return &platforms[WRT610N];
+
if (!strcmp(boardtype, "0x478") &&
!strcmp(getvar("cardbus"), "1"))
return &platforms[WRT350N];
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel