diff --git a/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.ipq53xx b/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.ipq53xx index 48ebfd7ae..3cec1c58d 100755 Binary files a/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.ipq53xx and b/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.ipq53xx differ diff --git a/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.qcn9224 b/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.qcn9224 index 2762ba247..cb2b068b4 100755 Binary files a/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.qcn9224 and b/feeds/ipq95xx/ath12k-wifi/board-cig-wf189.bin.qcn9224 differ diff --git a/feeds/ipq95xx/ipq53xx/base-files/etc/board.d/02_network b/feeds/ipq95xx/ipq53xx/base-files/etc/board.d/02_network index bc8f374e9..6cdc12dee 100755 --- a/feeds/ipq95xx/ipq53xx/base-files/etc/board.d/02_network +++ b/feeds/ipq95xx/ipq53xx/base-files/etc/board.d/02_network @@ -1,6 +1,8 @@ #!/bin/sh . /lib/functions/uci-defaults.sh +. /lib/functions.sh +. /lib/functions/system.sh ipq53xx_setup_interfaces() { @@ -20,9 +22,36 @@ ipq53xx_setup_interfaces() esac } +qcom_setup_macs() +{ + local board="$1" + + case $board in + cig,wf189) + mtd=$(find_mtd_chardev "0:APPSBLENV") + [ -z "$mtd" ] && return; + mac=$(grep BaseMacAddress= $mtd | cut -dx -f2) + [ -z "$mac" ] && return; + wan_mac=$(macaddr_canonicalize $mac) + lan_mac=$(macaddr_add "$wan_mac" 1) + ucidef_set_network_device_mac eth0 $lan_mac + ucidef_set_network_device_mac eth1 $wan_mac + ucidef_set_label_macaddr $wan_mac + ;; + *) + wan_mac=$(cat /sys/class/net/eth1/address) + lan_mac=$(macaddr_add "$wan_mac" 1) + ;; + esac + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$wan_mac" ] && ucidef_set_label_macaddr "$wan_mac" +} + board_config_update board=$(board_name) ipq53xx_setup_interfaces $board +qcom_setup_macs $board board_config_flush exit 0