--- a/master/device.c Mon Sep 17 09:08:49 2007 +0000
+++ b/master/device.c Mon Sep 17 10:24:13 2007 +0000
@@ -288,17 +288,17 @@
ec_print_data(skb->data + ETH_HLEN, size);
}
-#ifdef EC_DEBUG_IF
- ec_debug_send(&device->dbg, skb->data, ETH_HLEN + size);
-#endif
-#ifdef EC_DEBUG_RING
- ec_device_debug_ring_append(
- device, TX, skb->data + ETH_HLEN, size);
-#endif
-
// start sending
- device->dev->hard_start_xmit(skb, device->dev);
- device->tx_count++;
+ if (device->dev->hard_start_xmit(skb, device->dev) == NETDEV_TX_OK) {
+ device->tx_count++;
+#ifdef EC_DEBUG_IF
+ ec_debug_send(&device->dbg, skb->data, ETH_HLEN + size);
+#endif
+#ifdef EC_DEBUG_RING
+ ec_device_debug_ring_append(
+ device, TX, skb->data + ETH_HLEN, size);
+#endif
+ }
}
/*****************************************************************************/