de86c2f6cd064e91c0fed1c2bbe1d5b09e092f64
[openwrt/staging/blocktrron.git] /
1 From e3e9e9039fa6ae885c7d5c954d7b9f105fa23e8f Mon Sep 17 00:00:00 2001
2 From: Heiner Kallweit <hkallweit1@gmail.com>
3 Date: Wed, 6 Nov 2024 17:57:08 +0100
4 Subject: [PATCH] r8169: align WAKE_PHY handling with r8125/r8126 vendor
5 drivers
6
7 Vendor drivers r8125/r8126 apply this additional magic setting when
8 enabling WAKE_PHY, so do the same here.
9
10 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
11 Reviewed-by: Simon Horman <horms@kernel.org>
12 Link: https://patch.msgid.link/51130715-45be-4db5-abb7-05d87e1f5df9@gmail.com
13 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
14 ---
15 drivers/net/ethernet/realtek/r8169_main.c | 3 +++
16 1 file changed, 3 insertions(+)
17
18 --- a/drivers/net/ethernet/realtek/r8169_main.c
19 +++ b/drivers/net/ethernet/realtek/r8169_main.c
20 @@ -1563,6 +1563,9 @@ static void __rtl8169_set_wol(struct rtl
21 }
22
23 r8169_mod_reg8_cond(tp, Config3, LinkUp, wolopts & WAKE_PHY);
24 + if (rtl_is_8125(tp))
25 + r8168_mac_ocp_modify(tp, 0xe0c6, 0x3f,
26 + wolopts & WAKE_PHY ? 0x13 : 0);
27 r8169_mod_reg8_cond(tp, Config5, UWF, wolopts & WAKE_UCAST);
28 r8169_mod_reg8_cond(tp, Config5, BWF, wolopts & WAKE_BCAST);
29 r8169_mod_reg8_cond(tp, Config5, MWF, wolopts & WAKE_MCAST);