> +static int mlx5e_get_link_down_reason(struct net_device *netdev, > + struct ethtool_link_down_reason *ldr) > +{ > + struct mlx5e_priv *priv = netdev_priv(netdev); > + u16 monitor_opcode; > + int err; > + > + if (!netif_running(netdev)) { > + ldr->reason = ETHTOOL_LINK_NETDEV_CARRIER_DOWN; > + return 0; > + }
This is generic, will work for any interface. The same is true for ADMIN_DOWN. Either it is not required at all, since the information is available via other means, or it should be in the core. Andrew