summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2011-06-02 23:33:42 +0200
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-06-22 11:29:40 +0200
commitdd291bb98a2cdd6c4532baf052e902cd64018b68 (patch)
tree0bb81aa150c71953744ed819912bf277ccc3d48c
parent766c214fa70daaced6153f5e778655c143abcaf0 (diff)
cw1200: AMSDU debug statistics
MSDU aggregation statistics are exposed to DebugFS. Change-Id: Ifb99ab3a206d50a3f86b791fbc505de0e9b64371 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24477 Reviewed-by: Robert MARKLUND <robert.marklund@stericsson.com> Tested-by: Robert MARKLUND <robert.marklund@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25617 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
-rw-r--r--drivers/staging/cw1200/debug.c17
-rw-r--r--drivers/staging/cw1200/debug.h54
-rw-r--r--drivers/staging/cw1200/sta.c5
-rw-r--r--drivers/staging/cw1200/txrx.c6
4 files changed, 77 insertions, 5 deletions
diff --git a/drivers/staging/cw1200/debug.c b/drivers/staging/cw1200/debug.c
index c54e6391746..47e230f460d 100644
--- a/drivers/staging/cw1200/debug.c
+++ b/drivers/staging/cw1200/debug.c
@@ -15,11 +15,6 @@
#include "cw1200.h"
#include "debug.h"
-/* private */
-struct cw1200_debug_priv {
- struct dentry *debugfs_phy;
-};
-
/* join_status */
static const char * const cw1200_debug_join_status[] = {
"passive",
@@ -101,6 +96,7 @@ static int cw1200_status_show(struct seq_file *seq, void *v)
{
int i;
struct cw1200_common *priv = seq->private;
+ struct cw1200_debug_priv *d = priv->debug;
seq_puts(seq, "CW1200 Wireless LAN driver status\n");
seq_printf(seq, "Hardware: %d.%d\n",
priv->wsm_caps.hardwareId,
@@ -247,6 +243,17 @@ static int cw1200_status_show(struct seq_file *seq, void *v)
seq_printf(seq, "TXlock cnt: %d\n",
atomic_read(&priv->tx_lock));
+ seq_printf(seq, "TXed: %d\n",
+ d->tx);
+ seq_printf(seq, "AGG TXed: %d\n",
+ d->tx_agg);
+ seq_printf(seq, "MORE TXed: %d\n",
+ d->tx_more);
+ seq_printf(seq, "RXed: %d\n",
+ d->rx);
+ seq_printf(seq, "AGG RXed: %d\n",
+ d->rx_agg);
+
seq_printf(seq, "Scan: %s\n",
atomic_read(&priv->scan.in_progress) ? "active" : "idle");
seq_printf(seq, "Led state: 0x%.2X\n",
diff --git a/drivers/staging/cw1200/debug.h b/drivers/staging/cw1200/debug.h
index 3d34bcee541..c813c54f86b 100644
--- a/drivers/staging/cw1200/debug.h
+++ b/drivers/staging/cw1200/debug.h
@@ -5,9 +5,43 @@ struct cw200_common;
#ifdef CONFIG_CW1200_DEBUGFS
+struct cw1200_debug_priv {
+ struct dentry *debugfs_phy;
+ int tx;
+ int tx_agg;
+ int tx_more;
+ int rx;
+ int rx_agg;
+};
+
int cw1200_debug_init(struct cw1200_common *priv);
void cw1200_debug_release(struct cw1200_common *priv);
+static inline void cw1200_debug_txed(struct cw1200_common *priv)
+{
+ ++priv->debug->tx;
+}
+
+static inline void cw1200_debug_txed_agg(struct cw1200_common *priv)
+{
+ ++priv->debug->tx_agg;
+}
+
+static inline void cw1200_debug_txed_more(struct cw1200_common *priv)
+{
+ ++priv->debug->tx_more;
+}
+
+static inline void cw1200_debug_rxed(struct cw1200_common *priv)
+{
+ ++priv->debug->rx;
+}
+
+static inline void cw1200_debug_rxed_agg(struct cw1200_common *priv)
+{
+ ++priv->debug->rx_agg;
+}
+
#else /* CONFIG_CW1200_DEBUGFS */
static inline int cw1200_debug_init(struct cw1200_common *priv)
@@ -19,6 +53,26 @@ static inline void cw1200_debug_release(struct cw1200_common *priv)
{
}
+static inline void cw1200_debug_txed(struct cw1200_common *priv)
+{
+}
+
+static inline void cw1200_debug_txed_agg(struct cw1200_common *priv)
+{
+}
+
+static inline void cw1200_debug_txed_more(struct cw1200_common *priv)
+{
+}
+
+static inline void cw1200_debug_rxed(struct cw1200_common *priv)
+{
+}
+
+static inline void cw1200_debug_rxed_agg(struct cw1200_common *priv)
+{
+}
+
#endif /* CONFIG_CW1200_DEBUGFS */
#endif /* CW1200_DEBUG_H_INCLUDED */
diff --git a/drivers/staging/cw1200/sta.c b/drivers/staging/cw1200/sta.c
index 2de6156e100..af6eabf2d49 100644
--- a/drivers/staging/cw1200/sta.c
+++ b/drivers/staging/cw1200/sta.c
@@ -17,6 +17,7 @@
#include "sta.h"
#include "fwio.h"
#include "bh.h"
+#include "debug.h"
#if defined(CONFIG_CW1200_STA_DEBUG)
#define sta_printk(...) printk(__VA_ARGS__)
@@ -709,6 +710,10 @@ void cw1200_rx_cb(struct cw1200_common *priv,
}
if (arg->flags & WSM_RX_STATUS_HT)
hdr->flag |= RX_FLAG_HT;
+
+ cw1200_debug_rxed(priv);
+ if (arg->flags & WSM_RX_STATUS_AGGREGATE)
+ cw1200_debug_rxed_agg(priv);
#if 0
/* Wrong: ACK could be disable for this ACL */
if (arg->flags & WSM_RX_STATUS_ADDRESS1)
diff --git a/drivers/staging/cw1200/txrx.c b/drivers/staging/cw1200/txrx.c
index 3435a7b59da..fd04156dcb5 100644
--- a/drivers/staging/cw1200/txrx.c
+++ b/drivers/staging/cw1200/txrx.c
@@ -14,6 +14,7 @@
#include "cw1200.h"
#include "wsm.h"
#include "bh.h"
+#include "debug.h"
#if defined(CONFIG_CW1200_TX_POLICY_DEBUG)
#define tx_policy_printk(...) printk(__VA_ARGS__)
@@ -524,6 +525,11 @@ void cw1200_tx_confirm_cb(struct cw1200_common *priv,
#endif /* CONFIG_CW1200_FIRMWARE_DOES_NOT_SUPPORT_KEEPALIVE */
priv->cqm_tx_failure_count = 0;
++tx_count;
+ cw1200_debug_txed(priv);
+ if (arg->flags & WSM_TX_STATUS_AGGREGATION) {
+ tx->flags |= IEEE80211_TX_STAT_AMPDU;
+ cw1200_debug_txed_agg(priv);
+ }
} else {
/* TODO: Update TX failure counters */
if (unlikely(priv->cqm_tx_failure_thold &&