|
|
Re: [net-next 3/4 (V3)] stmmac: add the Energy Efficient Ethernet support |
From: Giuseppe CAVALLARO <peppe.cavallaro@xxxxxx>
Date: Fri, 6 Apr 2012 11:29:17 +0200
> +static int stmmac_ethtool_op_set_eee(struct net_device *dev,
> + struct ethtool_value *eee)
> +{
> + struct stmmac_priv *priv = netdev_priv(dev);
> +
> + if ((!eee->data) && (priv->eee_enabled)) {
> + stmmac_disable_eee_mode(priv);
> + priv->eee_enabled = eee->data;
> + } else if ((eee->data) && (!priv->eee_enabled))
> + /* We are asking for enabling the EEE but this
> + * has to be verified by invoking the eee_init function.
> + * For this reason we cannot set eee_enabled to
> + * eee->data, directly. */
> + priv->eee_enabled = stmmac_eee_init(priv);
> +
> + return 0;
If stmmac_eee_init() determines that it cannot enable eee, you should
return an appropriate error code here so that ethtool can report that
fact.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |