diff options
author | David S. Miller <davem@davemloft.net> | 2016-10-18 11:34:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-18 11:34:22 -0400 |
commit | 1441dc99faba2b3fd3a55e18cd955feb3667346a (patch) | |
tree | 97dff06ab97f91387a88de2dfb3c6d959609d321 /drivers/net/ethernet/amd/amd8111e.c | |
parent | 60d2d8dd9e1a2580541a3d28eb90d092381e2153 (diff) | |
parent | 44770e1180decf9b483d9b537fdad385a4fbf462 (diff) |
Merge branch 'ethernet-use-core-min-max-mtu'
Jarod Wilson says:
====================
ethernet: use core min/max MTU checking
Now that the network stack core min/max MTU checking infrastructure is in
place, time to start making drivers use it. We'll start with the easiest
ones, the ethernet drivers, split roughly by vendor, with a catch-all
patch at the end.
For the most part, every patch does the same essential thing: removes the
MTU range checking from the drivers' ndo_change_mtu function, puts those
ranges into the core net_device min_mtu and max_mtu fields, and where
possible, removes ndo_change_mtu functions entirely.
These patches have all been built through the 0-day build infrastructure
provided by Intel, on top of net-next as of October 17.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/amd8111e.c')
-rw-r--r-- | drivers/net/ethernet/amd/amd8111e.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c index f92cc97151ec..84b4ffbd084a 100644 --- a/drivers/net/ethernet/amd/amd8111e.c +++ b/drivers/net/ethernet/amd/amd8111e.c @@ -1556,9 +1556,6 @@ static int amd8111e_change_mtu(struct net_device *dev, int new_mtu) struct amd8111e_priv *lp = netdev_priv(dev); int err; - if ((new_mtu < AMD8111E_MIN_MTU) || (new_mtu > AMD8111E_MAX_MTU)) - return -EINVAL; - if (!netif_running(dev)) { /* new_mtu will be used * when device starts netxt time @@ -1874,6 +1871,8 @@ static int amd8111e_probe_one(struct pci_dev *pdev, dev->ethtool_ops = &ops; dev->irq =pdev->irq; dev->watchdog_timeo = AMD8111E_TX_TIMEOUT; + dev->min_mtu = AMD8111E_MIN_MTU; + dev->max_mtu = AMD8111E_MAX_MTU; netif_napi_add(dev, &lp->napi, amd8111e_rx_poll, 32); #if AMD8111E_VLAN_TAG_USED |