 return old_mode == priv->ieee->mode; 
static void ipw_sw_reset(struct ipw_priv *priv, int init){	int band, modulation;	/* Initialize module parameter values here */	priv->config = 0;	/* We default to disabling the LED code as right now it causes	 * too many systems to lock up... */	if (!led)		priv->config |= CFG_NO_LED;	if (associate)		priv->config |= CFG_ASSOCIATE;	else		IPW_DEBUG_INFO("Auto associate disabled.\n");	if (auto_create)		priv->config |= CFG_ADHOC_CREATE;	else		IPW_DEBUG_INFO("Auto adhoc creation disabled.\n");	if (disable) {		priv->status |= STATUS_RF_KILL_SW;		IPW_DEBUG_INFO("Radio disabled.\n");	}	if (channel != 0) {		priv->config |= CFG_STATIC_CHANNEL;		priv->channel = channel;		IPW_DEBUG_INFO("Bind to static channel %d\n", channel);		/* TODO: Validate that provided channel is in range */	}#ifdef CONFIG_IPW_QOS	ipw_qos_init(priv, qos_enable, qos_burst_enable,		     burst_duration_CCK, burst_duration_OFDM);#endif				/* CONFIG_IPW_QOS */	switch (mode) {	case 1:		priv->ieee->iw_mode = IW_MODE_ADHOC;		priv->net_dev->type = ARPHRD_ETHER;		break;#ifdef CONFIG_IPW2200_MONITOR	case 2:		priv->ieee->iw_mode = IW_MODE_MONITOR;		priv->net_dev->type = ARPHRD_IEEE80211;		break;#endif	default:	case 0:		priv->net_dev->type = ARPHRD_ETHER;		priv->ieee->iw_mode = IW_MODE_INFRA;		break;	}	if (hwcrypto) {		priv->ieee->host_encrypt = 0;		priv->ieee->host_decrypt = 0;	}	IPW_DEBUG_INFO("Hardware crypto [%s]\n", hwcrypto ? "on" : "off");	if ((priv->pci_dev->device == 0x4223) ||	    (priv->pci_dev->device == 0x4224)) {		if (init)			printk(KERN_INFO DRV_NAME			       ": Detected Intel PRO/Wireless 2915ABG Network "			       "Connection\n");		priv->ieee->abg_true = 1;		band = IEEE80211_52GHZ_BAND | IEEE80211_24GHZ_BAND;		modulation = IEEE80211_OFDM_MODULATION |		    IEEE80211_CCK_MODULATION;		priv->adapter = IPW_2915ABG;		priv->ieee->mode = IEEE_A | IEEE_G | IEEE_B;	} else {		if (init)			printk(KERN_INFO DRV_NAME			       ": Detected Intel PRO/Wireless 2200BG Network "			       "Connection\n");		priv->ieee->abg_true = 0;		band = IEEE80211_24GHZ_BAND;		modulation = IEEE80211_OFDM_MODULATION |		    IEEE80211_CCK_MODULATION;		priv->adapter = IPW_2200BG;		priv->ieee->mode = IEEE_G | IEEE_B;	}	priv->ieee->freq_band = band;	priv->ieee->modulation = modulation;	priv->rates_mask = IEEE80211_DEFAULT_RATES_MASK;	priv->missed_beacon_threshold = IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT;	priv->roaming_threshold = IPW_MB_ROAMING_THRESHOLD_DEFAULT;	priv->rts_threshold = DEFAULT_RTS_THRESHOLD;	/* If power management is turned on, default to AC mode */	priv->power_mode = IPW_POWER_AC;	priv->tx_power = IPW_TX_POWER_DEFAULT;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/afbf30a2b78cac38e6ddae10a73063943b4783ee/ipw2200.c/clean/drivers/net/wireless/ipw2200.c