[brcm-2.4] add support for OvisLink WL-1600GL
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 21 Jan 2010 23:48:23 +0000 (23:48 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 21 Jan 2010 23:48:23 +0000 (23:48 +0000)
SVN-Revision: 19262

package/broadcom-diag/Makefile
package/broadcom-diag/src/diag.c
package/nvram/files/nvram.init
target/linux/brcm-2.4/base-files/etc/init.d/netconfig

index deffaf6d29036da5a3c70c1a625449368171f29e..6c55dc3fedc413c3090885e6853d39ae20615c56 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=broadcom-diag
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 include $(INCLUDE_DIR)/package.mk
 
index fefd036c72b8c2b0d2f4016dd0f425c7c6fae1ab..8f296248bebf0ef44fdcfec79eda84fd4a7ad528 100644 (file)
@@ -138,6 +138,9 @@ enum {
 
        /* Askey */
        RT210W,
+
+       /* OvisLink */
+       WL1600GL,
 };
 
 static void __init bcm4780_init(void) {
@@ -852,6 +855,19 @@ static struct platform_t __initdata platforms[] = {
                        { .name = "power",      .gpio = 1 << 5, .polarity = REVERSE },
                },
        },
+       [WL1600GL] = {
+               .name           = "OvisLink WL-1600GL",
+               .buttons        = {
+                       { .name = "reset",      .gpio = 1 << 3 },
+                       { .name = "ses",        .gpio = 1 << 4 },
+               },
+               .leds           = {
+                       { .name = "power",      .gpio = 1 << 5, .polarity = REVERSE },
+                       { .name = "wps",        .gpio = 1 << 2, .polarity = REVERSE },
+                       { .name = "wlan",       .gpio = 1 << 1, .polarity = REVERSE },
+                       { .name = "connected",  .gpio = 1 << 0, .polarity = REVERSE },
+               },
+       },
 };
 
 static struct platform_t __init *platform_detect(void)
@@ -966,6 +982,10 @@ static struct platform_t __init *platform_detect(void)
                if (!strcmp(boardnum, "1024") && !strcmp(boardtype, "0x0446"))
                        return &platforms[WAP54GV2];
 
+               if (!strcmp(boardnum, "8") && !strcmp(boardtype, "0x048e"))
+                       return &platforms[WL1600GL];
+
+
                if (!strcmp(boardnum, "44") || !strcmp(boardnum, "44\r")) {
                        if (!strcmp(boardtype,"0x0101") || !strcmp(boardtype, "0x0101\r"))
                                return &platforms[TM2300V2]; /* Dell TrueMobile 2300 v2 */
index 75d712b59c062f8f64976cc2ae04bffc5731f745..9eae17fd8a805b1e6a152c84c9a3643eb7093733 100755 (executable)
@@ -74,5 +74,13 @@ start() {
                nvram set il0macaddr=$(nvram get et0macaddr|
                awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}')
        }
+
+       [ "$(nvram get et0macaddr)" = "00:90:4c:c0:00:08" ] && {
+               # OvisLink WL-1600GL mac workaround
+               nvram set et0macaddr=$(hexdump -n 6 -s 130976 -e '5/1 "%02x:" "%02x" ' /dev/mtd/0)
+               nvram set il0macaddr=$(nvram get et0macaddr|
+               awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}')
+       }
+
        [ "$COMMIT" = "1" ] && nvram commit
 }
index d63f17b124e0b35309f0956278c4c31eb47bf3d8..d1e45e5bb87a3b31a13ff652485d606a9df3f649 100755 (executable)
@@ -207,6 +207,12 @@ start() {
                        c["vlan0ports"] = "0 1 2 3 4 5u"
                        c["vlan1ports"] = ""
                }
+               if (model == "OvisLink WL-1600GL") {
+                       c["lan_ifname"] = "eth0.0"
+                       c["wan_ifname"] = "eth0.1"
+                       c["vlan0ports"] = "0 1 2 3 5*"
+                       c["vlan1ports"] = "4 5"
+               }
 
                if (c["vlan0ports"] || c["vlan1ports"]) {
                        print "#### VLAN configuration "