summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cortina
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-07-11 21:32:45 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-12 17:39:15 -0700
commit430ac34de9693bfe4bea0bab830e0ca0be9ef4b9 (patch)
treedd4b378fb1925c134af8e337a4976aa217e55dce /drivers/net/ethernet/cortina
parent06d51513129495fba9bb68ef7aa8cc5ca60e0556 (diff)
downloadlinux-430ac34de9693bfe4bea0bab830e0ca0be9ef4b9.tar.bz2
net: gemini: Indicate that we can handle jumboframes
The hardware supposedly handles frames up to 10236 bytes and implements .ndo_change_mtu() so accept 10236 minus the ethernet header for a VLAN tagged frame on the netdevices. Use ETH_MIN_MTU as minimum MTU. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cortina')
-rw-r--r--drivers/net/ethernet/cortina/gemini.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
index 050fffb77d11..1c9ad3630c77 100644
--- a/drivers/net/ethernet/cortina/gemini.c
+++ b/drivers/net/ethernet/cortina/gemini.c
@@ -2476,6 +2476,11 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev)
netdev->hw_features = GMAC_OFFLOAD_FEATURES;
netdev->features |= GMAC_OFFLOAD_FEATURES | NETIF_F_GRO;
+ /* We can handle jumbo frames up to 10236 bytes so, let's accept
+ * payloads of 10236 bytes minus VLAN and ethernet header
+ */
+ netdev->min_mtu = ETH_MIN_MTU;
+ netdev->max_mtu = 10236 - VLAN_ETH_HLEN;
port->freeq_refill = 0;
netif_napi_add(netdev, &port->napi, gmac_napi_poll,