} else if (priv->operating_mode == IW_MODE_ADHOC && 
} else if (priv->operating_mode == IW_MODE_ADHOC && 
static void atmel_command_irq(struct atmel_private *priv){	u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET));	u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET));	int fast_scan;		if (status == CMD_STATUS_IDLE || 	    status == CMD_STATUS_IN_PROGRESS)		return;	switch (command){	case CMD_Start:		if (status == CMD_STATUS_COMPLETE) {			priv->station_was_associated = priv->station_is_associated;			atmel_get_mib(priv, Mac_Mgmt_Mib_Type, MAC_MGMT_MIB_CUR_BSSID_POS,				      (u8 *)priv->CurrentBSSID, 6);			atmel_enter_state(priv, STATION_STATE_READY);		}					break;			case CMD_Scan:		fast_scan = priv->fast_scan;		priv->fast_scan = 0;				if (status != CMD_STATUS_COMPLETE) {			atmel_scan(priv, 1);		} else {			int bss_index = retrieve_bss(priv);			if (bss_index != -1) {				atmel_join_bss(priv, bss_index);			} else if (priv->operating_mode == IW_MODE_ADHOC && 				   priv->SSID_size != 0) {				start(priv, BSS_TYPE_AD_HOC);			} else {				priv->fast_scan = !fast_scan;				atmel_scan(priv, 1);			}			priv->site_survey_state = SITE_SURVEY_COMPLETED;		}		break;			case CMD_SiteSurvey:		priv->fast_scan = 0;				if (status != CMD_STATUS_COMPLETE)			return;				priv->site_survey_state = SITE_SURVEY_COMPLETED;		if (priv->station_is_associated) {			atmel_enter_state(priv, STATION_STATE_READY);						} else {			atmel_scan(priv, 1);		}		break;	case CMD_Join:		if (status == CMD_STATUS_COMPLETE) {			if (priv->operating_mode == IW_MODE_ADHOC) {				priv->station_was_associated = priv->station_is_associated;				atmel_enter_state(priv, STATION_STATE_READY);			} else {				priv->AuthenticationRequestRetryCnt = 0;				atmel_enter_state(priv, STATION_STATE_AUTHENTICATING);								mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);				priv->CurrentAuthentTransactionSeqNum = 0x0001;				send_authentication_request(priv, C80211_MGMT_AAN_SHAREDKEY, NULL, 0);			}			return;		}				atmel_scan(priv, 1);			}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4d791aadf63c9d605bc9a4144e79d5756fc29fb3/atmel.c/clean/drivers/net/wireless/atmel.c