diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-06-05 15:31:32 +0200 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2019-06-10 11:25:41 +0200 |
commit | 4d807ad2d95f000707d595d9aa52bc1e8aacbf0c (patch) | |
tree | 990658d244f5ef48174c86ffb8c258b29778db95 /target | |
parent | 3d153323ab4f6336a8fab771e6eefe9f61ecbfac (diff) | |
download | upstream-4d807ad2d95f000707d595d9aa52bc1e8aacbf0c.tar.gz upstream-4d807ad2d95f000707d595d9aa52bc1e8aacbf0c.tar.bz2 upstream-4d807ad2d95f000707d595d9aa52bc1e8aacbf0c.zip |
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 <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 37 |
1 files changed, 23 insertions, 14 deletions
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|\ |