Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / net / wireless / prism54 / islpci_dev.c
index efab07e..5ddf295 100644 (file)
@@ -19,7 +19,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 
 #include <linux/netdevice.h>
@@ -439,8 +438,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;
 }
@@ -491,8 +489,7 @@ islpci_reset_if(islpci_private *priv)
                /* 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;
@@ -756,8 +753,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;
         }
@@ -815,7 +811,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 +835,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;