ath79: add support for Senao Engenius ESR1750
[openwrt/staging/wigyori.git] / target / linux / ath79 / generic / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index c3dc2a8b5b3eb70009e8c930b96415309b8e1dab..1290c8b5fdc2bf11dcf73ccfc09f4a9da68e3825 100644 (file)
@@ -22,13 +22,26 @@ case "$board" in
        dlink,dch-g020-a1)
                mtd_get_mac_text "mp" 0x13 > /sys${DEVPATH}/macaddress
                ;;
-       dlink,dap-2230-a1)
+       dlink,dap-2230-a1|\
+       dlink,dap-3320-a1)
                mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
                ;;
-       dlink,dap-2660-a1)
+       dlink,dap-2660-a1|\
+       dlink,dap-2680-a1|\
+       dlink,dap-2695-a1|\
+       dlink,dap-3662-a1)
+               [ "$PHYNBR" -eq 0 ] && \
+                       mtd_get_mac_ascii bdcfg "wlanmac_a" > /sys${DEVPATH}/macaddress
                [ "$PHYNBR" -eq 1 ] && \
                        mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
                ;;
+       engenius,esr1750|\
+       engenius,esr900)
+               macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" "$PHYNBR" > /sys${DEVPATH}/macaddress
+               ;;
+       fortinet,fap-221-b)
+               macaddr_add "$(mtd_get_mac_text u-boot 0x3ff80 12)" $((PHYNBR*7+1)) > /sys${DEVPATH}/macaddress
+               ;;
        iodata,wn-ac1600dgr)
                # There is no eeprom data for 5 GHz wlan in "art" partition
                # which would allow to patch the macaddress
@@ -62,4 +75,12 @@ case "$board" in
                [ "$PHYNBR" -eq 1 ] && \
                        mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
                ;;
+       zyxel,nwa1123-ac)
+               [ "$PHYNBR" -eq 0 ] && \
+                       mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
+               ;;
+       zyxel,nwa1123-ni)
+               [ "$PHYNBR" -eq 1 ] && \
+                       mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
+               ;;
 esac