while ((c < REG_MAX_CHANNEL) && (f != ipw_frequencies[c])) c++;   fwrq->e = 0; fwrq->m = c + 1; } }  if (fwrq->e > 0 || fwrq->m > 1000) return -EOPNOTSUPP;
if (!ieee80211_is_valid_channel(priv->ieee, channel)) 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;	/* if setting by freq convert to channel */	if (fwrq->e == 1) {		if ((fwrq->m >= (int)2.412e8 && fwrq->m <= (int)2.487e8)) {			int f = fwrq->m / 100000;			int c = 0;			while ((c < REG_MAX_CHANNEL) &&			       (f != ipw_frequencies[c]))				c++;			/* hack to fall through */			fwrq->e = 0;			fwrq->m = c + 1;		}	}	if (fwrq->e > 0 || fwrq->m > 1000)		return -EOPNOTSUPP;	IPW_DEBUG_WX("SET Freq/Channel -> %d \n", fwrq->m);	down(&priv->sem);	ret = ipw_set_channel(priv, (u8) fwrq->m);	up(&priv->sem);	return ret;}