aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-05-08 17:07:18 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-05-08 17:07:18 +0000
commit852b8e9490df8df7db415bb71e8cad4c318a2346 (patch)
tree3b399a8e20126ecc47f2a3d619aeccc1e3dc41d0 /target/linux
parentc70694e755910904cb31267800cf15ff428cb704 (diff)
downloadupstream-852b8e9490df8df7db415bb71e8cad4c318a2346.tar.gz
upstream-852b8e9490df8df7db415bb71e8cad4c318a2346.tar.bz2
upstream-852b8e9490df8df7db415bb71e8cad4c318a2346.zip
ar71xx: add user-space model detection for the RNX-N360RT board
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36581
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 900c9ad1c6..194a40b5c3 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -62,12 +62,22 @@ tplink_get_hwid() {
dd if=$part bs=4 count=1 skip=16 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
}
+tplink_get_mid() {
+ local part
+
+ part=$(find_mtd_part firmware)
+ [ -z "$part" ] && return 1
+
+ dd if=$part bs=4 count=1 skip=17 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
+}
+
tplink_board_detect() {
local model="$1"
local hwid
local hwver
hwid=$(tplink_get_hwid)
+ mid=$(tplink_get_mid)
hwver=${hwid:6:2}
hwver="v${hwver#0}"
@@ -106,7 +116,12 @@ tplink_board_detect() {
model="TP-Link TL-WA901N/ND"
;;
"094100"*)
- model="TP-Link TL-WR941N/ND"
+ if [ "$hwid" == "09410002" -a "$mid" == "00420001" ]; then
+ model="Rosewill RNX-N360RT"
+ hwver=""
+ else
+ model="TP-Link TL-WR941N/ND"
+ fi
;;
"104100"*)
model="TP-Link TL-WR1041N/ND"