bcm53xx: add support for Meraki MR26
[openwrt/staging/nbd.git] / target / linux / bcm53xx / base-files / etc / hotplug.d / ieee80211 / 10-fix-mac-address
1 #!/bin/ash
2
3 [ "$ACTION" = "add" ] || exit 0
4
5 PHYNBR=${DEVPATH##*/phy}
6
7 [ -n $PHYNBR ] || exit 0
8
9 . /lib/functions.sh
10 . /lib/functions/system.sh
11
12 board=$(board_name)
13
14 case "$board" in
15 meraki,mr26)
16 macaddr_add "$(macaddr_setbit_la $(mtd_get_mac_binary_ubi 'board-config' 0x66))" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress
17 ;;
18 esac