aboutsummaryrefslogtreecommitdiff
path: root/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
blob: 6c7748589cd4823900176e06c1ed0df65b84bc9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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
netgear,wndap620|\
netgear,wndap660)
	macaddr_add $(mtd_get_mac_ascii u-boot-env baseMAC) $(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
	;;
esac