ath79: convert ath10k calibration data to NVMEM (ASCII MAC)
[openwrt/staging/svanheule.git] / target / linux / ath79 / nand / base-files / etc / hotplug.d / ieee80211 / 10-fix-wifi-mac
index 20974248c16743aa614d1384a05ed6d701abb303..5a933df501a7abad9528ce3ff775ef85944d82af 100644 (file)
@@ -17,8 +17,10 @@ case $board in
                ;;
        zyxel,emg2926-q10a|\
        zyxel,nbg6716)
-               # Set mac address for 2.4g device
+               ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
+               [ "$PHYNBR" -eq 0 ] && \
+                       macaddr_add $ethaddr 1 > /sys${DEVPATH}/macaddress
                [ "$PHYNBR" -eq 1 ] && \
-                       mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
+                       echo -n $ethaddr > /sys${DEVPATH}/macaddress
                ;;
 esac