From: Adrian Schmutzler Date: Wed, 5 Jun 2019 13:31:32 +0000 (+0200) Subject: ath79: Read MAC addresses from flash in 11-ath10k-caldata X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4d807ad2d95f000707d595d9aa52bc1e8aacbf0c;p=openwrt%2Fstaging%2Flynxis.git ath79: Read MAC addresses from flash in 11-ath10k-caldata In commit c3a8518 eth0 and eth1 have been swapped for some devices, but 11-ath10k-caldata has not been updated. Instead of fixing this by swapping eth0/eth1, this patch will read addresses from flash (as done for several devices already) so adjustments due to eth order become obsolete. Signed-off-by: Adrian Schmutzler --- diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index b2f5d17213..607c04a75f 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -112,13 +112,18 @@ case "$FIRMWARE" in ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +1) ;; - engenius,ews511ap|\ - glinet,gl-ar750s|\ - glinet,gl-x750|\ - tplink,re450-v2) + engenius,ews511ap) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) ;; + glinet,gl-ar750s) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) +1) + ;; + glinet,gl-x750) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) +2) + ;; nec,wg800hp) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac_crc $(mtd_get_mac_text board_data 2176) @@ -132,28 +137,32 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; + tplink,archer-a7-v5|\ + tplink,archer-c7-v4|\ + tplink,archer-c7-v5) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary info 8) -1) + ;; tplink,archer-c2-v3) ath10kcal_extract "ART" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary info 8) -1) ;; tplink,archer-c5-v1|\ tplink,archer-c7-v2) ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1) - ;; - tplink,archer-a7-v5|\ - tplink,archer-c7-v4|\ - tplink,archer-c7-v5) - ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x1fc00) -1) ;; tplink,archer-d50-v1) ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) +2) + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary romfile 0xf100) +2) ;; tplink,re350k-v1) ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +2) + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary config 0x10008) +2) + ;; + tplink,re450-v2) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary info 8) +1) ;; ubnt,unifiac-lite|\ ubnt,unifiac-mesh|\