]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/ncsi: use dev_set_mac_address() for Get MC MAC Address handling
authorPaul Fertser <fercerpav@gmail.com>
Mon, 20 Jan 2025 13:35:36 +0000 (16:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:54 +0000 (13:49 +0100)
commit846d74f329d6df30eef8f5e4ceb57b19c315aeff
treefc13d11d3f89c558b0101ffd229e53affc1f63c0
parentba266064713c2f8d53e1438a99b37303ddfee008
net/ncsi: use dev_set_mac_address() for Get MC MAC Address handling

commit 05d91cdb1f9108426b14975ef4eeddf15875ca05 upstream.

Copy of the rationale from 790071347a0a1a89e618eedcd51c687ea783aeb3:

Change ndo_set_mac_address to dev_set_mac_address because
dev_set_mac_address provides a way to notify network layer about MAC
change. In other case, services may not aware about MAC change and keep
using old one which set from network adapter driver.

As example, DHCP client from systemd do not update MAC address without
notification from net subsystem which leads to the problem with acquiring
the right address from DHCP server.

Since dev_set_mac_address requires RTNL lock the operation can not be
performed directly in the response handler, see
9e2bbab94b88295dcc57c7580393c9ee08d7314d.

The way of selecting the first suitable MAC address from the list is
changed, instead of having the driver check it this patch just assumes
any valid MAC should be good.

Fixes: b8291cf3d118 ("net/ncsi: Add NC-SI 1.2 Get MC MAC Address command")
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ncsi/ncsi-rsp.c