else 
ipw_set_fixed_rate(priv, priv->ieee->mode); } else 
static int ipw_wx_set_rate(struct net_device *dev,			   struct iw_request_info *info,			   union iwreq_data *wrqu, char *extra){	/* TODO: We should use semaphores or locks for access to priv */	struct ipw_priv *priv = ieee80211_priv(dev);	u32 target_rate = wrqu->bitrate.value;	u32 fixed, mask;	/* value = -1, fixed = 0 means auto only, so we should use all rates offered by AP */	/* value = X, fixed = 1 means only rate X */	/* value = X, fixed = 0 means all rates lower equal X */	if (target_rate == -1) {		fixed = 0;		mask = IEEE80211_DEFAULT_RATES_MASK;		/* Now we should reassociate */		goto apply;	}	mask = 0;	fixed = wrqu->bitrate.fixed;	if (target_rate == 1000000 || !fixed)		mask |= IEEE80211_CCK_RATE_1MB_MASK;	if (target_rate == 1000000)		goto apply;	if (target_rate == 2000000 || !fixed)		mask |= IEEE80211_CCK_RATE_2MB_MASK;	if (target_rate == 2000000)		goto apply;	if (target_rate == 5500000 || !fixed)		mask |= IEEE80211_CCK_RATE_5MB_MASK;	if (target_rate == 5500000)		goto apply;	if (target_rate == 6000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_6MB_MASK;	if (target_rate == 6000000)		goto apply;	if (target_rate == 9000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_9MB_MASK;	if (target_rate == 9000000)		goto apply;	if (target_rate == 11000000 || !fixed)		mask |= IEEE80211_CCK_RATE_11MB_MASK;	if (target_rate == 11000000)		goto apply;	if (target_rate == 12000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_12MB_MASK;	if (target_rate == 12000000)		goto apply;	if (target_rate == 18000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_18MB_MASK;	if (target_rate == 18000000)		goto apply;	if (target_rate == 24000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_24MB_MASK;	if (target_rate == 24000000)		goto apply;	if (target_rate == 36000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_36MB_MASK;	if (target_rate == 36000000)		goto apply;	if (target_rate == 48000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_48MB_MASK;	if (target_rate == 48000000)		goto apply;	if (target_rate == 54000000 || !fixed)		mask |= IEEE80211_OFDM_RATE_54MB_MASK;	if (target_rate == 54000000)		goto apply;	IPW_DEBUG_WX("invalid rate specified, returning error\n");	return -EINVAL;      apply:	IPW_DEBUG_WX("Setting rate mask to 0x%08X [%s]\n",		     mask, fixed ? "fixed" : "sub-rates");	down(&priv->sem);	if (mask == IEEE80211_DEFAULT_RATES_MASK)		priv->config &= ~CFG_FIXED_RATE;	else		priv->config |= CFG_FIXED_RATE;	if (priv->rates_mask == mask) {		IPW_DEBUG_WX("Mask set to current mask.\n");		up(&priv->sem);		return 0;	}	priv->rates_mask = mask;	/* Network configuration changed -- force [re]association */	IPW_DEBUG_ASSOC("[re]association triggered due to rates change.\n");	if (!ipw_disassociate(priv))		ipw_associate(priv);	up(&priv->sem);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b095c3819805f87d73d41641a53e4c070360d783/ipw2200.c/buggy/drivers/net/wireless/ipw2200.c