atmel: use eth_hw_addr_set()
authorJakub Kicinski <kuba@kernel.org>
Mon, 18 Oct 2021 23:50:12 +0000 (16:50 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 20 Oct 2021 09:39:44 +0000 (12:39 +0300)
commit251277af9c4fccc8969dbd56acebf11825d2c69c
tree086e19658e58797352c9320952cfde77dfab3a7d
parentc7b6128a8db1db6dd1a30a1bac72bcb1e57a094f
atmel: use eth_hw_addr_set()

Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

Use a buffer on the stack. Note that atmel_get_mib() is a wrapper
around atmel_copy_to_host(). For the to device direction we just
need to make sure functions respect argument being cost.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211018235021.1279697-7-kuba@kernel.org
drivers/net/wireless/atmel/atmel.c