OpenCloudOS-Kernel/net/ncsi
Paul Fertser 2cc0f0e1b9 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>
2025-02-17 09:40:41 +01:00
..
Kconfig net/ncsi: add NCSI Intel OEM command to keep PHY up 2021-07-08 14:16:39 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
internal.h net/ncsi: fix locking in Get MAC Address handling 2025-02-17 09:40:11 +01:00
ncsi-aen.c Revert ncsi: Propagate carrier gain/loss events to the NCSI controller 2023-11-28 17:20:10 +00:00
ncsi-cmd.c net/ncsi: Add NC-SI 1.2 Get MC MAC Address command 2025-02-17 09:40:11 +01:00
ncsi-manage.c net/ncsi: wait for the last response to Deselect Package before configuring channel 2025-02-17 09:40:39 +01:00
ncsi-netlink.c net/ncsi: Fix netlink major/minor version numbers 2024-01-25 15:35:20 -08:00
ncsi-netlink.h genetlink: make genl_info->nlhdr const 2023-08-15 14:54:44 -07:00
ncsi-pkt.h net/ncsi: Add NC-SI 1.2 Get MC MAC Address command 2025-02-17 09:40:11 +01:00
ncsi-rsp.c net/ncsi: use dev_set_mac_address() for Get MC MAC Address handling 2025-02-17 09:40:41 +01:00