[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3193368.44csPzL39Z@eto.sf-tec.de>
Date: Mon, 05 Sep 2022 16:15:21 +0200
From: Rolf Eike Beer <eike@...mail.de>
To: netdev@...r.kernel.org
Subject: Usage of arch_get_platform_mac_address() or the lack thereof
Hi,
just for the fun of it I'm poking a bit through the sunhme driver. I noticed
that this driver as well as many other sun related drivers directly use
idprom->id_ethaddr, but noone uses arch_get_platform_mac_address(). Some
drivers use eth_platform_get_mac_address() instead, which does some more
querying of of_* properties to find out the mac address.
So, what is the right way of doing this? sungem and sunhme query "local-mac-
address" before, but do not query the other possibilities used in
of_get_mac_address(), and neither of them checks for all-zeroes and other
things in the returned addresses. sungme will error out if that does not
return any address, sunhme will simply leave the mac address unassigned.
What would be the correct way of doing this? Should all these driver be ported
to use arch_get_platform_mac_address() or eth_platform_get_mac_address()?
Eike
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists