(jiffies - network->last_scanned) / (HZ / 100)); 
1000 * (jiffies - network->last_scanned) / HZ); 
static int ipw_find_adhoc_network(struct ipw_priv *priv,				  struct ipw_network_match *match,				  struct ieee80211_network *network,				  int roaming){	struct ipw_supported_rates rates;	/* Verify that this network's capability is compatible with the	 * current mode (AdHoc or Infrastructure) */	if ((priv->ieee->iw_mode == IW_MODE_ADHOC &&	     !(network->capability & WLAN_CAPABILITY_IBSS))) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded due to "				"capability mismatch.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid));		return 0;	}	/* If we do not have an ESSID for this AP, we can not associate with	 * it */	if (network->flags & NETWORK_EMPTY_ESSID) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because of hidden ESSID.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid));		return 0;	}	if (unlikely(roaming)) {		/* If we are roaming, then ensure check if this is a valid		 * network to try and roam to */		if ((network->ssid_len != match->network->ssid_len) ||		    memcmp(network->ssid, match->network->ssid,			   network->ssid_len)) {			IPW_DEBUG_MERGE("Netowrk '%s (" MAC_FMT ")' excluded "					"because of non-network ESSID.\n",					escape_essid(network->ssid,						     network->ssid_len),					MAC_ARG(network->bssid));			return 0;		}	} else {		/* If an ESSID has been configured then compare the broadcast		 * ESSID to ours */		if ((priv->config & CFG_STATIC_ESSID) &&		    ((network->ssid_len != priv->essid_len) ||		     memcmp(network->ssid, priv->essid,			    min(network->ssid_len, priv->essid_len)))) {			char escaped[IW_ESSID_MAX_SIZE * 2 + 1];			strncpy(escaped,				escape_essid(network->ssid, network->ssid_len),				sizeof(escaped));			IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "					"because of ESSID mismatch: '%s'.\n",					escaped, MAC_ARG(network->bssid),					escape_essid(priv->essid,						     priv->essid_len));			return 0;		}	}	/* If the old network rate is better than this one, don't bother	 * testing everything else. */	if (network->time_stamp[0] < match->network->time_stamp[0]) {		IPW_DEBUG_MERGE		    ("Network '%s excluded because newer than current network.\n",		     escape_essid(match->network->ssid,				  match->network->ssid_len));		return 0;	} else if (network->time_stamp[1] < match->network->time_stamp[1]) {		IPW_DEBUG_MERGE		    ("Network '%s excluded because newer than current network.\n",		     escape_essid(match->network->ssid,				  match->network->ssid_len));		return 0;	}	/* Now go through and see if the requested network is valid... */	if (priv->ieee->scan_age != 0 &&	    time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because of age: %lums.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid),				(jiffies - network->last_scanned) / (HZ / 100));		return 0;	}	if ((priv->config & CFG_STATIC_CHANNEL) &&	    (network->channel != priv->channel)) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because of channel mismatch: %d != %d.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid),				network->channel, priv->channel);		return 0;	}	/* Verify privacy compatability */	if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=	    ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because of privacy mismatch: %s != %s.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid),				priv->capability & CAP_PRIVACY_ON ? "on" :				"off",				network->capability &				WLAN_CAPABILITY_PRIVACY ? "on" : "off");		return 0;	}	if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because of the same BSSID match: " MAC_FMT				".\n", escape_essid(network->ssid,						    network->ssid_len),				MAC_ARG(network->bssid), MAC_ARG(priv->bssid));		return 0;	}	/* Filter out any incompatible freq / mode combinations */	if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because of invalid frequency/mode "				"combination.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid));		return 0;	}	/* Ensure that the rates supported by the driver are compatible with	 * this AP, including verification of basic rates (mandatory) */	if (!ipw_compatible_rates(priv, network, &rates)) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because configured rate mask excludes "				"AP mandatory rate.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid));		return 0;	}	if (rates.num_rates == 0) {		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "				"because of no compatible rates.\n",				escape_essid(network->ssid, network->ssid_len),				MAC_ARG(network->bssid));		return 0;	}	/* TODO: Perform any further minimal comparititive tests.  We do not	 * want to put too much policy logic here; intelligent scan selection	 * should occur within a generic IEEE 802.11 user space tool.  */	/* Set up 'new' AP to this network */	ipw_copy_rates(&match->rates, &rates);	match->network = network;	IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' is a viable match.\n",			escape_essid(network->ssid, network->ssid_len),			MAC_ARG(network->bssid));	return 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/afbf30a2b78cac38e6ddae10a73063943b4783ee/ipw2200.c/clean/drivers/net/wireless/ipw2200.c