lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1457621884-2479-3-git-send-email-git@karolherbst.de>
Date:	Thu, 10 Mar 2016 15:58:04 +0100
From:	Karol Herbst <git@...olherbst.de>
To:	linux-kernel@...r.kernel.org
Cc:	"David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Karol Herbst <nouveau@...olherbst.de>
Subject: [PATCH 2/2] net/forcedeth: add wol p support

REd on my mac mini. No idea if that also works on other ethernet cards
supported by forcedeth, but I doubt anybody cares at all, otherwise somebody
else would have REd it already.

Signed-off-by: Karol Herbst <nouveau@...olherbst.de>
---
 drivers/net/ethernet/nvidia/forcedeth.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index bdce33b..8e4e894 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -291,6 +291,7 @@ enum {
 #define NVREG_WAKEUPFLAGS_ACCEPT_WAKEUPPAT	0x02
 #define NVREG_WAKEUPFLAGS_ACCEPT_LINKCHANGE	0x04
 #define NVREG_WAKEUPFLAGS_ENABLE_G	0x01111
+#define NVREG_WAKEUPFLAGS_ENABLE_P	0x12000
 
 	NvRegMgmtUnitGetVersion = 0x204,
 #define NVREG_MGMTUNITGETVERSION	0x01
@@ -4216,12 +4217,14 @@ static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 static void nv_get_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
 {
 	struct fe_priv *np = netdev_priv(dev);
-	wolinfo->supported = WAKE_MAGIC;
+	wolinfo->supported = WAKE_MAGIC | WAKE_PHY;
 
 	spin_lock_irq(&np->lock);
 	wolinfo->wolopts = 0;
 	if (np->wolenabled & WAKE_MAGIC)
 		wolinfo->wolopts |= WAKE_MAGIC;
+	if (np->wolenabled & WAKE_PHY)
+		wolinfo->wolopts |= WAKE_PHY;
 	spin_unlock_irq(&np->lock);
 }
 
@@ -4236,6 +4239,10 @@ static int nv_set_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
 		np->wolenabled |= WAKE_MAGIC;
 		np->wol_flags |= NVREG_WAKEUPFLAGS_ENABLE_G;
 	}
+	if (wolinfo->wolopts & WAKE_PHY) {
+		np->wolenabled |= WAKE_PHY;
+		np->wol_flags |= NVREG_WAKEUPFLAGS_ENABLE_P;
+	}
 	if (netif_running(dev)) {
 		spin_lock_irq(&np->lock);
 		writel(np->wol_flags, base + NvRegWakeUpFlags);
-- 
2.7.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ