int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, int batch_mode) 
static int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, int batch_mode) 
int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, int batch_mode){	struct host_command cmd = {		.host_command = CHANNEL,		.host_command_sequence = 0,		.host_command_length = sizeof(u32)	};	int err;	cmd.host_command_parameters[0] = channel;	IPW_DEBUG_HC("CHANNEL: %d\n", channel);	/* If BSS then we don't support channel selection */	if (priv->ieee->iw_mode == IW_MODE_INFRA)		return 0;	if ((channel != 0) &&	    ((channel < REG_MIN_CHANNEL) || (channel > REG_MAX_CHANNEL)))		return -EINVAL;	if (!batch_mode) {		err = ipw2100_disable_adapter(priv);		if (err)			return err;	}	err = ipw2100_hw_send_command(priv, &cmd);	if (err) {		IPW_DEBUG_INFO("Failed to set channel to %d",			       channel);		return err;	}	if (channel)		priv->config |= CFG_STATIC_CHANNEL;	else		priv->config &= ~CFG_STATIC_CHANNEL;	priv->channel = channel;	if (!batch_mode) {		err = ipw2100_enable_adapter(priv);		if (err)			return err;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c4aee8c21ff5d8d6f9a27112468f5e840d5ced1b/ipw2100.c/buggy/drivers/net/wireless/ipw2100.c