diff options
-rw-r--r-- | net/ieee802154/6lowpan/rx.c | 2 | ||||
-rw-r--r-- | net/ieee802154/6lowpan/tx.c | 4 |
2 files changed, 6 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 @@ | |||
29 | static int lowpan_give_skb_to_device(struct sk_buff *skb) | 29 | static int lowpan_give_skb_to_device(struct sk_buff *skb) |
30 | { | 30 | { |
31 | skb->protocol = htons(ETH_P_IPV6); | 31 | skb->protocol = htons(ETH_P_IPV6); |
32 | skb->dev->stats.rx_packets++; | ||
33 | skb->dev->stats.rx_bytes += skb->len; | ||
32 | 34 | ||
33 | return netif_rx(skb); | 35 | return netif_rx(skb); |
34 | } | 36 | } |
diff --git a/net/ieee802154/6lowpan/tx.c b/net/ieee802154/6lowpan/tx.c index 3b665e12cf2b..57363026ff22 100644 --- a/net/ieee802154/6lowpan/tx.c +++ b/net/ieee802154/6lowpan/tx.c | |||
@@ -192,6 +192,8 @@ lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *ldev, | |||
192 | } | 192 | } |
193 | } while (skb_unprocessed > frag_cap); | 193 | } while (skb_unprocessed > frag_cap); |
194 | 194 | ||
195 | ldev->stats.tx_packets++; | ||
196 | ldev->stats.tx_bytes += dgram_size; | ||
195 | consume_skb(skb); | 197 | consume_skb(skb); |
196 | return NET_XMIT_SUCCESS; | 198 | return NET_XMIT_SUCCESS; |
197 | 199 | ||
@@ -277,6 +279,8 @@ netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *ldev) | |||
277 | 279 | ||
278 | if (skb_tail_pointer(skb) - skb_network_header(skb) <= max_single) { | 280 | if (skb_tail_pointer(skb) - skb_network_header(skb) <= max_single) { |
279 | skb->dev = lowpan_dev_info(ldev)->wdev; | 281 | skb->dev = lowpan_dev_info(ldev)->wdev; |
282 | ldev->stats.tx_packets++; | ||
283 | ldev->stats.tx_bytes += dgram_size; | ||
280 | return dev_queue_xmit(skb); | 284 | return dev_queue_xmit(skb); |
281 | } else { | 285 | } else { |
282 | netdev_tx_t rc; | 286 | netdev_tx_t rc; |