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/lantiq/base-files | |
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/lantiq/base-files')
3 files changed, 13 insertions, 13 deletions
diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network index a6a9e4d29d..d79a30d22d 100755 --- a/target/linux/lantiq/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/base-files/etc/board.d/02_network @@ -60,19 +60,19 @@ arcadyan,arv4525pw|arcadyan,arv452cqw|arcadyan,arv7525pw|arcadyan,arv752dpw) arcadyan,arv7506pw11) annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 2) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5t@eth0" ;; arcadyan,arv7519pw) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 1) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" ;; arcadyan,arv7519rw22) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 22)" 1) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0x16)" 1) ucidef_add_switch "switch0" \ "0:lan:5" "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" ;; @@ -104,7 +104,7 @@ bt,homehub-v3a) ;; bt,homehub-v5a) - lan_mac=$(mtd_get_mac_binary_ubi caldata 4364) + lan_mac=$(mtd_get_mac_binary_ubi caldata 0x110c) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" @@ -123,7 +123,7 @@ netgear,dgn3500|netgear,dgn3500b) ;; netgear,dm200) - lan_mac=$(mtd_get_mac_binary ART 0) + lan_mac=$(mtd_get_mac_binary ART 0x0) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan 'eth0' ;; @@ -147,13 +147,13 @@ avm,fritz3370-rev2-micron) avm,fritz7312|\ avm,fritz7320) annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 0xa91)" 1) ucidef_set_interface_lan 'eth0' ;; avm,fritz7360sl) annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 0xa91)" 1) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" ;; @@ -199,7 +199,7 @@ zyxel,p-2812hnu-f1|zyxel,p-2812hnu-f3) ;; tplink,tdw8970|tplink,tdw8980) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 61696)" 1) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1) ucidef_add_switch "switch0" \ "0:lan:2" "2:lan:3" "4:lan:4" "5:lan:1" "6t@eth0" ;; @@ -212,20 +212,20 @@ arcadyan,vg3503j) ;; tplink,vr200|tplink,vr200v) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 61696)" 1) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 0xf100)" 1) ucidef_add_switch "switch0" \ "0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0" ;; arcadyan,vgv7510kw22-nor|arcadyan,vgv7510kw22-brn) annex="b" - wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 2) ucidef_add_switch "switch0" \ "2:lan:2" "3:lan:1" "4:lan:4" "5:lan:3" "0:wan:5" "6t@eth0" ;; arcadyan,vgv7519-nor|arcadyan,vgv7519-brn) - wan_mac=$(mtd_get_mac_binary board_config 22) + wan_mac=$(mtd_get_mac_binary board_config 0x16) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" ;; diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 6b4d09dd33..6d7682a7f3 100644 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -40,7 +40,7 @@ case "$FIRMWARE" in case $board in bt,homehub-v5a) ath10k_caldata_extract_ubi "caldata" 20480 2116 - ath10k_caldata_set_macaddr $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +3) + ath10k_caldata_set_macaddr $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +3) ;; *) ath10k_caldata_die "board $board is not supported yet" diff --git a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 6ae5e3cfe9..aec963a721 100644 --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -150,7 +150,7 @@ case "$FIRMWARE" in ;; bt,homehub-v5a) ath9k_ubi_eeprom_extract "caldata" 4096 0 - ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 4364) +2) 268 + ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +2) 268 ;; netgear,dgn3500|netgear,dgn3500b) ath9k_eeprom_extract "calibration" 61440 0 |