tx_power.channels_tx_power[i].tx_power = priv->tx_power; 
if (max_power != 0 && priv->tx_power > max_power) tx_power.channels_tx_power[i].tx_power = max_power; else tx_power.channels_tx_power[i].tx_power = priv->tx_power; 
static int ipw_wx_set_txpow(struct net_device *dev,			    struct iw_request_info *info,			    union iwreq_data *wrqu, char *extra){	struct ipw_priv *priv = ieee80211_priv(dev);	struct ipw_tx_power tx_power;	int i;	down(&priv->sem);	if (ipw_radio_kill_sw(priv, wrqu->power.disabled)) {		up(&priv->sem);		return -EINPROGRESS;	}	if (!wrqu->power.fixed)		wrqu->power.value = IPW_TX_POWER_DEFAULT;	if (wrqu->power.flags != IW_TXPOW_DBM) {		up(&priv->sem);		return -EINVAL;	}	if ((wrqu->power.value > IPW_TX_POWER_MAX) ||	    (wrqu->power.value < IPW_TX_POWER_MIN)) {		up(&priv->sem);		return -EINVAL;	}	priv->tx_power = wrqu->power.value;	memset(&tx_power, 0, sizeof(tx_power));	/* configure device for 'G' band */	tx_power.ieee_mode = IPW_G_MODE;	tx_power.num_channels = 11;	for (i = 0; i < 11; i++) {		tx_power.channels_tx_power[i].channel_number = i + 1;		tx_power.channels_tx_power[i].tx_power = priv->tx_power;	}	if (ipw_send_tx_power(priv, &tx_power))		goto error;	/* configure device to also handle 'B' band */	tx_power.ieee_mode = IPW_B_MODE;	if (ipw_send_tx_power(priv, &tx_power))		goto error;	up(&priv->sem);	return 0;      error:	up(&priv->sem);	return -EIO;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8400a1ceb445f2ace4b8d3c35c181b2b416a81ce/ipw2200.c/buggy/drivers/net/wireless/ipw2200.c