brcm47xx: do not use GPIO configuration of WRT54G for every unknown Linksys device
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 13 Sep 2013 16:00:52 +0000 (16:00 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 13 Sep 2013 16:00:52 +0000 (16:00 +0000)
Most of the Linksys devices without an own GPIO configuration where
detected as WRT54G. On one board this made OpenWrt to boot into
failsafe every time, because one GPIO configurated as button was not a
button.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 37970

package/kernel/broadcom-diag/src/diag.c

index 1d4a4b1180c899f580901a0d0cd718d22d611e55..f3f70504deb8569bb868b7b76f9bd3a9051075bf 100644 (file)
@@ -1176,8 +1176,9 @@ static struct platform_t __init *platform_detect_legacy(void)
                        if (!strcmp(boardtype, "0x0101") && !strcmp(getvar("boot_ver"), "v3.6"))
                                return &platforms[WRT54G3G];
 
-                       /* default to WRT54G */
-                       return &platforms[WRT54G];
+                       /* default to WRT54G if no boot_hw_model is set */
+                       if (nvram_get("boot_hw_model") == NULL)
+                               return &platforms[WRT54G];
                }
                if (!strcmp(boardnum, "1024") && !strcmp(boardtype, "0x0446"))
                        return &platforms[WAP54GV2];