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 <mail@david-bauer.net>
(cherry picked from commit 13937a16d4)
			
			
This commit is contained in:
		| @@ -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") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Bauer
					David Bauer