X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Flib%2Far71xx.sh;h=fb375a5e159fa14d80c2bd8bd3d0ad80ac9013a9;hp=4eed64b6fc9ebeb92c86ff66e5af698be222bda2;hb=a71a8955f20e3c3ac13323072a70362f3c9d80fd;hpb=d2c9b169b3a3c43e66648590a9d0f1a12becebcf diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 4eed64b6fc..fb375a5e15 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -64,6 +64,39 @@ wndr3700_board_detect() { AR71XX_MODEL="$machine" } +ubnt_get_mtd_part_magic() { + ar71xx_get_mtd_offset_size_format EEPROM 4118 2 %02x +} + +ubnt_xm_board_detect() { + local model + local magic + + magic="$(ubnt_get_mtd_part_magic)" + case ${magic:0:3} in + "e00"|\ + "e01"|\ + "e80") # Different revisions of the NanoStation? + model="Ubiquiti NanoStation M" + ;; + "e0a") + model="Ubiquiti NanoStation loco M" + ;; + "e1b") # Rocket M5 untested + model="Ubiquiti Rocket M" + ;; + "e20"|\ + "e2d") # Bullet M Ti + model="Ubiquiti Bullet M" + ;; + "e30") + model="Ubiquiti PicoStation M" + ;; + esac + + [ -z "$model" ] || AR71XX_MODEL="${model}${magic:3:1}" +} + cybertan_get_hw_magic() { local part @@ -73,6 +106,15 @@ cybertan_get_hw_magic() { dd bs=8 count=1 skip=0 if=$part 2>/dev/null | hexdump -v -n 8 -e '1/1 "%02x"' } +dir505_board_detect() { + local dev=$(find_mtd_part 'mac') + [ -z "$dev" ] && return + + # The revision is stored at the beginning of the "mac" partition + local rev="$(LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}' $dev)" + AR71XX_MODEL="D-Link DIR-505 rev. $rev" +} + tplink_get_hwid() { local part @@ -175,6 +217,9 @@ tplink_board_detect() { "080100"*) model="TP-Link TL-WA801N/ND" ;; + "080200"*) + model="TP-Link TL-WR802N" + ;; "083000"*) model="TP-Link TL-WA830RE" @@ -271,7 +316,7 @@ tplink_board_detect() { model="TP-Link TL-WDR6500" ;; "453000"*) - model="MERCURY MW4530R" + model="Mercury MW4530R" ;; "934100"*) model="NC-LINK SMART-300" @@ -319,6 +364,9 @@ tplink_pharos_board_detect() { 'CPE520(TP-LINK|UN|N300-5)') model='TP-Link CPE520' ;; + 'EAP120(TP-LINK|UN|N300-2)') + model='TP-Link EAP120' + ;; esac [ -n "$model" ] && AR71XX_MODEL="$model v$2" @@ -440,6 +488,9 @@ ar71xx_board_detect() { *C-55) name="c-55" ;; + *C-60) + name="c-60" + ;; *CAP4200AG) name="cap4200ag" ;; @@ -471,6 +522,7 @@ ar71xx_board_detect() { ;; *"DIR-505 rev. A1") name="dir-505-a1" + dir505_board_detect ;; *"DIR-600 rev. A1") name="dir-600-a1" @@ -493,6 +545,9 @@ ar71xx_board_detect() { *"DIR-835 rev. A1") name="dir-835-a1" ;; + *"DIR-869 rev. A1") + name="dir-869-a1" + ;; *"dLAN Hotspot") name="dlan-hotspot" ;; @@ -514,6 +569,13 @@ ar71xx_board_detect() { *"Domino Pi") name="gl-domino" ;; + *"DW33D") + name="dw33d" + ;; + *"EAP120") + name="eap120" + tplink_pharos_board_detect + ;; *"EAP300 v2") name="eap300v2" ;; @@ -536,6 +598,12 @@ ar71xx_board_detect() { *"GL AR300") name="gl-ar300" ;; + *"GL-AR300M") + name="gl-ar300m" + ;; + *"GL-MIFI") + name="gl-mifi" + ;; *"EnGenius EPG5000") name="epg5000" ;; @@ -553,12 +621,14 @@ ar71xx_board_detect() { ;; *"Bullet M") name="bullet-m" + ubnt_xm_board_detect ;; *"Loco M XW") name="loco-m-xw" ;; *"Nanostation M") name="nanostation-m" + ubnt_xm_board_detect ;; *"Nanostation M XW") name="nanostation-m-xw" @@ -775,6 +845,7 @@ ar71xx_board_detect() { ;; *"Rocket M") name="rocket-m" + ubnt_xm_board_detect ;; *"Rocket M TI") name="rocket-m-ti" @@ -881,6 +952,9 @@ ar71xx_board_detect() { *"TL-WA801ND v3") name="tl-wa801nd-v3" ;; + *"TL-WR802N v1") + name="tl-wr802n-v1" + ;; *TL-WA901ND) name="tl-wa901nd" ;; @@ -1082,6 +1156,12 @@ ar71xx_board_detect() { *WHR-HP-G300N) name="whr-hp-g300n" ;; + *Z1) + name="z1" + ;; + *ZBT-WE1526) + name="zbt-we1526" + ;; *ZCN-1523H-2) name="zcn-1523h-2" ;;