Add support support for Microsoft MN-700.
Signed-off-by: Jochen Friedrich <[email protected]>
---
package/broadcom-diag/src/diag.c | 22 ++++++++++++++++++-
.../linux/brcm-2.4/base-files/etc/init.d/netconfig | 6 +++++
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c
index 8f29624..7df009e 100644
--- a/package/broadcom-diag/src/diag.c
+++ b/package/broadcom-diag/src/diag.c
@@ -141,6 +141,9 @@ enum {
/* OvisLink */
WL1600GL,
+
+ /* Microsoft */
+ MN700,
};
static void __init bcm4780_init(void) {
@@ -868,6 +871,16 @@ static struct platform_t __initdata platforms[] = {
{ .name = "connected", .gpio = 1 << 0, .polarity =
REVERSE },
},
},
+ /* Microsoft */
+ [MN700] = {
+ .name = "Microsoft MN-700",
+ .buttons = {
+ { .name = "reset", .gpio = 1 << 7 },
+ },
+ .leds = {
+ { .name = "power", .gpio = 1 << 6, .polarity =
NORMAL },
+ },
+ },
};
static struct platform_t __init *platform_detect(void)
@@ -1027,8 +1040,13 @@ static struct platform_t __init *platform_detect(void)
if (simple_strtoul(boardnum, NULL, 0) == 2)
return &platforms[WAP54GV1];
}
- if (startswith(getvar("hardware_version"), "WL500-"))
- return &platforms[WL500G];
+ /* MN-700 has also hardware_version 'WL500-...', so use
boardnum */
+ if (startswith(getvar("hardware_version"), "WL500-")) {
+ if (!strcmp(getvar("boardnum"), "mn700"))
+ return &platforms[MN700];
+ else
+ return &platforms[WL500G];
+ }
if (startswith(getvar("hardware_version"), "WL300-")) {
/* Either WL-300g or WL-HDD, do more extensive checks */
if ((simple_strtoul(getvar("et0phyaddr"), NULL, 0) ==
0) &&
diff --git a/target/linux/brcm-2.4/base-files/etc/init.d/netconfig
b/target/linux/brcm-2.4/base-files/etc/init.d/netconfig
index d1e45e5..1aa5fab 100755
--- a/target/linux/brcm-2.4/base-files/etc/init.d/netconfig
+++ b/target/linux/brcm-2.4/base-files/etc/init.d/netconfig
@@ -111,6 +111,12 @@ start() {
c["wan_ifname"] = "eth1"
c["lan_ifname"] = "eth0"
}
+ if (model == "Microsoft MN-700") {
+ c["wan_ifname"] = "eth1"
+ c["lan_ifname"] = "eth0"
+ c["vlan0ports"] = ""
+ c["vlan1ports"] = ""
+ }
if (model == "ASUS WL-500g Premium V2") {
c["vlan0ports"] = "0 1 2 3 5*"
c["vlan1ports"] = "4 5"
--
1.6.6
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel