You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

25 lines
370 B
Bash

#!/bin/ash
[ "$ACTION" == "add" ] || exit 0
PHYNBR=${DEVPATH##*/phy}
[ -n $PHYNBR ] || exit 0
. /lib/functions.sh
. /lib/functions/system.sh
board=$(board_name)
case "$board" in
archer-c58-v1|\
archer-c59-v1|\
archer-c59-v2|\
archer-c60-v1)
echo $(macaddr_add $(mtd_get_mac_binary mac 0x8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
;;
*)
;;
esac