All TP-LINK machine names begin with "TP-LINK", so there's no need to check for
more specific model names. This also allows adding new models like the Archer
series more easily.

Signed-off-by: Matthias Schiffer <mschif...@universe-factory.net>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1e96b6d..d26ac3d 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -744,11 +744,7 @@ ar71xx_board_detect() {
                ;;
        esac
 
-       case "$machine" in
-       *TL-WR* | *TL-WA* | *TL-MR* | *TL-WD*)
-               tplink_board_detect "$machine"
-               ;;
-       esac
+       [ "${machine:0:8}" = 'TP-LINK ' ] && tplink_board_detect "$machine"
 
        [ -z "$name" ] && name="unknown"
 
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to