Print complete Ethernet frame during debug.
authorFlorian Pose <fp@igh-essen.com>
Thu, 05 Nov 2009 09:25:25 +0100
changeset 1554 e07a0f8de03d
parent 1553 4e8d56d6f12a
child 1555 7679e98b0bb1
Print complete Ethernet frame during debug.
master/device.c
--- a/master/device.c	Thu Oct 29 17:28:49 2009 +0100
+++ b/master/device.c	Thu Nov 05 09:25:25 2009 +0100
@@ -309,16 +309,18 @@
     skb->len = ETH_HLEN + size;
 
     if (unlikely(device->master->debug_level > 1)) {
-        EC_DBG("sending frame:\n");
-        ec_print_data(skb->data + ETH_HLEN, size);
+        EC_DBG("Sending frame:\n");
+        ec_print_data(skb->data, ETH_HLEN + size);
     }
 
     // start sending
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
-    if (device->dev->netdev_ops->ndo_start_xmit(skb, device->dev) == NETDEV_TX_OK) {
+    if (device->dev->netdev_ops->ndo_start_xmit(skb, device->dev) ==
+            NETDEV_TX_OK)
 #else
-    if (device->dev->hard_start_xmit(skb, device->dev) == NETDEV_TX_OK) {
-#endif
+    if (device->dev->hard_start_xmit(skb, device->dev) == NETDEV_TX_OK)
+#endif
+    {
         device->tx_count++;
 #ifdef EC_DEBUG_IF
         ec_debug_send(&device->dbg, skb->data, ETH_HLEN + size);
@@ -516,7 +518,7 @@
 
     if (unlikely(device->master->debug_level > 1)) {
         EC_DBG("Received frame:\n");
-        ec_print_data(ec_data, ec_size);
+        ec_print_data(data, size);
     }
 
 #ifdef EC_DEBUG_IF