val = 0; for (i = 0; i < FREQ_COUNT; i++) { range->freq[val].i = i + 1; range->freq[val].m = ipw_frequencies[i] * 100000; range->freq[val].e = 1; val++; 
if (priv->ieee->mode & IEEE_A) { for (j = 0; j < geo->a_channels && i < IW_MAX_FREQUENCIES; i++, j++) { range->freq[i].i = geo->a[j].channel; range->freq[i].m = geo->a[j].freq * 100000; range->freq[i].e = 1; } } 
static int ipw_wx_get_range(struct net_device *dev,			    struct iw_request_info *info,			    union iwreq_data *wrqu, char *extra){	struct ipw_priv *priv = ieee80211_priv(dev);	struct iw_range *range = (struct iw_range *)extra;	u16 val;	int i;	wrqu->data.length = sizeof(*range);	memset(range, 0, sizeof(*range));	/* 54Mbs == ~27 Mb/s real (802.11g) */	range->throughput = 27 * 1000 * 1000;	range->max_qual.qual = 100;	/* TODO: Find real max RSSI and stick here */	range->max_qual.level = 0;	range->max_qual.noise = priv->ieee->worst_rssi + 0x100;	range->max_qual.updated = 7;	/* Updated all three */	range->avg_qual.qual = 70;	/* TODO: Find real 'good' to 'bad' threshol value for RSSI */	range->avg_qual.level = 0;	/* FIXME to real average level */	range->avg_qual.noise = 0;	range->avg_qual.updated = 7;	/* Updated all three */	down(&priv->sem);	range->num_bitrates = min(priv->rates.num_rates, (u8) IW_MAX_BITRATES);	for (i = 0; i < range->num_bitrates; i++)		range->bitrate[i] = (priv->rates.supported_rates[i] & 0x7F) *		    500000;	range->max_rts = DEFAULT_RTS_THRESHOLD;	range->min_frag = MIN_FRAG_THRESHOLD;	range->max_frag = MAX_FRAG_THRESHOLD;	range->encoding_size[0] = 5;	range->encoding_size[1] = 13;	range->num_encoding_sizes = 2;	range->max_encoding_tokens = WEP_KEYS;	/* Set the Wireless Extension versions */	range->we_version_compiled = WIRELESS_EXT;	range->we_version_source = 16;	range->num_channels = FREQ_COUNT;	val = 0;	for (i = 0; i < FREQ_COUNT; i++) {		range->freq[val].i = i + 1;		range->freq[val].m = ipw_frequencies[i] * 100000;		range->freq[val].e = 1;		val++;		if (val == IW_MAX_FREQUENCIES)			break;	}	range->num_frequency = val;	up(&priv->sem);	IPW_DEBUG_WX("GET Range\n");	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b095c3819805f87d73d41641a53e4c070360d783/ipw2200.c/buggy/drivers/net/wireless/ipw2200.c