Skip to content

Commit

Permalink
r8169: move updating counters to rtl8169_down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Jun 19, 2020
1 parent 0c28a63 commit a2ee847
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit a2ee847

Please sign in to comment.