[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211015193848.779420-1-kuba@kernel.org>
Date: Fri, 15 Oct 2021 12:38:42 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: netdev@...r.kernel.org
Cc: olteanv@...il.com, andrew@...n.ch, idosch@...sch.org,
f.fainelli@...il.com, Jakub Kicinski <kuba@...nel.org>
Subject: [RFC net-next 0/6] ethernet: add eth_hw_addr_set_port()
While doing the last polishing of the drivers/ethernet
changes I realized we have a handful of drivers offsetting
some base MAC addr by an id. So I decided to add a helper
for it. The helper takes care of wrapping which is probably
not 100% necessary but seems like a good idea. And it saves
driver side LoC (the diffstat is actually negative if we
compare against the changes I'd have to make if I was to
convert all these drivers to not operate directly on
netdev->dev_addr).
Sending as RFC, because feedback welcome.. and it may
be weekend for Ido.
Jakub Kicinski (6):
ethernet: add a helper for assigning port addresses
ethernet: ocelot: use eth_hw_addr_set_port()
ethernet: prestera: use eth_hw_addr_set_port()
ethernet: fec: use eth_hw_addr_set_port()
ethernet: mlxsw: use eth_hw_addr_set_port()
ethernet: sparx5: use eth_hw_addr_set_port()
drivers/net/ethernet/freescale/fec_main.c | 5 +----
.../ethernet/marvell/prestera/prestera_main.c | 5 +++--
drivers/net/ethernet/mellanox/mlxsw/minimal.c | 9 +++-----
.../net/ethernet/mellanox/mlxsw/spectrum.c | 8 +++----
.../ethernet/microchip/sparx5/sparx5_netdev.c | 4 +---
drivers/net/ethernet/mscc/ocelot_net.c | 3 +--
include/linux/etherdevice.h | 21 +++++++++++++++++++
7 files changed, 34 insertions(+), 21 deletions(-)
--
2.31.1
Powered by blists - more mailing lists