Re: [PATCH net-next v3 2/7] net: dsa: microchip: Set unique MAC at startup for WoL support

From: Andrew Lunn
Date: Sat Oct 14 2023 - 13:05:45 EST


On Fri, Oct 13, 2023 at 02:24:00PM +0200, Oleksij Rempel wrote:
> Set a unique global MAC address for each switch on the network at system
> startup by syncing the switch's global MAC address with the Ethernet
> address of the DSA master interface. This is crucial for supporting
> Wake-on-LAN (WoL) functionality, as it requires a unique address for
> each switch.
>
> Although the operation is performed only at system start and won't sync
> if the master Ethernet address changes dynamically, it lays the
> groundwork for WoL support by ensuring a unique MAC address for each
> switch.

I've not been following this patchset, so sorry if i make points
others have asked on earlier versions.

Maybe it would be good to add that the hardware only supports one MAC
address for all ports for WoL, and its this address. At least that is
my assumption.

> + * ksz_cmn_set_default_switch_mac_addr - Set the switch's global MAC address
> + * from master port.

Florian is doing a search replace to make use of the word `conduit`.


> @@ -3572,8 +3633,6 @@ static int ksz_switch_macaddr_get(struct dsa_switch *ds, int port,
> const unsigned char *addr = slave->dev_addr;

and this might need to change to user?