mac802154: rx: add rx stats incrementation
authorAlexander Aring <alex.aring@gmail.com>
Wed, 29 Oct 2014 20:34:40 +0000 (21:34 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 29 Oct 2014 22:07:46 +0000 (23:07 +0100)
This patch adds rx stats incrementation when the monitor interface
recevied a frame.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/mac802154/rx.c

index 7669cdbba526a825ada8d336b4408b3c0aad6f76..6ba2769f5fb495e0e143f70dc1eb8d7eeb4a7fa3 100644 (file)
@@ -241,6 +241,9 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
                skb2->dev = sdata->dev;
 
                ieee802154_deliver_skb(skb2);
+
+               sdata->dev->stats.rx_packets++;
+               sdata->dev->stats.rx_bytes += skb->len;
        }
 }