diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-08-09 17:45:12 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2019-08-14 12:10:12 +0200 |
commit | 75bfc393ba6cffd783e723d3115c25b70836c116 (patch) | |
tree | c3dc6d8b544ec5b5e4bb4d6c33f323d43cb0e8fc /target/linux/ar71xx/base-files/lib | |
parent | 07926d7def59e5684b488e9b614342edc19e7eb2 (diff) | |
download | upstream-75bfc393ba6cffd783e723d3115c25b70836c116.tar.gz upstream-75bfc393ba6cffd783e723d3115c25b70836c116.tar.bz2 upstream-75bfc393ba6cffd783e723d3115c25b70836c116.zip |
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 <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ar71xx/base-files/lib')
-rw-r--r-- | target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx index 7d3e82813d..b0aa150817 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx @@ -24,7 +24,7 @@ preinit_set_mac_address() { case $(board_name) in c-55|\ c-60) - mac_lan=$(mtd_get_mac_binary art 0) + mac_lan=$(mtd_get_mac_binary art 0x0) [ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan" ;; dir-615-c1|\ @@ -36,19 +36,19 @@ preinit_set_mac_address() { ;; mr18|\ z1) - 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" ;; r6100) - mac_lan=$(mtd_get_mac_binary caldata 0) + mac_lan=$(mtd_get_mac_binary caldata 0x0) [ -n "$mac_lan" ] && ifconfig eth1 hw ether "$mac_lan" - mac_wan=$(mtd_get_mac_binary caldata 6) + mac_wan=$(mtd_get_mac_binary caldata 0x6) [ -n "$mac_wan" ] && ifconfig eth0 hw ether "$mac_wan" ;; rambutan) - mac_lan=$(mtd_get_mac_binary art 0) + mac_lan=$(mtd_get_mac_binary art 0x0) [ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan" - mac_wan=$(mtd_get_mac_binary art 6) + mac_wan=$(mtd_get_mac_binary art 0x6) [ -n "$mac_wan" ] && ifconfig eth1 hw ether "$mac_wan" ;; wrt160nl) |