summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
blob: 77c835f2fd895fca3bdf4449c1c0d64cc8c0a695 (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/functions.sh
. /lib/functions/system.sh

board=$(board_name)

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