summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-12-11 17:54:49 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-12-12 13:45:37 +0100
commitfcf54f79d20dba62d481c33d6683e28cbcef9446 (patch)
tree7122613c2e8bc4c0d2079f11ab0268c36c0267ac /target
parentb305b8c38692e2345a6c580baf0b1eda929ce5d3 (diff)
downloadmtk-20170518-fcf54f79d20dba62d481c33d6683e28cbcef9446.zip
mtk-20170518-fcf54f79d20dba62d481c33d6683e28cbcef9446.tar.gz
mtk-20170518-fcf54f79d20dba62d481c33d6683e28cbcef9446.tar.bz2
ar71xx: simplify model detection for TP-Link Pharos devices
This also makes the detection more flexible, as it doesn't need to check for each model explicitly. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh21
1 files changed, 2 insertions, 19 deletions
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 7d30382..a543d3e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -350,27 +350,10 @@ tplink_pharos_get_model_string() {
tplink_pharos_board_detect() {
local model_string="$(tplink_pharos_get_model_string | tr -d '\r')"
local oIFS="$IFS"; IFS=":"; set -- $model_string; IFS="$oIFS"
- local model
- case "$1" in
- 'CPE210(TP-LINK|UN|N300-2)')
- model='TP-Link CPE210'
- ;;
- 'CPE220(TP-LINK|UN|N300-2)')
- model='TP-Link CPE220'
- ;;
- 'CPE510(TP-LINK|UN|N300-5)')
- model='TP-Link CPE510'
- ;;
- 'CPE520(TP-LINK|UN|N300-5)')
- model='TP-Link CPE520'
- ;;
- 'EAP120(TP-LINK|UN|N300-2)')
- model='TP-Link EAP120'
- ;;
- esac
+ local model="${1%%\(*}"
- [ -n "$model" ] && AR71XX_MODEL="$model v$2"
+ AR71XX_MODEL="TP-Link $model v$2"
}
gl_inet_board_detect() {