mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-18 18:56:37 +00:00
mediatek: bpi-r3-mini: persist WiFi and WAN MAC addresses
Derive WAN and WiFi MAC addresses from the (random) MAC address stored in the U-Boot environment. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
dceb5938f8
commit
abbcbb9228
@ -119,7 +119,8 @@ mediatek_setup_macs()
|
||||
local label_mac=""
|
||||
|
||||
case $board in
|
||||
bananapi,bpi-r3)
|
||||
bananapi,bpi-r3|\
|
||||
bananapi,bpi-r3-mini)
|
||||
wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
|
||||
;;
|
||||
cmcc,rax3000m)
|
||||
|
@ -36,7 +36,8 @@ case "$board" in
|
||||
[ "$PHYNBR" = "0" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
bananapi,bpi-r3)
|
||||
bananapi,bpi-r3|\
|
||||
bananapi,bpi-r3-mini)
|
||||
addr=$(cat /sys/class/net/eth0/address)
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
|
||||
|
Loading…
Reference in New Issue
Block a user