lede/target/linux/ipq60xx/base-files/etc/hotplug.d/ieee80211/10-fix-mac-address
2022-10-18 13:38:14 +08:00

17 lines
383 B
Plaintext

[ "$ACTION" == "add" ] || exit 0
PHY_NUM=${DEVPATH##*/phy}
[ -n $PHY_NUM ] || exit 0
. /lib/functions.sh
. /lib/functions/system.sh
case "$(board_name)" in
tplink,eap610-outdoor)
# /tmp/factory_data should have been mounted by preinit
base_mac=$(get_mac_binary /tmp/factory_data/default-mac 0)
macaddr_add $base_mac $(expr "$PHY_NUM" + 1) > /sys${DEVPATH}/macaddress
;;
esac