struct e1000_adapter *adapter = netdev->priv; 
struct e1000_adapter *adapter = netdev_priv(netdev); 
e1000_change_mtu(struct net_device *netdev, int new_mtu){	struct e1000_adapter *adapter = netdev->priv;	int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;	if((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) ||		(max_frame > MAX_JUMBO_FRAME_SIZE)) {			DPRINTK(PROBE, ERR, "Invalid MTU setting\n");			return -EINVAL;	}#define MAX_STD_JUMBO_FRAME_SIZE 9216	/* might want this to be bigger enum check... */	if (adapter->hw.mac_type == e1000_82573 &&	    max_frame > MAXIMUM_ETHERNET_FRAME_SIZE) {		DPRINTK(PROBE, ERR, "Jumbo Frames not supported "				    "on 82573\n");		return -EINVAL;	}	if(adapter->hw.mac_type > e1000_82547_rev_2) {		adapter->rx_buffer_len = max_frame;		E1000_ROUNDUP(adapter->rx_buffer_len, 1024);	} else {		if(unlikely((adapter->hw.mac_type < e1000_82543) &&		   (max_frame > MAXIMUM_ETHERNET_FRAME_SIZE))) {			DPRINTK(PROBE, ERR, "Jumbo Frames not supported "					    "on 82542\n");			return -EINVAL;		} else {			if(max_frame <= E1000_RXBUFFER_2048) {				adapter->rx_buffer_len = E1000_RXBUFFER_2048;			} else if(max_frame <= E1000_RXBUFFER_4096) {				adapter->rx_buffer_len = E1000_RXBUFFER_4096;			} else if(max_frame <= E1000_RXBUFFER_8192) {				adapter->rx_buffer_len = E1000_RXBUFFER_8192;			} else if(max_frame <= E1000_RXBUFFER_16384) {				adapter->rx_buffer_len = E1000_RXBUFFER_16384;			}		}	}	netdev->mtu = new_mtu;	if(netif_running(netdev)) {		e1000_down(adapter);		e1000_up(adapter);	}	adapter->hw.max_frame_size = max_frame;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/60490fe030f3969a8706d94c7cf8469be6330678/e1000_main.c/clean/drivers/net/e1000/e1000_main.c