ath79: add support for Trendnet TEW-823DRU
[openwrt/openwrt.git] / target / linux / ath79 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index bf3e14aa9c7da8de9e2741d6eaca1e69e3be846f..d9c3fe7440a0902d0a613cf46e54591c1e4ea487 100644 (file)
@@ -34,6 +34,14 @@ case "$board" in
                [ "$PHYNBR" -eq 1 ] && \
                        k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress
                ;;
+       trendnet,tew-823dru)
+               # set the 2.4G interface mac address to LAN MAC
+               [ "$PHYNBR" -eq 1 ] && \
+                       mtd_get_mac_text mac 4 > /sys${DEVPATH}/macaddress
+               # set the 5G interface mac address to WAN MAC + 1
+               [ "$PHYNBR" -eq 0 ] && \
+                       macaddr_add "$(mtd_get_mac_text mac 24)" 1 > /sys${DEVPATH}/macaddress
+                ;;
        *)
                ;;
 esac