brcm47xx: fix switch port mapping on Asus RT-N12 and RT-N16 models
[openwrt/openwrt.git] / target / linux / brcm47xx / base-files / etc / board.d / 01_detect
index 16b81d4fe9a05e3ba08924f7eab1a107967d8b2c..04d13950a78ea4df5be75a8d63137fa54986e60b 100755 (executable)
@@ -144,6 +144,8 @@ detect_by_model() {
                ucidef_set_interfaces_lan_wan "eth0" "eth1"
                ;;
 
+       "Asus RT-N12"* | \
+       "Asus RT-N16"* | \
        "Asus WL500GP V2" | \
        "Buffalo WHR-G125" | \
        "Motorola WR850G" | \
@@ -175,9 +177,9 @@ detect_by_model() {
 }
 
 
-local model="$(sed -ne 's/^machine[ \t]*: //p' /proc/cpuinfo)"
-local boardtype="$(nvram get boardtype)"
-local boardnum="$(nvram get boardnum)"
+model="$(board_name)"
+boardtype="$(nvram get boardtype)"
+boardnum="$(nvram get boardnum)"
 
 board_config_update