r8169: remove rtl_hw_start_8168bef
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 21 Oct 2019 19:24:15 +0000 (21:24 +0200)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 18:27:01 +0000 (11:27 -0700)
We can remove rtl_hw_start_8168bef() and use rtl_hw_start_8168b()
instead because setting register Config4 is done in
rtl_jumbo_config(), being called from rtl_hw_start().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/realtek/r8169_main.c

index 481a6df5966ab846b6485064520917f1ae97bcbf..57942383b73dd4961b9be2a1855d8ad38d2760ed 100644 (file)
@@ -4415,18 +4415,11 @@ static void rtl8168g_set_pause_thresholds(struct rtl8169_private *tp,
        rtl_eri_write(tp, 0xd0, ERIAR_MASK_0001, high);
 }
 
-static void rtl_hw_start_8168bb(struct rtl8169_private *tp)
+static void rtl_hw_start_8168b(struct rtl8169_private *tp)
 {
        RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en);
 }
 
-static void rtl_hw_start_8168bef(struct rtl8169_private *tp)
-{
-       rtl_hw_start_8168bb(tp);
-
-       RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~(1 << 0));
-}
-
 static void __rtl_hw_start_8168cp(struct rtl8169_private *tp)
 {
        RTL_W8(tp, Config1, RTL_R8(tp, Config1) | Speed_down);
@@ -5290,13 +5283,13 @@ static void rtl_hw_config(struct rtl8169_private *tp)
                [RTL_GIGA_MAC_VER_08] = rtl_hw_start_8102e_3,
                [RTL_GIGA_MAC_VER_09] = rtl_hw_start_8102e_2,
                [RTL_GIGA_MAC_VER_10] = NULL,
-               [RTL_GIGA_MAC_VER_11] = rtl_hw_start_8168bb,
-               [RTL_GIGA_MAC_VER_12] = rtl_hw_start_8168bef,
+               [RTL_GIGA_MAC_VER_11] = rtl_hw_start_8168b,
+               [RTL_GIGA_MAC_VER_12] = rtl_hw_start_8168b,
                [RTL_GIGA_MAC_VER_13] = NULL,
                [RTL_GIGA_MAC_VER_14] = NULL,
                [RTL_GIGA_MAC_VER_15] = NULL,
                [RTL_GIGA_MAC_VER_16] = NULL,
-               [RTL_GIGA_MAC_VER_17] = rtl_hw_start_8168bef,
+               [RTL_GIGA_MAC_VER_17] = rtl_hw_start_8168b,
                [RTL_GIGA_MAC_VER_18] = rtl_hw_start_8168cp_1,
                [RTL_GIGA_MAC_VER_19] = rtl_hw_start_8168c_1,
                [RTL_GIGA_MAC_VER_20] = rtl_hw_start_8168c_2,