ath79: convert ath10k pre-calibration data to NVMEM (ASCII MAC)
[openwrt/staging/wigyori.git] / target / linux / ath79 / generic / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index 42b69d2ca0c4dde9ce4e8da2791e7d46e69212c6..d3392aa61e71507a5a8fa645ebb611ebdaaf19ff 100644 (file)
@@ -59,13 +59,26 @@ case "$board" in
                [ "$PHYNBR" -eq 1 ] && \
                        macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
                ;;
+       nec,wf1200cr|\
+       nec,wg1200cr)
+               [ "$PHYNBR" -eq 0 ] && \
+                       mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
+               ;;
        phicomm,k2t)
+               [ "$PHYNBR" -eq 0 ] && \
+                       k2t_get_mac "5g_mac" > /sys${DEVPATH}/macaddress
                # The K2T factory firmware does use LAN mac address as the 2.4G wifi mac address
                [ "$PHYNBR" -eq 1 ] && \
                        k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress
                ;;
        siemens,ws-ap3610)
                mtd_get_mac_ascii cfg1 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
+               ;;
+       tplink,deco-s4-v2)
+               base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
+               [ "$PHYNBR" -eq 0 ] && \
+                       macaddr_add $base_mac 2 > /sys${DEVPATH}/macaddress
+
                ;;
        trendnet,tew-823dru)
                # set the 2.4G interface mac address to LAN MAC