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/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target/linux/ipq40xx/base-files/lib/preinit') diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index fc64441e1a..192488f377 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -5,7 +5,7 @@ preinit_set_mac_address() { case $(board_name) in asus,map-ac2200) - base_mac=$(mtd_get_mac_binary_ubi Factory 4102) + base_mac=$(mtd_get_mac_binary_ubi Factory 0x1006) ip link set dev eth0 address $(macaddr_add "$base_mac" +1) ip link set dev eth1 address $(macaddr_add "$base_mac" +3) ;; @@ -15,7 +15,7 @@ preinit_set_mac_address() { ip link set dev eth1 address $(macaddr_add "${base_mac}" 1) ;; meraki,mr33) - mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 102) + mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) [ -n "$mac_lan" ] && ip link set dev eth0 address "$mac_lan" ;; zyxel,nbg6617) -- cgit v1.2.3