[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160313.221434.1980290565680430002.davem@davemloft.net>
Date: Sun, 13 Mar 2016 22:14:34 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: git@...olherbst.de
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] net/forcedeth: refactor wol support to make it
easier to add more wol modes
From: Karol Herbst <git@...olherbst.de>
Date: Thu, 10 Mar 2016 15:58:03 +0100
> @@ -4218,8 +4219,9 @@ static void nv_get_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
> wolinfo->supported = WAKE_MAGIC;
>
> spin_lock_irq(&np->lock);
> - if (np->wolenabled)
> - wolinfo->wolopts = WAKE_MAGIC;
> + wolinfo->wolopts = 0;
> + if (np->wolenabled & WAKE_MAGIC)
> + wolinfo->wolopts |= WAKE_MAGIC;
> spin_unlock_irq(&np->lock);
> }
>
When I see a change like this I can see you don't understand the
contract that exists between the ethtool core layer and your
driver.
The command info struct, in this case 'wolinfo' passed to you is
zero'd out, always.
Therefore the part of the change explicitly clearing out
wolinfo->wolopts is completely unnecessary and needs to be removed.
Thanks.
Powered by blists - more mailing lists