atmel_get_mib(priv, Mac_Mgmt_Mib_Type, MAC_MGMT_MIB_CUR_BSSID_POS, 
atmel_get_mib(priv, Mac_Mgmt_Mib_Type, MAC_MGMT_MIB_CUR_BSSID_POS, 
static irqreturn_t service_interrupt(int irq, void *dev_id, struct pt_regs *regs){	struct net_device *dev = (struct net_device *) dev_id;	struct atmel_private *priv = netdev_priv(dev);	u8 isr;	int i = -1;	static u8 irq_order[] = { 		ISR_OUT_OF_RANGE,		ISR_RxCOMPLETE,		ISR_TxCOMPLETE,		ISR_RxFRAMELOST,		ISR_FATAL_ERROR,		ISR_COMMAND_COMPLETE,		ISR_IBSS_MERGE,		ISR_GENERIC_IRQ	};			if (priv->card && priv->present_callback && 	    !(*priv->present_callback)(priv->card))		return IRQ_HANDLED;	/* In this state upper-level code assumes it can mess with	   the card unhampered by interrupts which may change register state.	   Note that even though the card shouldn't generate interrupts	   the inturrupt line may be shared. This allows card setup 	   to go on without disabling interrupts for a long time. */	if (priv->station_state == STATION_STATE_DOWN)		return IRQ_NONE;     		atmel_clear_gcr(dev, GCR_ENINT); /* disable interrupts */	while (1) {		if (!atmel_lock_mac(priv)) {			/* failed to contact card */			printk(KERN_ALERT "%s: failed to contact MAC.\n", dev->name);			return IRQ_HANDLED;		}				isr = atmel_rmem8(priv, atmel_hi(priv, IFACE_INT_STATUS_OFFSET));		atmel_wmem8(priv, atmel_hi(priv, IFACE_LOCKOUT_MAC_OFFSET), 0);				if (!isr) {			atmel_set_gcr(dev, GCR_ENINT); /* enable interrupts */			return i == -1 ? IRQ_NONE : IRQ_HANDLED;		}				atmel_set_gcr(dev, GCR_ACKINT); /* acknowledge interrupt */				for (i = 0; i < sizeof(irq_order)/sizeof(u8); i++)			if (isr & irq_order[i])				break;				if (!atmel_lock_mac(priv)) {			/* failed to contact card */			printk(KERN_ALERT "%s: failed to contact MAC.\n", dev->name);			return IRQ_HANDLED;		}				isr = atmel_rmem8(priv, atmel_hi(priv, IFACE_INT_STATUS_OFFSET));		isr ^= irq_order[i];		atmel_wmem8(priv, atmel_hi(priv, IFACE_INT_STATUS_OFFSET), isr);		atmel_wmem8(priv, atmel_hi(priv, IFACE_LOCKOUT_MAC_OFFSET), 0);				switch (irq_order[i]) {					case ISR_OUT_OF_RANGE: 			if (priv->operating_mode == IW_MODE_INFRA && 			    priv->station_state == STATION_STATE_READY) {				priv->station_is_associated = 0;				atmel_scan(priv, 1);			}			break;		case ISR_RxFRAMELOST:			priv->wstats.discard.misc++;			/* fall through */		case ISR_RxCOMPLETE:			rx_done_irq(priv); 			break;					case ISR_TxCOMPLETE:			tx_done_irq(priv); 			break;					case ISR_FATAL_ERROR:			printk(KERN_ALERT "%s: *** FATAL error interrupt ***\n", dev->name);			atmel_enter_state(priv, STATION_STATE_MGMT_ERROR);			break;					case ISR_COMMAND_COMPLETE: 			atmel_command_irq(priv);			break;		case ISR_IBSS_MERGE:			atmel_get_mib(priv, Mac_Mgmt_Mib_Type, MAC_MGMT_MIB_CUR_BSSID_POS, 				      priv->CurrentBSSID, 6);			/* The WPA stuff cares about the current AP address */			if (priv->use_wpa)				build_wpa_mib(priv);			break;		case ISR_GENERIC_IRQ:			printk(KERN_INFO "%s: Generic_irq received.\n", dev->name);			break;		}	}	}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4d791aadf63c9d605bc9a4144e79d5756fc29fb3/atmel.c/clean/drivers/net/wireless/atmel.c