Skip to content

Commit

Permalink
r8169: don't apply UDP padding quirk on RTL8126A
Browse files Browse the repository at this point in the history
[ 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 <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
hkallweit authored and gregkh committed Dec 14, 2024
1 parent c76d0eb commit 8945c33
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4233,8 +4233,8 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
{
unsigned int padto = 0, len = skb->len;

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

Expand All @@ -4258,9 +4258,15 @@ static unsigned int rtl8125_quirk_udp_padto(struct rtl8169_private *tp,
static unsigned int rtl_quirk_packet_padto(struct rtl8169_private *tp,
struct sk_buff *skb)
{
unsigned int padto;
unsigned int padto = 0;

padto = rtl8125_quirk_udp_padto(tp, skb);
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_63:
padto = rtl8125_quirk_udp_padto(tp, skb);
break;
default:
break;
}

switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_34:
Expand Down

0 comments on commit 8945c33

Please sign in to comment.