qcacmn: Replace printk with qdf_nofl_info
Replace printk with qdf_nofl_info in qdf folder. So if we wish to change from printing on console to other location, based on a logging daemon, we can do that by only changing at the implementation of QDF print API's Change-Id: I6db67cee416ebbe0f2c51b2d4dbf2b3a335e972a CRs-Fixed: 2442689
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
#include "host_diag_core_log.h"
|
||||
#include "ani_global.h"
|
||||
|
||||
#define PKTLOG_TAG "ATH_PKTLOG"
|
||||
#define PKTLOG_DEVNAME_SIZE 32
|
||||
#define MAX_WLANDEV 1
|
||||
|
||||
@@ -55,7 +54,7 @@
|
||||
#ifndef __MOD_INC_USE_COUNT
|
||||
#define PKTLOG_MOD_INC_USE_COUNT do { \
|
||||
if (!try_module_get(THIS_MODULE)) { \
|
||||
printk(KERN_WARNING "try_module_get failed\n"); \
|
||||
qdf_nofl_info("try_module_get failed"); \
|
||||
} } while (0)
|
||||
|
||||
#define PKTLOG_MOD_DEC_USE_COUNT module_put(THIS_MODULE)
|
||||
@@ -102,9 +101,8 @@ int pktlog_alloc_buf(struct hif_opaque_softc *scn)
|
||||
pl_dev = get_pktlog_handle();
|
||||
|
||||
if (!pl_dev) {
|
||||
printk(PKTLOG_TAG
|
||||
"%s: Unable to allocate buffer pdev_txrx_handle or pdev_txrx_handle->pl_dev is null\n",
|
||||
__func__);
|
||||
qdf_nofl_info(PKTLOG_TAG
|
||||
"%s: pdev_txrx_handle->pl_dev is null", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -115,16 +113,13 @@ int pktlog_alloc_buf(struct hif_opaque_softc *scn)
|
||||
qdf_spin_lock_bh(&pl_info->log_lock);
|
||||
if (pl_info->buf) {
|
||||
qdf_spin_unlock_bh(&pl_info->log_lock);
|
||||
printk(PKTLOG_TAG "Buffer is already in use\n");
|
||||
qdf_nofl_info(PKTLOG_TAG "Buffer is already in use");
|
||||
return -EINVAL;
|
||||
}
|
||||
qdf_spin_unlock_bh(&pl_info->log_lock);
|
||||
|
||||
buffer = vmalloc((page_cnt + 2) * PAGE_SIZE);
|
||||
if (!buffer) {
|
||||
printk(PKTLOG_TAG
|
||||
"%s: Unable to allocate buffer "
|
||||
"(%d pages)\n", __func__, page_cnt);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -204,7 +199,7 @@ qdf_sysctl_decl(ath_sysctl_pktlog_enable, ctl, write, filp, buffer, lenp, ppos)
|
||||
|
||||
if (!scn) {
|
||||
mutex_unlock(&proc_mutex);
|
||||
printk("%s: Invalid scn context\n", __func__);
|
||||
qdf_nofl_info("%s: Invalid scn context", __func__);
|
||||
ASSERT(0);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -213,7 +208,7 @@ qdf_sysctl_decl(ath_sysctl_pktlog_enable, ctl, write, filp, buffer, lenp, ppos)
|
||||
|
||||
if (!pl_dev) {
|
||||
mutex_unlock(&proc_mutex);
|
||||
printk("%s: Invalid pktlog context\n", __func__);
|
||||
qdf_nofl_info("%s: Invalid pktlog context", __func__);
|
||||
ASSERT(0);
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -267,7 +262,7 @@ qdf_sysctl_decl(ath_sysctl_pktlog_size, ctl, write, filp, buffer, lenp, ppos)
|
||||
|
||||
if (!scn) {
|
||||
mutex_unlock(&proc_mutex);
|
||||
printk("%s: Invalid scn context\n", __func__);
|
||||
qdf_nofl_info("%s: Invalid scn context", __func__);
|
||||
ASSERT(0);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -276,7 +271,7 @@ qdf_sysctl_decl(ath_sysctl_pktlog_size, ctl, write, filp, buffer, lenp, ppos)
|
||||
|
||||
if (!pl_dev) {
|
||||
mutex_unlock(&proc_mutex);
|
||||
printk("%s: Invalid pktlog handle\n", __func__);
|
||||
qdf_nofl_info("%s: Invalid pktlog handle", __func__);
|
||||
ASSERT(0);
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -397,7 +392,7 @@ static int pktlog_sysctl_register(struct hif_opaque_softc *scn)
|
||||
register_sysctl_table(pl_info_lnx->sysctls);
|
||||
|
||||
if (!pl_info_lnx->sysctl_header) {
|
||||
printk("%s: failed to register sysctls!\n", proc_name);
|
||||
qdf_nofl_info("%s: failed to register sysctls!", proc_name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -455,16 +450,16 @@ static int pktlog_attach(struct hif_opaque_softc *scn)
|
||||
&pl_info_lnx->info);
|
||||
|
||||
if (!proc_entry) {
|
||||
printk(PKTLOG_TAG "%s: create_proc_entry failed for %s\n",
|
||||
__func__, proc_name);
|
||||
qdf_nofl_info(PKTLOG_TAG "%s: create_proc_entry failed for %s",
|
||||
__func__, proc_name);
|
||||
goto attach_fail1;
|
||||
}
|
||||
|
||||
pl_info_lnx->proc_entry = proc_entry;
|
||||
|
||||
if (pktlog_sysctl_register(scn)) {
|
||||
printk(PKTLOG_TAG "%s: sysctl register failed for %s\n",
|
||||
__func__, proc_name);
|
||||
qdf_nofl_info(PKTLOG_TAG "%s: sysctl register failed for %s",
|
||||
__func__, proc_name);
|
||||
goto attach_fail2;
|
||||
}
|
||||
|
||||
@@ -485,7 +480,7 @@ static void pktlog_sysctl_unregister(struct pktlog_dev_t *pl_dev)
|
||||
struct ath_pktlog_info_lnx *pl_info_lnx;
|
||||
|
||||
if (!pl_dev) {
|
||||
printk("%s: Invalid pktlog context\n", __func__);
|
||||
qdf_nofl_info("%s: Invalid pktlog context", __func__);
|
||||
ASSERT(0);
|
||||
return;
|
||||
}
|
||||
@@ -505,7 +500,7 @@ static void pktlog_detach(struct hif_opaque_softc *scn)
|
||||
struct pktlog_dev_t *pl_dev = get_pktlog_handle();
|
||||
|
||||
if (!pl_dev) {
|
||||
printk("%s: Invalid pktlog context\n", __func__);
|
||||
qdf_nofl_info("%s: Invalid pktlog context", __func__);
|
||||
ASSERT(0);
|
||||
return;
|
||||
}
|
||||
@@ -1006,7 +1001,7 @@ int pktlogmod_init(void *context)
|
||||
g_pktlog_pde = proc_mkdir(PKTLOG_PROC_DIR, NULL);
|
||||
|
||||
if (!g_pktlog_pde) {
|
||||
printk(PKTLOG_TAG "%s: proc_mkdir failed\n", __func__);
|
||||
qdf_nofl_info(PKTLOG_TAG "%s: proc_mkdir failed", __func__);
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user