Skip to content

Commit 8945c33

Browse files
hkallweitgregkh
authored andcommitted
r8169: don't apply UDP padding quirk on RTL8126A
[ Upstream commit 87e2644 ] Vendor drivers r8125/r8126 indicate that this quirk isn't needed any longer for RTL8126A. Mimic this in r8169. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/d1317187-aa81-4a69-b831-678436e4de62@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c76d0eb commit 8945c33

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4233,8 +4233,8 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
42334233
{
42344234
unsigned int padto = 0, len = skb->len;
42354235

4236-
if (rtl_is_8125(tp) && len < 128 + RTL_MIN_PATCH_LEN &&
4237-
rtl_skb_is_udp(skb) && skb_transport_header_was_set(skb)) {
4236+
if (len < 128 + RTL_MIN_PATCH_LEN && rtl_skb_is_udp(skb) &&
4237+
skb_transport_header_was_set(skb)) {
42384238
unsigned int trans_data_len = skb_tail_pointer(skb) -
42394239
skb_transport_header(skb);
42404240

@@ -4258,9 +4258,15 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
42584258
static unsigned int rtl_quirk_packet_padto(struct rtl8169_private *tp,
42594259
struct sk_buff *skb)
42604260
{
4261-
unsigned int padto;
4261+
unsigned int padto = 0;
42624262

4263-
padto = rtl8125_quirk_udp_padto(tp, skb);
4263+
switch (tp->mac_version) {
4264+
case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_63:
4265+
padto = rtl8125_quirk_udp_padto(tp, skb);
4266+
break;
4267+
default:
4268+
break;
4269+
}
42644270

42654271
switch (tp->mac_version) {
42664272
case RTL_GIGA_MAC_VER_34:

0 commit comments

Comments
 (0)