struct e1000_adapter *adapter = netdev->priv; 
struct e1000_adapter *adapter = netdev_priv(netdev); 
e1000_set_multi(struct net_device *netdev){	struct e1000_adapter *adapter = netdev->priv;	struct e1000_hw *hw = &adapter->hw;	struct dev_mc_list *mc_ptr;	unsigned long flags;	uint32_t rctl;	uint32_t hash_value;	int i;	spin_lock_irqsave(&adapter->tx_lock, flags);	/* Check for Promiscuous and All Multicast modes */	rctl = E1000_READ_REG(hw, RCTL);	if(netdev->flags & IFF_PROMISC) {		rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);	} else if(netdev->flags & IFF_ALLMULTI) {		rctl |= E1000_RCTL_MPE;		rctl &= ~E1000_RCTL_UPE;	} else {		rctl &= ~(E1000_RCTL_UPE | E1000_RCTL_MPE);	}	E1000_WRITE_REG(hw, RCTL, rctl);	/* 82542 2.0 needs to be in reset to write receive address registers */	if(hw->mac_type == e1000_82542_rev2_0)		e1000_enter_82542_rst(adapter);	/* load the first 14 multicast address into the exact filters 1-14	 * RAR 0 is used for the station MAC adddress	 * if there are not 14 addresses, go ahead and clear the filters	 */	mc_ptr = netdev->mc_list;	for(i = 1; i < E1000_RAR_ENTRIES; i++) {		if(mc_ptr) {			e1000_rar_set(hw, mc_ptr->dmi_addr, i);			mc_ptr = mc_ptr->next;		} else {			E1000_WRITE_REG_ARRAY(hw, RA, i << 1, 0);			E1000_WRITE_REG_ARRAY(hw, RA, (i << 1) + 1, 0);		}	}	/* clear the old settings from the multicast hash table */	for(i = 0; i < E1000_NUM_MTA_REGISTERS; i++)		E1000_WRITE_REG_ARRAY(hw, MTA, i, 0);	/* load any remaining addresses into the hash table */	for(; mc_ptr; mc_ptr = mc_ptr->next) {		hash_value = e1000_hash_mc_addr(hw, mc_ptr->dmi_addr);		e1000_mta_set(hw, hash_value);	}	if(hw->mac_type == e1000_82542_rev2_0)		e1000_leave_82542_rst(adapter);	spin_unlock_irqrestore(&adapter->tx_lock, flags);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/60490fe030f3969a8706d94c7cf8469be6330678/e1000_main.c/clean/drivers/net/e1000/e1000_main.c