aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-02-04 22:49:05 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-02-04 22:49:05 +0000
commit02055dcc39f2dee9d9c11937473ea58e446ef68b (patch)
tree530a1cb0f3e45dc212e81a95c8017a81e67e47ca
parent34e787e2f1a34bee7bec41e2dd4c5f69f2d96d3e (diff)
downloadupstream-02055dcc39f2dee9d9c11937473ea58e446ef68b.tar.gz
upstream-02055dcc39f2dee9d9c11937473ea58e446ef68b.tar.bz2
upstream-02055dcc39f2dee9d9c11937473ea58e446ef68b.zip
brcm47xx: fix detection of Asus RT-N16
This fixes #12936. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35492 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch7
1 files changed, 4 insertions, 3 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch b/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
index 06dbd0216a..18a3b1afec 100644
--- a/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
+++ b/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
@@ -8,7 +8,7 @@
obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
--- /dev/null
+++ b/arch/mips/bcm47xx/board.c
-@@ -0,0 +1,218 @@
+@@ -0,0 +1,219 @@
+#include <linux/export.h>
+#include <linux/string.h>
+#include <bcm47xx_board.h>
@@ -39,6 +39,7 @@
+};
+
+static const struct bcm47xx_board_type_list bcm47xx_board_list_hardware_version[] = {
++ {{BCM47XX_BOARD_ASUS_RTN16, "Asus RT-N16"}, "RT-N16-",},
+ {{BCM47XX_BOARD_ASUS_WL330GE, "Asus WL330GE"}, "WL330GE-",},
+ {{BCM47XX_BOARD_ASUS_WL500GPV1, "Asus WL500GPV1"}, "WL500gp-",},
+ {{BCM47XX_BOARD_ASUS_WL500GPV2, "Asus WL500GPV2"}, "WL500GPV2-",},
@@ -148,14 +149,14 @@
+
+ if (bcm47xx_nvram_getenv("model_no", buf1, sizeof(buf1)) >= 0) {
+ for (e = bcm47xx_board_list_model_no; e->value1; e++) {
-+ if (!strcmp(buf1, e->value1))
++ if (strstarts(buf1, e->value1))
+ return &e->board;
+ }
+ }
+
+ if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0) {
+ for (e = bcm47xx_board_list_hardware_version; e->value1; e++) {
-+ if (!strcmp(buf1, e->value1))
++ if (strstarts(buf1, e->value1))
+ return &e->board;
+ }
+ }