diff mbox series

[OpenWrt-Devel] ath79: remove invalid uses of ath9k_patch_fw_mac_crc

Message ID 20190918151106.3681-1-freifunk@adrianschmutzler.de
State Accepted, archived
Headers show
Series [OpenWrt-Devel] ath79: remove invalid uses of ath9k_patch_fw_mac_crc | expand

Commit Message

Adrian Schmutzler Sept. 18, 2019, 3:11 p.m. UTC
Some ar9344-based devices are using ath9k_patch_fw_mac_crc, which
is meant to generate a checksum, for fixing their ath9k MAC
addresses.
However, those do not have a checksum field, and the calculated
checksum offset would be negative.

This patch will use ath9k_patch_fw_mac function for those devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

---

This should be backported, too, as the negative offset for hexdump
and dd might do interesting things.
---
 .../ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index f07dbf83c4..63879cca47 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -103,7 +103,7 @@  case "$FIRMWARE" in
 	dlink,dir-825-c1|\
 	dlink,dir-835-a1)
 		ath9k_eeprom_extract "art" 0x1000 0x440
-		ath9k_patch_fw_mac_crc $(mtd_get_mac_text "mac" 0x4) 0x2
+		ath9k_patch_fw_mac $(mtd_get_mac_text "mac" 0x4) 0x2
 		;;
 	dlink,dir-842-c1|\
 	dlink,dir-842-c2|\
@@ -156,7 +156,7 @@  case "$FIRMWARE" in
 	dlink,dir-825-c1|\
 	dlink,dir-835-a1)
 		ath9k_eeprom_extract "art" 0x5000 0x440
-		ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_text "mac" 0x18) 1) 0x2
+		ath9k_patch_fw_mac $(macaddr_add $(mtd_get_mac_text "mac" 0x18) 1) 0x2
 		;;
 	ocedo,raccoon|\
 	tplink,tl-wdr3500-v1|\
@@ -196,7 +196,7 @@  case "$FIRMWARE" in
 		;;
 	wd,mynet-wifi-rangeextender)
 		ath9k_eeprom_extract "art" 0x1000 0x1000
-		ath9k_patch_fw_mac_crc $(nvram get wl0_hwaddr) "$mac" 0x2
+		ath9k_patch_fw_mac $(nvram get wl0_hwaddr) "$mac" 0x2
 		;;
 	*)
 		ath9k_eeprom_die "board $board is not supported yet"