summaryrefslogtreecommitdiff
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-12-29 17:50:38 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-12-29 17:50:38 +0000
commit8b1ac2ae372219d602e5c52ddfde3149e7a65dfd (patch)
treef4ce87befc2477d30b840b7252f014ae19e89eb6 /target/linux/ramips
parentd6d06aceb0afee15594ed25a3ffd58fb7d5f4a19 (diff)
downloadmtk-20170518-8b1ac2ae372219d602e5c52ddfde3149e7a65dfd.zip
mtk-20170518-8b1ac2ae372219d602e5c52ddfde3149e7a65dfd.tar.gz
mtk-20170518-8b1ac2ae372219d602e5c52ddfde3149e7a65dfd.tar.bz2
ramips: add user-space support for the Planex MZK-W300NH2 Router
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
Diffstat (limited to 'target/linux/ramips')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/diag.sh3
-rw-r--r--target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom1
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/leds3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/network8
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac1
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh1
7 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index d189db5..af05ace 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -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"
;;
diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 1a04e5a..be6975c 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -88,6 +88,7 @@ case "$FIRMWARE" in
wli-tx4-ag300n | \
wr512-3gn | \
wr6202 | \
+ mzk-w300nh2 | \
ur-336un | \
xdxrn502j)
rt2x00_eeprom_extract "factory" 0 272
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/leds b/target/linux/ramips/base-files/etc/uci-defaults/leds
index a379017..b4dcdd1 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/leds
@@ -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"
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/network b/target/linux/ramips/base-files/etc/uci-defaults/network
index 5ab89e9..598074b 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/network
@@ -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 | \
diff --git a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
index 7e2bac4..f411ab1 100644
--- a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
+++ b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
@@ -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)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 42fcb64..0128717 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -140,6 +140,9 @@ ramips_board_name() {
*"Petatel PSR-680W"*)
name="psr-680w"
;;
+ *"Planex MZK-W300NH2"*)
+ name="mzk-w300nh2"
+ ;;
*"PWH2004")
name="pwh2004"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index d1ccf7e..584e164 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -35,6 +35,7 @@ platform_check_image() {
freestation5 | \
hw550-3g | \
mofi3500-3gn | \
+ mzk-w300nh2 | \
nbg-419n | \
nw718 | \
omni-emb | \