diff options
author | Luciano Coelho <coelho@ti.com> | 2012-06-07 23:39:22 +0300 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-08 09:14:07 +0300 |
commit | f74ea74b82cf6b6aeef1e46d68fbbb02d2bce8b7 (patch) | |
tree | c0117cf3704b0ff16d1f853c273efb31af73c021 /drivers/net/wireless/ti/wl18xx/acx.c | |
parent | 3e8d69352bd9ac7287ab735d45582d79c1f9f2d9 (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.c | 24 |
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; +} |