X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fwireless%2Fprism54%2Fislpci_dev.c;h=f057fd9fcd79edcf2288451ec21c51aa09ad3f6b;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=efab07e9e24e0a37cfa624b57aa49060c9432e39;hpb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;p=linux-2.6.git diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index efab07e9e..f057fd9fc 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c @@ -1,5 +1,4 @@ /* - * * Copyright (C) 2002 Intersil Americas Inc. * Copyright (C) 2003 Herbert Valerio Riedel * Copyright (C) 2003 Luis R. Rodriguez @@ -19,7 +18,6 @@ * */ -#include #include #include @@ -183,7 +181,7 @@ isl_upload_firmware(islpci_private *priv) ******************************************************************************/ irqreturn_t -islpci_interrupt(int irq, void *config, struct pt_regs *regs) +islpci_interrupt(int irq, void *config) { u32 reg; islpci_private *priv = config; @@ -414,7 +412,7 @@ prism54_bring_down(islpci_private *priv) islpci_set_state(priv, PRV_STATE_PREBOOT); /* disable all device interrupts in case they weren't */ - isl38xx_disable_interrupts(priv->device_base); + isl38xx_disable_interrupts(priv->device_base); /* For safety reasons, we may want to ensure that no DMA transfer is * currently in progress by emptying the TX and RX queues. */ @@ -439,8 +437,7 @@ prism54_bring_down(islpci_private *priv) wmb(); /* wait a while for the device to reset */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(50*HZ/1000); + schedule_timeout_uninterruptible(msecs_to_jiffies(50)); return 0; } @@ -482,7 +479,7 @@ islpci_reset_if(islpci_private *priv) DEFINE_WAIT(wait); prepare_to_wait(&priv->reset_done, &wait, TASK_UNINTERRUPTIBLE); - + /* now the last step is to reset the interface */ isl38xx_interface_reset(priv->device_base, priv->device_host_address); islpci_set_state(priv, PRV_STATE_PREINIT); @@ -490,16 +487,15 @@ islpci_reset_if(islpci_private *priv) for(count = 0; count < 2 && result; count++) { /* The software reset acknowledge needs about 220 msec here. * Be conservative and wait for up to one second. */ - - set_current_state(TASK_UNINTERRUPTIBLE); - remaining = schedule_timeout(HZ); + + remaining = schedule_timeout_uninterruptible(HZ); if(remaining > 0) { result = 0; break; } - /* If we're here it's because our IRQ hasn't yet gone through. + /* If we're here it's because our IRQ hasn't yet gone through. * Retry a bit more... */ printk(KERN_ERR "%s: no 'reset complete' IRQ seen - retrying\n", @@ -517,7 +513,7 @@ islpci_reset_if(islpci_private *priv) /* Now that the device is 100% up, let's allow * for the other interrupts -- - * NOTE: this is not *yet* true since we've only allowed the + * NOTE: this is not *yet* true since we've only allowed the * INIT interrupt on the IRQ line. We can perhaps poll * the IRQ line until we know for sure the reset went through */ isl38xx_enable_common_interrupts(priv->device_base); @@ -718,8 +714,8 @@ islpci_alloc_memory(islpci_private *priv) } prism54_acl_init(&priv->acl); - prism54_wpa_ie_init(priv); - if (mgt_init(priv)) + prism54_wpa_bss_ie_init(priv); + if (mgt_init(priv)) goto out_free; return 0; @@ -756,8 +752,7 @@ islpci_free_memory(islpci_private *priv) pci_unmap_single(priv->pdev, buf->pci_addr, buf->size, PCI_DMA_FROMDEVICE); buf->pci_addr = 0; - if (buf->mem) - kfree(buf->mem); + kfree(buf->mem); buf->size = 0; buf->mem = NULL; } @@ -778,7 +773,7 @@ islpci_free_memory(islpci_private *priv) /* Free the acces control list and the WPA list */ prism54_acl_clean(&priv->acl); - prism54_wpa_ie_clean(priv); + prism54_wpa_bss_ie_clean(priv); mgt_clean(priv); return 0; @@ -815,7 +810,6 @@ islpci_setup(struct pci_dev *pdev) ndev->open = &islpci_open; ndev->stop = &islpci_close; ndev->get_stats = &islpci_statistics; - ndev->get_wireless_stats = &prism54_get_wireless_stats; ndev->do_ioctl = &prism54_ioctl; ndev->wireless_handlers = (struct iw_handler_def *) &prism54_handler_def; @@ -840,11 +834,9 @@ islpci_setup(struct pci_dev *pdev) priv->ndev->type = (priv->iw_mode == IW_MODE_MONITOR) ? priv->monitor_type : ARPHRD_ETHER; -#if WIRELESS_EXT > 16 /* Add pointers to enable iwspy support. */ priv->wireless_data.spy_data = &priv->spy_data; ndev->wireless_data = &priv->wireless_data; -#endif /* WIRELESS_EXT > 16 */ /* save the start and end address of the PCI memory area */ ndev->mem_start = (unsigned long) priv->device_base; @@ -868,11 +860,10 @@ islpci_setup(struct pci_dev *pdev) priv->state_off = 1; /* initialize workqueue's */ - INIT_WORK(&priv->stats_work, - (void (*)(void *)) prism54_update_stats, priv); + INIT_WORK(&priv->stats_work, prism54_update_stats); priv->stats_timestamp = 0; - INIT_WORK(&priv->reset_task, islpci_do_reset_and_wake, priv); + INIT_WORK(&priv->reset_task, islpci_do_reset_and_wake); priv->reset_task_pending = 0; /* allocate various memory areas */