unregister_netdev(local->dev); 
static void prism2_free_local_data(struct net_device *dev){	struct hostap_tx_callback_info *tx_cb, *tx_cb_prev;	int i;	struct hostap_interface *iface;	struct local_info *local;	struct list_head *ptr, *n;	if (dev == NULL)		return;	iface = netdev_priv(dev);	local = iface->local;	flush_scheduled_work();	if (timer_pending(&local->crypt_deinit_timer))		del_timer(&local->crypt_deinit_timer);	prism2_crypt_deinit_entries(local, 1);	if (timer_pending(&local->passive_scan_timer))		del_timer(&local->passive_scan_timer);	if (timer_pending(&local->tick_timer))		del_timer(&local->tick_timer);	prism2_clear_cmd_queue(local);	skb_queue_purge(&local->info_list);	skb_queue_purge(&local->rx_list);	skb_queue_purge(&local->sta_tx_exc_list);	if (local->dev_enabled)		prism2_callback(local, PRISM2_CALLBACK_DISABLE);	for (i = 0; i < WEP_KEYS; i++) {		struct ieee80211_crypt_data *crypt = local->crypt[i];		if (crypt) {			if (crypt->ops)				crypt->ops->deinit(crypt->priv);			kfree(crypt);			local->crypt[i] = NULL;		}	}	if (local->ap != NULL)		hostap_free_data(local->ap);#ifndef PRISM2_NO_PROCFS_DEBUG	if (local->proc != NULL)		remove_proc_entry("registers", local->proc);#endif /* PRISM2_NO_PROCFS_DEBUG */	hostap_remove_proc(local);	tx_cb = local->tx_callback;	while (tx_cb != NULL) {		tx_cb_prev = tx_cb;		tx_cb = tx_cb->next;		kfree(tx_cb_prev);	}	hostap_set_hostapd(local, 0, 0);	hostap_set_hostapd_sta(local, 0, 0);	for (i = 0; i < PRISM2_FRAG_CACHE_LEN; i++) {		if (local->frag_cache[i].skb != NULL)			dev_kfree_skb(local->frag_cache[i].skb);	}#ifdef PRISM2_DOWNLOAD_SUPPORT	prism2_download_free_data(local->dl_pri);	prism2_download_free_data(local->dl_sec);#endif /* PRISM2_DOWNLOAD_SUPPORT */	list_for_each_safe(ptr, n, &local->hostap_interfaces) {		iface = list_entry(ptr, struct hostap_interface, list);		if (iface->type == HOSTAP_INTERFACE_MASTER) {			/* special handling for this interface below */			continue;		}		hostap_remove_interface(iface->dev, 0, 1);	}	prism2_clear_set_tim_queue(local);	list_for_each_safe(ptr, n, &local->bss_list) {		struct hostap_bss_info *bss =			list_entry(ptr, struct hostap_bss_info, list);		kfree(bss);	}	kfree(local->pda);	kfree(local->last_scan_results);	kfree(local->generic_elem);	unregister_netdev(local->dev);	free_netdev(local->dev);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7cb3cd090c2725b80561958a362c2ba15a7a8c86/hostap_hw.c/buggy/drivers/net/wireless/hostap/hostap_hw.c