The usb code defines a structure for counting statistics. However,
it should use the statistics entry provided in brcmf_bus as that is
exposed to the net_device. The usb private statistics counter only
remains with counters for control packets between driver and usb
device.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcmf_usb_del_fromq(devinfo, req);
if (urb->status == 0)
- devinfo->bus_pub.stats.tx_packets++;
+ devinfo->bus_pub.bus->dstats.tx_packets++;
else
- devinfo->bus_pub.stats.tx_errors++;
+ devinfo->bus_pub.bus->dstats.tx_errors++;
dev_kfree_skb(req->skb);
req->skb = NULL;
req->skb = NULL;
if (urb->status == 0) {
- devinfo->bus_pub.stats.rx_packets++;
+ devinfo->bus_pub.bus->dstats.rx_packets++;
} else {
- devinfo->bus_pub.stats.rx_errors++;
+ devinfo->bus_pub.bus->dstats.rx_errors++;
dev_kfree_skb(skb);
brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req);
return;
};
struct brcmf_stats {
- u32 tx_errors;
- u32 tx_packets;
- u32 tx_multicast;
u32 tx_ctlpkts;
u32 tx_ctlerrs;
- u32 tx_dropped;
- u32 tx_flushed;
- u32 rx_errors;
- u32 rx_packets;
- u32 rx_multicast;
u32 rx_ctlpkts;
u32 rx_ctlerrs;
- u32 rx_dropped;
- u32 rx_flushed;
-
};
struct brcmf_usbdev {