if ((priv->iw_mode == IW_MODE_ADHOC) && (priv->spy_number == 0)){ 
if ((priv->iw_mode == IW_MODE_ADHOC) && (!SPY_NUMBER(priv))){ 
static int orinoco_ioctl_getiwrange(struct net_device *dev,				    struct iw_request_info *info,				    struct iw_point *rrq,				    char *extra){	struct orinoco_private *priv = netdev_priv(dev);	int err = 0;	struct iw_range *range = (struct iw_range *) extra;	int numrates;	int i, k;	TRACE_ENTER(dev->name);	rrq->length = sizeof(struct iw_range);	memset(range, 0, sizeof(struct iw_range));	range->we_version_compiled = WIRELESS_EXT;	range->we_version_source = 14;	/* Set available channels/frequencies */	range->num_channels = NUM_CHANNELS;	k = 0;	for (i = 0; i < NUM_CHANNELS; i++) {		if (priv->channel_mask & (1 << i)) {			range->freq[k].i = i + 1;			range->freq[k].m = channel_frequency[i] * 100000;			range->freq[k].e = 1;			k++;		}				if (k >= IW_MAX_FREQUENCIES)			break;	}	range->num_frequency = k;	range->sensitivity = 3;	if (priv->has_wep) {		range->max_encoding_tokens = ORINOCO_MAX_KEYS;		range->encoding_size[0] = SMALL_KEY_SIZE;		range->num_encoding_sizes = 1;		if (priv->has_big_wep) {			range->encoding_size[1] = LARGE_KEY_SIZE;			range->num_encoding_sizes = 2;		}	}	if ((priv->iw_mode == IW_MODE_ADHOC) && (priv->spy_number == 0)){		/* Quality stats meaningless in ad-hoc mode */	} else {		range->max_qual.qual = 0x8b - 0x2f;		range->max_qual.level = 0x2f - 0x95 - 1;		range->max_qual.noise = 0x2f - 0x95 - 1;		/* Need to get better values */		range->avg_qual.qual = 0x24;		range->avg_qual.level = 0xC2;		range->avg_qual.noise = 0x9E;	}	err = orinoco_hw_get_bitratelist(priv, &numrates,					 range->bitrate, IW_MAX_BITRATES);	if (err)		return err;	range->num_bitrates = numrates;	/* Set an indication of the max TCP throughput in bit/s that we can	 * expect using this interface. May be use for QoS stuff...	 * Jean II */	if (numrates > 2)		range->throughput = 5 * 1000 * 1000;	/* ~5 Mb/s */	else		range->throughput = 1.5 * 1000 * 1000;	/* ~1.5 Mb/s */	range->min_rts = 0;	range->max_rts = 2347;	range->min_frag = 256;	range->max_frag = 2346;	range->min_pmp = 0;	range->max_pmp = 65535000;	range->min_pmt = 0;	range->max_pmt = 65535 * 1000;	/* ??? */	range->pmp_flags = IW_POWER_PERIOD;	range->pmt_flags = IW_POWER_TIMEOUT;	range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_UNICAST_R;	range->retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME;	range->retry_flags = IW_RETRY_LIMIT;	range->r_time_flags = IW_RETRY_LIFETIME;	range->min_retry = 0;	range->max_retry = 65535;	/* ??? */	range->min_r_time = 0;	range->max_r_time = 65535 * 1000;	/* ??? */	TRACE_EXIT(dev->name);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/343c686c04eec556645f251f7d6c9b3d7335dae0/orinoco.c/buggy/drivers/net/wireless/orinoco.c