diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-11-29 10:46:41 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-11-29 10:46:42 +0100 |
commit | 4f5ed7fb6cd65eda3b64503aaecf61d7fb03fcbf (patch) | |
tree | 6ee34dba450f4bbfbb37ee524a394ee2f2b04747 /net/core/of_net.c | |
parent | d6dc62fca6b6a1e75430618bf6d84cf135f1b3d8 (diff) | |
parent | 7a74c1265ab4340b0fd5223084151003ef4c394a (diff) |
Merge branch 'marvell-nvmem-mac-addresses-support'
Miquel Raynal says:
====================
Marvell nvmem mac addresses support
Now that we are aligned on how to make information available from static
storage media to drivers like Ethernet controller drivers or switch
drivers by using nvmem cells and going through the whole nvmem
infrastructure, here are two driver updates to reflect these changes.
Prior to the driver updates, I propose:
* Reverting binding changes which should have never been accepted like
that.
* A conversion of the (old) Prestera and DFX server bindings (optional,
can be dropped if not considered necessary).
* A better description of the more recent Prestera PCI switch.
Please mind that this series cannot break anything since retrieving the
MAC address Prestera driver has never worked upstream, because the (ONIE
tlv) driver supposed to export the MAC address has not been accepted in
its original form and has been updated to the nvmem-layout
infrastructure (bindings have been merged, the code remains to be
applied).
====================
Link: https://lore.kernel.org/r/20221124111556.264647-1-miquel.raynal@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/core/of_net.c')
-rw-r--r-- | net/core/of_net.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/of_net.c b/net/core/of_net.c index f1a9bf7578e7..55d3fe229269 100644 --- a/net/core/of_net.c +++ b/net/core/of_net.c @@ -57,7 +57,7 @@ static int of_get_mac_addr(struct device_node *np, const char *name, u8 *addr) return -ENODEV; } -static int of_get_mac_addr_nvmem(struct device_node *np, u8 *addr) +int of_get_mac_address_nvmem(struct device_node *np, u8 *addr) { struct platform_device *pdev = of_find_device_by_node(np); struct nvmem_cell *cell; @@ -94,6 +94,7 @@ static int of_get_mac_addr_nvmem(struct device_node *np, u8 *addr) return 0; } +EXPORT_SYMBOL(of_get_mac_address_nvmem); /** * of_get_mac_address() @@ -140,7 +141,7 @@ int of_get_mac_address(struct device_node *np, u8 *addr) if (!ret) return 0; - return of_get_mac_addr_nvmem(np, addr); + return of_get_mac_address_nvmem(np, addr); } EXPORT_SYMBOL(of_get_mac_address); |