libunwind: add support for loongarch64
[openwrt/openwrt.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-ap3715i)
16 [ "$PHYNBR" -eq 0 ] && mtd_get_mac_ascii cfg2 RADIOADDR1 > /sys${DEVPATH}/macaddress
17 [ "$PHYNBR" -eq 1 ] && mtd_get_mac_ascii cfg2 RADIOADDR0 > /sys${DEVPATH}/macaddress
18 ;;
19 enterasys,ws-ap3710i|\
20 extreme-networks,ws-ap3825i)
21 mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
22 ;;
23 ocedo,panda)
24 mtd_get_mac_ascii uboot-env0 wmac$(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
25 ;;
26 sophos,red-15w-rev1)
27 mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
28 ;;
29 esac