diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-03-02 16:55:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-05 15:53:55 -0500 |
commit | 1d9c1796bc448d76429e0937ef69e4f29cd1adad (patch) | |
tree | 25caecd71f337c81d4dd88468440b85959d52b36 | |
parent | ac94f196a5fed4915b82d71b9b111867d78df992 (diff) |
brcm80211: fmac: use counters in brcmf_bus structure
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>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/usb.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/usb.h | 11 |
2 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index 0418a40fce8d..a2a0c45201ac 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c | |||
@@ -514,9 +514,9 @@ static void brcmf_usb_tx_complete(struct urb *urb) | |||
514 | 514 | ||
515 | brcmf_usb_del_fromq(devinfo, req); | 515 | brcmf_usb_del_fromq(devinfo, req); |
516 | if (urb->status == 0) | 516 | if (urb->status == 0) |
517 | devinfo->bus_pub.stats.tx_packets++; | 517 | devinfo->bus_pub.bus->dstats.tx_packets++; |
518 | else | 518 | else |
519 | devinfo->bus_pub.stats.tx_errors++; | 519 | devinfo->bus_pub.bus->dstats.tx_errors++; |
520 | 520 | ||
521 | dev_kfree_skb(req->skb); | 521 | dev_kfree_skb(req->skb); |
522 | req->skb = NULL; | 522 | req->skb = NULL; |
@@ -536,9 +536,9 @@ static void brcmf_usb_rx_complete(struct urb *urb) | |||
536 | req->skb = NULL; | 536 | req->skb = NULL; |
537 | 537 | ||
538 | if (urb->status == 0) { | 538 | if (urb->status == 0) { |
539 | devinfo->bus_pub.stats.rx_packets++; | 539 | devinfo->bus_pub.bus->dstats.rx_packets++; |
540 | } else { | 540 | } else { |
541 | devinfo->bus_pub.stats.rx_errors++; | 541 | devinfo->bus_pub.bus->dstats.rx_errors++; |
542 | dev_kfree_skb(skb); | 542 | dev_kfree_skb(skb); |
543 | brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req); | 543 | brcmf_usb_enq(devinfo, &devinfo->rx_freeq, req); |
544 | return; | 544 | return; |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.h b/drivers/net/wireless/brcm80211/brcmfmac/usb.h index 3377d63e6c8b..acfa5e89872f 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.h | |||
@@ -33,21 +33,10 @@ enum brcmf_usb_pnp_state { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct brcmf_stats { | 35 | struct brcmf_stats { |
36 | u32 tx_errors; | ||
37 | u32 tx_packets; | ||
38 | u32 tx_multicast; | ||
39 | u32 tx_ctlpkts; | 36 | u32 tx_ctlpkts; |
40 | u32 tx_ctlerrs; | 37 | u32 tx_ctlerrs; |
41 | u32 tx_dropped; | ||
42 | u32 tx_flushed; | ||
43 | u32 rx_errors; | ||
44 | u32 rx_packets; | ||
45 | u32 rx_multicast; | ||
46 | u32 rx_ctlpkts; | 38 | u32 rx_ctlpkts; |
47 | u32 rx_ctlerrs; | 39 | u32 rx_ctlerrs; |
48 | u32 rx_dropped; | ||
49 | u32 rx_flushed; | ||
50 | |||
51 | }; | 40 | }; |
52 | 41 | ||
53 | struct brcmf_usbdev { | 42 | struct brcmf_usbdev { |