mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-13 18:53:52 +02:00
Adrian Schmutzler
75bfc393ba
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>
26 lines
387 B
Bash
26 lines
387 B
Bash
#!/bin/ash
|
|
|
|
[ "$ACTION" == "add" ] || exit 0
|
|
|
|
PHYNBR=${DEVPATH##*/phy}
|
|
|
|
[ -n $PHYNBR ] || exit 0
|
|
|
|
. /lib/functions.sh
|
|
. /lib/functions/system.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
archer-c58-v1|\
|
|
archer-c59-v1|\
|
|
archer-c59-v2|\
|
|
archer-c60-v1|\
|
|
archer-c60-v2)
|
|
echo $(macaddr_add $(mtd_get_mac_binary mac 0x8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|