netiucv: displayed TX bytes value much too high
authorUrsula Braun <ursula.braun@de.ibm.com>
Thu, 12 Nov 2009 21:46:30 +0000 (21:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Nov 2009 04:47:01 +0000 (20:47 -0800)
tx_bytes value must be updated by skb length before skb is freed.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/netiucv.c

index c84eadd3602af2883dbc8aa719aa2f576962c831..395c04c2b00fcd5cca85a696bccddf6f540b7064 100644 (file)
@@ -741,13 +741,13 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg)
        if (single_flag) {
                if ((skb = skb_dequeue(&conn->commit_queue))) {
                        atomic_dec(&skb->users);
-                       dev_kfree_skb_any(skb);
                        if (privptr) {
                                privptr->stats.tx_packets++;
                                privptr->stats.tx_bytes +=
                                        (skb->len - NETIUCV_HDRLEN
-                                                 - NETIUCV_HDRLEN);
+                                                 - NETIUCV_HDRLEN);
                        }
+                       dev_kfree_skb_any(skb);
                }
        }
        conn->tx_buff->data = conn->tx_buff->head;