This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / net / wireless / prism54 / islpci_dev.c
index 1ae1685..650f86a 100644 (file)
@@ -105,7 +105,7 @@ isl_upload_firmware(islpci_private *priv)
                               "%s: firmware '%s' size is not multiple of 32bit, aborting!\n",
                               "prism54", priv->firmware);
                        release_firmware(fw_entry);
-                       return -EILSEQ; /* Illegal byte sequence  */;
+                       return EILSEQ; /* Illegal byte sequence  */;
                }
 
                while (fw_len > 0) {
@@ -142,10 +142,6 @@ isl_upload_firmware(islpci_private *priv)
 
                BUG_ON(fw_len != 0);
 
-               /* Firmware version is at offset 40 (also for "newmac") */
-               printk(KERN_DEBUG "%s: firmware version: %.8s\n",
-                      priv->ndev->name, fw_entry->data + 40);
-
                release_firmware(fw_entry);
        }
 
@@ -379,6 +375,8 @@ islpci_open(struct net_device *ndev)
        u32 rc;
        islpci_private *priv = netdev_priv(ndev);
 
+       printk(KERN_DEBUG "%s: islpci_open()\n", ndev->name);
+
        /* reset data structures, upload firmware and reset device */
        rc = islpci_reset(priv,1);
        if (rc) {
@@ -464,7 +462,8 @@ islpci_upload_fw(islpci_private *priv)
                return rc;
        }
 
-       printk(KERN_DEBUG "%s: firmware upload complete\n",
+       printk(KERN_DEBUG
+              "%s: firmware uploaded done, now triggering reset...\n",
               priv->ndev->name);
 
        islpci_set_state(priv, PRV_STATE_POSTBOOT);
@@ -490,7 +489,6 @@ 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);
 
                if(remaining > 0) {
@@ -501,16 +499,15 @@ islpci_reset_if(islpci_private *priv)
                /* 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",
-                       priv->ndev->name);
+                printk(KERN_ERR "%s: device soft reset timed out\n",
+                      priv->ndev->name);
+
        }
 
        finish_wait(&priv->reset_done, &wait);
 
-       if (result) {
-               printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name);
+       if(result)
                return result;
-       }
 
        islpci_set_state(priv, PRV_STATE_INIT);
 
@@ -522,17 +519,11 @@ islpci_reset_if(islpci_private *priv)
        isl38xx_enable_common_interrupts(priv->device_base);
 
        down_write(&priv->mib_sem);
-       result = mgt_commit(priv);
-       if (result) {
-               printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name);
-               up_write(&priv->mib_sem);
-               return result;
-       }
+       mgt_commit(priv);
        up_write(&priv->mib_sem);
 
        islpci_set_state(priv, PRV_STATE_READY);
 
-       printk(KERN_DEBUG "%s: interface reset complete\n", priv->ndev->name);
        return 0;
 }
 
@@ -593,18 +584,18 @@ islpci_reset(islpci_private *priv, int reload_firmware)
        /* now that the data structures are cleaned up, upload
         * firmware and reset interface */
                rc = islpci_upload_fw(priv);
-               if (rc) {
-                       printk(KERN_ERR "%s: islpci_reset: failure\n",
-                               priv->ndev->name);
+               if (rc) 
                        return rc;
-               }
        }
 
        /* finally reset interface */
        rc = islpci_reset_if(priv);
-       if (rc)
-               printk(KERN_ERR "prism54: Your card/socket may be faulty, or IRQ line too busy :(\n");
+       if (!rc) /* If successful */
+               return rc;
+       
+       printk(KERN_DEBUG  "prism54: Your card/socket may be faulty, or IRQ line too busy :(\n");
        return rc;
+
 }
 
 struct net_device_stats *
@@ -613,7 +604,7 @@ islpci_statistics(struct net_device *ndev)
        islpci_private *priv = netdev_priv(ndev);
 
 #if VERBOSE > SHOW_ERROR_MESSAGES
-       DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics\n");
+       DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics \n");
 #endif
 
        return &priv->statistics;
@@ -839,12 +830,6 @@ 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;
        ndev->mem_end = ndev->mem_start + ISL38XX_PCI_MEM_SIZE;