} else network->mode = priv->ieee->mode; 
break; } 
static void ipw_adhoc_create(struct ipw_priv *priv,			     struct ieee80211_network *network){	/*	 * For the purposes of scanning, we can set our wireless mode	 * to trigger scans across combinations of bands, but when it	 * comes to creating a new ad-hoc network, we have tell the FW	 * exactly which band to use.	 *	 * We also have the possibility of an invalid channel for the	 * chossen band.  Attempting to create a new ad-hoc network	 * with an invalid channel for wireless mode will trigger a	 * FW fatal error.	 */	if (!ieee80211_is_valid_channel(priv->ieee, priv->channel)) {		const struct ieee80211_geo *geo = ieee80211_get_geo(priv->ieee);		IPW_WARNING("Overriding invalid channel\n");		if (priv->ieee->mode & IEEE_A) {			network->mode = IEEE_A;			priv->channel = geo->a[0].channel;		} else if (priv->ieee->mode & IEEE_G) {			network->mode = IEEE_G;			priv->channel = geo->bg[0].channel;		} else {			network->mode = IEEE_B;			priv->channel = geo->bg[0].channel;		}	} else		network->mode = priv->ieee->mode;	network->channel = priv->channel;	priv->config |= CFG_ADHOC_PERSIST;	ipw_create_bssid(priv, network->bssid);	network->ssid_len = priv->essid_len;	memcpy(network->ssid, priv->essid, priv->essid_len);	memset(&network->stats, 0, sizeof(network->stats));	network->capability = WLAN_CAPABILITY_IBSS;	if (!(priv->config & CFG_PREAMBLE_LONG))		network->capability |= WLAN_CAPABILITY_SHORT_PREAMBLE;	if (priv->capability & CAP_PRIVACY_ON)		network->capability |= WLAN_CAPABILITY_PRIVACY;	network->rates_len = min(priv->rates.num_rates, MAX_RATES_LENGTH);	memcpy(network->rates, priv->rates.supported_rates, network->rates_len);	network->rates_ex_len = priv->rates.num_rates - network->rates_len;	memcpy(network->rates_ex,	       &priv->rates.supported_rates[network->rates_len],	       network->rates_ex_len);	network->last_scanned = 0;	network->flags = 0;	network->last_associate = 0;	network->time_stamp[0] = 0;	network->time_stamp[1] = 0;	network->beacon_interval = 100;	/* Default */	network->listen_interval = 10;	/* Default */	network->atim_window = 0;	/* Default */	network->wpa_ie_len = 0;	network->rsn_ie_len = 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/afbf30a2b78cac38e6ddae10a73063943b4783ee/ipw2200.c/clean/drivers/net/wireless/ipw2200.c