> +static void linkstate_get_ext_state(struct net_device *dev,
> + struct linkstate_reply_data *data)
> +{
> + int err;
> +
> + if (!dev->ethtool_ops->get_ext_state)
> + return;
> +
> + err = dev->ethtool_ops->get_ext_state(dev,
> &data->ethtool_ext_state_info);
> + if (err) {
> + data->ext_state_provided = false;
> + return;
> + }
> +
> + data->ext_state_provided = true;
> }
A void function is rather odd for this sort of thing. It is much more
normal to return an error code, -EOPNOTSUPP if the op is not available,
or 0 if it all went well.
Andrew