lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120412.163258.602029261264172098.davem@davemloft.net>
Date:	Thu, 12 Apr 2012 16:32:58 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	peppe.cavallaro@...com
Cc:	netdev@...r.kernel.org, bhutchings@...arflare.com,
	rayagond@...avyalabs.com
Subject: Re: [net-next 3/4 (V3)] stmmac: add the Energy Efficient Ethernet
 support

From: Giuseppe CAVALLARO <peppe.cavallaro@...com>
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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ