/* Event capability (kernel + driver) */ range->event_capa[0] = (IW_EVENT_CAPA_K_0 | IW_EVENT_CAPA_MASK(SIOCGIWAP)); range->event_capa[1] = IW_EVENT_CAPA_K_1;  
static int ipw2100_wx_get_range(struct net_device *dev,				struct iw_request_info *info,				union iwreq_data *wrqu, char *extra){	/*	 * This can be called at any time.  No action lock required	 */	struct ipw2100_priv *priv = ieee80211_priv(dev);	struct iw_range *range = (struct iw_range *)extra;	u16 val;	int i, level;	wrqu->data.length = sizeof(*range);	memset(range, 0, sizeof(*range));	/* Let's try to keep this struct in the same order as in	 * linux/include/wireless.h	 */	/* TODO: See what values we can set, and remove the ones we can't	 * set, or fill them with some default data.	 */	/* ~5 Mb/s real (802.11b) */	range->throughput = 5 * 1000 * 1000;//      range->sensitivity;     /* signal level threshold range */	range->max_qual.qual = 100;	/* TODO: Find real max RSSI and stick here */	range->max_qual.level = 0;	range->max_qual.noise = 0;	range->max_qual.updated = 7;	/* Updated all three */	range->avg_qual.qual = 70;	/* > 8% missed beacons is 'bad' */	/* TODO: Find real 'good' to 'bad' threshol value for RSSI */	range->avg_qual.level = 20 + IPW2100_RSSI_TO_DBM;	range->avg_qual.noise = 0;	range->avg_qual.updated = 7;	/* Updated all three */	range->num_bitrates = RATE_COUNT;	for (i = 0; i < RATE_COUNT && i < IW_MAX_BITRATES; i++) {		range->bitrate[i] = ipw2100_rates_11b[i];	}	range->min_rts = MIN_RTS_THRESHOLD;	range->max_rts = MAX_RTS_THRESHOLD;	range->min_frag = MIN_FRAG_THRESHOLD;	range->max_frag = MAX_FRAG_THRESHOLD;	range->min_pmp = period_duration[0];	/* Minimal PM period */	range->max_pmp = period_duration[POWER_MODES - 1];	/* Maximal PM period */	range->min_pmt = timeout_duration[POWER_MODES - 1];	/* Minimal PM timeout */	range->max_pmt = timeout_duration[0];	/* Maximal PM timeout */	/* How to decode max/min PM period */	range->pmp_flags = IW_POWER_PERIOD;	/* How to decode max/min PM period */	range->pmt_flags = IW_POWER_TIMEOUT;	/* What PM options are supported */	range->pm_capa = IW_POWER_TIMEOUT | IW_POWER_PERIOD;	range->encoding_size[0] = 5;	range->encoding_size[1] = 13;	/* Different token sizes */	range->num_encoding_sizes = 2;	/* Number of entry in the list */	range->max_encoding_tokens = WEP_KEYS;	/* Max number of tokens *///      range->encoding_login_index;            /* token index for login token */	if (priv->ieee->iw_mode == IW_MODE_ADHOC) {		range->txpower_capa = IW_TXPOW_DBM;		range->num_txpower = IW_MAX_TXPOWER;		for (i = 0, level = (IPW_TX_POWER_MAX_DBM * 16);		     i < IW_MAX_TXPOWER;		     i++, level -=		     ((IPW_TX_POWER_MAX_DBM -		       IPW_TX_POWER_MIN_DBM) * 16) / (IW_MAX_TXPOWER - 1))			range->txpower[i] = level / 16;	} else {		range->txpower_capa = 0;		range->num_txpower = 0;	}	/* Set the Wireless Extension versions */	range->we_version_compiled = WIRELESS_EXT;	range->we_version_source = 16;//      range->retry_capa;      /* What retry options are supported *///      range->retry_flags;     /* How to decode max/min retry limit *///      range->r_time_flags;    /* How to decode max/min retry life *///      range->min_retry;       /* Minimal number of retries *///      range->max_retry;       /* Maximal number of retries *///      range->min_r_time;      /* Minimal retry lifetime *///      range->max_r_time;      /* Maximal retry lifetime */	range->num_channels = FREQ_COUNT;	val = 0;	for (i = 0; i < FREQ_COUNT; i++) {		// TODO: Include only legal frequencies for some countries//              if (local->channel_mask & (1 << i)) {		range->freq[val].i = i + 1;		range->freq[val].m = ipw2100_frequencies[i] * 100000;		range->freq[val].e = 1;		val++;//              }		if (val == IW_MAX_FREQUENCIES)			break;	}	range->num_frequency = val;	IPW_DEBUG_WX("GET Range\n");	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/eaf8f53bc001d20aa59aa4519b71f11a1cc7f945/ipw2100.c/buggy/drivers/net/wireless/ipw2100.c