struct ixgb_adapter *adapter = netdev->priv; 
struct ixgb_adapter *adapter = netdev_priv(netdev); 
ixgb_get_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;	int i, max_len, first_word, last_word;	int ret_val = 0;	if(eeprom->len == 0) {		ret_val = -EINVAL;		goto geeprom_error;	}	eeprom->magic = hw->vendor_id | (hw->device_id << 16);	max_len = ixgb_get_eeprom_len(netdev);	if(eeprom->offset > eeprom->offset + eeprom->len) {		ret_val = -EINVAL;		goto geeprom_error;	}	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(sizeof(uint16_t) *			(last_word - first_word + 1), GFP_KERNEL);	if(!eeprom_buff)		return -ENOMEM;	/* note the eeprom was good because the driver loaded */	for(i = 0; i <= (last_word - first_word); i++) {		eeprom_buff[i] = ixgb_get_eeprom_word(hw, (first_word + i));	}	memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1),			eeprom->len);	kfree(eeprom_buff);geeprom_error:	return ret_val;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8908c6cd1d6889850148aeb50bb14301959adaa7/ixgb_ethtool.c/clean/drivers/net/ixgb/ixgb_ethtool.c