ramips: add user-space support for the Planex MZK-W300NH2 Router
authorGabor Juhos <juhosg@openwrt.org>
Sat, 29 Dec 2012 17:50:38 +0000 (17:50 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 29 Dec 2012 17:50:38 +0000 (17:50 +0000)
Signed-off-by: Samir Ibradžić <sibradzic@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/3077/
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34926

target/linux/ramips/base-files/etc/diag.sh
target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
target/linux/ramips/base-files/etc/uci-defaults/leds
target/linux/ramips/base-files/etc/uci-defaults/network
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh

index d189db518d3a89d220814b27ed08e9ea3427970f..af05aceded0f618190a9080cb9ff34b77957cb7c 100755 (executable)
@@ -122,6 +122,9 @@ get_status_led() {
        wr512-3gn)
                status_led="wr512:green:wps"
                ;;
+       mzk-w300nh2)
+               status_led="mzkw300nh2:green:power"
+               ;;
        ur-336un)
                status_led="ur336:green:wps"
                ;;
index 1a04e5af657834cddc02a1f69098e4d8fb57c29d..be6975c8094312ac24886b1f66e252b30d647471 100644 (file)
@@ -88,6 +88,7 @@ case "$FIRMWARE" in
        wli-tx4-ag300n | \
        wr512-3gn | \
        wr6202 | \
+       mzk-w300nh2 | \
        ur-336un | \
        xdxrn502j)
                rt2x00_eeprom_extract "factory" 0 272
index a37901743dcbc3b4fc3f0bd5d58b5d8318d07f83..b4dcdd1947aa0613d5880bb1559923b01f1dea31 100755 (executable)
@@ -69,6 +69,9 @@ case $board in
        mofi3500-3gn)
                set_usb_led "mofi3500-3gn:green:usb"
                ;;
+       mzk-w300nh2)
+               set_wifi_led "mzkw300nh2:amber:wlan"
+               ;;
        nw718)
                set_usb_led "nw718:amber:usb"
                ;;
index 5ab89e9d975c645174a1b58d3d40a62579f4ae88..598074bb1937268156b731ff4d37fe8dade6b28f 100755 (executable)
@@ -71,6 +71,13 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch0" "2" "0 6t"
                ;;
 
+       mzk-w300nh2)
+               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
+               ucidef_add_switch_vlan "switch0" "2" "4 6t"
+               ;;
+
        f5d8235-v1 | \
        f5d8235-v2 | \
        ur-336un)
@@ -145,6 +152,7 @@ ramips_setup_macs()
        bc2 | \
        broadway | \
        f5d8235-v1 | \
+       mzk-w300nh2 | \
        nw718 | \
        psr-680w | \
        rt-n15 | \
index 7e2bac454786a92dfc0fb4af23d1639de1731399..f411ab1fd058f3d7274566d4a8dbcfe7bcf41068 100644 (file)
@@ -9,6 +9,7 @@ preinit_set_mac_address() {
 
        case $(ramips_board_name) in
        3g-6200n |\
+       mzk-w300nh2 |\
        wl-330n |\
        wl-330n3g)
                mac=$(ramips_get_mac_binary factory 4)
index 42fcb646ce9b69ed9a908157f6b50519769aedab..0128717e3587b4993224009ded8d9ffaa1d61993 100755 (executable)
@@ -140,6 +140,9 @@ ramips_board_name() {
        *"Petatel PSR-680W"*)
                name="psr-680w"
                ;;
+       *"Planex MZK-W300NH2"*)
+               name="mzk-w300nh2"
+               ;;
        *"PWH2004")
                name="pwh2004"
                ;;
index d1ccf7eac171a1fa838a77ed110a330723073046..584e16410a47d0e7c6f1b36cf70877c88e6ff961 100755 (executable)
@@ -35,6 +35,7 @@ platform_check_image() {
        freestation5 | \
        hw550-3g | \
        mofi3500-3gn | \
+       mzk-w300nh2 | \
        nbg-419n | \
        nw718 | \
        omni-emb | \