[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220615094411.237uekup24skoeu4@microsemi.com>
Date: Wed, 15 Jun 2022 15:14:11 +0530
From: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>, <kuba@...nel.org>,
<linux-kernel@...r.kernel.org>, <bryan.whitehead@...rochip.com>,
<lxu@...linear.com>, <richardcochran@...il.com>,
<UNGLinuxDriver@...rochip.com>, <Ian.Saturley@...rochip.com>
Subject: Re: [PATCH net-next 2/5] net: lan743x: Add support to Secure-ON WOL
Hi Andrew,
Thank you for review comments.
The 06/14/2022 22:59, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Tue, Jun 14, 2022 at 04:04:21PM +0530, Raju Lakkaraju wrote:
> > Add support to Magic Packet Detection with Secure-ON for PCI11010/PCI11414 chips
> >
> > Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
> > ---
> > .../net/ethernet/microchip/lan743x_ethtool.c | 14 +++++++++
> > drivers/net/ethernet/microchip/lan743x_main.c | 29 +++++++++++++++++++
> > drivers/net/ethernet/microchip/lan743x_main.h | 10 +++++++
> > 3 files changed, 53 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c
> > index 48b19dcd4351..b591a7aea937 100644
> > --- a/drivers/net/ethernet/microchip/lan743x_ethtool.c
> > +++ b/drivers/net/ethernet/microchip/lan743x_ethtool.c
> > @@ -1149,7 +1149,13 @@ static void lan743x_ethtool_get_wol(struct net_device *netdev,
> > wol->supported |= WAKE_BCAST | WAKE_UCAST | WAKE_MCAST |
> > WAKE_MAGIC | WAKE_PHY | WAKE_ARP;
> >
> > + if (adapter->is_pci11x1x)
> > + wol->supported |= WAKE_MAGICSECURE;
> > +
> > wol->wolopts |= adapter->wolopts;
> > + if (adapter->wolopts & WAKE_MAGICSECURE)
> > + memcpy(wol->sopass, adapter->sopass,
> > + SOPASS_MAX * sizeof(wol->sopass[0]));
>
> sizeof(wol->sopass) is simpler. That is what other drivers use.
>
Accepted. I'll change.
> > + if (wol->wolopts & WAKE_MAGICSECURE &&
> > + wol->wolopts & WAKE_MAGIC) {
> > + memcpy(adapter->sopass, wol->sopass,
> > + SOPASS_MAX * sizeof(wol->sopass[0]));
> > + adapter->wolopts |= WAKE_MAGICSECURE;
> > + } else {
> > + memset(adapter->sopass, 0, sizeof(u8) * SOPASS_MAX);
> > + }
>
> Same here.
>
Accepted. I'll change.
> Andrew
--
Thanks,
Raju
Powered by blists - more mailing lists