6c61e5df00735061dbae4fa975bc6afc455f0a6f
[openwrt/openwrt.git] / target / linux / ath79 / nand / base-files / etc / hotplug.d / ieee80211 / 10-fix-wifi-mac
1 [ "$ACTION" = "add" ] || exit 0
2
3 PHYNBR=${DEVPATH##*/phy}
4
5 [ -n $PHYNBR ] || exit 0
6
7 . /lib/functions.sh
8 . /lib/functions/system.sh
9
10 board=$(board_name)
11
12 case $board in
13 zyxel,nbg6716)
14 # Set mac address for 2.4g device
15 [ "$PHYNBR" -eq 1 ] && \
16 mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
17 ;;
18 esac