ramips: add support for ZyXEL NWA50AX / NWA55AXE
[openwrt/openwrt.git] / target / linux / ramips / mt7621 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index 4649b9e9d0a89b69cc3e4809b3b83a190a5f9362..bced04423436057c0067ee74dad068d82edeeb74 100644 (file)
@@ -104,4 +104,10 @@ case "$board" in
                [ "$PHYNBR" = "1" ] && \
                        macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress
                ;;
+       zyxel,nwa50ax|\
+       zyxel,nwa55axe)
+               hw_mac_addr="$(mtd_get_mac_binary mrd 0x1fff8)"
+               [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
+               ;;
 esac