aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Arcari <[email protected]>2017-03-13 19:07:16 -0400
committerDavid S. Miller <[email protected]>2017-03-16 20:21:20 -0700
commitbc9ab9231ec8c08352ea860480523d88a221a68f (patch)
treeceb4835b4a037c43a582d8aa5fdcc65aac644cb9
parent4cbe4dac82e423ecc9a0ba46af24a860853259f4 (diff)
net: ethernet: aquantia: set net_device mtu when mtu is changed
When the aquantia device mtu is changed the net_device structure is not updated. As a result the ip command does not properly reflect the mtu change. Commit 5513e16421cb incorrectly assumed that __dev_set_mtu() was making the assignment ndev->mtu = new_mtu; This is not true in the case where the driver has a ndo_change_mtu routine. Fixes: 5513e16421cb ("net: ethernet: aquantia: Fixes for aq_ndev_change_mtu") Cc: Pavel Belous <[email protected]> Signed-off-by: David Arcari <[email protected]> Tested-by: Pavel Belous <[email protected]> Reviewed-by: Jarod Wilson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index dad63623be6a..d05fbfdce5e5 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -98,6 +98,7 @@ static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu)
if (err < 0)
goto err_exit;
+ ndev->mtu = new_mtu;
if (netif_running(ndev)) {
aq_ndev_close(ndev);