Send frame to debug-if and debug-ring only when transmitted

successfully.
This commit is contained in:
Florian Pose 2007-09-17 10:24:13 +00:00
parent b4880eee0f
commit 2f2738ccd1
1 changed files with 7 additions and 7 deletions

View File

@ -288,17 +288,17 @@ void ec_device_send(ec_device_t *device, /**< EtherCAT device */
ec_print_data(skb->data + ETH_HLEN, size);
}
// start sending
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);
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);
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++;
}
}
/*****************************************************************************/