[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2ad0905-bcb8-5af5-4688-218617c790ca@wolfvision.net>
Date: Fri, 25 Oct 2019 07:55:27 +0000
From: Thomas Hämmerle
<Thomas.Haemmerle@...fvision.net>
To: David Miller <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"andrew@...n.ch" <andrew@...n.ch>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"hkallweit1@...il.com" <hkallweit1@...il.com>,
"m.tretter@...gutronix.de" <m.tretter@...gutronix.de>
Subject: Re: [PATCH v2] net: phy: dp83867: support Wake on LAN
Hi David,
On 25.10.19 00:17, David Miller wrote:
> From: Thomas Hämmerle <Thomas.Haemmerle@...fvision.net>
> Date: Tue, 22 Oct 2019 13:06:35 +0000
>
>> + const u8 *mac;
>> +
>> + val_rxcfg = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RXFCFG);
>> + val_micr = phy_read(phydev, MII_DP83867_MICR);
>> +
>> + if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST |
>> + WAKE_BCAST)) {
>> + val_rxcfg |= DP83867_WOL_ENH_MAC;
>> + val_micr |= MII_DP83867_MICR_WOL_INT_EN;
>> +
>> + if (wol->wolopts & WAKE_MAGIC) {
>> + mac = (const u8 *)ndev->dev_addr;
>
> Please declare 'mac' non-const and get rid of this cast, as suggested by Heiner.
>
I agree with Heiner and you, however since I first took a into other phy
drivers (at803x, dp83822, dp83tc811) and how set_wol() is done there,
I've implemented it the same way.
So maybe we should also change it in the other drivers.
Thomas
Powered by blists - more mailing lists