ramips: add basic support for TP-Link EC330-G5u v1
[openwrt/staging/dedeckeh.git] / target / linux / ramips / mt7621 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index 161bd942db858d14940aa0d0e965eba4efd5a2cf..079f07956d1ccd4e08b3cb1ac8c403ca93f955ac 100644 (file)
@@ -131,6 +131,11 @@ case "$board" in
                hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)"
                macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress"
                ;;
+       tplink,ec330-g5u-v1)
+               hw_mac_addr="$(mtd_get_mac_text factory 0x165)"
+               [ "$PHYNBR" = "0" ] && echo -n $hw_mac_addr > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
+               ;;
        yuncore,ax820)
                [ "$PHYNBR" = "1" ] && \
                        macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress