local, scan, hscan, hostscan, NULL, bssid, current_ev, end_buf); 
local, scan, NULL, current_ev, end_buf); 
static inline int prism2_translate_scan(local_info_t *local,					char *buffer, int buflen){	struct hfa384x_scan_result *scan;	struct hfa384x_hostscan_result *hscan;	int entries, entry, hostscan;	char *current_ev = buffer;	char *end_buf = buffer + buflen;	u8 *bssid;	struct list_head *ptr;	spin_lock_bh(&local->lock);	list_for_each(ptr, &local->bss_list) {		struct hostap_bss_info *bss;		bss = list_entry(ptr, struct hostap_bss_info, list);		bss->included = 0;	}	hostscan = local->last_scan_type == PRISM2_HOSTSCAN;	entries = hostscan ? local->last_hostscan_results_count :		local->last_scan_results_count;	for (entry = 0; entry < entries; entry++) {		int found = 0;		scan = &local->last_scan_results[entry];		hscan = &local->last_hostscan_results[entry];		bssid = hostscan ? hscan->bssid : scan->bssid;		/* Report every SSID if the AP is using multiple SSIDs. If no		 * BSS record is found (e.g., when WPA mode is disabled),		 * report the AP once. */		list_for_each(ptr, &local->bss_list) {			struct hostap_bss_info *bss;			bss = list_entry(ptr, struct hostap_bss_info, list);			if (memcmp(bss->bssid, bssid, ETH_ALEN) == 0) {				bss->included = 1;				current_ev = __prism2_translate_scan(					local, scan, hscan, hostscan, bss,					bssid, current_ev, end_buf);				found++;			}		}		if (!found) {			current_ev = __prism2_translate_scan(				local, scan, hscan, hostscan, NULL, bssid,				current_ev, end_buf);		}		/* Check if there is space for one more entry */		if ((end_buf - current_ev) <= IW_EV_ADDR_LEN) {			/* Ask user space to try again with a bigger buffer */			spin_unlock_bh(&local->lock);			return -E2BIG;		}	}	/* Prism2 firmware has limits (32 at least in some versions) for number	 * of BSSes in scan results. Extend this limit by using local BSS list.	 */	list_for_each(ptr, &local->bss_list) {		struct hostap_bss_info *bss;		bss = list_entry(ptr, struct hostap_bss_info, list);		if (bss->included)			continue;		current_ev = __prism2_translate_scan(local, NULL, NULL, 0, bss,						     bss->bssid, current_ev,						     end_buf);		/* Check if there is space for one more entry */		if ((end_buf - current_ev) <= IW_EV_ADDR_LEN) {			/* Ask user space to try again with a bigger buffer */			spin_unlock_bh(&local->lock);			return -E2BIG;		}	}	spin_unlock_bh(&local->lock);	return current_ev - buffer;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2e4fd068e7e25e654a454ed4a425f239c0f6407a/hostap_ioctl.c/buggy/drivers/net/wireless/hostap/hostap_ioctl.c