summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2020-04-28 23:54:12 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-01 06:51:13 +0300
commitb410439ca371334cd9e5772e411b5e2b6b2d0c9a (patch)
tree789385c6752aafd39dcff7efa8f1400adf4a71a0 /drivers/net/ethernet/realtek
parent78734404ef9c133eac70339415c8028dbe19109a (diff)
downloadlinux-b410439ca371334cd9e5772e411b5e2b6b2d0c9a.tar.xz
r8169: improve max jumbo packet size definition
Sync definition of max jumbo packet size with vendor driver and reserve 22 bytes for VLAN ethernet header plus checksum. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index aa3e63e031da..82f2ae7b6cf7 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -88,10 +88,10 @@
#define RTL_R16(tp, reg) readw(tp->mmio_addr + (reg))
#define RTL_R32(tp, reg) readl(tp->mmio_addr + (reg))
-#define JUMBO_4K (4*1024 - ETH_HLEN - 2)
-#define JUMBO_6K (6*1024 - ETH_HLEN - 2)
-#define JUMBO_7K (7*1024 - ETH_HLEN - 2)
-#define JUMBO_9K (9*1024 - ETH_HLEN - 2)
+#define JUMBO_4K (4 * SZ_1K - VLAN_ETH_HLEN - ETH_FCS_LEN)
+#define JUMBO_6K (6 * SZ_1K - VLAN_ETH_HLEN - ETH_FCS_LEN)
+#define JUMBO_7K (7 * SZ_1K - VLAN_ETH_HLEN - ETH_FCS_LEN)
+#define JUMBO_9K (9 * SZ_1K - VLAN_ETH_HLEN - ETH_FCS_LEN)
static const struct {
const char *name;