diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2023-01-19 13:27:00 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-23 13:44:18 +0100 |
commit | 5f6c2d498ad97cf9f85b81c0fbb205abbcdfe3f8 (patch) | |
tree | 14b229ff7d38066b0fa61c5907751d8ab68c66c8 /include/net/dsa.h | |
parent | net: ethtool: add helpers for MM fragment size translation (diff) | |
download | linux-5f6c2d498ad97cf9f85b81c0fbb205abbcdfe3f8.tar.xz linux-5f6c2d498ad97cf9f85b81c0fbb205abbcdfe3f8.zip |
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>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 96086289aa9b..a15f17a38eca 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -938,6 +938,17 @@ struct dsa_switch_ops { 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 */ int (*port_get_default_prio)(struct dsa_switch *ds, int port); |