Files
linux/drivers/net
Adam Ford f30a51a418 net: ethernet: davinci_emac: Use MAC Address from Device Tree
Currently there is a device tree entry called "local-mac-address"
which can be filled by the bootloader or manually set.This is
useful when the user does not want to use the MAC address
programmed into the SoC.

Currently, the davinci_emac reads the MAC from the DT, copies
it from pdata->mac_addr to priv->mac_addr, then blindly overwrites
it by reading from registers in the SoC, and falls back to a
random MAC if it's still not valid.  This completely ignores any
MAC address in the device tree.

In order to use the local-mac-address, check to see if the contents
of priv->mac_addr are valid before falling back to reading from the
SoC when the MAC address is not valid.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20231022151911.4279-1-aford173@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-10-24 11:26:08 +02:00
..
2023-08-11 21:12:45 +02:00
2023-10-17 12:45:03 +02:00
2023-10-01 19:09:54 +01:00
2023-08-11 21:12:45 +02:00
2023-08-14 08:03:52 +01:00
2023-10-10 17:49:00 -07:00
2023-10-04 11:49:20 -07:00
2023-10-17 17:44:51 -07:00