summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
blob: 7d2eca546d76b771b12026788510f73a293a9a93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/ash

[ "$ACTION" == "add" ] || exit 0

PHYNBR=${DEVPATH##*/phy}

[ -n $PHYNBR ] || exit 0

. /lib/ar71xx.sh
. /lib/functions/system.sh

board=$(ar71xx_board_name)

case "$board" in
	archer-c58-v1)
		echo $(macaddr_add $(mtd_get_mac_binary mac 8)  $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
		;;
	*)
		;;
esac