]> git.baikalelectronics.ru Git - kernel.git/commit
ethernet: tg3: remove direct netdev->dev_addr writes
authorJakub Kicinski <kuba@kernel.org>
Fri, 8 Oct 2021 17:59:10 +0000 (10:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Oct 2021 10:46:56 +0000 (11:46 +0100)
commit0cc2285db718bfb2f180275b3e704c9769bc4a29
tree5ef6984ce0a9a3618ee5bd22335bcd5df5457b08
parent443eb2dac5dc3f024d05c8cf035f19431cc87a90
ethernet: tg3: remove direct netdev->dev_addr writes

tg3 does various forms of direct writes to netdev->dev_addr.
Use a local buffer. Make sure local buffer is aligned since
eth_platform_get_mac_address() may call ether_addr_copy().

tg3_get_device_address() returns whenever it finds a method
that found a valid address. Instead of modifying all the exit
points pass the buffer from the outside and commit the address
in the caller.

Constify the argument of the set addr helper.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c