if (priv->ieee->iw_mode == IW_MODE_ADHOC && priv->ieee->mode & IEEE_A) { i = ieee80211_channel_to_index(priv->ieee, channel); if (i == -1) return -EINVAL; if (geo->a[i].flags & IEEE80211_CH_PASSIVE_ONLY) { IPW_DEBUG_WX("Invalid Ad-Hoc channel for 802.11a\n"); return -EINVAL; } }  
static int ipw_wx_set_freq(struct net_device *dev,			   struct iw_request_info *info,			   union iwreq_data *wrqu, char *extra){	struct ipw_priv *priv = ieee80211_priv(dev);	struct iw_freq *fwrq = &wrqu->freq;	int ret = 0;	u8 channel;	if (fwrq->m == 0) {		IPW_DEBUG_WX("SET Freq/Channel -> any\n");		down(&priv->sem);		ret = ipw_set_channel(priv, 0);		up(&priv->sem);		return ret;	}	/* if setting by freq convert to channel */	if (fwrq->e == 1) {		channel = ieee80211_freq_to_channel(priv->ieee, fwrq->m);		if (channel == 0)			return -EINVAL;	} else		channel = fwrq->m;	if (!ieee80211_is_valid_channel(priv->ieee, channel))		return -EINVAL;	IPW_DEBUG_WX("SET Freq/Channel -> %d \n", fwrq->m);	down(&priv->sem);	ret = ipw_set_channel(priv, channel);	up(&priv->sem);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/afbf30a2b78cac38e6ddae10a73063943b4783ee/ipw2200.c/clean/drivers/net/wireless/ipw2200.c