Skip to content

Commit 793f8ac

Browse files
RealtekNICgregkh
authored andcommitted
r8169: move rtl_wol_enable_rx() and rtl_prepare_power_down()
[ Upstream commit ad42566 ] There is no functional change. Moving these two functions for following patch "r8169: fix dmar pte write access is not set error". Signed-off-by: Chunhao Lin <hau@realtek.com> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent dc07276 commit 793f8ac

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,28 +2251,6 @@ static int rtl_set_mac_address(struct net_device *dev, void *p)
22512251
return 0;
22522252
}
22532253

2254-
static void rtl_wol_enable_rx(struct rtl8169_private *tp)
2255-
{
2256-
if (tp->mac_version >= RTL_GIGA_MAC_VER_25)
2257-
RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) |
2258-
AcceptBroadcast | AcceptMulticast | AcceptMyPhys);
2259-
}
2260-
2261-
static void rtl_prepare_power_down(struct rtl8169_private *tp)
2262-
{
2263-
if (tp->dash_type != RTL_DASH_NONE)
2264-
return;
2265-
2266-
if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
2267-
tp->mac_version == RTL_GIGA_MAC_VER_33)
2268-
rtl_ephy_write(tp, 0x19, 0xff64);
2269-
2270-
if (device_may_wakeup(tp_to_dev(tp))) {
2271-
phy_speed_down(tp->phydev, false);
2272-
rtl_wol_enable_rx(tp);
2273-
}
2274-
}
2275-
22762254
static void rtl_init_rxcfg(struct rtl8169_private *tp)
22772255
{
22782256
switch (tp->mac_version) {
@@ -2492,6 +2470,28 @@ static void rtl_enable_rxdvgate(struct rtl8169_private *tp)
24922470
rtl_wait_txrx_fifo_empty(tp);
24932471
}
24942472

2473+
static void rtl_wol_enable_rx(struct rtl8169_private *tp)
2474+
{
2475+
if (tp->mac_version >= RTL_GIGA_MAC_VER_25)
2476+
RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) |
2477+
AcceptBroadcast | AcceptMulticast | AcceptMyPhys);
2478+
}
2479+
2480+
static void rtl_prepare_power_down(struct rtl8169_private *tp)
2481+
{
2482+
if (tp->dash_type != RTL_DASH_NONE)
2483+
return;
2484+
2485+
if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
2486+
tp->mac_version == RTL_GIGA_MAC_VER_33)
2487+
rtl_ephy_write(tp, 0x19, 0xff64);
2488+
2489+
if (device_may_wakeup(tp_to_dev(tp))) {
2490+
phy_speed_down(tp->phydev, false);
2491+
rtl_wol_enable_rx(tp);
2492+
}
2493+
}
2494+
24952495
static void rtl_set_tx_config_registers(struct rtl8169_private *tp)
24962496
{
24972497
u32 val = TX_DMA_BURST << TxDMAShift |

0 commit comments

Comments
 (0)