[PATCH] e1000: fix to set the new max frame size before resetting the adapter
authorBruce Allan <bruce.w.allan@intel.com>
Fri, 15 Dec 2006 09:36:35 +0000 (10:36 +0100)
committerJeff Garzik <jeff@garzik.org>
Tue, 26 Dec 2006 20:51:30 +0000 (15:51 -0500)
This bugfix makes sure that the driver data reflects the full new situation
before the adapter is reinitialized.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/e1000/e1000_main.c

index 343eb68fff7398d9633447631f1592c3bd9a248d..0d7c458168d3d629948adc7e63ae3f3fd25c6758 100644 (file)
@@ -3485,12 +3485,11 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu)
                adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE;
 
        netdev->mtu = new_mtu;
+       adapter->hw.max_frame_size = max_frame;
 
        if (netif_running(netdev))
                e1000_reinit_locked(adapter);
 
-       adapter->hw.max_frame_size = max_frame;
-
        return 0;
 }