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_eth.c
index 5952e99..a8261d8 100644 (file)
@@ -17,7 +17,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 
 #include <linux/pci.h>
@@ -97,12 +96,6 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
        /* lock the driver code */
        spin_lock_irqsave(&priv->slock, flags);
 
-       /* determine the amount of fragments needed to store the frame */
-
-       frame_size = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
-       if (init_wds)
-               frame_size += 6;
-
        /* check whether the destination queue has enough fragments for the frame */
        curr_frag = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_TX_DATA_LQ]);
        if (unlikely(curr_frag - priv->free_data_tx >= ISL38XX_CB_TX_QSIZE)) {
@@ -184,7 +177,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
 #endif
 
                        newskb->dev = skb->dev;
-                       dev_kfree_skb(skb);
+                       dev_kfree_skb_irq(skb);
                        skb = newskb;
                }
        }
@@ -213,6 +206,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
        /* store the skb address for future freeing  */
        priv->data_low_tx[index] = skb;
        /* set the proper fragment start address and size information */
+       frame_size = skb->len;
        fragment->size = cpu_to_le16(frame_size);
        fragment->flags = cpu_to_le16(0);       /* set to 1 if more fragments */
        fragment->address = cpu_to_le32(pci_map_address);
@@ -232,26 +226,23 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
                priv->data_low_tx_full = 1;
        }
 
+       /* set the transmission time */
+       ndev->trans_start = jiffies;
+       priv->statistics.tx_packets++;
+       priv->statistics.tx_bytes += skb->len;
+
        /* trigger the device */
        islpci_trigger(priv);
 
        /* unlock the driver code */
        spin_unlock_irqrestore(&priv->slock, flags);
 
-       /* set the transmission time */
-       ndev->trans_start = jiffies;
-       priv->statistics.tx_packets++;
-       priv->statistics.tx_bytes += skb->len;
-
        return 0;
 
       drop_free:
-       /* free the skbuf structure before aborting */
-       dev_kfree_skb(skb);
-       skb = NULL;
-
        priv->statistics.tx_dropped++;
        spin_unlock_irqrestore(&priv->slock, flags);
+       dev_kfree_skb(skb);
        return err;
 }