ramips: add support for H3C TX1800 Plus / TX1801 Plus / TX1806
[openwrt/staging/hauke.git] / target / linux / ramips / mt7621 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index bced04423436057c0067ee74dad068d82edeeb74..0ace1933e3f81714648471177719d0f64aec3aa7 100644 (file)
@@ -37,6 +37,13 @@ case "$board" in
                [ "$PHYNBR" = "1" ] && \
                        macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress
                ;;
+       h3c,tx1800-plus|\
+       h3c,tx1801-plus|\
+       h3c,tx1806)
+               addr=$(macaddr_setbit $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2) 7)
+               [ "$PHYNBR" = "0" ] && echo -n ${addr:0:9}'1'${addr:10:7} > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" = "1" ] && echo -n ${addr:0:9}'7'${addr:10:7} > /sys${DEVPATH}/macaddress
+               ;;
        hiwifi,hc5962)
                label_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
                [ "$PHYNBR" = "0" ] && [ -n "$label_mac" ] && \