Re: [PATCH net-next v1 4/4] net: phy: c45: genphy_c45_ethtool_set_eee: validate EEE link modes

From: Andrew Lunn
Date: Mon Feb 20 2023 - 10:35:10 EST


> + adv[0] = data->advertised;

Same here please.

> + linkmode_andnot(adv, adv, phydev->supported_eee);
> + if (!linkmode_empty(adv)) {
> + phydev_warn(phydev, "At least some EEE link modes are not supported.\n");
> + return -EINVAL;
> + }
> +
> phydev->advertising_eee[0] = data->advertised;

...

Andrew