aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac')
-rw-r--r--target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac21
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
new file mode 100644
index 0000000000..597b5dcca6
--- /dev/null
+++ b/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -0,0 +1,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
+netgear,wndap620|\
+netgear,wndap660)
+ echo $(macaddr_add $(mtd_get_mac_ascii u-boot-env baseMAC) $(($PHYNBR + 1)) ) > /sys${DEVPATH}/macaddress
+ ;;
+*)
+ ;;
+esac