From 75bfc393ba6cffd783e723d3115c25b70836c116 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 9 Aug 2019 17:45:12 +0200 Subject: treewide: convert MAC address location offsets to hexadecimal This changes the offsets for the MAC address location in mtd_get_mac_binary* and mtd_get_mac_text to hexadecimal notation. This will be much clearer for the reader when numbers are big, and will also match the style used for mtd-mac-address in DTS files. (e.g. 0x1006 and 0x5006 are much more useful than 4102 and 20486) Acked-by: Alexander Couzens Signed-off-by: Adrian Schmutzler --- .../linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 4 ++-- .../linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'target/linux/apm821xx') diff --git a/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 6d2d18658d..b3b8886720 100644 --- a/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -59,7 +59,7 @@ case "$FIRMWARE" in ath9k_ubi_eeprom_extract "caldata" 20480 4096 else ath9k_eeprom_extract "wifi_data" 20480 4096 - ath9k_patch_firmware_mac $(mtd_get_mac_binary wifi_data 12) + ath9k_patch_firmware_mac $(mtd_get_mac_binary wifi_data 0xc) fi ;; *) @@ -77,7 +77,7 @@ case "$FIRMWARE" in ath9k_ubi_eeprom_extract "caldata" 4096 4096 else ath9k_eeprom_extract "wifi_data" 4096 4096 - ath9k_patch_firmware_mac $(mtd_get_mac_binary wifi_data 0) + ath9k_patch_firmware_mac $(mtd_get_mac_binary wifi_data 0x0) fi ;; *) diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx index 1a27930d24..11955dd5a2 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx +++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx @@ -6,7 +6,7 @@ preinit_set_mac_address() { case $(board_name) in meraki,mr24|\ meraki,mx60) - mac_lan=$(mtd_get_mac_binary_ubi board-config 102) + mac_lan=$(mtd_get_mac_binary_ubi board-config 0x66) [ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan" ;; esac -- cgit v1.2.3