add WRT300N v1.1 support (patch from #6379)
authorFelix Fietkau <nbd@openwrt.org>
Thu, 24 Dec 2009 10:58:09 +0000 (10:58 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 24 Dec 2009 10:58:09 +0000 (10:58 +0000)
SVN-Revision: 18921

package/broadcom-diag/src/diag.c
target/linux/brcm-2.4/base-files/etc/init.d/netconfig
target/linux/brcm-2.4/image/Makefile
target/linux/brcm-2.4/profiles/WRT300Nv11.mk [new file with mode: 0644]

index 89af0f7fc00f03a567c22f5c1ae14ebac0046cb1..0b59ab12cfebddae3a4dad40271183ce48984e7b 100644 (file)
@@ -61,6 +61,7 @@ enum {
        WRTSL54GS,
        WRT54G3G,
        WRT160N,
+       WRT300NV11,
        WRT350N,
        WRT600N,
        WRT600NV11,
@@ -255,6 +256,19 @@ static struct platform_t __initdata platforms[] = {
                        { .name = "ses_orange", .gpio = 1 << 3, .polarity = REVERSE },
                },
        },
+       [WRT300NV11] = {
+               .name           = "Linksys WRT300N V1.1",
+               .buttons        = {
+                       { .name = "reset",     .gpio = 1 << 6 }, // "Reset" on back panel
+                       { .name = "ses",       .gpio = 1 << 4 }, // "Reserved" on top panel
+               },
+               .leds           = {
+                       { .name = "power",     .gpio = 1 << 1, .polarity = NORMAL  }, // "Power"
+                       { .name = "ses_amber", .gpio = 1 << 3, .polarity = REVERSE }, // "Security" Amber
+                       { .name = "ses_green", .gpio = 1 << 5, .polarity = REVERSE }, // "Security" Green
+               },
+               .platform_init = bcm57xx_init,
+       },
        [WRT350N] = {
                .name           = "Linksys WRT350N",
                .buttons        = {
@@ -886,6 +900,9 @@ static struct platform_t __init *platform_detect(void)
        if (startswith(getvar("pmon_ver"), "CFE")) {
                /* CFE based - newer hardware */
                if (!strcmp(boardnum, "42")) { /* Linksys */
+                       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("cardbus"), "1"))
                                return &platforms[WRT350N];
 
index 638f664bef322ceffc4ad278d294d08e06f55462..d63f17b124e0b35309f0956278c4c31eb47bf3d8 100755 (executable)
@@ -164,8 +164,10 @@ start() {
                        c["lan_ifname"] = "eth0"
                        c["wan_ifname"] = "eth1"
                }
-               if (nvram["boardtype"] == "0x478") {
-                       # generic broadcom 4785 processor with 5397 switch?
+               # generic broadcom 4705/4785 processor with 5397 switch?
+               #  EXCEPT Linksys WRT300N V1.1
+               if ((nvram["boardtype"] == "0x478") && \
+                   (model != "Linksys WRT300N V1.1")) {
                        c["vlan0ports"] = "1 2 3 4 8*"
                        c["vlan1ports"] = "0 8"
                }
index 39570200afb43f21e54af85674e02e138c8b5bd6..3dad1cee7098d3480351b10eec84a56746d15984 100644 (file)
@@ -68,7 +68,8 @@ define Image/Build/jffs2-64k
        $(call Image/Build/CyberTAN,$(1),wrt54g,W54G,4.71.1,$(patsubst jffs2-%,jffs2,$(1)))
        $(call Image/Build/CyberTAN,$(1),wrt54gs_v4,W54s,1.09.1,$(patsubst jffs2-%,jffs2,$(1)))
        $(call Image/Build/CyberTAN,$(1),wrt150n,N150,1.51.3,$(patsubst jffs2-%,jffs2,$(1)))
-       $(call Image/Build/CyberTAN,$(1),wrt300n_v1,EWCB,1.51.2,$(patsubst jffs2-%,jffs2,$(1)))
+       $(call Image/Build/CyberTAN,$(1),wrt300n_v1,EWCB,1.03.6,$(patsubst jffs2-%,jffs2,$(1)))
+       $(call Image/Build/CyberTAN,$(1),wrt300n_v11,EWC2,1.51.2,$(patsubst jffs2-%,jffs2,$(1)))
        $(call Image/Build/CyberTAN,$(1),wrt350n_v1,EWCG,1.04.1,$(patsubst jffs2-%,jffs2,$(1)))
        $(call Image/Build/Motorola,$(1),wa840g,2,$(patsubst jffs2-%,jffs2,$(1)))
        $(call Image/Build/Motorola,$(1),we800g,3,$(patsubst jffs2-%,jffs2,$(1)))
diff --git a/target/linux/brcm-2.4/profiles/WRT300Nv11.mk b/target/linux/brcm-2.4/profiles/WRT300Nv11.mk
new file mode 100644 (file)
index 0000000..dddcd14
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006-2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/WRT300Nv11
+  NAME:=Linksys WRT300N v1.1
+  PACKAGES:=kmod-brcm-wl-mimo wlc nas kmod-wlcompat kmod-brcm-57xx
+endef
+
+define Profile/WRT300Nv11/Description
+       Package set optimized for the WRT300N v1.1
+endef
+$(eval $(call Profile,WRT300Nv11))
+