band_a_active_channel[i] == priv->channel) 
geo->a[i].channel == priv->channel) 
static int ipw_request_scan(struct ipw_priv *priv){	struct ipw_scan_request_ext scan;	int channel_index = 0;	int i, err, scan_type;	if (priv->status & STATUS_EXIT_PENDING) {		IPW_DEBUG_SCAN("Aborting scan due to device shutdown\n");		priv->status |= STATUS_SCAN_PENDING;		return 0;	}	if (priv->status & STATUS_SCANNING) {		IPW_DEBUG_HC("Concurrent scan requested.  Ignoring.\n");//              IPW_DEBUG_HC("Concurrent scan requested.  Aborting first.\n");		priv->status |= STATUS_SCAN_PENDING;//              ipw_abort_scan(priv);		return 0;	}	if (priv->status & STATUS_SCAN_ABORTING) {		IPW_DEBUG_HC("Scan request while abort pending.  Queuing.\n");		priv->status |= STATUS_SCAN_PENDING;		return 0;	}	if (priv->status & STATUS_RF_KILL_MASK) {		IPW_DEBUG_HC("Aborting scan due to RF Kill activation\n");		priv->status |= STATUS_SCAN_PENDING;		return 0;	}	memset(&scan, 0, sizeof(scan));	scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = cpu_to_le16(20);	scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] =	    cpu_to_le16(20);	scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(20);	scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee));#ifdef CONFIG_IPW_MONITOR	if (priv->ieee->iw_mode == IW_MODE_MONITOR) {		u8 band = 0, channel = priv->channel;		if (is_valid_channel(IEEE_A, channel))			band = (u8) (IPW_A_MODE << 6) | 1;		if (is_valid_channel(IEEE_B | IEEE_G, channel))			band = (u8) (IPW_B_MODE << 6) | 1;		if (band == 0) {			band = (u8) (IPW_B_MODE << 6) | 1;			channel = 9;		}		scan.channels_list[channel_index++] = band;		scan.channels_list[channel_index] = channel;		ipw_set_scan_type(&scan, channel_index,				  IPW_SCAN_PASSIVE_FULL_DWELL_SCAN);		scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] =		    cpu_to_le16(2000);	} else {#endif				/* CONFIG_IPW_MONITOR */		/* If we are roaming, then make this a directed scan for the current		 * network.  Otherwise, ensure that every other scan is a fast		 * channel hop scan */		if ((priv->status & STATUS_ROAMING) || (!(priv->status & STATUS_ASSOCIATED) && (priv->config & CFG_STATIC_ESSID) && (le32_to_cpu(scan.full_scan_index) % 2))) {	/* || (																						   (priv->status & STATUS_ASSOCIATED) &&																						   (priv->ieee->iw_mode == IW_MODE_ADHOC))) { */			err = ipw_send_ssid(priv, priv->essid, priv->essid_len);			if (err) {				IPW_DEBUG_HC				    ("Attempt to send SSID command failed.\n");				return err;			}			scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN;		} else {			scan_type = IPW_SCAN_ACTIVE_BROADCAST_SCAN;		}		if (priv->ieee->freq_band & IEEE80211_52GHZ_BAND) {			int start = channel_index;			for (i = 0; i < MAX_A_CHANNELS; i++) {				if (band_a_active_channel[i] == 0)					break;				if ((priv->status & STATUS_ASSOCIATED) &&				    band_a_active_channel[i] == priv->channel)					continue;				channel_index++;				scan.channels_list[channel_index] =				    band_a_active_channel[i];				ipw_set_scan_type(&scan, channel_index,						  scan_type);			}			if (start != channel_index) {				scan.channels_list[start] =				    (u8) (IPW_A_MODE << 6) | (channel_index -							      start);				channel_index++;			}		}		if (priv->ieee->freq_band & IEEE80211_24GHZ_BAND) {			int start = channel_index;			for (i = 0; i < MAX_B_CHANNELS; i++) {				if (band_b_active_channel[i] == 0)					break;				if ((priv->status & STATUS_ASSOCIATED) &&				    band_b_active_channel[i] == priv->channel)					continue;				channel_index++;				scan.channels_list[channel_index] =				    band_b_active_channel[i];				ipw_set_scan_type(&scan, channel_index,						  scan_type);			}			if (start != channel_index) {				scan.channels_list[start] =				    (u8) (IPW_B_MODE << 6) | (channel_index -							      start);			}		}#ifdef CONFIG_IPW_MONITOR	}#endif	err = ipw_send_scan_request_ext(priv, &scan);	if (err) {		IPW_DEBUG_HC("Sending scan command failed: %08X\n", err);		return -EIO;	}	priv->status |= STATUS_SCANNING;	priv->status &= ~STATUS_SCAN_PENDING;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b095c3819805f87d73d41641a53e4c070360d783/ipw2200.c/buggy/drivers/net/wireless/ipw2200.c