struct ixgb_adapter *adapter = netdev->priv; 
struct ixgb_adapter *adapter = netdev_priv(netdev); 
ixgb_set_eeprom(struct net_device *netdev,		  struct ethtool_eeprom *eeprom, uint8_t *bytes){	struct ixgb_adapter *adapter = netdev->priv;	struct ixgb_hw *hw = &adapter->hw;	uint16_t *eeprom_buff;	void *ptr;	int max_len, first_word, last_word;	uint16_t i;	if(eeprom->len == 0)		return -EINVAL;	if(eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))		return -EFAULT;	max_len = ixgb_get_eeprom_len(netdev);	if(eeprom->offset > eeprom->offset + eeprom->len)		return -EINVAL;	if((eeprom->offset + eeprom->len) > max_len)		eeprom->len = (max_len - eeprom->offset);	first_word = eeprom->offset >> 1;	last_word = (eeprom->offset + eeprom->len - 1) >> 1;	eeprom_buff = kmalloc(max_len, GFP_KERNEL);	if(!eeprom_buff)		return -ENOMEM;	ptr = (void *)eeprom_buff;	if(eeprom->offset & 1) {		/* need read/modify/write of first changed EEPROM word */		/* only the second byte of the word is being modified */		eeprom_buff[0] = ixgb_read_eeprom(hw, first_word);		ptr++;	}	if((eeprom->offset + eeprom->len) & 1) {		/* need read/modify/write of last changed EEPROM word */		/* only the first byte of the word is being modified */		eeprom_buff[last_word - first_word] 			= ixgb_read_eeprom(hw, last_word);	}	memcpy(ptr, bytes, eeprom->len);	for(i = 0; i <= (last_word - first_word); i++)		ixgb_write_eeprom(hw, first_word + i, eeprom_buff[i]);	/* Update the checksum over the first part of the EEPROM if needed */	if(first_word <= EEPROM_CHECKSUM_REG)		ixgb_update_eeprom_checksum(hw);	kfree(eeprom_buff);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8908c6cd1d6889850148aeb50bb14301959adaa7/ixgb_ethtool.c/clean/drivers/net/ixgb/ixgb_ethtool.c