ar71xx: add Abicom SC300M support
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
index c27cd136b01224786c79f6e2620db6000483a885..fb8997fe89fb7ba7483d6ee298942a28b87dc8a7 100755 (executable)
@@ -250,6 +250,9 @@ tplink_board_detect() {
        "090100"*)
                model="TP-Link TL-WA901N/ND"
                ;;
+       "094000"*)
+               model="TP-Link TL-WR940N"
+               ;;
        "094100"*)
                if [ "$hwid" = "09410002" -a "$mid" = "00420001" ]; then
                        model="Rosewill RNX-N360RT"
@@ -350,27 +353,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() {
@@ -435,9 +421,6 @@ ar71xx_board_detect() {
        *"Arduino Yun")
                name="arduino-yun"
                ;;
-       *AP113)
-               name="ap113"
-               ;;
        *"AP121 reference board")
                name="ap121"
                ;;
@@ -465,12 +448,6 @@ ar71xx_board_detect() {
        *"AP152 reference board")
                name="ap152"
                ;;
-       *AP81)
-               name="ap81"
-               ;;
-       *AP83)
-               name="ap83"
-               ;;
        *AP90Q)
                name="ap90q"
                ;;
@@ -533,6 +510,14 @@ ar71xx_board_detect() {
        *CPE870)
                name="cpe870"
                ;;
+       *WBS210)
+               name="wbs210"
+               tplink_pharos_board_detect
+               ;;
+       *WBS510)
+               name="wbs510"
+               tplink_pharos_board_detect
+               ;;
        *CR3000)
                name="cr3000"
                ;;
@@ -603,6 +588,9 @@ ar71xx_board_detect() {
        *"DW33D")
                name="dw33d"
                ;;
+       *E2100L)
+               name="e2100l"
+               ;;
        *"EAP120")
                name="eap120"
                tplink_pharos_board_detect
@@ -787,12 +775,12 @@ ar71xx_board_detect() {
        *"PB44 reference board")
                name="pb44"
                ;;
-       *PB92)
-               name="pb92"
-               ;;
        *"Qihoo 360 C301")
                name="qihoo-c301"
                ;;
+       *"RE450")
+               name="re450"
+               ;;
        *"RouterBOARD 411/A/AH")
                name="rb-411"
                ;;
@@ -847,6 +835,9 @@ ar71xx_board_detect() {
        *"RouterBOARD 912UAG-5HPnD")
                name="rb-912uag-5hpnd"
                ;;
+       *"RouterBOARD 941-2nD")
+               name="rb-941-2nd"
+               ;;
        *"RouterBOARD 951G-2HnD")
                name="rb-951g-2hnd"
                ;;
@@ -893,6 +884,9 @@ ar71xx_board_detect() {
        *RW2458N)
                name="rw2458n"
                ;;
+       *SC300M)
+               name="sc300m"
+               ;;
        *"SMART-300")
                name="smart-300"
                ;;
@@ -932,6 +926,9 @@ ar71xx_board_detect() {
        *"TL-WR1043ND v2")
                name="tl-wr1043nd-v2"
                ;;
+       *"TL-WR1043ND v4")
+               name="tl-wr1043nd-v4"
+               ;;
        *TL-WR2543N*)
                name="tl-wr2543n"
                ;;
@@ -1055,6 +1052,9 @@ ar71xx_board_detect() {
        *"TL-WR941N/ND v6")
                name="tl-wr941nd-v6"
                ;;
+       *"TL-WR940N v4")
+               name="tl-wr940n-v4"
+               ;;
        *"TL-WR703N v1")
                name="tl-wr703n"
                ;;