From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: "Linux Wireless List" <linux-wireless@vger.kernel.org>,
"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 3/7] brcm80211: fmac: use counters in brcmf_bus structure
Date: Fri, 2 Mar 2012 22:55:47 +0100 [thread overview]
Message-ID: <1330725351-3803-4-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1330725351-3803-1-git-send-email-arend@broadcom.com>
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>
---
drivers/net/wireless/brcm80211/brcmfmac/usb.c | 8 ++++----
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 0418a40..a2a0c45 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)
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;
@@ -536,9 +536,9 @@ static void brcmf_usb_rx_complete(struct urb *urb)
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;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.h b/drivers/net/wireless/brcm80211/brcmfmac/usb.h
index 3377d63..acfa5e8 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 {
};
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 {
--
1.7.5.4
next prev parent reply other threads:[~2012-03-02 21:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 21:55 [PATCH 0/7] firmware request changed for udev and other cleanup Arend van Spriel
2012-03-02 21:55 ` [PATCH 1/7] brcm80211: fmac: remove unnecessary NULL pointer check Arend van Spriel
2012-03-02 21:55 ` [PATCH 2/7] brcm80211: fmac: remove brcmf_usb_attrib structure Arend van Spriel
2012-03-02 21:55 ` Arend van Spriel [this message]
2012-03-02 21:55 ` [PATCH 4/7] brcm80211: fmac: initialize host interface drivers regardless result Arend van Spriel
2012-03-04 22:49 ` Julian Calaby
2012-03-05 9:31 ` Arend van Spriel
2012-03-05 11:44 ` Julian Calaby
2012-03-02 21:55 ` [PATCH 5/7] brcm80211: fmac: remove firmware requests from init_module syscall Arend van Spriel
2012-03-02 21:55 ` [PATCH 6/7] brcm80211: smac: " Arend van Spriel
2012-03-02 21:55 ` [PATCH 7/7] brcm80211: smac: cleanup couple of debug output statements Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330725351-3803-4-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).