From 48b5d08a483a29c4e654a08580fffe12559e41b7 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 14 Oct 2019 14:02:40 +0200 Subject: treewide: use a single ath10k MAC patching function with checksum While all ath10k eeproms have a checksum field, so far two functions for patching ath10k MAC address have been present (and been used). This merges code to provide a single function ath10k_patch_mac in caldata.sh, having its name in accordance with ath9k functions. By doing so, correct MAC patching for current and future ath10k devices should be ensured. This patch adds checksum adjustments for several targets on ath79 and lantiq. Signed-off-by: Adrian Schmutzler --- .../etc/hotplug.d/firmware/11-ath10k-caldata | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'target/linux/ipq806x/base-files') diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index f8a4c98542..6013bb100c 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -11,33 +11,33 @@ case "$FIRMWARE" in case $board in buffalo,wxr-2533dhp) caldata_extract "ART" 0x1000 0x2f20 - ath10kcal_patch_mac_crc $(mtd_get_mac_binary ART 0x1e) + ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e) ;; linksys,ea8500) caldata_extract "art" 0x1000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1) ;; nec,wg2600hp) caldata_extract "ART" 0x1000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary PRODUCTDATA 0xc) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary PRODUCTDATA 0xc) +1) ;; netgear,d7800 |\ netgear,r7500v2 |\ netgear,r7800) caldata_extract "art" 0x1000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0x6) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +1) ;; tplink,c2600) caldata_extract "radio" 0x1000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary default-mac 0x8) -1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x8) -1) ;; tplink,vr2600v) caldata_extract "ART" 0x1000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary default-mac 0x0) -1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x0) -1) ;; zyxel,nbg6817) caldata_extract "0:ART" 0x1000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1) ;; esac ;; @@ -45,33 +45,33 @@ case "$FIRMWARE" in case $board in buffalo,wxr-2533dhp) caldata_extract "ART" 0x5000 0x2f20 - ath10kcal_patch_mac_crc $(mtd_get_mac_binary ART 0x18) + ath10k_patch_mac $(mtd_get_mac_binary ART 0x18) ;; linksys,ea8500) caldata_extract "art" 0x5000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +2) ;; nec,wg2600hp) caldata_extract "ART" 0x5000 0x2f20 - ath10kcal_patch_mac_crc $(mtd_get_mac_binary PRODUCTDATA 0xc) + ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0xc) ;; netgear,d7800 |\ netgear,r7500v2 |\ netgear,r7800) caldata_extract "art" 0x5000 0x2f20 - ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0x6) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +2) ;; tplink,c2600) caldata_extract "radio" 0x5000 0x2f20 - ath10kcal_patch_mac_crc $(mtd_get_mac_binary default-mac 0x8) + ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x8) ;; tplink,vr2600v) caldata_extract "ART" 0x5000 0x2f20 - ath10kcal_patch_mac_crc $(mtd_get_mac_binary default-mac 0x0) + ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x0) ;; zyxel,nbg6817) caldata_extract "0:ART" 0x5000 0x2f20 - ath10kcal_patch_mac_crc $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) + ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) ;; esac ;; -- cgit v1.2.3