Skip to content
Snippets Groups Projects
Commit bf730b7b authored by Florian Pose's avatar Florian Pose
Browse files

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

successfully.
parent 56f470cd
No related branches found
No related tags found
No related merge requests found
...@@ -288,17 +288,17 @@ void ec_device_send(ec_device_t *device, /**< EtherCAT device */ ...@@ -288,17 +288,17 @@ void ec_device_send(ec_device_t *device, /**< EtherCAT device */
ec_print_data(skb->data + ETH_HLEN, size); 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 #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 #endif
#ifdef EC_DEBUG_RING #ifdef EC_DEBUG_RING
ec_device_debug_ring_append( ec_device_debug_ring_append(
device, TX, skb->data + ETH_HLEN, size); device, TX, skb->data + ETH_HLEN, size);
#endif #endif
}
// start sending
device->dev->hard_start_xmit(skb, device->dev);
device->tx_count++;
} }
/*****************************************************************************/ /*****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment