diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-09-30 11:20:11 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-09-30 14:23:57 +0300 |
commit | 1c64f147d3cc9bbafe091a7b335ea3ec700186f0 (patch) | |
tree | 9af28fa3e5e8c586d1a6ea85a31ec570e6b9da07 /net/ieee802154/6lowpan/rx.c | |
parent | 4bc8fbc95e0d831e5e3800ecc8a8d5acac79c9a8 (diff) | |
download | linux-1c64f147d3cc9bbafe091a7b335ea3ec700186f0.tar.xz |
ieee802154: 6lowpan: add tx/rx stats
This patch adds support for increment transmit and receive stats. The
meaning of these stats are IPv6 based, which shows the stats after
running the 6lowpan adaptation layer (uncompression/compression,
fragmentation handling) on receive and before the adaptation layer
when transmit.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154/6lowpan/rx.c')
-rw-r--r-- | net/ieee802154/6lowpan/rx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ieee802154/6lowpan/rx.c b/net/ieee802154/6lowpan/rx.c index b1fd47d2802b..65d55e05516c 100644 --- a/net/ieee802154/6lowpan/rx.c +++ b/net/ieee802154/6lowpan/rx.c @@ -29,6 +29,8 @@ static int lowpan_give_skb_to_device(struct sk_buff *skb) { skb->protocol = htons(ETH_P_IPV6); + skb->dev->stats.rx_packets++; + skb->dev->stats.rx_bytes += skb->len; return netif_rx(skb); } |