]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dp83867: Fix WoL SecureOn password
authorDan Murphy <dmurphy@ti.com>
Wed, 2 Sep 2020 19:27:04 +0000 (14:27 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Sep 2020 23:04:59 +0000 (16:04 -0700)
Fix the registers being written to as the values were being over written
when writing the same registers.

Fixes: d5eb566fa58b ("net: phy: dp83867: support Wake on LAN")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/dp83867.c

index f3c04981b8da67846eb9c0e5b20208741aecd3cc..cd7032628a28ceeec4d55ba4594269b3e09d5e84 100644 (file)
@@ -215,9 +215,9 @@ static int dp83867_set_wol(struct phy_device *phydev,
                if (wol->wolopts & WAKE_MAGICSECURE) {
                        phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RXFSOP1,
                                      (wol->sopass[1] << 8) | wol->sopass[0]);
-                       phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RXFSOP1,
+                       phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RXFSOP2,
                                      (wol->sopass[3] << 8) | wol->sopass[2]);
-                       phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RXFSOP1,
+                       phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RXFSOP3,
                                      (wol->sopass[5] << 8) | wol->sopass[4]);
 
                        val_rxcfg |= DP83867_WOL_SEC_EN;