This patch fixes the board detection of the TL-MR3020.
The string *TL-MR3020 was searched which is wrong.
Now the correct string *"TL-MR3020 v1" is searched for.
The board name has also been modified from tl-mr3020 to tl-mr3020-v1 to reflect the correction revision. All strings have been updated in the other files which rely on the board name.

The LED behaviour has also been modified:
* The WPS LED is the diag LED now.
* A netdev trigger for the LAN LED has been added.

The profile of the TL-MR3020 has been updated because the needed package "kmod-ledtrig-usbdev" was missing which resulted in a non-working usbdev trigger for the 3G/USB LED.

Signed-off-by: Christian Cier-Zniewski <[email protected]>



Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/ar71xx.sh        (Revision 29875)
+++ target/linux/ar71xx/base-files/lib/ar71xx.sh        (Arbeitskopie)
@@ -256,8 +256,8 @@
        *"DIR-615 rev. C1")
                name="dir-615-c1"
                ;;
-       *TL-MR3020)
-               name="tl-mr3020"
+       *"TL-MR3020 v1")
+               name="tl-mr3020-v1"
                ;;
        *TL-MR3220)
                name="tl-mr3220"
Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh      (Revision 29875)
+++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh      (Arbeitskopie)
@@ -121,7 +121,7 @@
                }
                return 0
                ;;
-       tl-mr3020 | \
+       tl-mr3020-v1 | \
        tl-mr3220 | \
        tl-mr3420 | \
        tl-wa901nd | \
Index: target/linux/ar71xx/base-files/etc/uci-defaults/leds
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/leds        (Revision 29875)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/leds        (Arbeitskopie)
@@ -139,9 +139,10 @@
        set_led_netdev "port2" "port2" "om2p:blue:lan" "eth1"
        ;;
 
-tl-mr3020)
+tl-mr3020-v1)
        set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
        set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+       set_led_netdev "lan" "LAN" "tp-link:green:lan"  "eth0"
        ;;
 
 tl-mr3220 | \
Index: target/linux/ar71xx/base-files/etc/uci-defaults/network
===================================================================
--- target/linux/ar71xx/base-files/etc/uci-defaults/network     (Revision 29875)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/network     (Arbeitskopie)
@@ -110,7 +110,7 @@
 bullet-m |\
 eap7660d |\
 rb-411 |\
-tl-mr3020 |\
+tl-mr3020-v1 |\
 tl-wa901nd |\
 tl-wa901nd-v2 |\
 tl-wr703n |\
Index: target/linux/ar71xx/base-files/etc/diag.sh
===================================================================
--- target/linux/ar71xx/base-files/etc/diag.sh  (Revision 29875)
+++ target/linux/ar71xx/base-files/etc/diag.sh  (Arbeitskopie)
@@ -97,7 +97,9 @@
        tew-632brp)
                status_led="tew-632brp:green:status"
                ;;
-       tl-mr3020 | \
+       tl-mr3020-v1)
+               status_led="tp-link:green:wps"
+               ;;
        tl-mr3220 | \
        tl-mr3420 | \
        tl-wa901nd | \
Index: target/linux/ar71xx/generic/profiles/tp-link.mk
===================================================================
--- target/linux/ar71xx/generic/profiles/tp-link.mk     (Revision 29875)
+++ target/linux/ar71xx/generic/profiles/tp-link.mk     (Arbeitskopie)
@@ -7,7 +7,7 @@
 
 define Profile/TLMR3020
        NAME:=TP-LINK TL-MR3020
-       PACKAGES:=kmod-usb-core kmod-usb2
+       PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
 endef
 
 define Profile/TLMR3020/Description
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to