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] [day] [month] [year] [list]
Message-ID: <52126A71.5050306@cogentembedded.com>
Date:	Mon, 19 Aug 2013 22:56:49 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	ujhelyi.m@...il.com
CC:	davem@...emloft.net, mugunthanvnm@...com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: cpsw: Add support for wake-on-lan for cpsw

Hello.

On 08/19/2013 02:13 PM, ujhelyi.m@...il.com wrote:

> From: Matus Ujhelyi <ujhelyi.m@...il.com>

> Signed-off-by: Matus Ujhelyi <ujhelyi.m@...il.com>
> ---
>   drivers/net/ethernet/ti/cpsw.c |   25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)

> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 22a7a43..f59302e 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -1416,6 +1416,29 @@ static int cpsw_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
>   		return -EOPNOTSUPP;
>   }
>
> +static void
> +cpsw_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
> +{
> +	struct cpsw_priv *priv = netdev_priv(ndev);
> +	int slave_no = cpsw_slave_index(priv);

    Empty line wouldn't hurt here, after declaration.

> +	wol->supported = 0;
> +	wol->wolopts = 0;
> +	if (priv->slaves[slave_no].phy)
> +		phy_ethtool_get_wol(priv->slaves[slave_no].phy, wol);
> +
> +}
> +
> +static int
> +cpsw_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
> +{
> +	struct cpsw_priv *priv = netdev_priv(ndev);
> +	int slave_no = cpsw_slave_index(priv);

    Here too...

> +	if (priv->slaves[slave_no].phy)
> +		return phy_ethtool_set_wol(priv->slaves[slave_no].phy, wol);
> +	else
> +		return -EOPNOTSUPP;
> +}
> +
>   static const struct ethtool_ops cpsw_ethtool_ops = {
>   	.get_drvinfo	= cpsw_get_drvinfo,
>   	.get_msglevel	= cpsw_get_msglevel,

WBR, Sergei

--
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