firewire: net: count stats.tx_packets and stats.tx_bytes

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+6 -3
+6 -3
drivers/firewire/net.c
··· 906 906 static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask) 907 907 { 908 908 struct fwnet_device *dev = ptask->dev; 909 + struct sk_buff *skb = ptask->skb; 909 910 unsigned long flags; 910 911 bool free; 911 912 ··· 917 916 /* Check whether we or the networking TX soft-IRQ is last user. */ 918 917 free = (ptask->outstanding_pkts == 0 && !list_empty(&ptask->pt_link)); 919 918 920 - if (ptask->outstanding_pkts == 0) 919 + if (ptask->outstanding_pkts == 0) { 921 920 list_del(&ptask->pt_link); 921 + dev->netdev->stats.tx_packets++; 922 + dev->netdev->stats.tx_bytes += skb->len; 923 + } 922 924 923 925 spin_unlock_irqrestore(&dev->lock, flags); 924 926 ··· 930 926 u16 fg_off; 931 927 u16 datagram_label; 932 928 u16 lf; 933 - struct sk_buff *skb; 934 929 935 930 /* Update the ptask to point to the next fragment and send it */ 936 931 lf = fwnet_get_hdr_lf(&ptask->hdr); ··· 956 953 datagram_label = fwnet_get_hdr_dgl(&ptask->hdr); 957 954 break; 958 955 } 959 - skb = ptask->skb; 956 + 960 957 skb_pull(skb, ptask->max_payload); 961 958 if (ptask->outstanding_pkts > 1) { 962 959 fwnet_make_sf_hdr(&ptask->hdr, RFC2374_HDR_INTFRAG,