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>
This commit is contained in:
Luciano Coelho
2012-06-07 23:39:22 +03:00
parent 3e8d69352b
commit f74ea74b82
3 changed files with 63 additions and 0 deletions

View File

@@ -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;
}