Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: thunderbolt: Allow changing MAC address of the device

The MAC address we use is based on a suggestion in the USB4 Inter-domain
spec but it is not really used in the USB4NET protocol. It is more
targeted for the upper layers of the network stack. There is no reason
why it should not be changed by the userspace for example if needed for
bonding.

Reported-by: Ian MacDonald <ian@netstatz.com>
Closes: https://lore.kernel.org/netdev/CAFJzfF9N4Hak23sc-zh0jMobbkjK7rg4odhic1DQ1cC+=MoQoA@mail.gmail.com/
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://patch.msgid.link/20260115115646.328898-2-mika.westerberg@linux.intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Mika Westerberg and committed by
Jakub Kicinski
8411d728 456083e7

+4
+4
drivers/net/thunderbolt/main.c
··· 1261 1261 .ndo_open = tbnet_open, 1262 1262 .ndo_stop = tbnet_stop, 1263 1263 .ndo_start_xmit = tbnet_start_xmit, 1264 + .ndo_set_mac_address = eth_mac_addr, 1264 1265 .ndo_get_stats64 = tbnet_get_stats64, 1265 1266 }; 1266 1267 ··· 1282 1281 hash = jhash2((u32 *)xd->local_uuid, 4, hash); 1283 1282 addr[5] = hash & 0xff; 1284 1283 eth_hw_addr_set(dev, addr); 1284 + 1285 + /* Allow changing it if needed */ 1286 + dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; 1285 1287 } 1286 1288 1287 1289 static int tbnet_probe(struct tb_service *svc, const struct tb_service_id *id)