Re: [PATCH v7 net-next 6/8] net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2023-12-11 12:12:47
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2023-12-11 12:12:47
On Fri, Dec 08, 2023 at 02:33:00PM +0200, Roger Quadros wrote:
But,
bool __ethtool_dev_mm_supported(struct net_device *dev)
{
const struct ethtool_ops *ops = dev->ethtool_ops;
struct ethtool_mm_state state = {};
int ret = -EOPNOTSUPP;
if (ops && ops->get_mm)
ret = ops->get_mm(dev, &state);
return !ret;
}
So looks like it is better to not define get_mm/set_mm if CONFIG_TI_AM65_CPSW_TAS is disabled.Why not? __ethtool_dev_mm_supported() returns true if os->get_mm() is implemented and returns 0. You return -EOPNOTSUPP, and that's different from 0.