qcacmn: Use module level logging in Spectral

Current Spectral module uses qdf_print. To improve the control over
logging, use module level logging

CRs-Fixed: 2165341
Change-Id: I205991347453c4dcc424ba1958e309b7c5fb71a0
This commit is contained in:
Shiva Krishna Pittala
2017-12-18 16:39:20 +05:30
committed by snandini
parent 72bbf17531
commit 71155a3e48
17 changed files with 379 additions and 541 deletions

View File

@@ -60,7 +60,7 @@ spectral_get_vdev(struct wlan_objmgr_pdev *pdev)
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, 0, WLAN_SPECTRAL_ID); vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, 0, WLAN_SPECTRAL_ID);
if (!vdev) { if (!vdev) {
qdf_print("%s: Unable to get first vdev of pdev.\n", __func__); spectral_warn("Unable to get first vdev of pdev");
return NULL; return NULL;
} }
@@ -128,13 +128,13 @@ spectral_control_cmn(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_rxchainmask = 0; uint8_t vdev_rxchainmask = 0;
if (!pdev) { if (!pdev) {
spectral_err("PDEV is NULL!\n"); spectral_err("PDEV is NULL!");
error = -EINVAL; error = -EINVAL;
goto bad; goto bad;
} }
sc = spectral_get_spectral_ctx_from_pdev(pdev); sc = spectral_get_spectral_ctx_from_pdev(pdev);
if (!sc) { if (!sc) {
spectral_err("atf context is NULL!\n"); spectral_err("atf context is NULL!");
error = -EINVAL; error = -EINVAL;
goto bad; goto bad;
} }
@@ -331,10 +331,7 @@ spectral_control_cmn(struct wlan_objmgr_pdev *pdev,
WLAN_SPECTRAL_ID); WLAN_SPECTRAL_ID);
if (!(sp_in->ss_chn_mask & vdev_rxchainmask)) { if (!(sp_in->ss_chn_mask & vdev_rxchainmask)) {
qdf_print spectral_err("Invalid Spectral Chainmask - Inactive Rx antenna chain cannot be an active spectral chain");
("Invalid Spectral Chainmask - "
"Inactive Rx antenna chain cannot "
"be an active spectral chain\n");
error = -EINVAL; error = -EINVAL;
break; break;
} else if (sc->sptrlc_set_spectral_config( } else if (sc->sptrlc_set_spectral_config(
@@ -532,13 +529,13 @@ wlan_spectral_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
struct spectral_context *sc = NULL; struct spectral_context *sc = NULL;
if (!psoc) { if (!psoc) {
spectral_err("PSOC is NULL\n"); spectral_err("PSOC is NULL");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
sc = (struct spectral_context *) sc = (struct spectral_context *)
qdf_mem_malloc(sizeof(struct spectral_context)); qdf_mem_malloc(sizeof(struct spectral_context));
if (!sc) { if (!sc) {
spectral_err("Failed to allocate spectral_ctx object\n"); spectral_err("Failed to allocate spectral_ctx object");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
} }
qdf_mem_zero(sc, sizeof(struct spectral_context)); qdf_mem_zero(sc, sizeof(struct spectral_context));
@@ -562,7 +559,7 @@ wlan_spectral_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc,
struct spectral_context *sc = NULL; struct spectral_context *sc = NULL;
if (!psoc) { if (!psoc) {
spectral_err("PSOC is NULL\n"); spectral_err("PSOC is NULL");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
sc = wlan_objmgr_psoc_get_comp_private_obj(psoc, sc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
@@ -587,18 +584,18 @@ wlan_spectral_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev, void *arg)
void *target_handle = NULL; void *target_handle = NULL;
if (!pdev) { if (!pdev) {
spectral_err("PDEV is NULL\n"); spectral_err("PDEV is NULL");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
ps = (struct pdev_spectral *) ps = (struct pdev_spectral *)
qdf_mem_malloc(sizeof(struct pdev_spectral)); qdf_mem_malloc(sizeof(struct pdev_spectral));
if (!ps) { if (!ps) {
spectral_err("Failed to allocate pdev_spectral object\n"); spectral_err("Failed to allocate pdev_spectral object");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
} }
sc = spectral_get_spectral_ctx_from_pdev(pdev); sc = spectral_get_spectral_ctx_from_pdev(pdev);
if (!sc) { if (!sc) {
spectral_err("Spectral context is NULL!\n"); spectral_err("Spectral context is NULL!");
goto cleanup; goto cleanup;
} }
@@ -609,7 +606,7 @@ wlan_spectral_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev, void *arg)
if (sc->sptrlc_pdev_spectral_init) { if (sc->sptrlc_pdev_spectral_init) {
target_handle = sc->sptrlc_pdev_spectral_init(pdev); target_handle = sc->sptrlc_pdev_spectral_init(pdev);
if (!target_handle) { if (!target_handle) {
spectral_err("Spectral lmac object is NULL!\n"); spectral_err("Spectral lmac object is NULL!");
goto cleanup; goto cleanup;
} }
ps->psptrl_target_handle = target_handle; ps->psptrl_target_handle = target_handle;
@@ -631,12 +628,12 @@ wlan_spectral_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev,
struct spectral_context *sc = NULL; struct spectral_context *sc = NULL;
if (!pdev) { if (!pdev) {
spectral_err("PDEV is NULL\n"); spectral_err("PDEV is NULL");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
sc = spectral_get_spectral_ctx_from_pdev(pdev); sc = spectral_get_spectral_ctx_from_pdev(pdev);
if (!sc) { if (!sc) {
spectral_err("Spectral context is NULL!\n"); spectral_err("Spectral context is NULL!");
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
ps = wlan_objmgr_pdev_get_comp_private_obj(pdev, ps = wlan_objmgr_pdev_get_comp_private_obj(pdev,

View File

@@ -41,12 +41,12 @@ spectral_control_da(struct wlan_objmgr_pdev *pdev, u_int id, void *indata,
int error = 0; int error = 0;
if (!pdev) { if (!pdev) {
spectral_err("PDEV is NULL!\n"); spectral_err("PDEV is NULL!");
return -EPERM; return -EPERM;
} }
sc = spectral_get_spectral_ctx_from_pdev(pdev); sc = spectral_get_spectral_ctx_from_pdev(pdev);
if (!sc) { if (!sc) {
spectral_err("spectral context is NULL!\n"); spectral_err("spectral context is NULL!");
return -EPERM; return -EPERM;
} }
@@ -325,7 +325,7 @@ void
spectral_ctx_init_da(struct spectral_context *sc) spectral_ctx_init_da(struct spectral_context *sc)
{ {
if (!sc) { if (!sc) {
spectral_err("spectral context is null!\n"); spectral_err("spectral context is null!");
return; return;
} }
sc->sptrlc_spectral_control = spectral_control_da; sc->sptrlc_spectral_control = spectral_control_da;

View File

@@ -21,6 +21,7 @@
#include <wlan_spectral_utils_api.h> #include <wlan_spectral_utils_api.h>
#include <qdf_types.h> #include <qdf_types.h>
#include<wlan_global_lmac_if_api.h> #include<wlan_global_lmac_if_api.h>
#include "spectral_defs_i.h"
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("Dual BSD/GPL");
@@ -32,7 +33,7 @@ MODULE_LICENSE("Dual BSD/GPL");
static int __init static int __init
spectral_init_module(void) spectral_init_module(void)
{ {
qdf_print("qca_spectral module loaded\n"); spectral_info("qca_spectral module loaded");
wlan_spectral_init(); wlan_spectral_init();
/* register spectral rxops */ /* register spectral rxops */
wlan_lmac_if_sptrl_set_rx_ops_register_cb wlan_lmac_if_sptrl_set_rx_ops_register_cb
@@ -49,7 +50,7 @@ static void __exit
spectral_exit_module(void) spectral_exit_module(void)
{ {
wlan_spectral_deinit(); wlan_spectral_deinit();
qdf_print("qca_spectral module unloaded\n"); spectral_info("qca_spectral module unloaded");
} }
module_init(spectral_init_module); module_init(spectral_init_module);

View File

@@ -43,12 +43,12 @@ spectral_control_ol(struct wlan_objmgr_pdev *pdev,
struct spectral_context *sc; struct spectral_context *sc;
if (!pdev) { if (!pdev) {
spectral_err("PDEV is NULL!\n"); spectral_err("PDEV is NULL!");
return -EPERM; return -EPERM;
} }
sc = spectral_get_spectral_ctx_from_pdev(pdev); sc = spectral_get_spectral_ctx_from_pdev(pdev);
if (!sc) { if (!sc) {
spectral_err("spectral context is NULL!\n"); spectral_err("spectral context is NULL!");
return -EPERM; return -EPERM;
} }
return spectral_control_cmn(pdev, id, indata, insize, outdata, outsize); return spectral_control_cmn(pdev, id, indata, insize, outdata, outsize);
@@ -304,7 +304,7 @@ void
spectral_ctx_init_ol(struct spectral_context *sc) spectral_ctx_init_ol(struct spectral_context *sc)
{ {
if (!sc) { if (!sc) {
spectral_err("spectral context is null!\n"); spectral_err("spectral context is null!");
return; return;
} }
sc->sptrlc_spectral_control = spectral_control_ol; sc->sptrlc_spectral_control = spectral_control_ol;

View File

@@ -344,7 +344,7 @@ enum dcs_int_type {
}; };
/** /**
* struct INTERF_RSP - Interference record * struct interf_rsp - Interference record
* @interf_type: eINTERF_TYPE giving type of interference * @interf_type: eINTERF_TYPE giving type of interference
* @interf_min_freq: Minimum frequency in MHz at which interference has been * @interf_min_freq: Minimum frequency in MHz at which interference has been
* found * found
@@ -352,20 +352,20 @@ enum dcs_int_type {
* found * found
* @advncd_spectral_cap: Advanced spectral capability * @advncd_spectral_cap: Advanced spectral capability
*/ */
struct INTERF_RSP { struct interf_rsp {
uint8_t interf_type; uint8_t interf_type;
uint16_t interf_min_freq; uint16_t interf_min_freq;
uint16_t interf_max_freq; uint16_t interf_max_freq;
} __ATTRIB_PACKED; } __ATTRIB_PACKED;
/** /**
* struct INTERF_SRC_RSP - List of interference sources * struct interf_src_rsp - List of interference sources
* @count: Number of interference records * @count: Number of interference records
* @interf: Array of interference records * @interf: Array of interference records
*/ */
struct INTERF_SRC_RSP { struct interf_src_rsp {
uint16_t count; uint16_t count;
struct INTERF_RSP interf[MAX_INTERF]; struct interf_rsp interf[MAX_INTERF];
} __ATTRIB_PACKED; } __ATTRIB_PACKED;
/** /**
@@ -472,7 +472,7 @@ struct spectral_samp_data {
uint16_t bin_pwr_count_sec80; uint16_t bin_pwr_count_sec80;
uint8_t bin_pwr[MAX_NUM_BINS]; uint8_t bin_pwr[MAX_NUM_BINS];
uint8_t bin_pwr_sec80[MAX_NUM_BINS]; uint8_t bin_pwr_sec80[MAX_NUM_BINS];
struct INTERF_SRC_RSP interf_list; struct interf_src_rsp interf_list;
int16_t noise_floor; int16_t noise_floor;
int16_t noise_floor_sec80; int16_t noise_floor_sec80;
uint32_t ch_width; uint32_t ch_width;

View File

@@ -33,13 +33,13 @@ tgt_get_target_handle(struct wlan_objmgr_pdev *pdev)
struct pdev_spectral *ps; struct pdev_spectral *ps;
if (!pdev) { if (!pdev) {
spectral_err("PDEV is NULL!\n"); spectral_err("PDEV is NULL!");
return NULL; return NULL;
} }
ps = wlan_objmgr_pdev_get_comp_private_obj(pdev, ps = wlan_objmgr_pdev_get_comp_private_obj(pdev,
WLAN_UMAC_COMP_SPECTRAL); WLAN_UMAC_COMP_SPECTRAL);
if (!ps) { if (!ps) {
spectral_err("PDEV SPECTRAL object is NULL!\n"); spectral_err("PDEV SPECTRAL object is NULL!");
return NULL; return NULL;
} }
return ps->psptrl_target_handle; return ps->psptrl_target_handle;

View File

@@ -30,12 +30,12 @@ ucfg_spectral_control(struct wlan_objmgr_pdev *pdev,
struct spectral_context *sc; struct spectral_context *sc;
if (!pdev) { if (!pdev) {
spectral_err("PDEV is NULL!\n"); spectral_err("PDEV is NULL!");
return -EPERM; return -EPERM;
} }
sc = spectral_get_spectral_ctx_from_pdev(pdev); sc = spectral_get_spectral_ctx_from_pdev(pdev);
if (!sc) { if (!sc) {
spectral_err("spectral context is NULL!\n"); spectral_err("spectral context is NULL!");
return -EPERM; return -EPERM;
} }

View File

@@ -164,11 +164,11 @@ wlan_register_wmi_spectral_cmd_ops(struct wlan_objmgr_pdev *pdev,
struct spectral_context *sc; struct spectral_context *sc;
if (!pdev) if (!pdev)
spectral_err("PDEV is NULL!\n"); spectral_err("PDEV is NULL!");
sc = spectral_get_spectral_ctx_from_pdev(pdev); sc = spectral_get_spectral_ctx_from_pdev(pdev);
if (!sc) if (!sc)
spectral_err("spectral context is NULL!\n"); spectral_err("spectral context is NULL!");
return sc->sptrlc_register_wmi_spectral_cmd_ops(pdev, cmd_ops); return sc->sptrlc_register_wmi_spectral_cmd_ops(pdev, cmd_ops);
} }

View File

@@ -54,7 +54,7 @@ target_if_spectral_get_vdev(struct target_if_spectral *spectral)
if (wlan_objmgr_pdev_try_get_ref(pdev, WLAN_SPECTRAL_ID) != if (wlan_objmgr_pdev_try_get_ref(pdev, WLAN_SPECTRAL_ID) !=
QDF_STATUS_SUCCESS) { QDF_STATUS_SUCCESS) {
qdf_print("%s: Unable to get pdev reference.\n", __func__); spectral_err("Unable to get pdev reference.");
return NULL; return NULL;
} }
@@ -63,7 +63,7 @@ target_if_spectral_get_vdev(struct target_if_spectral *spectral)
wlan_objmgr_pdev_release_ref(pdev, WLAN_SPECTRAL_ID); wlan_objmgr_pdev_release_ref(pdev, WLAN_SPECTRAL_ID);
if (!vdev) { if (!vdev) {
qdf_print("%s: Unable to get first vdev of pdev.\n", __func__); spectral_warn("Unable to get first vdev of pdev.");
return NULL; return NULL;
} }
@@ -117,7 +117,7 @@ target_if_send_vdev_spectral_configure_cmd(struct target_if_spectral *spectral,
sparam.pwr_format = param->ss_pwr_format; sparam.pwr_format = param->ss_pwr_format;
sparam.rpt_mode = param->ss_rpt_mode; sparam.rpt_mode = param->ss_rpt_mode;
sparam.bin_scale = param->ss_bin_scale; sparam.bin_scale = param->ss_bin_scale;
sparam.dBm_adj = param->ss_dbm_adj; sparam.dbm_adj = param->ss_dbm_adj;
sparam.chn_mask = param->ss_chn_mask; sparam.chn_mask = param->ss_chn_mask;
return spectral->param_wmi_cmd_ops.wmi_spectral_configure_cmd_send( return spectral->param_wmi_cmd_ops.wmi_spectral_configure_cmd_send(
@@ -272,9 +272,8 @@ target_if_log_read_spectral_active(
const char *function_name, const char *function_name,
unsigned char output) unsigned char output)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_ACTIVE. " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_ACTIVE. Returning val=%u",
"Returning val=%u\n", function_name, output);
function_name, output);
} }
/** /**
@@ -292,9 +291,8 @@ target_if_log_read_spectral_enabled(
const char *function_name, const char *function_name,
unsigned char output) unsigned char output)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_ENABLED. " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_ENABLED. Returning val=%u",
"Returning val=%u\n", function_name, output);
function_name, output);
} }
/** /**
@@ -312,45 +310,26 @@ target_if_log_read_spectral_params(
const char *function_name, const char *function_name,
struct spectral_config *pparam) struct spectral_config *pparam)
{ {
qdf_print spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_PARAMS. Returning following params:\nss_count = %u\nss_period = %u\nss_spectral_pri = %u\nss_fft_size = %u\nss_gc_ena = %u\nss_restart_ena = %u\nss_noise_floor_ref = %d\nss_init_delay = %u\nss_nb_tone_thr = %u\nss_str_bin_thr = %u\nss_wb_rpt_mode = %u\nss_rssi_rpt_mode = %u\nss_rssi_thr = %d\nss_pwr_format = %u\nss_rpt_mode = %u\nss_bin_scale = %u\nss_dbm_adj = %u\nss_chn_mask = %u\n",
("%s: TARGET_IF_SPECTRAL_INFO_PARAMS. " function_name,
"Returning following params:\n" pparam->ss_count,
"ss_count = %u\n" pparam->ss_period,
"ss_period = %u\n" pparam->ss_spectral_pri,
"ss_spectral_pri = %u\n" pparam->ss_fft_size,
"ss_fft_size = %u\n" pparam->ss_gc_ena,
"ss_gc_ena = %u\n" pparam->ss_restart_ena,
"ss_restart_ena = %u\n" (int8_t)pparam->ss_noise_floor_ref,
"ss_noise_floor_ref = %d\n" pparam->ss_init_delay,
"ss_init_delay = %u\n" pparam->ss_nb_tone_thr,
"ss_nb_tone_thr = %u\n" pparam->ss_str_bin_thr,
"ss_str_bin_thr = %u\n" pparam->ss_wb_rpt_mode,
"ss_wb_rpt_mode = %u\n" pparam->ss_rssi_rpt_mode,
"ss_rssi_rpt_mode = %u\n" (int8_t)pparam->ss_rssi_thr,
"ss_rssi_thr = %d\n" pparam->ss_pwr_format,
"ss_pwr_format = %u\n" pparam->ss_rpt_mode,
"ss_rpt_mode = %u\n" pparam->ss_bin_scale,
"ss_bin_scale = %u\n" pparam->ss_dbm_adj,
"ss_dbm_adj = %u\n" pparam->ss_chn_mask);
"ss_chn_mask = %u\n\n", function_name,
pparam->ss_count,
pparam->ss_period,
pparam->ss_spectral_pri,
pparam->ss_fft_size,
pparam->ss_gc_ena,
pparam->ss_restart_ena,
(int8_t)pparam->ss_noise_floor_ref,
pparam->ss_init_delay,
pparam->ss_nb_tone_thr,
pparam->ss_str_bin_thr,
pparam->ss_wb_rpt_mode,
pparam->ss_rssi_rpt_mode,
(int8_t)pparam->ss_rssi_thr,
pparam->ss_pwr_format,
pparam->ss_rpt_mode,
pparam->ss_bin_scale,
pparam->ss_dbm_adj,
pparam->ss_chn_mask);
} }
/** /**
@@ -368,10 +347,8 @@ target_if_log_read_spectral_active_catch_validate(
const char *function_name, const char *function_name,
unsigned char output) unsigned char output)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_ACTIVE on " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_ACTIVE on initial cache validation\nReturning val=%u",
"initial cache validation\n" function_name, output);
"Returning val=%u\n",
function_name, output);
} }
/** /**
@@ -389,10 +366,8 @@ target_if_log_read_spectral_enabled_catch_validate(
const char *function_name, const char *function_name,
unsigned char output) unsigned char output)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_ENABLED on " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_ENABLED on initial cache validation\nReturning val=%u\n",
"initial cache validation\n" function_name, output);
"Returning val=%u\n",
function_name, output);
} }
/** /**
@@ -410,45 +385,25 @@ target_if_log_read_spectral_params_catch_validate(
const char *function_name, const char *function_name,
struct spectral_config *pparam) struct spectral_config *pparam)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_PARAMS on " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_PARAMS on initial cache validation\nReturning following params:\nss_count = %u\nss_period = %u\nss_spectral_pri = %u\nss_fft_size = %u\nss_gc_ena = %u\nss_restart_ena = %u\nss_noise_floor_ref = %d\nss_init_delay = %u\nss_nb_tone_thr = %u\nss_str_bin_thr = %u\nss_wb_rpt_mode = %u\nss_rssi_rpt_mode = %u\nss_rssi_thr = %d\nss_pwr_format = %u\nss_rpt_mode = %u\nss_bin_scale = %u\nss_dbm_adj = %u\nss_chn_mask = %u",
"initial cache validation\n" function_name,
"Returning following params:\n" pparam->ss_count,
"ss_count = %u\n" pparam->ss_period,
"ss_period = %u\n" pparam->ss_spectral_pri,
"ss_spectral_pri = %u\n" pparam->ss_fft_size,
"ss_fft_size = %u\n" pparam->ss_gc_ena,
"ss_gc_ena = %u\n" pparam->ss_restart_ena,
"ss_restart_ena = %u\n" (int8_t)pparam->ss_noise_floor_ref,
"ss_noise_floor_ref = %d\n" pparam->ss_init_delay,
"ss_init_delay = %u\n" pparam->ss_nb_tone_thr,
"ss_nb_tone_thr = %u\n" pparam->ss_str_bin_thr,
"ss_str_bin_thr = %u\n" pparam->ss_wb_rpt_mode,
"ss_wb_rpt_mode = %u\n" pparam->ss_rssi_rpt_mode,
"ss_rssi_rpt_mode = %u\n" (int8_t)pparam->ss_rssi_thr,
"ss_rssi_thr = %d\n" pparam->ss_pwr_format,
"ss_pwr_format = %u\n" pparam->ss_rpt_mode,
"ss_rpt_mode = %u\n" pparam->ss_bin_scale,
"ss_bin_scale = %u\n" pparam->ss_dbm_adj, pparam->ss_chn_mask);
"ss_dbm_adj = %u\n"
"ss_chn_mask = %u\n\n",
function_name,
pparam->ss_count,
pparam->ss_period,
pparam->ss_spectral_pri,
pparam->ss_fft_size,
pparam->ss_gc_ena,
pparam->ss_restart_ena,
(int8_t)pparam->ss_noise_floor_ref,
pparam->ss_init_delay,
pparam->ss_nb_tone_thr,
pparam->ss_str_bin_thr,
pparam->ss_wb_rpt_mode,
pparam->ss_rssi_rpt_mode,
(int8_t)pparam->ss_rssi_thr,
pparam->ss_pwr_format,
pparam->ss_rpt_mode,
pparam->ss_bin_scale,
pparam->ss_dbm_adj, pparam->ss_chn_mask);
} }
#else #else
@@ -546,8 +501,7 @@ target_if_spectral_info_read(
break; break;
default: default:
qdf_print("%s: Unknown target_if_spectral_info specifier\n", spectral_err("Unknown target_if_spectral_info specifier");
__func__);
return -EINVAL; return -EINVAL;
} }
@@ -673,9 +627,8 @@ target_if_log_write_spectral_active(
uint8_t pval, uint8_t pval,
int ret) int ret)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_ACTIVE with " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_ACTIVE with val=%u status=%d",
"val=%u status=%d\n", function_name, pval, ret);
function_name, pval, ret);
} }
/** /**
@@ -694,9 +647,8 @@ target_if_log_write_spectral_enabled(
uint8_t pval, uint8_t pval,
int ret) int ret)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_ENABLED with " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_ENABLED with val=%u status=%d",
"val=%u status=%d\n", function_name, pval, ret);
function_name, pval, ret);
} }
/** /**
@@ -715,45 +667,25 @@ target_if_log_write_spectral_params(
const char *function_name, const char *function_name,
int ret) int ret)
{ {
qdf_print("%s: TARGET_IF_SPECTRAL_INFO_PARAMS. " spectral_debug("%s: TARGET_IF_SPECTRAL_INFO_PARAMS. Params:\nss_count = %u\nss_period = %u\nss_spectral_pri = %u\nss_fft_size = %u\nss_gc_ena = %u\nss_restart_ena = %u\nss_noise_floor_ref = %d\nss_init_delay = %u\nss_nb_tone_thr = %u\nss_str_bin_thr = %u\nss_wb_rpt_mode = %u\nss_rssi_rpt_mode = %u\nss_rssi_thr = %d\nss_pwr_format = %u\nss_rpt_mode = %u\nss_bin_scale = %u\nss_dbm_adj = %u\nss_chn_mask = %u\nstatus = %d",
"Params:\n" function_name,
"ss_count = %u\n" param->ss_count,
"ss_period = %u\n" param->ss_period,
"ss_spectral_pri = %u\n" param->ss_spectral_pri,
"ss_fft_size = %u\n" param->ss_fft_size,
"ss_gc_ena = %u\n" param->ss_gc_ena,
"ss_restart_ena = %u\n" param->ss_restart_ena,
"ss_noise_floor_ref = %d\n" (int8_t)param->ss_noise_floor_ref,
"ss_init_delay = %u\n" param->ss_init_delay,
"ss_nb_tone_thr = %u\n" param->ss_nb_tone_thr,
"ss_str_bin_thr = %u\n" param->ss_str_bin_thr,
"ss_wb_rpt_mode = %u\n" param->ss_wb_rpt_mode,
"ss_rssi_rpt_mode = %u\n" param->ss_rssi_rpt_mode,
"ss_rssi_thr = %d\n" (int8_t)param->ss_rssi_thr,
"ss_pwr_format = %u\n" param->ss_pwr_format,
"ss_rpt_mode = %u\n" param->ss_rpt_mode,
"ss_bin_scale = %u\n" param->ss_bin_scale,
"ss_dbm_adj = %u\n" param->ss_dbm_adj, param->ss_chn_mask, ret);
"ss_chn_mask = %u\n"
"status = %d\n\n",
function_name,
param->ss_count,
param->ss_period,
param->ss_spectral_pri,
param->ss_fft_size,
param->ss_gc_ena,
param->ss_restart_ena,
(int8_t)param->ss_noise_floor_ref,
param->ss_init_delay,
param->ss_nb_tone_thr,
param->ss_str_bin_thr,
param->ss_wb_rpt_mode,
param->ss_rssi_rpt_mode,
(int8_t)param->ss_rssi_thr,
param->ss_pwr_format,
param->ss_rpt_mode,
param->ss_bin_scale,
param->ss_dbm_adj, param->ss_chn_mask, ret);
} }
#else #else
static void static void
@@ -828,8 +760,8 @@ target_if_spectral_info_write(
ret); ret);
if (ret < 0) { if (ret < 0) {
qdf_print("%s: target_if_send_vdev_spectral_enable_cmd " spectral_err("target_if_send_vdev_spectral_enable_cmd failed with error=%d",
"failed with error=%d\n", __func__, ret); ret);
qdf_spin_unlock(&info->osps_lock); qdf_spin_unlock(&info->osps_lock);
return ret; return ret;
} }
@@ -854,8 +786,8 @@ target_if_spectral_info_write(
ret); ret);
if (ret < 0) { if (ret < 0) {
qdf_print("%s: target_if_send_vdev_spectral_enable_cmd " spectral_err("target_if_send_vdev_spectral_enable_cmd failed with error=%d",
"failed with error=%d\n", __func__, ret); ret);
qdf_spin_unlock(&info->osps_lock); qdf_spin_unlock(&info->osps_lock);
return ret; return ret;
} }
@@ -880,9 +812,8 @@ target_if_spectral_info_write(
ret); ret);
if (ret < 0) { if (ret < 0) {
qdf_print("%s: " spectral_err("target_if_send_vdev_spectral_configure_cmd failed with error=%d",
"target_if_send_vdev_spectral_configure_cmd " ret);
"failed with error=%d\n", __func__, ret);
qdf_spin_unlock(&info->osps_lock); qdf_spin_unlock(&info->osps_lock);
return ret; return ret;
} }
@@ -893,8 +824,7 @@ target_if_spectral_info_write(
break; break;
default: default:
qdf_print("%s: Unknown target_if_spectral_info " spectral_err("Unknown target_if_spectral_info specifier");
"specifier\n", __func__);
return -EINVAL; return -EINVAL;
} }
@@ -1524,7 +1454,7 @@ target_if_init_spectral_ops(struct target_if_spectral *spectral)
else if (spectral->spectral_gen == SPECTRAL_GEN3) else if (spectral->spectral_gen == SPECTRAL_GEN3)
target_if_init_spectral_ops_gen3(); target_if_init_spectral_ops_gen3();
else else
qdf_print("Invalid spetral generation\n"); spectral_err("Invalid Spectral generation");
} }
/* /*
@@ -1792,14 +1722,14 @@ target_if_spectral_check_hw_capability(struct target_if_spectral *spectral)
if (p_sops->get_capability(spectral, SPECTRAL_CAP_PHYDIAG) == false) { if (p_sops->get_capability(spectral, SPECTRAL_CAP_PHYDIAG) == false) {
is_spectral_supported = false; is_spectral_supported = false;
qdf_print("SPECTRAL : No PHYDIAG support\n"); spectral_info("SPECTRAL : No PHYDIAG support");
return is_spectral_supported; return is_spectral_supported;
} }
pcap->phydiag_cap = 1; pcap->phydiag_cap = 1;
if (p_sops->get_capability(spectral, SPECTRAL_CAP_RADAR) == false) { if (p_sops->get_capability(spectral, SPECTRAL_CAP_RADAR) == false) {
is_spectral_supported = false; is_spectral_supported = false;
qdf_print("SPECTRAL : No RADAR support\n"); spectral_info("SPECTRAL : No RADAR support");
return is_spectral_supported; return is_spectral_supported;
} }
pcap->radar_cap = 1; pcap->radar_cap = 1;
@@ -1807,14 +1737,14 @@ target_if_spectral_check_hw_capability(struct target_if_spectral *spectral)
if (p_sops->get_capability(spectral, if (p_sops->get_capability(spectral,
SPECTRAL_CAP_SPECTRAL_SCAN) == false) { SPECTRAL_CAP_SPECTRAL_SCAN) == false) {
is_spectral_supported = false; is_spectral_supported = false;
qdf_print("SPECTRAL : No SPECTRAL SUPPORT\n"); spectral_info("SPECTRAL : No SPECTRAL SUPPORT");
return is_spectral_supported; return is_spectral_supported;
} }
pcap->spectral_cap = 1; pcap->spectral_cap = 1;
if (p_sops->get_capability(spectral, SPECTRAL_CAP_ADVNCD_SPECTRAL_SCAN) if (p_sops->get_capability(spectral, SPECTRAL_CAP_ADVNCD_SPECTRAL_SCAN)
== false) { == false) {
qdf_print("SPECTRAL : No ADVANCED SPECTRAL SUPPORT\n"); spectral_info("SPECTRAL : No ADVANCED SPECTRAL SUPPORT");
} else { } else {
pcap->advncd_spectral_cap = 1; pcap->advncd_spectral_cap = 1;
} }
@@ -1904,7 +1834,7 @@ target_if_spectral_detach_simulation(struct target_if_spectral *spectral)
static void static void
target_if_spectral_detach(struct target_if_spectral *spectral) target_if_spectral_detach(struct target_if_spectral *spectral)
{ {
qdf_print("spectral detach\n"); spectral_info("spectral detach");
qdf_spinlock_destroy(&spectral->param_info.osps_lock); qdf_spinlock_destroy(&spectral->param_info.osps_lock);
target_if_spectral_detach_simulation(spectral); target_if_spectral_detach_simulation(spectral);
@@ -1973,13 +1903,13 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
#endif #endif
if (!pdev) { if (!pdev) {
qdf_print("SPECTRAL: pdev is NULL!\n"); spectral_err("SPECTRAL: pdev is NULL!");
return NULL; return NULL;
} }
spectral = (struct target_if_spectral *)qdf_mem_malloc( spectral = (struct target_if_spectral *)qdf_mem_malloc(
sizeof(struct target_if_spectral)); sizeof(struct target_if_spectral));
if (!spectral) { if (!spectral) {
qdf_print("SPECTRAL : Memory allocation failed\n"); spectral_err("SPECTRAL : Memory allocation failed");
return spectral; return spectral;
} }
qdf_mem_zero(spectral, sizeof(struct target_if_spectral)); qdf_mem_zero(spectral, sizeof(struct target_if_spectral));
@@ -2013,16 +1943,16 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral); p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
/* TODO : Should this be called here of after ath_attach ? */ /* TODO : Should this be called here of after ath_attach ? */
if (p_sops->get_capability(spectral, SPECTRAL_CAP_PHYDIAG)) if (p_sops->get_capability(spectral, SPECTRAL_CAP_PHYDIAG))
qdf_print(KERN_INFO "HAL_CAP_PHYDIAG : Capable\n"); spectral_info("HAL_CAP_PHYDIAG : Capable");
SPECTRAL_TODO("Need to fix the capablity check for RADAR"); SPECTRAL_TODO("Need to fix the capablity check for RADAR");
if (p_sops->get_capability(spectral, SPECTRAL_CAP_RADAR)) if (p_sops->get_capability(spectral, SPECTRAL_CAP_RADAR))
qdf_print(KERN_INFO "HAL_CAP_RADAR : Capable\n"); spectral_info("HAL_CAP_RADAR : Capable");
SPECTRAL_TODO("Need to fix the capablity check for SPECTRAL\n"); SPECTRAL_TODO("Need to fix the capablity check for SPECTRAL\n");
/* TODO : Should this be called here of after ath_attach ? */ /* TODO : Should this be called here of after ath_attach ? */
if (p_sops->get_capability(spectral, SPECTRAL_CAP_SPECTRAL_SCAN)) if (p_sops->get_capability(spectral, SPECTRAL_CAP_SPECTRAL_SCAN))
qdf_print(KERN_INFO "HAL_CAP_SPECTRAL_SCAN : Capable\n"); spectral_info("HAL_CAP_SPECTRAL_SCAN : Capable");
qdf_spinlock_create(&spectral->spectral_lock); qdf_spinlock_create(&spectral->spectral_lock);
qdf_spinlock_create(&spectral->noise_pwr_reports_lock); qdf_spinlock_create(&spectral->noise_pwr_reports_lock);
@@ -2125,7 +2055,7 @@ target_if_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev)
spectral = get_target_if_spectral_handle_from_pdev(pdev); spectral = get_target_if_spectral_handle_from_pdev(pdev);
if (!spectral) { if (!spectral) {
qdf_print("SPECTRAL : Module doesn't exist\n"); spectral_err("SPECTRAL : Module doesn't exist");
return; return;
} }
target_if_spectral_detach(spectral); target_if_spectral_detach(spectral);
@@ -2154,7 +2084,7 @@ target_if_set_spectral_config(struct wlan_objmgr_pdev *pdev,
spectral = get_target_if_spectral_handle_from_pdev(pdev); spectral = get_target_if_spectral_handle_from_pdev(pdev);
p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral); p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
if (!spectral) { if (!spectral) {
qdf_print("%s: spectral object is NULL\n", __func__); spectral_err("spectral object is NULL");
return -EPERM; return -EPERM;
} }
@@ -2356,14 +2286,14 @@ target_if_spectral_scan_enable_params(struct target_if_spectral *spectral,
struct wlan_objmgr_vdev *vdev = NULL; struct wlan_objmgr_vdev *vdev = NULL;
if (!spectral) { if (!spectral) {
qdf_print("SPECTRAL : Spectral is NULL\n"); spectral_err("SPECTRAL : Spectral is NULL");
return 1; return 1;
} }
p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral); p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
if (!p_sops) { if (!p_sops) {
qdf_print("SPECTRAL : p_sops is NULL\n"); spectral_err("SPECTRAL : p_sops is NULL");
return 1; return 1;
} }
@@ -2649,8 +2579,7 @@ target_if_start_spectral_scan(struct wlan_objmgr_pdev *pdev)
spectral = get_target_if_spectral_handle_from_pdev(pdev); spectral = get_target_if_spectral_handle_from_pdev(pdev);
if (!spectral) { if (!spectral) {
qdf_print("SPECTRAL : Spectral LMAC object is NUll (%s)\n", spectral_err("SPECTRAL : Spectral LMAC object is NUll");
__func__);
return -EPERM; return -EPERM;
} }
p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral); p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
@@ -2670,8 +2599,7 @@ target_if_stop_spectral_scan(struct wlan_objmgr_pdev *pdev)
spectral = get_target_if_spectral_handle_from_pdev(pdev); spectral = get_target_if_spectral_handle_from_pdev(pdev);
if (!spectral) { if (!spectral) {
qdf_print("SPECTRAL : Spectral LMAC object is NUll (%s)\n", spectral_err("SPECTRAL : Spectral LMAC object is NUll ");
__func__);
return; return;
} }
p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral); p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);

View File

@@ -56,16 +56,20 @@ QDF_PRINT_INFO(QDF_PRINT_IDX_SHARED, QDF_MODULE_ID_SPECTRAL, level, ## args)
#define STATUS_PASS 1 #define STATUS_PASS 1
#define STATUS_FAIL 0 #define STATUS_FAIL 0
#define line() \ #undef spectral_dbg_line
qdf_print("----------------------------------------------------\n") #define spectral_dbg_line() \
spectral_debug("----------------------------------------------------\n")
#undef SPECTRAL_TODO
#define SPECTRAL_TODO(str) \ #define SPECTRAL_TODO(str) \
qdf_print(KERN_INFO "SPECTRAL : %s (%s : %d)\n", \ spectral_info("SPECTRAL : %s (%s : %d)\n", \
(str), __func__, __LINE__) (str), __func__, __LINE__)
#undef spectral_ops_not_registered
#define spectral_ops_not_registered(str) \ #define spectral_ops_not_registered(str) \
qdf_print(KERN_INFO "SPECTRAL : %s not registered\n", (str)) spectral_info("SPECTRAL : %s not registered\n", (str))
#undef not_yet_implemented
#define not_yet_implemented() \ #define not_yet_implemented() \
qdf_print("SPECTRAL : %s : %d Not yet implemented\n", \ spectral_info("SPECTRAL : %s : %d Not yet implemented\n", \
__func__, __LINE__) __func__, __LINE__)
#define SPECTRAL_HT20_NUM_BINS 56 #define SPECTRAL_HT20_NUM_BINS 56
#define SPECTRAL_HT20_FFT_LEN 56 #define SPECTRAL_HT20_FFT_LEN 56
@@ -863,7 +867,7 @@ struct target_if_samp_msg_params {
uint16_t freq_loading; uint16_t freq_loading;
int16_t noise_floor; int16_t noise_floor;
int16_t noise_floor_sec80; int16_t noise_floor_sec80;
struct INTERF_SRC_RSP interf_list; struct interf_src_rsp interf_list;
struct spectral_classifier_params classifier_params; struct spectral_classifier_params classifier_params;
struct ath_softc *sc; struct ath_softc *sc;
}; };

View File

@@ -35,14 +35,14 @@ static atomic_t spectral_nl_users = ATOMIC_INIT(0);
void void
target_if_spectral_nl_data_ready(struct sock *sk, int len) target_if_spectral_nl_data_ready(struct sock *sk, int len)
{ {
qdf_print("%s %d\n", __func__, __LINE__); spectral_debug("%d", __LINE__);
} }
#else #else
void void
target_if_spectral_nl_data_ready(struct sk_buff *skb) target_if_spectral_nl_data_ready(struct sk_buff *skb)
{ {
qdf_print("%s %d\n", __func__, __LINE__); spectral_debug("%d", __LINE__);
} }
#endif /* VERSION */ #endif /* VERSION */
@@ -141,7 +141,7 @@ target_if_spectral_init_netlink(struct target_if_spectral *spectral)
target_if_spectral_init_nl_cfg(&cfg); target_if_spectral_init_nl_cfg(&cfg);
if (!spectral) { if (!spectral) {
qdf_print("%s: sc_spectral is NULL\n", __func__); spectral_err("sc_spectral is NULL");
return -EIO; return -EIO;
} }
@@ -151,8 +151,7 @@ target_if_spectral_init_netlink(struct target_if_spectral *spectral)
target_if_spectral_create_nl_sock(&cfg); target_if_spectral_create_nl_sock(&cfg);
if (!target_if_spectral_nl_sock) { if (!target_if_spectral_nl_sock) {
qdf_print("%s NETLINK_KERNEL_CREATE FAILED\n", spectral_err("NETLINK_KERNEL_CREATE FAILED");
__func__);
return -ENODEV; return -ENODEV;
} }
} }
@@ -160,12 +159,13 @@ target_if_spectral_init_netlink(struct target_if_spectral *spectral)
spectral->spectral_sock = target_if_spectral_nl_sock; spectral->spectral_sock = target_if_spectral_nl_sock;
if ((!spectral) || (!spectral->spectral_sock)) { if ((!spectral) || (!spectral->spectral_sock)) {
qdf_print("%s NULL pointers (spectral=%d) (sock=%d)\n", spectral_err("NULL pointers (spectral=%d) (sock=%d)",
__func__, (!spectral), (!spectral->spectral_sock)); (!spectral),
(!spectral->spectral_sock));
return -ENODEV; return -ENODEV;
} }
if (!spectral->spectral_skb) if (!spectral->spectral_skb)
qdf_print(KERN_ERR "%s %d NULL SKB\n", __func__, __LINE__); spectral_err("%d NULL SKB", __LINE__);
return 0; return 0;
} }
@@ -252,7 +252,7 @@ target_if_spectral_init_interf_list(
{ {
if (params->interf_list.count) if (params->interf_list.count)
OS_MEMCPY(&data->interf_list, OS_MEMCPY(&data->interf_list,
&params->interf_list, sizeof(struct INTERF_SRC_RSP)); &params->interf_list, sizeof(struct interf_src_rsp));
else else
data->interf_list.count = 0; data->interf_list.count = 0;
} }
@@ -466,7 +466,7 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral,
OS_FREE(msg); OS_FREE(msg);
msg = NULL; msg = NULL;
} else { } else {
qdf_print("No buffer\n"); spectral_err("No buffer");
} }
#endif /* SPECTRAL_USE_NETLINK_SOCKETS */ #endif /* SPECTRAL_USE_NETLINK_SOCKETS */
@@ -541,12 +541,12 @@ void
target_if_spectral_unicast_msg(struct target_if_spectral *spectral) target_if_spectral_unicast_msg(struct target_if_spectral *spectral)
{ {
if (!spectral) { if (!spectral) {
qdf_print("%s Spectral is NULL\n", __func__); spectral_err("Spectral is NULL");
return; return;
} }
if (!spectral->spectral_sock) { if (!spectral->spectral_sock) {
qdf_print("%s Spectral Socket is invalid\n", __func__); spectral_err("Spectral Socket is invalid");
dev_kfree_skb(spectral->spectral_skb); dev_kfree_skb(spectral->spectral_skb);
spectral->spectral_skb = NULL; spectral->spectral_skb = NULL;
return; return;

View File

@@ -49,9 +49,9 @@ target_if_print_buf(uint8_t *pbuf, int len)
int i = 0; int i = 0;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
qdf_print("%02X ", pbuf[i]); spectral_debug("%02X ", pbuf[i]);
if (i % 32 == 31) if (i % 32 == 31)
qdf_print("\n"); spectral_debug("\n");
} }
} }
@@ -64,12 +64,12 @@ target_if_spectral_dump_fft(uint8_t *pfft, int fftlen)
* TODO : Do not delete the following print * TODO : Do not delete the following print
* The scripts used to validate Spectral depend on this Print * The scripts used to validate Spectral depend on this Print
*/ */
qdf_print("SPECTRAL : FFT Length is 0x%x (%d)\n", fftlen, fftlen); spectral_debug("SPECTRAL : FFT Length is 0x%x (%d)", fftlen, fftlen);
qdf_print("fft_data # "); spectral_debug("fft_data # ");
for (i = 0; i < fftlen; i++) for (i = 0; i < fftlen; i++)
qdf_print("%d ", pfft[i]); spectral_debug("%d ", pfft[i]);
qdf_print("\n"); spectral_debug("\n");
return 0; return 0;
} }
@@ -104,14 +104,12 @@ target_if_spectral_send_tlv_to_host(struct target_if_spectral *spectral,
void void
target_if_dbg_print_samp_param(struct target_if_samp_msg_params *p) target_if_dbg_print_samp_param(struct target_if_samp_msg_params *p)
{ {
qdf_print("\nSAMP Packet : -------------------- START --------------" spectral_debug("\nSAMP Packet : -------------------- START --------------------");
"------\n"); spectral_debug("Freq = %d", p->freq);
qdf_print("Freq = %d\n", p->freq); spectral_debug("RSSI = %d", p->rssi);
qdf_print("RSSI = %d\n", p->rssi); spectral_debug("Bin Count = %d", p->pwr_count);
qdf_print("Bin Count = %d\n", p->pwr_count); spectral_debug("Timestamp = %d", p->tstamp);
qdf_print("Timestamp = %d\n", p->tstamp); spectral_debug("SAMP Packet : -------------------- END -----------------------");
qdf_print("SAMP Packet : -------------------- END ------------------"
"-----\n");
} }
void void
@@ -121,51 +119,52 @@ target_if_dbg_print_samp_msg(struct spectral_samp_msg *ss_msg)
struct spectral_samp_data *p = &ss_msg->samp_data; struct spectral_samp_data *p = &ss_msg->samp_data;
struct spectral_classifier_params *pc = &p->classifier_params; struct spectral_classifier_params *pc = &p->classifier_params;
struct INTERF_SRC_RSP *pi = &p->interf_list; struct interf_src_rsp *pi = &p->interf_list;
line(); spectral_dbg_line();
qdf_print("Spectral Message\n"); spectral_debug("Spectral Message");
line(); spectral_dbg_line();
qdf_print("Signature : 0x%x\n", ss_msg->signature); spectral_debug("Signature : 0x%x", ss_msg->signature);
qdf_print("Freq : %d\n", ss_msg->freq); spectral_debug("Freq : %d", ss_msg->freq);
qdf_print("Freq load : %d\n", ss_msg->freq_loading); spectral_debug("Freq load : %d", ss_msg->freq_loading);
qdf_print("Intfnc type : %d\n", ss_msg->int_type); spectral_debug("Intfnc type : %d", ss_msg->int_type);
line(); spectral_dbg_line();
qdf_print("Spectral Data info\n"); spectral_debug("Spectral Data info");
line(); spectral_dbg_line();
qdf_print("data length : %d\n", p->spectral_data_len); spectral_debug("data length : %d", p->spectral_data_len);
qdf_print("rssi : %d\n", p->spectral_rssi); spectral_debug("rssi : %d", p->spectral_rssi);
qdf_print("combined rssi : %d\n", p->spectral_combined_rssi); spectral_debug("combined rssi : %d", p->spectral_combined_rssi);
qdf_print("upper rssi : %d\n", p->spectral_upper_rssi); spectral_debug("upper rssi : %d", p->spectral_upper_rssi);
qdf_print("lower rssi : %d\n", p->spectral_lower_rssi); spectral_debug("lower rssi : %d", p->spectral_lower_rssi);
qdf_print("bw info : %d\n", p->spectral_bwinfo); spectral_debug("bw info : %d", p->spectral_bwinfo);
qdf_print("timestamp : %d\n", p->spectral_tstamp); spectral_debug("timestamp : %d", p->spectral_tstamp);
qdf_print("max index : %d\n", p->spectral_max_index); spectral_debug("max index : %d", p->spectral_max_index);
qdf_print("max exp : %d\n", p->spectral_max_exp); spectral_debug("max exp : %d", p->spectral_max_exp);
qdf_print("max mag : %d\n", p->spectral_max_mag); spectral_debug("max mag : %d", p->spectral_max_mag);
qdf_print("last timstamp : %d\n", p->spectral_last_tstamp); spectral_debug("last timstamp : %d", p->spectral_last_tstamp);
qdf_print("upper max idx : %d\n", p->spectral_upper_max_index); spectral_debug("upper max idx : %d", p->spectral_upper_max_index);
qdf_print("lower max idx : %d\n", p->spectral_lower_max_index); spectral_debug("lower max idx : %d", p->spectral_lower_max_index);
qdf_print("bin power count : %d\n", p->bin_pwr_count); spectral_debug("bin power count : %d", p->bin_pwr_count);
line(); spectral_dbg_line();
qdf_print("Classifier info\n"); spectral_debug("Classifier info");
line(); spectral_dbg_line();
qdf_print("20/40 Mode : %d\n", pc->spectral_20_40_mode); spectral_debug("20/40 Mode : %d", pc->spectral_20_40_mode);
qdf_print("dc index : %d\n", pc->spectral_dc_index); spectral_debug("dc index : %d", pc->spectral_dc_index);
qdf_print("dc in MHz : %d\n", pc->spectral_dc_in_mhz); spectral_debug("dc in MHz : %d", pc->spectral_dc_in_mhz);
qdf_print("upper channel : %d\n", pc->upper_chan_in_mhz); spectral_debug("upper channel : %d", pc->upper_chan_in_mhz);
qdf_print("lower channel : %d\n", pc->lower_chan_in_mhz); spectral_debug("lower channel : %d", pc->lower_chan_in_mhz);
line(); spectral_dbg_line();
qdf_print("Interference info\n"); spectral_debug("Interference info");
line(); spectral_dbg_line();
qdf_print("inter count : %d\n", pi->count); spectral_debug("inter count : %d", pi->count);
for (i = 0; i < pi->count; i++) { for (i = 0; i < pi->count; i++) {
qdf_print("inter type : %d\n", pi->interf[i].interf_type); spectral_debug("inter type : %d",
qdf_print("min freq : %d\n", pi->interf[i].interf_type);
pi->interf[i].interf_min_freq); spectral_debug("min freq : %d",
qdf_print("max freq : %d\n", pi->interf[i].interf_min_freq);
pi->interf[i].interf_max_freq); spectral_debug("max freq : %d",
pi->interf[i].interf_max_freq);
} }
} }
@@ -238,13 +237,12 @@ target_if_dump_summary_report_gen2(struct spectral_phyerr_tlv_gen2 *ptlv,
(uint8_t *)ptlv + (uint8_t *)ptlv +
sizeof(struct spectral_phyerr_tlv_gen2)); sizeof(struct spectral_phyerr_tlv_gen2));
qdf_print("SPECTRAL : SPECTRAL SUMMARY REPORT\n"); spectral_debug("SPECTRAL : SPECTRAL SUMMARY REPORT");
if (is_160_format) { if (is_160_format) {
if (tlvlen != 20) { if (tlvlen != 20) {
qdf_print spectral_err("Unexpected TLV length %d for Spectral Summary Report! Hexdump follows",
("SPECTRAL : Unexpected TLV length %d for Spectral " tlvlen);
"Summary Report! Hexdump follows\n", tlvlen);
target_if_print_buf((uint8_t *)ptlv, tlvlen + 4); target_if_print_buf((uint8_t *)ptlv, tlvlen + 4);
return -EPERM; return -EPERM;
} }
@@ -271,8 +269,8 @@ target_if_dump_summary_report_gen2(struct spectral_phyerr_tlv_gen2 *ptlv,
recent_rfsat = ((ss_summary_A >> 8) & 0x1); recent_rfsat = ((ss_summary_A >> 8) & 0x1);
sscan_gidx = (ss_summary_A & 0xff); sscan_gidx = (ss_summary_A & 0xff);
qdf_print("sscan_gidx=%d, is_recent_rfsat=%d\n", spectral_debug("sscan_gidx=%d, is_recent_rfsat=%d",
sscan_gidx, recent_rfsat); sscan_gidx, recent_rfsat);
/* First segment */ /* First segment */
agc_mb_gain = ((ss_summary_B >> 10) & 0x7f); agc_mb_gain = ((ss_summary_B >> 10) & 0x7f);
@@ -284,12 +282,10 @@ target_if_dump_summary_report_gen2(struct spectral_phyerr_tlv_gen2 *ptlv,
peak_inx = peak_inx - 4096; peak_inx = peak_inx - 4096;
peak_mag = ((ss_summary_C >> 12) & 0x3ff); peak_mag = ((ss_summary_C >> 12) & 0x3ff);
qdf_print spectral_debug("agc_total_gain_segid0 = 0x%.2x, agc_mb_gain_segid0=%d",
("agc_total_gain_segid0 = 0x%.2x, agc_mb_gain_segid0=%d\n", agc_total_gain, agc_mb_gain);
agc_total_gain, agc_mb_gain); spectral_debug("nb_mask_segid0 = 0x%.2x, ob_flag_segid0=%d, peak_index_segid0=%d, peak_mag_segid0=%d",
qdf_print("nb_mask_segid0 = 0x%.2x, ob_flag_segid0=%d, " nb_mask, ob_flag, peak_inx, peak_mag);
"peak_index_segid0=%d, peak_mag_segid0=%d\n", nb_mask,
ob_flag, peak_inx, peak_mag);
/* Second segment */ /* Second segment */
agc_mb_gain = ((ss_summary_D >> 10) & 0x7f); agc_mb_gain = ((ss_summary_D >> 10) & 0x7f);
@@ -301,17 +297,14 @@ target_if_dump_summary_report_gen2(struct spectral_phyerr_tlv_gen2 *ptlv,
peak_inx = peak_inx - 4096; peak_inx = peak_inx - 4096;
peak_mag = ((ss_summary_E >> 12) & 0x3ff); peak_mag = ((ss_summary_E >> 12) & 0x3ff);
qdf_print spectral_debug("agc_total_gain_segid1 = 0x%.2x, agc_mb_gain_segid1=%d",
("agc_total_gain_segid1 = 0x%.2x, agc_mb_gain_segid1=%d\n", agc_total_gain, agc_mb_gain);
agc_total_gain, agc_mb_gain); spectral_debug("nb_mask_segid1 = 0x%.2x, ob_flag_segid1=%d, peak_index_segid1=%d, peak_mag_segid1=%d",
qdf_print("nb_mask_segid1 = 0x%.2x, ob_flag_segid1=%d, " nb_mask, ob_flag, peak_inx, peak_mag);
"peak_index_segid1=%d, peak_mag_segid1=%d\n", nb_mask,
ob_flag, peak_inx, peak_mag);
} else { } else {
if (tlvlen != 8) { if (tlvlen != 8) {
qdf_print spectral_err("Unexpected TLV length %d for Spectral Summary Report! Hexdump follows",
("SPECTRAL : Unexpected TLV length %d for Spectral " tlvlen);
"Summary Report! Hexdump follows\n", tlvlen);
target_if_print_buf((uint8_t *)ptlv, tlvlen + 4); target_if_print_buf((uint8_t *)ptlv, tlvlen + 4);
return -EPERM; return -EPERM;
} }
@@ -335,12 +328,10 @@ target_if_dump_summary_report_gen2(struct spectral_phyerr_tlv_gen2 *ptlv,
sscan_gidx = ((ss_summary_A >> 16) & 0xff); sscan_gidx = ((ss_summary_A >> 16) & 0xff);
recent_rfsat = ((ss_summary_B >> 31) & 0x1); recent_rfsat = ((ss_summary_B >> 31) & 0x1);
qdf_print spectral_debug("nb_mask = 0x%.2x, ob_flag=%d, peak_index=%d, peak_mag=%d, agc_mb_gain=%d, agc_total_gain=%d, sscan_gidx=%d, recent_rfsat=%d",
("nb_mask = 0x%.2x, ob_flag=%d, peak_index=%d, " nb_mask, ob_flag, peak_inx, peak_mag,
"peak_mag=%d, " agc_mb_gain, agc_total_gain, sscan_gidx,
"agc_mb_gain=%d, agc_total_gain=%d, sscan_gidx=%d, " recent_rfsat);
"recent_rfsat=%d\n", nb_mask, ob_flag, peak_inx, peak_mag,
agc_mb_gain, agc_total_gain, sscan_gidx, recent_rfsat);
} }
return 0; return 0;
@@ -390,8 +381,8 @@ target_if_process_sfft_report_gen2(
/* Relook this */ /* Relook this */
if (tlvlen < 8) { if (tlvlen < 8) {
qdf_print("SPECTRAL : Unexpected TLV length %d for Spectral " spectral_err("Unexpected TLV length %d for Spectral Summary Report! Hexdump follows",
"Summary Report! Hexdump follows\n", tlvlen); tlvlen);
target_if_print_buf((uint8_t *)ptlv, tlvlen + 4); target_if_print_buf((uint8_t *)ptlv, tlvlen + 4);
return -EPERM; return -EPERM;
} }
@@ -462,12 +453,12 @@ target_if_dump_adc_report_gen2(
uint8_t *ptmp = (uint8_t *)ptlv; uint8_t *ptmp = (uint8_t *)ptlv;
qdf_print("SPECTRAL : ADC REPORT\n"); spectral_debug("SPECTRAL : ADC REPORT");
/* Relook this */ /* Relook this */
if (tlvlen < 4) { if (tlvlen < 4) {
qdf_print("Unexpected TLV length %d for ADC Report! Hexdump" spectral_err("Unexpected TLV length %d for ADC Report! Hexdump follows",
" follows\n", tlvlen); tlvlen);
target_if_print_buf((uint8_t *)ptlv, tlvlen + 4); target_if_print_buf((uint8_t *)ptlv, tlvlen + 4);
return -EPERM; return -EPERM;
} }
@@ -480,9 +471,9 @@ target_if_dump_adc_report_gen2(
agc_mb_gain = ((adc_summary >> 16) & 0x7f); agc_mb_gain = ((adc_summary >> 16) & 0x7f);
agc_total_gain = adc_summary & 0x3ff; agc_total_gain = adc_summary & 0x3ff;
qdf_print("samp_fmt= %u, chn_idx= %u, recent_rfsat= %u, agc_mb_gain=%u" spectral_debug("samp_fmt= %u, chn_idx= %u, recent_rfsat= %u, agc_mb_gain=%u agc_total_gain=%u",
" agc_total_gain=%u\n", samp_fmt, chn_idx, recent_rfsat, samp_fmt, chn_idx, recent_rfsat, agc_mb_gain,
agc_mb_gain, agc_total_gain); agc_total_gain);
for (i = 0; i < (tlvlen / 4); i++) { for (i = 0; i < (tlvlen / 4); i++) {
pdata = (uint32_t *)(ptmp + 4 + i * 4); pdata = (uint32_t *)(ptmp + 4 + i * 4);
@@ -524,12 +515,11 @@ target_if_dump_adc_report_gen2(
else else
sq2 = q2; sq2 = q2;
qdf_print spectral_debug("SPECTRAL ADC : Interpreting capture format 1");
("SPECTRAL ADC : Interpreting capture format 1\n"); spectral_debug("adc_data_format_1 # %d %d %d",
qdf_print("adc_data_format_1 # %d %d %d\n", 2 * i, si1, 2 * i, si1, sq1);
sq1); spectral_debug("adc_data_format_1 # %d %d %d",
qdf_print("adc_data_format_1 # %d %d %d\n", 2 * i + 1, 2 * i + 1, si2, sq2);
si2, sq2);
} }
/* Interpreting capture format 0 */ /* Interpreting capture format 0 */
@@ -550,14 +540,13 @@ target_if_dump_adc_report_gen2(
sq1 = q1 - 65536; sq1 = q1 - 65536;
else else
sq1 = q1; sq1 = q1;
qdf_print spectral_debug("SPECTRAL ADC : Interpreting capture format 0");
("SPECTRAL ADC : Interpreting capture format 0\n"); spectral_debug("adc_data_format_2 # %d %d %d",
qdf_print("adc_data_format_2 # %d %d %d\n", i, si1, i, si1, sq1);
sq1);
} }
} }
qdf_print("\n"); spectral_debug("\n");
return 0; return 0;
} }
@@ -611,12 +600,12 @@ target_if_dump_sfft_report_gen2(struct spectral_phyerr_tlv_gen2 *ptlv,
if (is_160_format) if (is_160_format)
segid_skiplen = sizeof(SPECTRAL_SEGID_INFO); segid_skiplen = sizeof(SPECTRAL_SEGID_INFO);
qdf_print("SPECTRAL : SEARCH FFT REPORT\n"); spectral_debug("SPECTRAL : SEARCH FFT REPORT");
/* Relook this */ /* Relook this */
if (tlvlen < (8 + segid_skiplen)) { if (tlvlen < (8 + segid_skiplen)) {
qdf_print("SPECTRAL : Unexpected TLV length %d for Spectral " spectral_err("Unexpected TLV length %d for Spectral Summary Report! Hexdump follows",
"Summary Report! Hexdump follows\n", tlvlen); tlvlen);
target_if_print_buf((uint8_t *)ptlv, tlvlen + 4); target_if_print_buf((uint8_t *)ptlv, tlvlen + 4);
return -EPERM; return -EPERM;
} }
@@ -645,24 +634,23 @@ target_if_dump_sfft_report_gen2(struct spectral_phyerr_tlv_gen2 *ptlv,
avgpwr_db = ((fft_summary_B >> 18) & 0xff); avgpwr_db = ((fft_summary_B >> 18) & 0xff);
peak_mag = ((fft_summary_B >> 8) & 0x3ff); peak_mag = ((fft_summary_B >> 8) & 0x3ff);
qdf_print("Header A = 0x%x Header B = 0x%x\n", spectral_debug("Header A = 0x%x Header B = 0x%x",
phdr->hdr_a, phdr->hdr_b); phdr->hdr_a, phdr->hdr_b);
qdf_print("Base Power= 0x%x, Total Gain= %d, relpwr_db=%d, " spectral_debug("Base Power= 0x%x, Total Gain= %d, relpwr_db=%d, num_str_bins_ib=%d fft_chn_idx=%d peak_inx=%d avgpwr_db=%d peak_mag=%d",
"num_str_bins_ib=%d fft_chn_idx=%d peak_inx=%d avgpwr_db=%d " base_pwr, total_gain_info, relpwr_db, num_str_bins_ib,
"peak_mag=%d\n", base_pwr, total_gain_info, relpwr_db, fft_chn_idx, peak_inx, avgpwr_db, peak_mag);
num_str_bins_ib, fft_chn_idx, peak_inx, avgpwr_db, peak_mag);
if (is_160_format) { if (is_160_format) {
segid = fft_summary_C & 0x1; segid = fft_summary_C & 0x1;
qdf_print("Segment ID: %hhu\n", segid); spectral_debug("Segment ID: %hhu", segid);
} }
qdf_print("FFT bins:\n"); spectral_debug("FFT bins:");
for (i = 0; i < (tlvlen - 8 - segid_skiplen); i++) { for (i = 0; i < (tlvlen - 8 - segid_skiplen); i++) {
fft_mag = ((uint8_t *)ptlv)[12 + segid_skiplen + i]; fft_mag = ((uint8_t *)ptlv)[12 + segid_skiplen + i];
qdf_print("%d %d, ", i, fft_mag); spectral_debug("%d %d, ", i, fft_mag);
} }
qdf_print("\n"); spectral_debug("\n");
return 0; return 0;
} }
@@ -1019,8 +1007,8 @@ target_if_spectral_dump_hdr_gen2(struct spectral_phyerr_hdr_gen2 *phdr)
(uint8_t *)((uint8_t *)phdr + sizeof(int)), (uint8_t *)((uint8_t *)phdr + sizeof(int)),
sizeof(int)); sizeof(int));
qdf_print("SPECTRAL : HEADER A 0x%x (%d)\n", a, a); spectral_debug("SPECTRAL : HEADER A 0x%x (%d)", a, a);
qdf_print("SPECTRAL : HEADER B 0x%x (%d)\n", b, b); spectral_debug("SPECTRAL : HEADER B 0x%x (%d)", b, b);
return 0; return 0;
} }
@@ -1057,8 +1045,8 @@ target_if_spectral_dump_tlv_gen2(
* TODO : Do not delete the following print * TODO : Do not delete the following print
* The scripts used to validate Spectral depend on this Print * The scripts used to validate Spectral depend on this Print
*/ */
qdf_print("SPECTRAL : TLV Length is 0x%x (%d)\n", spectral_debug("SPECTRAL : TLV Length is 0x%x (%d)",
ptlv->length, ptlv->length); ptlv->length, ptlv->length);
switch (ptlv->tag) { switch (ptlv->tag) {
case TLV_TAG_SPECTRAL_SUMMARY_REPORT_GEN2: case TLV_TAG_SPECTRAL_SUMMARY_REPORT_GEN2:
@@ -1078,7 +1066,7 @@ target_if_spectral_dump_tlv_gen2(
break; break;
default: default:
qdf_print("SPECTRAL : INVALID TLV\n"); spectral_warn("INVALID TLV");
ret = -1; ret = -1;
break; break;
} }
@@ -1096,17 +1084,15 @@ target_if_spectral_dump_phyerr_data_gen2(uint8_t *data, uint32_t datalen,
uint32_t curr_tlv_complete_size = 0; uint32_t curr_tlv_complete_size = 0;
if (datalen < sizeof(struct spectral_phyerr_tlv_gen2)) { if (datalen < sizeof(struct spectral_phyerr_tlv_gen2)) {
qdf_print spectral_err("Total PHY error data length %u too short to contain any TLVs",
("DRIVER: Total PHY error data length %u too short to " datalen);
"contain any TLVs\n", datalen);
return -EPERM; return -EPERM;
} }
while (bytes_processed < datalen) { while (bytes_processed < datalen) {
if (bytes_remaining < sizeof(struct spectral_phyerr_tlv_gen2)) { if (bytes_remaining < sizeof(struct spectral_phyerr_tlv_gen2)) {
qdf_print spectral_err("Remaining PHY error data length %u too short to contain a TLV",
("DRIVER: Remaining PHY error data length %u too " bytes_remaining);
"short to contain a TLV\n", bytes_remaining);
return -EPERM; return -EPERM;
} }
@@ -1114,8 +1100,8 @@ target_if_spectral_dump_phyerr_data_gen2(uint8_t *data, uint32_t datalen,
bytes_processed); bytes_processed);
if (ptlv->signature != SPECTRAL_PHYERR_SIGNATURE_GEN2) { if (ptlv->signature != SPECTRAL_PHYERR_SIGNATURE_GEN2) {
qdf_print("DRIVER : Invalid signature 0x%x!\n", spectral_err("Invalid signature 0x%x!",
ptlv->signature); ptlv->signature);
return -EPERM; return -EPERM;
} }
@@ -1124,11 +1110,8 @@ target_if_spectral_dump_phyerr_data_gen2(uint8_t *data, uint32_t datalen,
ptlv->length; ptlv->length;
if (curr_tlv_complete_size > bytes_remaining) { if (curr_tlv_complete_size > bytes_remaining) {
qdf_print spectral_err("Current indicated complete TLV size %u greater than number of bytes remaining to be processed %u",
("DRIVER : Current indicated complete TLV size %u " curr_tlv_complete_size, bytes_remaining);
"greater than number of bytes remaining to be "
"processed %u", curr_tlv_complete_size,
bytes_remaining);
return -EPERM; return -EPERM;
} }
@@ -1201,57 +1184,42 @@ target_if_dump_fft_report_gen3(struct spectral_phyerr_fft_report_gen3
int report_len = (fft_hdr_length + 8); int report_len = (fft_hdr_length + 8);
int fft_bin_len = (fft_hdr_length - 16); int fft_bin_len = (fft_hdr_length - 16);
qdf_print("##############################################" spectral_debug("#############################################################");
"###############\n"); spectral_debug("Spectral search fft_report");
qdf_print("Spectral search fft_report\n"); spectral_debug("fft_timestamp = 0x%x\nfft_hdr_length = %d(32 bit words)\nfft_hdr_tag = 0x%x\nfft_hdr_sig = 0x%x",
qdf_print("fft_timestamp = 0x%x\n" p_fft_report->fft_timestamp,
"fft_hdr_length = %d(32 bit words)\n" p_fft_report->fft_hdr_length,
"fft_hdr_tag = 0x%x\n" p_fft_report->fft_hdr_tag, p_fft_report->fft_hdr_sig);
"fft_hdr_sig = 0x%x\n",
p_fft_report->fft_timestamp,
p_fft_report->fft_hdr_length,
p_fft_report->fft_hdr_tag, p_fft_report->fft_hdr_sig);
qdf_print("Length field in search fft report is %d(0x%x) bytes\n", spectral_debug("Length field in search fft report is %d(0x%x) bytes",
fft_hdr_length, fft_hdr_length); fft_hdr_length, fft_hdr_length);
qdf_print("Total length of search fft report is %d(0x%x) bytes\n", spectral_debug("Total length of search fft report is %d(0x%x) bytes",
report_len, report_len); report_len, report_len);
qdf_print("Number of fftbins in report is %d(0x%x)\n", fft_bin_len, spectral_debug("Number of fftbins in report is %d(0x%x)", fft_bin_len,
fft_bin_len); fft_bin_len);
qdf_print("fft_detector_id = %u\n" spectral_debug("fft_detector_id = %u\nfft_num = %u\nfft_radar_check = %u\nfft_peak_sidx = %d\nfft_chn_idx = %u\nfft_base_pwr_db = %u\nfft_total_gain_db = %u\nfft_num_str_bins_ib = %u\nfft_peak_mag = %d\nfft_avgpwr_db = %u\nfft_relpwr_db = %u",
"fft_num = %u\n" p_sfft->fft_detector_id,
"fft_radar_check = %u\n" p_sfft->fft_num,
"fft_peak_sidx = %d\n" p_sfft->fft_radar_check,
"fft_chn_idx = %u\n" p_sfft->fft_peak_sidx,
"fft_base_pwr_db = %u\n" p_sfft->fft_chn_idx,
"fft_total_gain_db = %u\n" p_sfft->fft_base_pwr_db,
"fft_num_str_bins_ib = %u\n" p_sfft->fft_total_gain_db,
"fft_peak_mag = %d\n" p_sfft->fft_num_str_bins_ib,
"fft_avgpwr_db = %u\n" p_sfft->fft_peak_mag,
"fft_relpwr_db = %u\n", p_sfft->fft_avgpwr_db, p_sfft->fft_relpwr_db);
p_sfft->fft_detector_id,
p_sfft->fft_num,
p_sfft->fft_radar_check,
p_sfft->fft_peak_sidx,
p_sfft->fft_chn_idx,
p_sfft->fft_base_pwr_db,
p_sfft->fft_total_gain_db,
p_sfft->fft_num_str_bins_ib,
p_sfft->fft_peak_mag,
p_sfft->fft_avgpwr_db, p_sfft->fft_relpwr_db);
qdf_print("FFT bins:\n"); spectral_debug("FFT bins:");
for (i = 0; i < (fft_hdr_length - 16); i++) { for (i = 0; i < (fft_hdr_length - 16); i++) {
fft_mag = fft_mag =
((uint8_t *)p_fft_report)[SPECTRAL_FFT_BINS_POS + i]; ((uint8_t *)p_fft_report)[SPECTRAL_FFT_BINS_POS + i];
qdf_print("%d: %d, ", i, fft_mag); spectral_debug("%d: %d, ", i, fft_mag);
if (i % 16 == 0) if (i % 16 == 0)
qdf_print("\n"); spectral_debug("\n");
} }
qdf_print("\n"); spectral_debug("\n");
qdf_print("###########################################################" spectral_debug("#############################################################");
"##\n");
return 0; return 0;
} }
@@ -1324,26 +1292,24 @@ target_if_consume_sfft_report_gen3(struct target_if_spectral *spectral,
fft_hdr_length = p_fft_report->fft_hdr_length * 4; fft_hdr_length = p_fft_report->fft_hdr_length * 4;
if (fft_hdr_length < 16) { if (fft_hdr_length < 16) {
qdf_print spectral_err("Unexpected TLV length %u for FFT Report! Hexdump follows",
("SPECTRAL : Unexpected TLV length %u for FFT Report! " fft_hdr_length);
"Hexdump follows\n", fft_hdr_length);
goto fail; goto fail;
} }
report_len = (fft_hdr_length + 8); report_len = (fft_hdr_length + 8);
fft_bin_len = (fft_hdr_length - 16); fft_bin_len = (fft_hdr_length - 16);
if (datalen < report_len) { if (datalen < report_len) {
qdf_print("DRIVER: Total PHY error data length %u too short to" spectral_err("Total PHY error data length %u too short to contain the search fft report of length %u",
" contain the search fft report of length %u\n", datalen, report_len);
datalen, report_len);
goto fail; goto fail;
} }
target_if_process_sfft_report_gen3(p_fft_report, p_sfft); target_if_process_sfft_report_gen3(p_fft_report, p_sfft);
if (p_sfft->fft_detector_id != 0) { if (p_sfft->fft_detector_id != 0) {
qdf_print("Expected segid is 0 but we got %d\n", spectral_err("Expected segid is 0 but we got %d",
p_sfft->fft_detector_id); p_sfft->fft_detector_id);
spectral->diag_stats.spectral_vhtseg1id_mismatch++; spectral->diag_stats.spectral_vhtseg1id_mismatch++;
goto fail; goto fail;
} }
@@ -1474,8 +1440,8 @@ target_if_consume_sfft_report_gen3(struct target_if_spectral *spectral,
target_if_process_sfft_report_gen3(p_fft_report, p_sfft); target_if_process_sfft_report_gen3(p_fft_report, p_sfft);
if (p_sfft->fft_detector_id != 1) { if (p_sfft->fft_detector_id != 1) {
qdf_print("Expected segid is 1 but we got %d\n", spectral_err("Expected segid is 1 but we got %d",
p_sfft->fft_detector_id); p_sfft->fft_detector_id);
spectral->diag_stats.spectral_vhtseg2id_mismatch++; spectral->diag_stats.spectral_vhtseg2id_mismatch++;
goto fail; goto fail;
} }
@@ -1524,8 +1490,7 @@ target_if_consume_sfft_report_gen3(struct target_if_spectral *spectral,
return 0; return 0;
fail: fail:
qdf_print("Error in function %s while processing search fft report\n", spectral_err("Error in function while processing search fft report");
__func__);
target_if_print_buf((uint8_t *)p_fft_report, fft_hdr_length + 8); target_if_print_buf((uint8_t *)p_fft_report, fft_hdr_length + 8);
return -EPERM; return -EPERM;
} }
@@ -1557,10 +1522,9 @@ target_if_spectral_process_phyerr_gen3(
pinfo.acs_stats = acs_stats; pinfo.acs_stats = acs_stats;
if (spectral_debug_level & (DEBUG_SPECTRAL2 | DEBUG_SPECTRAL4)) { if (spectral_debug_level & (DEBUG_SPECTRAL2 | DEBUG_SPECTRAL4)) {
qdf_print("Printing the spectral phyerr buffer for debug " spectral_debug("Printing the spectral phyerr buffer for debug purpose");
"purpose\n"); spectral_debug("Dalalength of buffer = 0x%x(%d)",
qdf_print("Dalalength of buffer = 0x%x(%d)\n", datalen, datalen);
datalen, datalen);
#ifdef CONFIG_WIN #ifdef CONFIG_WIN
RAWSIM_PKT_HEXDUMP(data, datalen); RAWSIM_PKT_HEXDUMP(data, datalen);
#endif #endif
@@ -1575,8 +1539,8 @@ target_if_spectral_process_phyerr_gen3(
signature = *(data + PHYERR_HDR_SIG_POS); signature = *(data + PHYERR_HDR_SIG_POS);
if (signature != SPECTRAL_PHYERR_SIGNATURE_GEN3) { if (signature != SPECTRAL_PHYERR_SIGNATURE_GEN3) {
qdf_print("Unexpected signature %x in spectral phyerror " spectral_err("Unexpected signature %x in spectral phyerror event",
"event\n", signature); signature);
spectral->diag_stats.spectral_mismatch++; spectral->diag_stats.spectral_mismatch++;
ret = -1; ret = -1;
goto end; goto end;
@@ -1595,7 +1559,8 @@ target_if_spectral_process_phyerr_gen3(
break; break;
default: default:
qdf_print("Unknown tag %x in spectral phyerror event\n", tag); spectral_warn("Unknown tag %x in spectral phyerror event",
tag);
break; break;
} }

View File

@@ -85,9 +85,7 @@ target_if_populate_report_static_gen2(
qdf_mem_malloc(sizeof(reportdata_20_gen2)); qdf_mem_malloc(sizeof(reportdata_20_gen2));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate memory "
"for report data\n");
goto bad; goto bad;
} }
@@ -108,9 +106,7 @@ target_if_populate_report_static_gen2(
qdf_mem_malloc(sizeof(reportdata_40_gen2)); qdf_mem_malloc(sizeof(reportdata_40_gen2));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate memory "
"for report data\n");
goto bad; goto bad;
} }
@@ -131,9 +127,7 @@ target_if_populate_report_static_gen2(
qdf_mem_malloc(sizeof(reportdata_80_gen2)); qdf_mem_malloc(sizeof(reportdata_80_gen2));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate memory "
"for report data\n");
goto bad; goto bad;
} }
@@ -155,9 +149,7 @@ target_if_populate_report_static_gen2(
qdf_mem_malloc(sizeof(reportdata_80_80_gen2)); qdf_mem_malloc(sizeof(reportdata_80_80_gen2));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate "
"memory for report data\n");
goto bad; goto bad;
} }
@@ -179,9 +171,7 @@ target_if_populate_report_static_gen2(
qdf_mem_malloc(sizeof(reportdata_160_gen2)); qdf_mem_malloc(sizeof(reportdata_160_gen2));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate "
"memory for report data\n");
goto bad; goto bad;
} }
@@ -198,7 +188,7 @@ target_if_populate_report_static_gen2(
} }
break; break;
default: default:
qdf_print("Unhandled width. Please correct. Asserting\n"); spectral_err("Unhandled width. Please correct. Asserting");
qdf_assert_always(0); qdf_assert_always(0);
} }
@@ -233,8 +223,7 @@ target_if_populate_report_static_gen3(
qdf_mem_malloc(sizeof(reportdata_20_gen3)); qdf_mem_malloc(sizeof(reportdata_20_gen3));
if (!report->data) { if (!report->data) {
qdf_print("Spectral simulation: Could not allocate " spectral_err("Spectral simulation: Could not allocate memory for report data");
"memory for report data\n");
goto bad; goto bad;
} }
@@ -255,8 +244,7 @@ target_if_populate_report_static_gen3(
qdf_mem_malloc(sizeof(reportdata_40_gen3)); qdf_mem_malloc(sizeof(reportdata_40_gen3));
if (!report->data) { if (!report->data) {
qdf_print("Spectral simulation: Could not allocate " spectral_err("Spectral simulation: Could not allocate memory for report data");
"memory for report data\n");
goto bad; goto bad;
} }
@@ -277,9 +265,7 @@ target_if_populate_report_static_gen3(
qdf_mem_malloc(sizeof(reportdata_80_gen3)); qdf_mem_malloc(sizeof(reportdata_80_gen3));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate memory "
"for report data\n");
goto bad; goto bad;
} }
@@ -301,9 +287,7 @@ target_if_populate_report_static_gen3(
qdf_mem_malloc(sizeof(reportdata_80_80_gen3)); qdf_mem_malloc(sizeof(reportdata_80_80_gen3));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate "
"memory for report data\n");
goto bad; goto bad;
} }
@@ -325,9 +309,7 @@ target_if_populate_report_static_gen3(
qdf_mem_malloc(sizeof(reportdata_160_gen3)); qdf_mem_malloc(sizeof(reportdata_160_gen3));
if (!report->data) { if (!report->data) {
qdf_print spectral_err("Spectral simulation: Could not allocate memory for report data");
("Spectral simulation: Could not allocate "
"memory for report data\n");
goto bad; goto bad;
} }
@@ -344,7 +326,7 @@ target_if_populate_report_static_gen3(
} }
break; break;
default: default:
qdf_print("Unhandled width. Please correct. Asserting\n"); spectral_err("Unhandled width. Please correct. Asserting");
qdf_assert_always(0); qdf_assert_always(0);
} }
@@ -408,8 +390,7 @@ target_if_populate_reportset_static(
qdf_mem_malloc(sizeof(struct spectralsim_report)); qdf_mem_malloc(sizeof(struct spectralsim_report));
if (!report) { if (!report) {
qdf_print("Spectral simulation: Could not allocate memory " spectral_err("Spectral simulation: Could not allocate memory for report.");
"for report.\n");
goto bad; goto bad;
} }
@@ -478,7 +459,7 @@ target_if_populate_reportset_static(
} }
break; break;
default: default:
qdf_print("Unhandled width. Please rectify.\n"); spectral_err("Unhandled width. Please rectify.");
qdf_assert_always(0); qdf_assert_always(0);
}; };
@@ -679,8 +660,7 @@ target_if_spectral_sim_attach(struct target_if_spectral *spectral)
qdf_mem_malloc(sizeof(struct spectralsim_context)); qdf_mem_malloc(sizeof(struct spectralsim_context));
if (!simctx) { if (!simctx) {
qdf_print("Spectral simulation: Could not allocate memory for " spectral_err("Spectral simulation: Could not allocate memory for context");
"context\n");
return -EPERM; return -EPERM;
} }
@@ -698,7 +678,7 @@ target_if_spectral_sim_attach(struct target_if_spectral *spectral)
if (target_if_populate_simdata(simctx) != 0) { if (target_if_populate_simdata(simctx) != 0) {
qdf_mem_free(simctx); qdf_mem_free(simctx);
spectral->simctx = NULL; spectral->simctx = NULL;
qdf_print("Spectral simulation attach failed\n"); spectral_err("Spectral simulation attach failed");
return -EPERM; return -EPERM;
} }
@@ -707,7 +687,7 @@ target_if_spectral_sim_attach(struct target_if_spectral *spectral)
target_if_spectral_sim_phyerrdelivery_handler, target_if_spectral_sim_phyerrdelivery_handler,
(void *)(spectral), QDF_TIMER_TYPE_WAKE_APPS); (void *)(spectral), QDF_TIMER_TYPE_WAKE_APPS);
qdf_print("Spectral simulation attached\n"); spectral_info("Spectral simulation attached");
return 0; return 0;
} }
@@ -728,7 +708,7 @@ target_if_spectral_sim_detach(struct target_if_spectral *spectral)
qdf_mem_free(simctx); qdf_mem_free(simctx);
spectral->simctx = NULL; spectral->simctx = NULL;
qdf_print("Spectral simulation detached\n"); spectral_info("Spectral simulation detached");
} }
uint32_t uint32_t
@@ -776,16 +756,12 @@ target_if_spectral_sops_sim_start_scan(void *arg)
qdf_assert_always(simctx); qdf_assert_always(simctx);
if (!simctx->curr_reportset) { if (!simctx->curr_reportset) {
qdf_print("Spectral simulation: No current report set " spectral_err("Spectral simulation: No current report set configured - unable to start simulated Spectral scan");
"configured - unable to start simulated Spectral "
"scan\n");
return 0; return 0;
} }
if (!simctx->curr_reportset->curr_report) { if (!simctx->curr_reportset->curr_report) {
qdf_print("Spectral simulation: No report data instances " spectral_err("Spectral simulation: No report data instances populated - unable to start simulated Spectral scan");
"populated - unable to start simulated Spectral "
"scan\n");
return 0; return 0;
} }
@@ -846,60 +822,38 @@ target_if_log_sim_spectral_params(struct spectral_config *params)
{ {
int i = 0; int i = 0;
qdf_print("\n"); spectral_debug("\n");
qdf_print("Spectral simulation: Param data dump:\n" spectral_debug("Spectral simulation: Param data dump:\nss_fft_period=%hu\nss_period=%hu\nss_count=%hu\nss_short_report=%hu\nradar_bin_thresh_sel=%hhu\nss_spectral_pri=%hu\nss_fft_size=%hu\nss_gc_ena=%hu\nss_restart_ena=%hu\nss_noise_floor_ref=%hu\nss_init_delay=%hu\nss_nb_tone_thr=%hu\nss_str_bin_thr=%hu\nss_wb_rpt_mode=%hu\nss_rssi_rpt_mode=%hu\nss_rssi_thr=%hu\nss_pwr_format=%hu\nss_rpt_mode=%hu\nss_bin_scale=%hu\nss_dbm_adj=%hu\nss_chn_mask=%hu\nss_nf_temp_data=%d",
"ss_fft_period=%hu\n" params->ss_fft_period,
"ss_period=%hu\n" params->ss_period,
"ss_count=%hu\n" params->ss_count,
"ss_short_report=%hu\n" params->ss_short_report,
"radar_bin_thresh_sel=%hhu\n" params->radar_bin_thresh_sel,
"ss_spectral_pri=%hu\n" params->ss_spectral_pri,
"ss_fft_size=%hu\n" params->ss_fft_size,
"ss_gc_ena=%hu\n" params->ss_gc_ena,
"ss_restart_ena=%hu\n" params->ss_restart_ena,
"ss_noise_floor_ref=%hu\n" params->ss_noise_floor_ref,
"ss_init_delay=%hu\n" params->ss_init_delay,
"ss_nb_tone_thr=%hu\n" params->ss_nb_tone_thr,
"ss_str_bin_thr=%hu\n" params->ss_str_bin_thr,
"ss_wb_rpt_mode=%hu\n" params->ss_wb_rpt_mode,
"ss_rssi_rpt_mode=%hu\n" params->ss_rssi_rpt_mode,
"ss_rssi_thr=%hu\n" params->ss_rssi_thr,
"ss_pwr_format=%hu\n" params->ss_pwr_format,
"ss_rpt_mode=%hu\n" params->ss_rpt_mode,
"ss_bin_scale=%hu\n" params->ss_bin_scale,
"ss_dbm_adj=%hu\n" params->ss_dbm_adj,
"ss_chn_mask=%hu\n" params->ss_chn_mask, params->ss_nf_temp_data);
"ss_nf_temp_data=%d\n",
params->ss_fft_period,
params->ss_period,
params->ss_count,
params->ss_short_report,
params->radar_bin_thresh_sel,
params->ss_spectral_pri,
params->ss_fft_size,
params->ss_gc_ena,
params->ss_restart_ena,
params->ss_noise_floor_ref,
params->ss_init_delay,
params->ss_nb_tone_thr,
params->ss_str_bin_thr,
params->ss_wb_rpt_mode,
params->ss_rssi_rpt_mode,
params->ss_rssi_thr,
params->ss_pwr_format,
params->ss_rpt_mode,
params->ss_bin_scale,
params->ss_dbm_adj,
params->ss_chn_mask, params->ss_nf_temp_data);
for (i = 0; i < AH_MAX_CHAINS * 2; i++) for (i = 0; i < AH_MAX_CHAINS * 2; i++)
qdf_print("ss_nf_cal[%d]=%hhd\n", i, params->ss_nf_cal[i]); spectral_debug("ss_nf_cal[%d]=%hhd", i, params->ss_nf_cal[i]);
for (i = 0; i < AH_MAX_CHAINS * 2; i++) for (i = 0; i < AH_MAX_CHAINS * 2; i++)
qdf_print("ss_nf_pwr[%d]=%hhd\n", i, params->ss_nf_pwr[i]); spectral_debug("ss_nf_pwr[%d]=%hhd", i, params->ss_nf_pwr[i]);
qdf_print("\n"); spectral_info("\n");
} }
#else #else
@@ -933,8 +887,7 @@ target_if_spectral_sops_sim_configure_params(
vdev = target_if_spectral_get_vdev(spectral); vdev = target_if_spectral_get_vdev(spectral);
if (!vdev) { if (!vdev) {
qdf_print("Spectral simulation: No VAPs found - not proceeding" spectral_warn("Spectral simulation: No VAPs found - not proceeding with param config.");
" with param config.\n");
return 0; return 0;
} }
@@ -957,20 +910,18 @@ target_if_spectral_sops_sim_configure_params(
} else if (phymode == WLAN_PHYMODE_11AC_VHT80_80) { } else if (phymode == WLAN_PHYMODE_11AC_VHT80_80) {
des_headreportset = simctx->bw80_80_headreportset; des_headreportset = simctx->bw80_80_headreportset;
} else { } else {
qdf_print("Spectral simulation: Unexpected PHY mode %u" spectral_err("Spectral simulation: Unexpected PHY mode %u found for width 160 MHz...asserting.",
" found for width 160 MHz...asserting.\n", phymode);
phymode);
qdf_assert_always(0); qdf_assert_always(0);
} }
break; break;
case IEEE80211_CWM_WIDTHINVALID: case IEEE80211_CWM_WIDTHINVALID:
qdf_print("Spectral simulation: Invalid width configured - not" spectral_err("Spectral simulation: Invalid width configured - not proceeding with param config.");
" proceeding with param config.\n");
is_invalid_width = true; is_invalid_width = true;
default: default:
qdf_print("Spectral simulation: Unknown width %u...asserting\n", spectral_err("Spectral simulation: Unknown width %u...asserting",
bw); bw);
qdf_assert_always(0); qdf_assert_always(0);
break; break;
} }
@@ -981,9 +932,7 @@ target_if_spectral_sops_sim_configure_params(
return 0; return 0;
if (!des_headreportset) { if (!des_headreportset) {
qdf_print("Spectral simulation: No simulation data present for" spectral_warn("Spectral simulation: No simulation data present for configured bandwidth/PHY mode - unable to proceed with param config.");
" configured bandwidth/PHY mode - unable to proceed "
" with param config.\n");
return 0; return 0;
} }
@@ -1002,16 +951,12 @@ target_if_spectral_sops_sim_configure_params(
} }
if (!simctx->curr_reportset) { if (!simctx->curr_reportset) {
qdf_print("Spectral simulation: No simulation data present for" spectral_warn("Spectral simulation: No simulation data present for desired Spectral configuration - unable to proceed with param config.");
" desired Spectral configuration - unable to proceed"
" with param config.\n");
return 0; return 0;
} }
if (!simctx->curr_reportset->curr_report) { if (!simctx->curr_reportset->curr_report) {
qdf_print("Spectral simulation: No report data instances " spectral_warn("Spectral simulation: No report data instances populated for desired Spectral configuration - unable to proceed with param config");
"populated for desired Spectral configuration - "
"unable to proceed with param config\n");
return 0; return 0;
} }
@@ -1035,8 +980,7 @@ target_if_spectral_sops_sim_get_params(
qdf_assert_always(simctx); qdf_assert_always(simctx);
if (!simctx->curr_reportset) { if (!simctx->curr_reportset) {
qdf_print spectral_warn("Spectral simulation: No configured reportset found.");
("Spectral simulation: No configured reportset found.\n");
return 0; return 0;
} }

View File

@@ -126,8 +126,7 @@ struct spectralsim_context {
qdf_mem_malloc(sizeof(struct spectralsim_reportset)); \ qdf_mem_malloc(sizeof(struct spectralsim_reportset)); \
\ \
if ((reportset) == NULL) { \ if ((reportset) == NULL) { \
qdf_print("Spectral simulation: Could not allocate memory " \ spectral_err("Spectral simulation: Could not allocate memory for report set"); \
"for report set\n"); \
target_if_depopulate_simdata((simctx)); \ target_if_depopulate_simdata((simctx)); \
return -EPERM; \ return -EPERM; \
} \ } \

View File

@@ -4004,7 +4004,7 @@ struct smart_ant_enable_tx_feedback_params {
* @pwr_format: Power format * @pwr_format: Power format
* @rpt_mode: Report mdoe * @rpt_mode: Report mdoe
* @bin_scale: BIN scale * @bin_scale: BIN scale
* @dBm_adj: DBM adjust * @dbm_adj: DBM adjust
* @chn_mask: chain mask * @chn_mask: chain mask
*/ */
struct vdev_spectral_configure_params { struct vdev_spectral_configure_params {
@@ -4025,7 +4025,7 @@ struct vdev_spectral_configure_params {
uint16_t pwr_format; uint16_t pwr_format;
uint16_t rpt_mode; uint16_t rpt_mode;
uint16_t bin_scale; uint16_t bin_scale;
uint16_t dBm_adj; uint16_t dbm_adj;
uint16_t chn_mask; uint16_t chn_mask;
}; };

View File

@@ -2673,7 +2673,7 @@ static QDF_STATUS send_vdev_spectral_configure_cmd_non_tlv(wmi_unified_t wmi_han
cmd->spectral_scan_pwr_format = param->pwr_format; cmd->spectral_scan_pwr_format = param->pwr_format;
cmd->spectral_scan_rpt_mode = param->rpt_mode; cmd->spectral_scan_rpt_mode = param->rpt_mode;
cmd->spectral_scan_bin_scale = param->bin_scale; cmd->spectral_scan_bin_scale = param->bin_scale;
cmd->spectral_scan_dBm_adj = param->dBm_adj; cmd->spectral_scan_dBm_adj = param->dbm_adj;
cmd->spectral_scan_chn_mask = param->chn_mask; cmd->spectral_scan_chn_mask = param->chn_mask;
ret = wmi_unified_cmd_send(wmi_handle, ret = wmi_unified_cmd_send(wmi_handle,
@@ -2720,7 +2720,7 @@ static QDF_STATUS send_vdev_spectral_configure_cmd_non_tlv(wmi_unified_t wmi_han
param->pwr_format, param->pwr_format,
param->rpt_mode, param->rpt_mode,
param->bin_scale, param->bin_scale,
param->dBm_adj, param->dbm_adj,
param->chn_mask); param->chn_mask);
qdf_print("%s: Status: %d\n\n", __func__, ret); qdf_print("%s: Status: %d\n\n", __func__, ret);
#endif /* OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS */ #endif /* OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS */

View File

@@ -12753,7 +12753,7 @@ static QDF_STATUS send_vdev_spectral_configure_cmd_tlv(wmi_unified_t wmi_handle,
cmd->spectral_scan_pwr_format = param->pwr_format; cmd->spectral_scan_pwr_format = param->pwr_format;
cmd->spectral_scan_rpt_mode = param->rpt_mode; cmd->spectral_scan_rpt_mode = param->rpt_mode;
cmd->spectral_scan_bin_scale = param->bin_scale; cmd->spectral_scan_bin_scale = param->bin_scale;
cmd->spectral_scan_dBm_adj = param->dBm_adj; cmd->spectral_scan_dBm_adj = param->dbm_adj;
cmd->spectral_scan_chn_mask = param->chn_mask; cmd->spectral_scan_chn_mask = param->chn_mask;
ret = wmi_unified_cmd_send(wmi_handle, buf, len, ret = wmi_unified_cmd_send(wmi_handle, buf, len,
@@ -12803,7 +12803,7 @@ static QDF_STATUS send_vdev_spectral_configure_cmd_tlv(wmi_unified_t wmi_handle,
param->pwr_format, param->pwr_format,
param->rpt_mode, param->rpt_mode,
param->bin_scale, param->bin_scale,
param->dBm_adj, param->dbm_adj,
param->chn_mask); param->chn_mask);
WMI_LOGI("%s: Status: %d\n\n", __func__, ret); WMI_LOGI("%s: Status: %d\n\n", __func__, ret);