mpc85xx: add support for Sophos RED 15w Rev.1
[openwrt/openwrt.git] / target / linux / mpc85xx / base-files / etc / hotplug.d / ieee80211 / 10-fix-wifi-mac
diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
new file mode 100644 (file)
index 0000000..3092ceb
--- /dev/null
@@ -0,0 +1,20 @@
+#!/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
+sophos,red-15w-rev1)
+       echo $(mtd_get_mac_ascii u-boot-env ethaddr) > /sys${DEVPATH}/macaddress
+       ;;
+*)
+       ;;
+esac