netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Hao Lan <lanhao@huawei.com>
Cc: andrew@lunn.ch, davem@davemloft.net, kuba@kernel.org,
	alexander.duyck@gmail.com, yisen.zhuang@huawei.com,
	salil.mehta@huawei.com, edumazet@google.com, pabeni@redhat.com,
	richardcochran@gmail.com, shenjian15@huawei.com,
	netdev@vger.kernel.org, wangjie125@huawei.com
Subject: Re: [PATCH v3 net-next] net: hns3: support wake on lan configuration and query
Date: Sat, 11 Mar 2023 13:15:24 +0100	[thread overview]
Message-ID: <ZAxw3PWVLiGQtTMS@corigine.com> (raw)
In-Reply-To: <20230310081404.947-1-lanhao@huawei.com>

On Fri, Mar 10, 2023 at 04:14:04PM +0800, Hao Lan wrote:
> The HNS3 driver supports Wake-on-LAN, which can wake up
> the server from power off state to power on state by magic
> packet or magic security packet.
> 
> ChangeLog:
> v1->v2:
> Deleted the debugfs function that overlaps with the ethtool function
> from suggestion of Andrew Lunn.
> 
> v2->v3:
> Return the wol configuration stored in driver,
> suggested by Alexander H Duyck.
> 
> Signed-off-by: Hao Lan <lanhao@huawei.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>

...

> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> index 55306fe8a540..10de2b4c401b 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> @@ -2063,6 +2063,31 @@ static int hns3_get_link_ext_state(struct net_device *netdev,
>  	return -ENODATA;
>  }
>  
> +static void hns3_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
> +{
> +	struct hnae3_handle *handle = hns3_get_handle(netdev);
> +	struct hnae3_ae_dev *ae_dev = pci_get_drvdata(handle->pdev);
> +	const struct hnae3_ae_ops *ops = handle->ae_algo->ops;

nit: the local variable declarations could be reverse xmas tree
     - longest line to shortest line. One option being:

	const struct hnae3_ae_ops *ops;
	struct hnae3_handle *handle;
	struct hnae3_ae_dev *ae_dev;

	handle = hns3_get_handle(netdev);
	ae_dev = pci_get_drvdata(handle->pdev);
	ops = handle->ae_algo->ops;

Likewise elsewhere in this patch.

  reply	other threads:[~2023-03-11 12:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  8:14 [PATCH v3 net-next] net: hns3: support wake on lan configuration and query Hao Lan
2023-03-11 12:15 ` Simon Horman [this message]
2023-03-13  8:05   ` Hao Lan
2023-03-13 19:16     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAxw3PWVLiGQtTMS@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=alexander.duyck@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=lanhao@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=salil.mehta@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=wangjie125@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).