X__ipw2100_tx_send_commands(priv); X__ipw2100_tx_send_data(priv); 
ipw2100_tx_send_commands(priv); ipw2100_tx_send_data(priv); 
static int ipw2100_hw_send_command(struct ipw2100_priv *priv,				   struct host_command * cmd){	struct list_head *element;	struct ipw2100_tx_packet *packet;	unsigned long flags;	int err = 0;	IPW_DEBUG_HC("Sending %s command (#%d), %d bytes\n",		     command_types[cmd->host_command], cmd->host_command,		     cmd->host_command_length);	printk_buf(IPW_DL_HC, (u8*)cmd->host_command_parameters,		   cmd->host_command_length);	spin_lock_irqsave(&priv->low_lock, flags);	if (priv->fatal_error) {		IPW_DEBUG_INFO("Attempt to send command while hardware in fatal error condition.\n");		err = -EIO;		goto fail_unlock;	}	if (!(priv->status & STATUS_RUNNING)) {		IPW_DEBUG_INFO("Attempt to send command while hardware is not running.\n");		err = -EIO;		goto fail_unlock;	}	if (priv->status & STATUS_CMD_ACTIVE) {		IPW_DEBUG_INFO("Attempt to send command while another command is pending.\n");		err = -EBUSY;		goto fail_unlock;	}	if (list_empty(&priv->msg_free_list)) {		IPW_DEBUG_INFO("no available msg buffers\n");		goto fail_unlock;	}	priv->status |= STATUS_CMD_ACTIVE;	priv->messages_sent++;	element = priv->msg_free_list.next;	packet = list_entry(element, struct ipw2100_tx_packet, list);	packet->jiffy_start = jiffies;	/* initialize the firmware command packet */	packet->info.c_struct.cmd->host_command_reg = cmd->host_command;	packet->info.c_struct.cmd->host_command_reg1 = cmd->host_command1;	packet->info.c_struct.cmd->host_command_len_reg = cmd->host_command_length;	packet->info.c_struct.cmd->sequence = cmd->host_command_sequence;	memcpy(packet->info.c_struct.cmd->host_command_params_reg,	       cmd->host_command_parameters,	       sizeof(packet->info.c_struct.cmd->host_command_params_reg));	list_del(element);	DEC_STAT(&priv->msg_free_stat);	list_add_tail(element, &priv->msg_pend_list);	INC_STAT(&priv->msg_pend_stat);	X__ipw2100_tx_send_commands(priv);	X__ipw2100_tx_send_data(priv);	spin_unlock_irqrestore(&priv->low_lock, flags);	/*	 * We must wait for this command to complete before another	 * command can be sent...  but if we wait more than 3 seconds	 * then there is a problem.	 */	err = wait_event_interruptible_timeout(		priv->wait_command_queue, !(priv->status & STATUS_CMD_ACTIVE),		HOST_COMPLETE_TIMEOUT);	if (err == 0) {		IPW_DEBUG_INFO("Command completion failed out after %dms.\n",			       HOST_COMPLETE_TIMEOUT / (HZ / 100));		priv->fatal_error = IPW2100_ERR_MSG_TIMEOUT;		priv->status &= ~STATUS_CMD_ACTIVE;		schedule_reset(priv);		return -EIO;	}	if (priv->fatal_error) {		IPW_DEBUG_WARNING("%s: firmware fatal error\n",		       priv->net_dev->name);		return -EIO;	}	/* !!!!! HACK TEST !!!!!	 * When lots of debug trace statements are enabled, the driver	 * doesn't seem to have as many firmware restart cycles...	 *	 * As a test, we're sticking in a 1/100s delay here */	set_current_state(TASK_UNINTERRUPTIBLE);	schedule_timeout(HZ / 100);	return 0; fail_unlock:	spin_unlock_irqrestore(&priv->low_lock, flags);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/19f7f74297e7f88f60c183acb105a5488dd189b6/ipw2100.c/clean/drivers/net/wireless/ipw2100.c