ath79: add support for I-O DATA WN-AG300DGR
[openwrt/staging/mkresin.git] / target / linux / ath79 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index 59c58f9c6747bbc9acbf2c9c1a491b2c6e840b28..bb55b1c11c8a0343a4df287d6a553fb64ec42565 100644 (file)
@@ -13,11 +13,21 @@ PHYNBR=${DEVPATH##*/phy}
 board=$(board_name)
 
 case "$board" in
+       iodata,wn-ag300dgr)
+               # There is no eeprom data for 5 GHz wlan in "art" partition
+               # which would allow to patch the macaddress
+               [ "$PHYNBR" -eq 1 ] && \
+                       echo $(macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1) > /sys${DEVPATH}/macaddress
+               ;;
        phicomm,k2t)
                # The K2T factory firmware does use LAN mac address as the 2.4G wifi mac address
                [ "$PHYNBR" -eq 1 ] && \
                        echo $(k2t_get_mac "lan_mac") > /sys${DEVPATH}/macaddress
                ;;
+       tplink,archer-c58-v1|\
+       tplink,archer-c59-v1)
+               echo $(macaddr_add $(mtd_get_mac_binary mac 8)  $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
+               ;;
        *)
                ;;
 esac