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>] [day] [month] [year] [list]
Message-Id: <1455078122-2151-1-git-send-email-asd@marian1000.go.ro>
Date:	Wed, 10 Feb 2016 06:22:02 +0200
From:	Corcodel Marian <asd@...ian1000.go.ro>
To:	netdev@...r.kernel.org
Cc:	Corcodel Marian <asd@...ian1000.go.ro>
Subject: [PATCH net v4] r8169: Remove duplicate of RTL_FEATURE_WOL

This patch remove multiple invocation of RTL_FEATURE_WOL.

Signed-off-by: Corcodel Marian <asd@...ian1000.go.ro>
---
 drivers/net/ethernet/realtek/r8169.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 17d5571..1f75478 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8289,18 +8289,20 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	case RTL_GIGA_MAC_VER_49:
 	case RTL_GIGA_MAC_VER_50:
 	case RTL_GIGA_MAC_VER_51:
-		if (rtl_eri_read(tp, 0xdc, ERIAR_EXGMAC) & MagicPacket_v2)
-			tp->features |= RTL_FEATURE_WOL;
-		if ((RTL_R8(Config3) & LinkUp) != 0)
-			tp->features |= RTL_FEATURE_WOL;
+		if (rtl_eri_read(tp, 0xdc, ERIAR_EXGMAC) & MagicPacket_v2) {
+			if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0) {
+				if ((RTL_R8(Config3) & LinkUp) != 0)
+					tp->features |= RTL_FEATURE_WOL;
+			}
+		}
 		break;
 	default:
-		if ((RTL_R8(Config3) & (LinkUp | MagicPacket)) != 0)
-			tp->features |= RTL_FEATURE_WOL;
+		if ((RTL_R8(Config3) & (LinkUp | MagicPacket)) != 0) {
+			if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0)
+				tp->features |= RTL_FEATURE_WOL;
+		}
 		break;
 	}
-	if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0)
-		tp->features |= RTL_FEATURE_WOL;
 	tp->features |= rtl_try_msi(tp, cfg);
 	RTL_W8(Cfg9346, Cfg9346_Lock);
 
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ