[qca-nss-drv] Break up statistics implementation
Break up the centralized statistics implementation to be subsystem based
statistics implementation.
Change-Id: Ibc14d88f391e816d3d6284a57ea6676f2842ac70
Signed-off-by: Yu Huang <yuhuang@codeaurora.org>
diff --git a/nss_log.c b/nss_log.c
index 0480ad0..a538264 100644
--- a/nss_log.c
+++ b/nss_log.c
@@ -655,6 +655,8 @@
void nss_log_init(void)
{
int i;
+ struct dentry *logs_dentry;
+ struct dentry *core_log_dentry;
memset(nss_rbe, 0, sizeof(nss_rbe));
init_waitqueue_head(&nss_log_wq);
@@ -663,8 +665,8 @@
/*
* Create directory for obtaining NSS FW logs from each core
*/
- nss_top_main.logs_dentry = debugfs_create_dir("logs", nss_top_main.top_dentry);
- if (unlikely(!nss_top_main.logs_dentry)) {
+ logs_dentry = debugfs_create_dir("logs", nss_top_main.top_dentry);
+ if (unlikely(!logs_dentry)) {
nss_warning("Failed to create qca-nss-drv/logs directory in debugfs");
return;
}
@@ -674,9 +676,9 @@
extern struct file_operations nss_logs_core_ops;
snprintf(file, sizeof(file), "core%d", i);
- nss_top_main.core_log_dentry = debugfs_create_file(file, 0400,
- nss_top_main.logs_dentry, (void *)(nss_ptr_t)i, &nss_logs_core_ops);
- if (unlikely(!nss_top_main.core_log_dentry)) {
+ core_log_dentry = debugfs_create_file(file, 0400,
+ logs_dentry, (void *)(nss_ptr_t)i, &nss_logs_core_ops);
+ if (unlikely(!core_log_dentry)) {
nss_warning("Failed to create qca-nss-drv/logs/%s file in debugfs", file);
return;
}