]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: ethernet: aquantia: set net_device mtu when mtu is changed
authorDavid Arcari <darcari@redhat.com>
Mon, 13 Mar 2017 23:07:16 +0000 (19:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2017 03:21:20 +0000 (20:21 -0700)
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 <Pavel.Belous@aquantia.com>
Signed-off-by: David Arcari <darcari@redhat.com>
Tested-by: Pavel Belous <pavel.belous@aquantia.com>
Reviewed-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_main.c

index dad63623be6a93672974fb43ee50b518fff59ab5..d05fbfdce5e52e640042f36ba3eb831a3a42ce8a 100644 (file)
@@ -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);