struct e1000_adapter *adapter = netdev->priv; 
struct e1000_adapter *adapter = netdev_priv(netdev); 
e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd){	struct e1000_adapter *adapter = netdev->priv;	struct e1000_hw *hw = &adapter->hw;	if(hw->media_type == e1000_media_type_copper) {		ecmd->supported = (SUPPORTED_10baseT_Half |		                   SUPPORTED_10baseT_Full |		                   SUPPORTED_100baseT_Half |		                   SUPPORTED_100baseT_Full |		                   SUPPORTED_1000baseT_Full|		                   SUPPORTED_Autoneg |		                   SUPPORTED_TP);		ecmd->advertising = ADVERTISED_TP;		if(hw->autoneg == 1) {			ecmd->advertising |= ADVERTISED_Autoneg;			/* the e1000 autoneg seems to match ethtool nicely */			ecmd->advertising |= hw->autoneg_advertised;		}		ecmd->port = PORT_TP;		ecmd->phy_address = hw->phy_addr;		if(hw->mac_type == e1000_82543)			ecmd->transceiver = XCVR_EXTERNAL;		else			ecmd->transceiver = XCVR_INTERNAL;	} else {		ecmd->supported   = (SUPPORTED_1000baseT_Full |				     SUPPORTED_FIBRE |				     SUPPORTED_Autoneg);		ecmd->advertising = (SUPPORTED_1000baseT_Full |				     SUPPORTED_FIBRE |				     SUPPORTED_Autoneg);		ecmd->port = PORT_FIBRE;		if(hw->mac_type >= e1000_82545)			ecmd->transceiver = XCVR_INTERNAL;		else			ecmd->transceiver = XCVR_EXTERNAL;	}	if(netif_carrier_ok(adapter->netdev)) {		e1000_get_speed_and_duplex(hw, &adapter->link_speed,		                                   &adapter->link_duplex);		ecmd->speed = adapter->link_speed;		/* unfortunatly FULL_DUPLEX != DUPLEX_FULL		 *          and HALF_DUPLEX != DUPLEX_HALF */		if(adapter->link_duplex == FULL_DUPLEX)			ecmd->duplex = DUPLEX_FULL;		else			ecmd->duplex = DUPLEX_HALF;	} else {		ecmd->speed = -1;		ecmd->duplex = -1;	}	ecmd->autoneg = ((hw->media_type == e1000_media_type_fiber) ||			 hw->autoneg) ? AUTONEG_ENABLE : AUTONEG_DISABLE;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/60490fe030f3969a8706d94c7cf8469be6330678/e1000_ethtool.c/clean/drivers/net/e1000/e1000_ethtool.c