mpc85xx: add support for Enterasys WS-AP3710i
[openwrt/staging/rmilecki.git] / target / linux / mpc85xx / base-files / etc / hotplug.d / ieee80211 / 10-fix-wifi-mac
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 enterasys,ws-ap3710i)
16 echo $(mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR}) > /sys${DEVPATH}/macaddress
17 ;;
18 ocedo,panda)
19 WMAC=wmac$(($PHYNBR + 1))
20 MAC=$(mtd_get_mac_ascii uboot-env0 ${WMAC})
21 echo ${MAC} > /sys${DEVPATH}/macaddress
22 ;;
23 sophos,red-15w-rev1)
24 echo $(mtd_get_mac_ascii u-boot-env ethaddr) > /sys${DEVPATH}/macaddress
25 ;;
26 *)
27 ;;
28 esac