diff options
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 4bf6bbc65822..c3234c451043 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1573,14 +1573,18 @@ ixgb_change_mtu(struct net_device *netdev, int new_mtu) | |||
1573 | return -EINVAL; | 1573 | return -EINVAL; |
1574 | } | 1574 | } |
1575 | 1575 | ||
1576 | if (old_max_frame == max_frame) | ||
1577 | return 0; | ||
1578 | |||
1579 | if (netif_running(netdev)) | ||
1580 | ixgb_down(adapter, true); | ||
1581 | |||
1576 | adapter->rx_buffer_len = max_frame + 8; /* + 8 for errata */ | 1582 | adapter->rx_buffer_len = max_frame + 8; /* + 8 for errata */ |
1577 | 1583 | ||
1578 | netdev->mtu = new_mtu; | 1584 | netdev->mtu = new_mtu; |
1579 | 1585 | ||
1580 | if ((old_max_frame != max_frame) && netif_running(netdev)) { | 1586 | if (netif_running(netdev)) |
1581 | ixgb_down(adapter, true); | ||
1582 | ixgb_up(adapter); | 1587 | ixgb_up(adapter); |
1583 | } | ||
1584 | 1588 | ||
1585 | return 0; | 1589 | return 0; |
1586 | } | 1590 | } |