summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wl18xx/acx.c
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2012-06-07 23:39:22 +0300
committerLuciano Coelho <coelho@ti.com>2012-06-08 09:14:07 +0300
commitf74ea74b82cf6b6aeef1e46d68fbbb02d2bce8b7 (patch)
treec0117cf3704b0ff16d1f853c273efb31af73c021 /drivers/net/wireless/ti/wl18xx/acx.c
parent3e8d69352bd9ac7287ab735d45582d79c1f9f2d9 (diff)
wl18xx: add support to clear FW statistics
This patch calls ACX_CLEAR_STATISTICS to clear the firmware statistics. The trigger is a new debugfs file called clear_fw_statistics in the fw_stats directory. Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/acx.c')
-rw-r--r--drivers/net/wireless/ti/wl18xx/acx.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c
index 01ba4032143..72840e23bf5 100644
--- a/drivers/net/wireless/ti/wl18xx/acx.c
+++ b/drivers/net/wireless/ti/wl18xx/acx.c
@@ -85,3 +85,27 @@ out:
kfree(acx);
return ret;
}
+
+int wl18xx_acx_clear_statistics(struct wl1271 *wl)
+{
+ struct wl18xx_acx_clear_statistics *acx;
+ int ret = 0;
+
+ wl1271_debug(DEBUG_ACX, "acx clear statistics");
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ ret = wl1271_cmd_configure(wl, ACX_CLEAR_STATISTICS, acx, sizeof(*acx));
+ if (ret < 0) {
+ wl1271_warning("failed to clear firmware statistics: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+}