ipq40xx: add netgear wac510 support
[openwrt/openwrt.git] / target / linux / ipq40xx / base-files / etc / hotplug.d / firmware / 11-ath10k-caldata
index d68e8d54b8ad3e8456a98808607a4bc21b4014bc..42cb295496a65387976e90234edbf0ba82e017b8 100644 (file)
@@ -36,10 +36,12 @@ case "$FIRMWARE" in
                ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x32)
                ;;
        engenius,eap2200 |\
-       openmesh,a62)
+       openmesh,a62 |\
+       plasmacloud,pa2200)
                caldata_extract "0:ART" 0x9000 0x2f20
                ;;
-       linksys,ea8300)
+       linksys,ea8300 |\
+       linksys,mr8300)
                caldata_extract "ART" 0x9000 0x2f20
                # OEM assigns 4 sequential MACs
                ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
@@ -53,6 +55,7 @@ case "$FIRMWARE" in
        alfa-network,ap120c-ac |\
        cilab,meshpoint-one |\
        ezviz,cs-w3-wd1200g-eup |\
+       glinet,gl-ap1300 |\
        glinet,gl-b1300 |\
        glinet,gl-s1300 |\
        linksys,ea6350v3 |\
@@ -97,13 +100,20 @@ case "$FIRMWARE" in
        edgecore,oap100 |\
        engenius,eap1300 |\
        engenius,eap2200 |\
+       luma,wrtq-329acn|\
        openmesh,a42 |\
        openmesh,a62 |\
+       plasmacloud,pa1200 |\
+       plasmacloud,pa2200 |\
        qxwlan,e2600ac-c1 |\
        qxwlan,e2600ac-c2 |\
        unielec,u4019-32m)
                caldata_extract "0:ART" 0x1000 0x2f20
                ;;
+       devolo,magic-2-wifi-next)
+               caldata_extract "ART" 0x1000 0x2f20
+               ath10k_patch_mac $(mtd_get_mac_ascii APPSBLENV WiFiMacAddress0)
+               ;;
        dlink,dap-2610)
                caldata_extract "ART" 0x1000 0x2f20
                ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac)
@@ -120,7 +130,8 @@ case "$FIRMWARE" in
                caldata_extract "ART" 0x1000 0x2f20
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
                ;;
-       linksys,ea8300)
+       linksys,ea8300 |\
+       linksys,mr8300)
                caldata_extract "ART" 0x1000 0x2f20
                ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
                ;;
@@ -129,11 +140,20 @@ case "$FIRMWARE" in
                caldata_valid "202f" || caldata_extract "ART" 0x1000 0x2f20
                ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +2)
                ;;
+       mikrotik,hap-ac2)
+               wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
+               ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x0 0x2f20 ) || \
+               ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_0" 0x0 0x2f20 )
+               ;;
        netgear,ex6100v2 |\
        netgear,ex6150v2)
                caldata_extract "ART" 0x1000 0x2f20
                ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0)
                ;;
+       netgear,wac510)
+               caldata_extract "0:ART" 0x1000 0x2f20
+               ath10k_patch_mac $(mtd_get_mac_binary "0:MANUDATA" 0x6)
+               ;;
        zyxel,nbg6617 |\
        zyxel,wre6606)
                caldata_extract "ART" 0x1000 0x2f20
@@ -148,6 +168,7 @@ case "$FIRMWARE" in
        alfa-network,ap120c-ac |\
        cilab,meshpoint-one |\
        ezviz,cs-w3-wd1200g-eup |\
+       glinet,gl-ap1300 |\
        glinet,gl-b1300 |\
        glinet,gl-s1300 |\
        linksys,ea6350v3 |\
@@ -192,13 +213,20 @@ case "$FIRMWARE" in
        edgecore,oap100 |\
        engenius,eap1300 |\
        engenius,eap2200 |\
+       luma,wrtq-329acn|\
        openmesh,a42 |\
        openmesh,a62 |\
+       plasmacloud,pa1200 |\
+       plasmacloud,pa2200 |\
        qxwlan,e2600ac-c1 |\
        qxwlan,e2600ac-c2 |\
        unielec,u4019-32m)
                caldata_extract "0:ART" 0x5000 0x2f20
                ;;
+       devolo,magic-2-wifi-next)
+               caldata_extract "ART" 0x5000 0x2f20
+               ath10k_patch_mac $(mtd_get_mac_ascii APPSBLENV WiFiMacAddress1)
+               ;;
        dlink,dap-2610)
                caldata_extract "ART" 0x5000 0x2f20
                ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
@@ -215,7 +243,8 @@ case "$FIRMWARE" in
                caldata_extract "ART" 0x5000 0x2f20
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
                ;;
-       linksys,ea8300)
+       linksys,ea8300 |\
+       linksys,mr8300)
                caldata_extract "ART" 0x5000 0x2f20
                ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
                ;;
@@ -224,11 +253,21 @@ case "$FIRMWARE" in
                caldata_valid "202f" || caldata_extract "ART" 0x5000 0x2f20
                ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +3)
                ;;
+       mikrotik,hap-ac2|\
+       mikrotik,sxtsq-5-ac)
+               wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
+               ( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x8000 0x2f20 ) || \
+               ( [ -d "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data/data_2" 0x0 0x2f20 )
+               ;;
        netgear,ex6100v2 |\
        netgear,ex6150v2)
                caldata_extract "ART" 0x5000 0x2f20
                ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc)
                ;;
+       netgear,wac510)
+               caldata_extract "0:ART" 0x5000 0x2f20
+               ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) +16)
+               ;;
        zyxel,nbg6617 |\
        zyxel,wre6606)
                caldata_extract "ART" 0x5000 0x2f20