net: dsa: add plumbing for changing and getting MAC merge layer state

The DSA core is in charge of the ethtool_ops of the net devices
associated with switch ports, so in case a hardware driver supports the
MAC merge layer, DSA must pass the callbacks through to the driver.
Add support for precisely that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vladimir Oltean
2023-01-19 14:27:00 +02:00
committed by David S. Miller
parent dd1c416450
commit 5f6c2d498a
2 changed files with 48 additions and 0 deletions

View File

@@ -937,6 +937,17 @@ struct dsa_switch_ops {
int (*get_ts_info)(struct dsa_switch *ds, int port,
struct ethtool_ts_info *ts);
/*
* ethtool MAC merge layer
*/
int (*get_mm)(struct dsa_switch *ds, int port,
struct ethtool_mm_state *state);
int (*set_mm)(struct dsa_switch *ds, int port,
struct ethtool_mm_cfg *cfg,
struct netlink_ext_ack *extack);
void (*get_mm_stats)(struct dsa_switch *ds, int port,
struct ethtool_mm_stats *stats);
/*
* DCB ops
*/