forked from Ivasoft/openwrt
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>
This commit is contained in:
committed by
Alexander Couzens
parent
07926d7def
commit
75bfc393ba
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user