]> git.baikalelectronics.ru Git - kernel.git/commitdiff
r8169: restrict rtl_is_8168evl_up to RTL8168 chip versions
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 28 Aug 2019 20:24:54 +0000 (22:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Aug 2019 00:47:26 +0000 (17:47 -0700)
Extend helper rtl_is_8168evl_up to properly work once we add
mac version numbers >51 for RTL8125.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c

index bf00c3d8f4c8edc3bb5856a283d4c33e72b0aaf1..e9d900c112dcd0b714b4a1e9162969f7cd7201c6 100644 (file)
@@ -730,7 +730,8 @@ static void rtl_tx_performance_tweak(struct rtl8169_private *tp, u16 force)
 static bool rtl_is_8168evl_up(struct rtl8169_private *tp)
 {
        return tp->mac_version >= RTL_GIGA_MAC_VER_34 &&
-              tp->mac_version != RTL_GIGA_MAC_VER_39;
+              tp->mac_version != RTL_GIGA_MAC_VER_39 &&
+              tp->mac_version <= RTL_GIGA_MAC_VER_51;
 }
 
 static bool rtl_supports_eee(struct rtl8169_private *tp)