ibmvnic: Update MTU after device initialization
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Mon, 17 Oct 2016 20:28:10 +0000 (15:28 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Oct 2016 18:17:13 +0000 (14:17 -0400)
It is possible for the MTU to be changed during the initialization
process with the VNIC Server.  Ensure that the net device is updated
to reflect the new MTU.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index 928bf8a5a567631795d6db7c11dd02c85e7910e3..213162df1a9bf3220207d10635c1f52087eceb3c 100644 (file)
@@ -3654,6 +3654,7 @@ static void handle_crq_init_rsp(struct work_struct *work)
                goto task_failed;
 
        netdev->real_num_tx_queues = adapter->req_tx_queues;
+       netdev->mtu = adapter->req_mtu;
 
        if (adapter->failover) {
                adapter->failover = false;
@@ -3792,6 +3793,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
        }
 
        netdev->real_num_tx_queues = adapter->req_tx_queues;
+       netdev->mtu = adapter->req_mtu;
 
        rc = register_netdev(netdev);
        if (rc) {