if (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_WEP)) { 
if (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_PROTECTED)) { 
static void rx_done_irq(struct atmel_private *priv){	int i;	struct ieee80211_hdr header;		for (i = 0; 	     atmel_rmem8(priv, atmel_rx(priv, RX_DESC_FLAGS_OFFSET, priv->rx_desc_head)) == RX_DESC_FLAG_VALID &&		     i < priv->host_info.rx_desc_count;	     i++) {						u16 msdu_size, rx_packet_loc, frame_ctl, seq_control;		u8 status = atmel_rmem8(priv, atmel_rx(priv, RX_DESC_STATUS_OFFSET, priv->rx_desc_head));		u32 crc = 0xffffffff;				if (status != RX_STATUS_SUCCESS) {			if (status == 0xc1) /* determined by experiment */				priv->wstats.discard.nwid++;			else				priv->stats.rx_errors++; 			goto next;		}		msdu_size = atmel_rmem16(priv, atmel_rx(priv, RX_DESC_MSDU_SIZE_OFFSET, priv->rx_desc_head));		rx_packet_loc = atmel_rmem16(priv, atmel_rx(priv, RX_DESC_MSDU_POS_OFFSET, priv->rx_desc_head));				if (msdu_size < 30) {			priv->stats.rx_errors++; 			goto next;		}				/* Get header as far as end of seq_ctl */		atmel_copy_to_host(priv->dev, (char *)&header, rx_packet_loc, 24);		frame_ctl = le16_to_cpu(header.frame_ctl);		seq_control = le16_to_cpu(header.seq_ctl);		/* probe for CRC use here if needed  once five packets have arrived with		   the same crc status, we assume we know what's happening and stop probing */		if (priv->probe_crc) {			if (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_WEP)) {				priv->do_rx_crc = probe_crc(priv, rx_packet_loc, msdu_size);			} else {				priv->do_rx_crc = probe_crc(priv, rx_packet_loc + 24, msdu_size - 24);			}			if (priv->do_rx_crc) {				if (priv->crc_ok_cnt++ > 5)					priv->probe_crc = 0;			} else {				if (priv->crc_ko_cnt++ > 5)					priv->probe_crc = 0;			}		}		    		/* don't CRC header when WEP in use */		if (priv->do_rx_crc && (!priv->wep_is_on || !(frame_ctl & IEEE80211_FCTL_WEP))) {			crc = crc32_le(0xffffffff, (unsigned char *)&header, 24);		}		msdu_size -= 24; /* header */		if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) { 						int more_fragments = frame_ctl & IEEE80211_FCTL_MOREFRAGS;			u8 packet_fragment_no = seq_control & IEEE80211_SCTL_FRAG;			u16 packet_sequence_no = (seq_control & IEEE80211_SCTL_SEQ) >> 4;						if (!more_fragments && packet_fragment_no == 0 ) {				fast_rx_path(priv, &header, msdu_size, rx_packet_loc, crc);			} else {				frag_rx_path(priv, &header, msdu_size, rx_packet_loc, crc,					     packet_sequence_no, packet_fragment_no, more_fragments);			}		}				if ((frame_ctl & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) {			/* copy rest of packet into buffer */			atmel_copy_to_host(priv->dev, (unsigned char *)&priv->rx_buf, rx_packet_loc + 24, msdu_size);						/* we use the same buffer for frag reassembly and control packets */			memset(priv->frag_source, 0xff, 6);						if (priv->do_rx_crc) {				/* last 4 octets is crc */				msdu_size -= 4;				crc = crc32_le(crc, (unsigned char *)&priv->rx_buf, msdu_size);				if ((crc ^ 0xffffffff) != (*((u32 *)&priv->rx_buf[msdu_size]))) {					priv->stats.rx_crc_errors++;					goto next;				}			}			atmel_management_frame(priv, &header, msdu_size,					       atmel_rmem8(priv, atmel_rx(priv, RX_DESC_RSSI_OFFSET, priv->rx_desc_head)));		} 	next:		/* release descriptor */		atmel_wmem8(priv, atmel_rx(priv, RX_DESC_FLAGS_OFFSET, priv->rx_desc_head), RX_DESC_FLAG_CONSUMED);  				if (priv->rx_desc_head < (priv->host_info.rx_desc_count - 1))			priv->rx_desc_head++;							else			priv->rx_desc_head = 0;	}}	
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f13baae43e97e84d3f06080908db75a017c62165/atmel.c/clean/drivers/net/wireless/atmel.c