Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 998221c2 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller
Browse files

netiucv: displayed TX bytes value much too high



tx_bytes value must be updated by skb length before skb is freed.

Signed-off-by: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0ca8cc6f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -741,13 +741,13 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg)
	if (single_flag) {
	if (single_flag) {
		if ((skb = skb_dequeue(&conn->commit_queue))) {
		if ((skb = skb_dequeue(&conn->commit_queue))) {
			atomic_dec(&skb->users);
			atomic_dec(&skb->users);
			dev_kfree_skb_any(skb);
			if (privptr) {
			if (privptr) {
				privptr->stats.tx_packets++;
				privptr->stats.tx_packets++;
				privptr->stats.tx_bytes +=
				privptr->stats.tx_bytes +=
					(skb->len - NETIUCV_HDRLEN
					(skb->len - NETIUCV_HDRLEN
						  - NETIUCV_HDRLEN);
						  - NETIUCV_HDRLEN);
			}
			}
			dev_kfree_skb_any(skb);
		}
		}
	}
	}
	conn->tx_buff->data = conn->tx_buff->head;
	conn->tx_buff->data = conn->tx_buff->head;