Fixed freeing transmit socket buffers.
authorFlorian Pose <fp@igh-essen.com>
Tue, 30 Sep 2008 12:30:18 +0000
changeset 1230 0f3878668790
parent 1229 51d447754109
child 1231 c929f2fff45a
Fixed freeing transmit socket buffers.
devices/e100-2.6.20-ethercat.c
--- a/devices/e100-2.6.20-ethercat.c	Tue Sep 30 11:51:23 2008 +0000
+++ b/devices/e100-2.6.20-ethercat.c	Tue Sep 30 12:30:18 2008 +0000
@@ -1748,10 +1748,9 @@
 				le32_to_cpu(cb->u.tcb.tbd.buf_addr),
 				le16_to_cpu(cb->u.tcb.tbd.size),
 				PCI_DMA_TODEVICE);
-            if (!nic->ecdev) {
-                dev_kfree_skb_any(cb->skb);
-				cb->skb = NULL;
-			}
+			if (!nic->ecdev)
+				dev_kfree_skb_any(cb->skb);
+			cb->skb = NULL;
 			tx_cleaned = 1;
 		}
 		cb->status = 0;
@@ -1779,7 +1778,8 @@
 					le32_to_cpu(cb->u.tcb.tbd.buf_addr),
 					le16_to_cpu(cb->u.tcb.tbd.size),
 					PCI_DMA_TODEVICE);
-				dev_kfree_skb(cb->skb);
+				if (!nic->ecdev)
+					dev_kfree_skb(cb->skb);
 			}
 			nic->cb_to_clean = nic->cb_to_clean->next;
 			nic->cbs_avail++;