ramips: add support for TP-Link Archer AX23 v1
[openwrt/staging/wigyori.git] / target / linux / ramips / mt7621 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index 5a186dcb88f45e7a3b66637dd1b6399904d61527..ffc643f42b728cced042827d27ae90f3aa21e2fa 100644 (file)
@@ -147,6 +147,13 @@ case "$board" in
                hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
                [ "$PHYNBR" = "1" ] &&  macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress
                ;;
+       tplink,archer-ax23-v1)
+               hw_mac_addr="$(mtd_get_mac_binary config 0x8)"
+               # 2.4 GHz MAC is MAC in EEPROm while 5GHz is EEPROM_MAC -1
+               # However, mac80211 assigns consecutive addresses for each VAP
+               # Which leads to conflicting addresses. Set the LA bit for 5Ghz instead.
+               [ "$PHYNBR" = "1" ] &&  macaddr_setbit_la "$hw_mac_addr" > "/sys${DEVPATH}/macaddress"
+               ;;
        tplink,eap615-wall-v1)
                hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)"
                macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress"