if (cipher_type == CIPHER_SUITE_WEP_64 || cipher_type == CIPHER_SUITE_WEP_128 ) 
if (cipher_type == CIPHER_SUITE_WEP_64 || cipher_type == CIPHER_SUITE_WEP_128) 
static void tx_update_descriptor(struct atmel_private *priv, int is_bcast, u16 len, u16 buff, u8 type){	atmel_wmem16(priv, atmel_tx(priv, TX_DESC_POS_OFFSET, priv->tx_desc_tail), buff);	atmel_wmem16(priv, atmel_tx(priv, TX_DESC_SIZE_OFFSET, priv->tx_desc_tail), len);	if (!priv->use_wpa)		atmel_wmem16(priv, atmel_tx(priv, TX_DESC_HOST_LENGTH_OFFSET, priv->tx_desc_tail), len);	atmel_wmem8(priv, atmel_tx(priv, TX_DESC_PACKET_TYPE_OFFSET, priv->tx_desc_tail), type);	atmel_wmem8(priv, atmel_tx(priv, TX_DESC_RATE_OFFSET, priv->tx_desc_tail), priv->tx_rate);	atmel_wmem8(priv, atmel_tx(priv, TX_DESC_RETRY_OFFSET, priv->tx_desc_tail), 0);	if (priv->use_wpa) {		int cipher_type, cipher_length;		if (is_bcast) {			cipher_type = priv->group_cipher_suite;			if (cipher_type == CIPHER_SUITE_WEP_64 || 			    cipher_type == CIPHER_SUITE_WEP_128 )				cipher_length = 8;			else if (cipher_type == CIPHER_SUITE_TKIP)				cipher_length = 12;			else if (priv->pairwise_cipher_suite == CIPHER_SUITE_WEP_64 ||				 priv->pairwise_cipher_suite == CIPHER_SUITE_WEP_128) {				cipher_type = priv->pairwise_cipher_suite;				cipher_length = 8;			} else {				cipher_type = CIPHER_SUITE_NONE;				cipher_length = 0;			}		} else {			cipher_type = priv->pairwise_cipher_suite;			if (cipher_type == CIPHER_SUITE_WEP_64 || 			    cipher_type == CIPHER_SUITE_WEP_128 )				cipher_length = 8;			else if (cipher_type == CIPHER_SUITE_TKIP)				cipher_length = 12;			else if (priv->group_cipher_suite == CIPHER_SUITE_WEP_64 ||				 priv->group_cipher_suite == CIPHER_SUITE_WEP_128) {				cipher_type = priv->group_cipher_suite;				cipher_length = 8;			} else {				cipher_type = CIPHER_SUITE_NONE;				cipher_length = 0;			}		}				atmel_wmem8(priv, atmel_tx(priv, TX_DESC_CIPHER_TYPE_OFFSET, priv->tx_desc_tail),			    cipher_type);			atmel_wmem8(priv, atmel_tx(priv, TX_DESC_CIPHER_LENGTH_OFFSET, priv->tx_desc_tail),			    cipher_length);	}	atmel_wmem32(priv, atmel_tx(priv, TX_DESC_NEXT_OFFSET, priv->tx_desc_tail), 0x80000000L);	atmel_wmem8(priv, atmel_tx(priv, TX_DESC_FLAGS_OFFSET, priv->tx_desc_tail), TX_FIRM_OWN);	if (priv->tx_desc_previous != priv->tx_desc_tail)		atmel_wmem32(priv, atmel_tx(priv, TX_DESC_NEXT_OFFSET, priv->tx_desc_previous), 0);	priv->tx_desc_previous = priv->tx_desc_tail;	if (priv->tx_desc_tail < (priv->host_info.tx_desc_count -1 ))		priv->tx_desc_tail++;	else		priv->tx_desc_tail = 0;	priv->tx_desc_free--;	priv->tx_free_mem -= len;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4d791aadf63c9d605bc9a4144e79d5756fc29fb3/atmel.c/buggy/drivers/net/wireless/atmel.c