diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2020-06-17 22:54:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-18 20:38:36 -0700 |
commit | a2ee847242b35816f57b0731aab9fd6e8693ae65 (patch) | |
tree | 536b62f96036b85b1d1970c6233054c47453cca0 /drivers/net/ethernet/realtek | |
parent | 0c28a63a47bfa7497e4dce79f6bb53a00d8f6aa0 (diff) | |
download | linux-a2ee847242b35816f57b0731aab9fd6e8693ae65.tar.gz linux-a2ee847242b35816f57b0731aab9fd6e8693ae65.tar.bz2 linux-a2ee847242b35816f57b0731aab9fd6e8693ae65.zip |
r8169: move updating counters to rtl8169_down
Counters are updated whenever we go down, therefore move the call to
rtl8169_down().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169_main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index afcdaace2716..9f99b3f076d8 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4638,6 +4638,8 @@ static void rtl8169_down(struct rtl8169_private *tp) phy_stop(tp->phydev); + rtl8169_update_counters(tp); + rtl8169_cleanup(tp, true); rtl_pll_power_down(tp); @@ -4652,9 +4654,6 @@ static int rtl8169_close(struct net_device *dev) pm_runtime_get_sync(&pdev->dev); - /* Update counters before going down */ - rtl8169_update_counters(tp); - netif_stop_queue(dev); rtl8169_down(tp); rtl8169_rx_clear(tp); @@ -4875,9 +4874,6 @@ static int rtl8169_runtime_suspend(struct device *device) rtl8169_net_suspend(tp); - /* Update counters before going runtime suspend */ - rtl8169_update_counters(tp); - return 0; } |