ar71xx: add support for the devolo dLAN Hotspot
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
index 2fdc5381c2382ebb0b22a3e8ce5bda4c783b52f1..5b3e76f993127eccac7cd1a6b90a88d76974f188 100755 (executable)
@@ -37,8 +37,9 @@ wndr3700_board_detect() {
                machine="NETGEAR WNDR3700"
                ;;
        "33373031")
-               # Use awk to remove everything after the first zero byte
-               model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')"
+               model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c)"
+               # Use awk to remove everything unprintable
+               model_stripped="$(echo -n "$model" | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')"
                case $model in
                $'\xff'*)
                        if [ "${model:24:1}" = 'N' ]; then
@@ -48,14 +49,14 @@ wndr3700_board_detect() {
                        fi
                        ;;
                '29763654+16+64'*)
-                       machine="NETGEAR ${model:14}"
+                       machine="NETGEAR ${model_stripped:14}"
                        ;;
                '29763654+16+128'*)
-                       machine="NETGEAR ${model:15}"
+                       machine="NETGEAR ${model_stripped:15}"
                        ;;
                *)
                        # Unknown ID
-                       machine="NETGEAR $model"
+                       machine="NETGEAR ${model_stripped}"
                esac
        esac
 
@@ -122,7 +123,7 @@ tplink_board_detect() {
        "3C0002"*)
                model="MINIBOX_V1"
                ;;
-       "070300"*)
+       "070301"*)
                model="TP-Link TL-WR703N"
                ;;
        "071000"*)
@@ -359,6 +360,9 @@ ar71xx_board_detect() {
        *Antminer-S3)
                name="antminer-s3"
                ;;
+       *"Arduino Yun")
+               name="arduino-yun"
+               ;;
        *AP113)
                name="ap113"
                ;;
@@ -450,6 +454,9 @@ ar71xx_board_detect() {
        *"DIR-835 rev. A1")
                name="dir-835-a1"
                ;;
+       *"dLAN Hotspot")
+               name="dlan-hotspot"
+               ;;
        *"dLAN pro 500 Wireless+")
                name="dlan-pro-500-wp"
                ;;
@@ -835,6 +842,9 @@ ar71xx_board_detect() {
        *"TL-WR941N/ND v5")
                name="tl-wr941nd-v5"
                ;;
+       *"TL-WR941N/ND v6")
+               name="tl-wr941nd-v6"
+               ;;
        *"TL-WR703N v1")
                name="tl-wr703n"
                ;;