#define PCI_DMA_32BIT 0x00000000ffffffffULL err = pci_set_dma_mask(pdev, PCI_DMA_32BIT); 
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 
static int ipw_pci_probe(struct pci_dev *pdev,			 const struct pci_device_id *ent){	int err = 0;	struct net_device *net_dev;	void __iomem *base;	u32 length, val;	struct ipw_priv *priv;	int band, modulation;	net_dev = alloc_ieee80211(sizeof(struct ipw_priv));	if (net_dev == NULL) {		err = -ENOMEM;		goto out;	}	priv = ieee80211_priv(net_dev);	priv->ieee = netdev_priv(net_dev);	priv->net_dev = net_dev;	priv->pci_dev = pdev;#ifdef CONFIG_IPW_DEBUG	ipw_debug_level = debug;#endif	spin_lock_init(&priv->lock);	if (pci_enable_device(pdev)) {		err = -ENODEV;		goto out_free_ieee80211;	}	pci_set_master(pdev);#define PCI_DMA_32BIT 0x00000000ffffffffULL	err = pci_set_dma_mask(pdev, PCI_DMA_32BIT);	if (!err) 		err = pci_set_consistent_dma_mask(pdev, PCI_DMA_32BIT);	if (err) {		printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n");		goto out_pci_disable_device;	}	pci_set_drvdata(pdev, priv);	err = pci_request_regions(pdev, DRV_NAME);	if (err) 		goto out_pci_disable_device;	/* We disable the RETRY_TIMEOUT register (0x41) to keep 	 * PCI Tx retries from interfering with C3 CPU state */	pci_read_config_dword(pdev, 0x40, &val); 	if ((val & 0x0000ff00) != 0) 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);		length = pci_resource_len(pdev, 0);	priv->hw_len = length;		base = ioremap_nocache(pci_resource_start(pdev, 0), length);	if (!base) {		err = -ENODEV;		goto out_pci_release_regions;	}	priv->hw_base = base;	IPW_DEBUG_INFO("pci_resource_len = 0x%08x\n", length);	IPW_DEBUG_INFO("pci_resource_base = %p\n", base);	err = ipw_setup_deferred_work(priv);	if (err) {		IPW_ERROR("Unable to setup deferred work\n");		goto out_iounmap;	}	/* Initialize module parameter values here */	if (ifname)		strncpy(net_dev->name, ifname, IFNAMSIZ);	if (associate) 		priv->config |= CFG_ASSOCIATE;	else		IPW_DEBUG_INFO("Auto associate disabled.\n");		if (auto_create) 		priv->config |= CFG_ADHOC_CREATE;	else		IPW_DEBUG_INFO("Auto adhoc creation disabled.\n");		if (disable) {		priv->status |= STATUS_RF_KILL_SW;		IPW_DEBUG_INFO("Radio disabled.\n");	}	if (channel != 0) {		priv->config |= CFG_STATIC_CHANNEL;		priv->channel = channel;		IPW_DEBUG_INFO("Bind to static channel %d\n", channel); 		IPW_DEBUG_INFO("Bind to static channel %d\n", channel);		/* TODO: Validate that provided channel is in range */	}	switch (mode) {	case 1:		priv->ieee->iw_mode = IW_MODE_ADHOC;		break;#ifdef CONFIG_IPW_PROMISC		case 2:		priv->ieee->iw_mode = IW_MODE_MONITOR;		break;#endif	default:	case 0:		priv->ieee->iw_mode = IW_MODE_INFRA;		break;	}	if ((priv->pci_dev->device == 0x4223) ||	    (priv->pci_dev->device == 0x4224)) {		printk(KERN_INFO DRV_NAME 		       ": Detected Intel PRO/Wireless 2915ABG Network "		       "Connection\n");		priv->ieee->abg_ture = 1;		band = IEEE80211_52GHZ_BAND | IEEE80211_24GHZ_BAND;		modulation = IEEE80211_OFDM_MODULATION |			IEEE80211_CCK_MODULATION;		priv->adapter = IPW_2915ABG;		priv->ieee->mode = IEEE_A|IEEE_G|IEEE_B;	} else {		if (priv->pci_dev->device == 0x4221) 			printk(KERN_INFO DRV_NAME 			       ": Detected Intel PRO/Wireless 2225BG Network "			       "Connection\n");		else			printk(KERN_INFO DRV_NAME 			       ": Detected Intel PRO/Wireless 2200BG Network "			       "Connection\n");				priv->ieee->abg_ture = 0;		band = IEEE80211_24GHZ_BAND;		modulation = IEEE80211_OFDM_MODULATION |			IEEE80211_CCK_MODULATION;		priv->adapter = IPW_2200BG;		priv->ieee->mode = IEEE_G|IEEE_B;	}	priv->ieee->freq_band = band;	priv->ieee->modulation = modulation;	priv->rates_mask = IEEE80211_DEFAULT_RATES_MASK;	priv->missed_beacon_threshold = IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT;	priv->roaming_threshold = IPW_MB_ROAMING_THRESHOLD_DEFAULT;	priv->rts_threshold = DEFAULT_RTS_THRESHOLD;	/* If power management is turned on, default to AC mode */        priv->power_mode = IPW_POWER_AC;	priv->tx_power = IPW_DEFAULT_TX_POWER;	err = request_irq(pdev->irq, ipw_isr, SA_SHIRQ, DRV_NAME, 			  priv);	if (err) {		IPW_ERROR("Error allocating IRQ %d\n", pdev->irq);		goto out_destroy_workqueue;	}	SET_MODULE_OWNER(net_dev);	SET_NETDEV_DEV(net_dev, &pdev->dev);	priv->ieee->hard_start_xmit = ipw_net_hard_start_xmit;	priv->ieee->set_security = shim__set_security;	net_dev->open = ipw_net_open;	net_dev->stop = ipw_net_stop;	net_dev->init = ipw_net_init;	net_dev->get_stats = ipw_net_get_stats;	net_dev->set_multicast_list = ipw_net_set_multicast_list;	net_dev->set_mac_address = ipw_net_set_mac_address;	net_dev->get_wireless_stats = ipw_get_wireless_stats;	net_dev->wireless_handlers = &ipw_wx_handler_def;	net_dev->ethtool_ops = &ipw_ethtool_ops;	net_dev->irq = pdev->irq;	net_dev->base_addr = (unsigned long )priv->hw_base;	net_dev->mem_start = pci_resource_start(pdev, 0);	net_dev->mem_end = net_dev->mem_start + pci_resource_len(pdev, 0) - 1;	err = sysfs_create_group(&pdev->dev.kobj, &ipw_attribute_group);	if (err) {		IPW_ERROR("failed to create sysfs device attributes\n");		goto out_release_irq;	}	err = register_netdev(net_dev);	if (err) {		IPW_ERROR("failed to register network device\n");		goto out_remove_group;	}	return 0; out_remove_group:	sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); out_release_irq:	free_irq(pdev->irq, priv); out_destroy_workqueue:	destroy_workqueue(priv->workqueue);	priv->workqueue = NULL; out_iounmap:	iounmap(priv->hw_base); out_pci_release_regions:	pci_release_regions(pdev); out_pci_disable_device:	pci_disable_device(pdev);	pci_set_drvdata(pdev, NULL); out_free_ieee80211:	free_ieee80211(priv->net_dev); out:	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0e08b44eedacb7824c88678d9a9ea7db25b5401c/ipw2200.c/buggy/drivers/net/wireless/ipw2200.c