ath79: convert ath10k calibration data to NVMEM (ASCII MAC)
[openwrt/staging/dangole.git] / target / linux / ath79 / generic / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index d3392aa61e71507a5a8fa645ebb611ebdaaf19ff..1a845a4ed717fb539724621fa2a9984178c0b93c 100644 (file)
@@ -41,13 +41,31 @@ case "$board" in
                [ "$PHYNBR" -eq 1 ] && \
                        mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
                ;;
+       engenius,ecb1200|\
+       engenius,ecb1750)
+               [ "$PHYNBR" -eq 0 ] && \
+               mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
+               ;;
        engenius,epg5000|\
        engenius,esr1200|\
        engenius,esr1750|\
        engenius,esr900)
                macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" "$PHYNBR" > /sys${DEVPATH}/macaddress
                ;;
-       iodata,wn-ac1600dgr)
+       engenius,ews511ap)
+               [ "$PHYNBR" -eq 0 ] && \
+               macaddr_add $(cat /sys/class/net/eth0/address) 1 > /sys${DEVPATH}/macaddress
+               ;;
+       extreme-networks,ws-ap3805i)
+               [ "$PHYNBR" -eq 0 ] && \
+               mtd_get_mac_ascii cfg1 RADIOADDR0 > /sys${DEVPATH}/macaddress
+               ;;
+       iodata,wn-ac1167dgr|\
+       iodata,wn-ac1600dgr|\
+       iodata,wn-ac1600dgr2|\
+       sitecom,wlr-7100|\
+       sitecom,wlr-8100|\
+       zyxel,nbg6616)
                # There is no eeprom data for 5 GHz wlan in "art" partition
                # which would allow to patch the macaddress
                [ "$PHYNBR" -eq 0 ] && \
@@ -60,7 +78,8 @@ case "$board" in
                        macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
                ;;
        nec,wf1200cr|\
-       nec,wg1200cr)
+       nec,wg1200cr|\
+       qihoo,c301)
                [ "$PHYNBR" -eq 0 ] && \
                        mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
                ;;