aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-08-01 19:33:59 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-08-01 19:33:59 +0000
commit24880dbaa09b119533aea41acf15befa50e09975 (patch)
treedbd2a738a3c4b48083373e3a59eb34dacb2f3f83 /target/linux/brcm47xx
parent3a9a8aeb57551b2f3207e1038b321482ebd24415 (diff)
downloadmaster-187ad058-24880dbaa09b119533aea41acf15befa50e09975.tar.gz
master-187ad058-24880dbaa09b119533aea41acf15befa50e09975.tar.bz2
master-187ad058-24880dbaa09b119533aea41acf15befa50e09975.zip
brcm47xx: improve detection of Linksys WRTSL54GS
This closes #13319 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37647 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx')
-rw-r--r--target/linux/brcm47xx/patches-3.10/260-MIPS-BCM47XX-add-board-detection.patch17
-rw-r--r--target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch17
2 files changed, 30 insertions, 4 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/260-MIPS-BCM47XX-add-board-detection.patch b/target/linux/brcm47xx/patches-3.10/260-MIPS-BCM47XX-add-board-detection.patch
index cef3d527ed..ebc179ab1a 100644
--- a/target/linux/brcm47xx/patches-3.10/260-MIPS-BCM47XX-add-board-detection.patch
+++ b/target/linux/brcm47xx/patches-3.10/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,223 @@
+@@ -0,0 +1,235 @@
+#include <linux/export.h>
+#include <linux/string.h>
+#include <bcm47xx_board.h>
@@ -38,6 +38,11 @@
+ { {0}, 0},
+};
+
++static const struct bcm47xx_board_type_list bcm47xx_board_list_machine_name[] = {
++ {{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "WRTSL54GS",},
++ { {0}, 0},
++};
++
+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-",},
@@ -156,6 +161,13 @@
+ }
+ }
+
++ if (bcm47xx_nvram_getenv("machine_name", buf1, sizeof(buf1)) >= 0) {
++ for (e = bcm47xx_board_list_machine_name; e->value1; e++) {
++ 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 (strstarts(buf1, e->value1))
@@ -234,7 +246,7 @@
+EXPORT_SYMBOL(bcm47xx_board_get_name);
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -0,0 +1,91 @@
+@@ -0,0 +1,92 @@
+#ifndef __BCM47XX_BOARD_H
+#define __BCM47XX_BOARD_H
+
@@ -293,6 +305,7 @@
+ BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
+ BCM47XX_BOARD_LINKSYS_WRT610NV1,
+ BCM47XX_BOARD_LINKSYS_WRT610NV2,
++ BCM47XX_BOARD_LINKSYS_WRTSL54GS,
+
+ BCM47XX_BOARD_MOTOROLA_WE800G,
+ BCM47XX_BOARD_MOTOROLA_WR850GP,
diff --git a/target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch b/target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch
index 3149855bf4..74cd182b72 100644
--- a/target/linux/brcm47xx/patches-3.8/260-MIPS-BCM47XX-add-board-detection.patch
+++ b/target/linux/brcm47xx/patches-3.8/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,223 @@
+@@ -0,0 +1,235 @@
+#include <linux/export.h>
+#include <linux/string.h>
+#include <bcm47xx_board.h>
@@ -38,6 +38,11 @@
+ { {0}, 0},
+};
+
++static const struct bcm47xx_board_type_list bcm47xx_board_list_machine_name[] = {
++ {{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "WRTSL54GS",},
++ { {0}, 0},
++};
++
+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-",},
@@ -156,6 +161,13 @@
+ }
+ }
+
++ if (bcm47xx_nvram_getenv("machine_name", buf1, sizeof(buf1)) >= 0) {
++ for (e = bcm47xx_board_list_machine_name; e->value1; e++) {
++ 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 (strstarts(buf1, e->value1))
@@ -234,7 +246,7 @@
+EXPORT_SYMBOL(bcm47xx_board_get_name);
--- /dev/null
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -0,0 +1,91 @@
+@@ -0,0 +1,92 @@
+#ifndef __BCM47XX_BOARD_H
+#define __BCM47XX_BOARD_H
+
@@ -293,6 +305,7 @@
+ BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
+ BCM47XX_BOARD_LINKSYS_WRT610NV1,
+ BCM47XX_BOARD_LINKSYS_WRT610NV2,
++ BCM47XX_BOARD_LINKSYS_WRTSL54GS,
+
+ BCM47XX_BOARD_MOTOROLA_WE800G,
+ BCM47XX_BOARD_MOTOROLA_WR850GP,