ramips: Cudy X6 fixes / improvements
[openwrt/openwrt.git] / target / linux / ramips / mt7621 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index 30a10423ad51b320836fde0c751fbe2988b65860..b6337f397b842d31d7c1f623b55fd9bf20889dad 100644 (file)
@@ -28,8 +28,9 @@ case "$board" in
                [ "$PHYNBR" = "1" ] && macaddr_setbit_la $hw_mac_addr > /sys${DEVPATH}/macaddress
                ;;
        cudy,x6)
-               hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
-               macaddr_add $hw_mac_addr "$PHYNBR" > /sys${DEVPATH}/macaddress
+               hw_mac_addr="$(mtd_get_mac_binary bdinfo 0xde00)"
+               [ "$PHYNBR" = "1" ] && \
+               macaddr_setbit_la "$(macaddr_add $hw_mac_addr 0x100000)" > /sys${DEVPATH}/macaddress
                ;;
        dlink,dap-x1860-a1)
                hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"