mediatek: filogic: prevent faulty mac address assignment
The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random mac addresses on boot and set the 'local-mac-address' property which prevents Openwrt from assigning the correct address from evmem. This patch removes the alias for ethernet0 so that U-Boot doesn't add the property, removes the workaround from 02_network, and adds back the nvmem definition for the M3000. Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
This commit is contained in:
		 Leon M. Busch-George
					Leon M. Busch-George
				
			
				
					committed by
					
						 Hauke Mehrtens
						Hauke Mehrtens
					
				
			
			
				
	
			
			
			 Hauke Mehrtens
						Hauke Mehrtens
					
				
			
						parent
						
							e7661a808e
						
					
				
				
					commit
					a55ab9e134
				
			| @@ -9,7 +9,6 @@ | |||||||
| 	compatible = "cudy,m3000-v1", "mediatek,mt7981-spim-snand-rfb"; | 	compatible = "cudy,m3000-v1", "mediatek,mt7981-spim-snand-rfb"; | ||||||
|  |  | ||||||
| 	aliases { | 	aliases { | ||||||
| 		ethernet0 = &gmac0; |  | ||||||
| 		label-mac-device = &gmac0; | 		label-mac-device = &gmac0; | ||||||
| 		led-boot = &led_status; | 		led-boot = &led_status; | ||||||
| 		led-failsafe = &led_status; | 		led-failsafe = &led_status; | ||||||
| @@ -87,7 +86,8 @@ | |||||||
| 		phy-mode = "2500base-x"; | 		phy-mode = "2500base-x"; | ||||||
| 		phy-handle = <&rtl8221b_phy>; | 		phy-handle = <&rtl8221b_phy>; | ||||||
|  |  | ||||||
| 		/* the MAC address assignment using nvmem-cells doesn't work, so it's done through 02_network */ | 		nvmem-cell-names = "mac-address"; | ||||||
|  | 		nvmem-cells = <&macaddr_bdinfo_de00 1>; | ||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
| 	gmac1: mac@1 { | 	gmac1: mac@1 { | ||||||
|   | |||||||
| @@ -9,7 +9,6 @@ | |||||||
| 	model = "YunCore AX835"; | 	model = "YunCore AX835"; | ||||||
|  |  | ||||||
| 	aliases { | 	aliases { | ||||||
| 		ethernet0 = &gmac0; |  | ||||||
| 		led-boot = &led_system; | 		led-boot = &led_system; | ||||||
| 		led-failsafe = &led_system; | 		led-failsafe = &led_system; | ||||||
| 		led-running = &led_system; | 		led-running = &led_system; | ||||||
|   | |||||||
| @@ -137,9 +137,6 @@ mediatek_setup_macs() | |||||||
| 		;; | 		;; | ||||||
| 		esac | 		esac | ||||||
| 		;; | 		;; | ||||||
| 	cudy,m3000-v1) |  | ||||||
| 		wan_mac=$(macaddr_add $(cat /sys/class/net/eth1/address) 1) |  | ||||||
| 		;; |  | ||||||
| 	h3c,magic-nx30-pro) | 	h3c,magic-nx30-pro) | ||||||
| 		wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr) | 		wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr) | ||||||
| 		lan_mac=$(macaddr_add "$wan_mac" 1) | 		lan_mac=$(macaddr_add "$wan_mac" 1) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user