From: David Bauer Date: Fri, 30 Aug 2019 20:41:18 +0000 (+0200) Subject: ramips: fix network setup for various NETGEAR boards X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=15d84131fe3e98de546f95e0f96f00d3c11fba38;p=openwrt%2Fstaging%2Fynezz.git ramips: fix network setup for various NETGEAR boards There are currently the following issues present for the Netgear R6220, R6350 and WNDR3700 v5: - LAN and WAN MAC-addresses are inverted - WAN MAC-address is off. It are +2 compared to the LAN MAC-address (R6350 only) - Switchport order is inverted in LuCi This commit fixes both these issues by assigning correct MAC-addresses to LAN and WAN interfaces and defining the switchports with the correct labels. Signed-off-by: David Bauer (cherry picked from commit 13937a16d40693df67d3d39faa3a80644bdb7abf) --- diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 0f2afe0425..a5cfd8343a 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -114,8 +114,6 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ psg1218a|\ - r6220|\ - netgear,r6350|\ rt-n12p|\ sap-g3200u3|\ sk-wb8|\ @@ -130,7 +128,6 @@ ramips_setup_interfaces() whr-g300n|\ mqmaker,witi-256m|\ mqmaker,witi-512m|\ - wndr3700v5|\ youku-yk1|\ youku,yk-l2|\ zbt-ape522ii|\ @@ -355,7 +352,10 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0" ucidef_set_interface_wan "usb0" ;; - netgear,r6120) + netgear,r6120|\ + r6220|\ + netgear,r6350|\ + wndr3700v5) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" ;; @@ -559,7 +559,8 @@ ramips_setup_macs() e1700) wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR) ;; - edimax,br-6478ac-v2) + edimax,br-6478ac-v2|\ + netgear,r6350) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 2) ;; @@ -628,12 +629,6 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory 40) wan_mac=$(mtd_get_mac_binary factory 46) ;; - r6220|\ - netgear,r6350|\ - wndr3700v5) - wan_mac=$(mtd_get_mac_binary factory 4) - lan_mac=$(macaddr_add "$wan_mac" 1) - ;; rt-n56u) lan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(macaddr_setbit_la "$lan_mac")