qcacmn: Reduce logging while printing channel list
As part of logging optimization, reduce logging while printing channel lists. Change-Id: I0241dc4dbaa3879bbe354a0e4750a0d559d1ba40 CRs-Fixed: 2624517
This commit is contained in:

committed by
nshrivas

parent
a3a9160cf8
commit
07810f61ce
@@ -1285,8 +1285,9 @@ static inline void scm_print_scan_req_info(struct scan_req_params *req)
|
|||||||
uint32_t buff_len;
|
uint32_t buff_len;
|
||||||
char *chan_buff;
|
char *chan_buff;
|
||||||
uint32_t len = 0;
|
uint32_t len = 0;
|
||||||
uint8_t idx;
|
uint8_t idx, count = 0;
|
||||||
struct chan_list *chan_lst;
|
struct chan_list *chan_lst;
|
||||||
|
#define MAX_SCAN_FREQ_TO_PRINT 60
|
||||||
|
|
||||||
scm_nofl_debug("Scan start: scan id %d vdev %d Dwell time: act %d pass %d act_2G %d act_6G %d pass_6G %d, probe time %d n_probes %d flags %x ext_flag %x events %x policy %d wide_bw %d pri %d",
|
scm_nofl_debug("Scan start: scan id %d vdev %d Dwell time: act %d pass %d act_2G %d act_6G %d pass_6G %d, probe time %d n_probes %d flags %x ext_flag %x events %x policy %d wide_bw %d pri %d",
|
||||||
req->scan_id, req->vdev_id, req->dwell_time_active,
|
req->scan_id, req->vdev_id, req->dwell_time_active,
|
||||||
@@ -1309,16 +1310,25 @@ static inline void scm_print_scan_req_info(struct scan_req_params *req)
|
|||||||
* Buffer of (num channl * 5) + 1 to consider the 4 char freq and
|
* Buffer of (num channl * 5) + 1 to consider the 4 char freq and
|
||||||
* 1 space after it for each channel and 1 to end the string with NULL.
|
* 1 space after it for each channel and 1 to end the string with NULL.
|
||||||
*/
|
*/
|
||||||
buff_len = (chan_lst->num_chan * 5) + 1;
|
buff_len =
|
||||||
|
(QDF_MIN(MAX_SCAN_FREQ_TO_PRINT, chan_lst->num_chan) * 5) + 1;
|
||||||
chan_buff = qdf_mem_malloc(buff_len);
|
chan_buff = qdf_mem_malloc(buff_len);
|
||||||
if (!chan_buff)
|
if (!chan_buff)
|
||||||
return;
|
return;
|
||||||
|
scm_nofl_debug("Total freq %d", chan_lst->num_chan);
|
||||||
for (idx = 0; idx < chan_lst->num_chan; idx++)
|
for (idx = 0; idx < chan_lst->num_chan; idx++) {
|
||||||
len += qdf_scnprintf(chan_buff + len, buff_len - len, "%d ",
|
len += qdf_scnprintf(chan_buff + len, buff_len - len, "%d ",
|
||||||
chan_lst->chan[idx].freq);
|
chan_lst->chan[idx].freq);
|
||||||
|
count++;
|
||||||
scm_nofl_debug("Freq list[%d]: %s", chan_lst->num_chan, chan_buff);
|
if (count >= MAX_SCAN_FREQ_TO_PRINT) {
|
||||||
|
/* Print the MAX_SCAN_FREQ_TO_PRINT channels */
|
||||||
|
scm_nofl_debug("Freq list: %s", chan_buff);
|
||||||
|
len = 0;
|
||||||
|
count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (len)
|
||||||
|
scm_nofl_debug("Freq list: %s", chan_buff);
|
||||||
|
|
||||||
qdf_mem_free(chan_buff);
|
qdf_mem_free(chan_buff);
|
||||||
}
|
}
|
||||||
|
@@ -1915,12 +1915,9 @@ static QDF_STATUS send_roam_scan_offload_chan_list_cmd_tlv(wmi_unified_t wmi_han
|
|||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
|
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
|
||||||
(chan_list_fp->num_chan * sizeof(uint32_t)));
|
(chan_list_fp->num_chan * sizeof(uint32_t)));
|
||||||
roam_chan_list_array = (uint32_t *) (buf_ptr + WMI_TLV_HDR_SIZE);
|
roam_chan_list_array = (uint32_t *) (buf_ptr + WMI_TLV_HDR_SIZE);
|
||||||
WMI_LOGD("%s: %d channels = ", __func__, chan_list_fp->num_chan);
|
|
||||||
for (i = 0; ((i < chan_list_fp->num_chan) &&
|
for (i = 0; ((i < chan_list_fp->num_chan) &&
|
||||||
(i < WMI_ROAM_MAX_CHANNELS)); i++) {
|
(i < WMI_ROAM_MAX_CHANNELS)); i++)
|
||||||
roam_chan_list_array[i] = chan_list[i];
|
roam_chan_list_array[i] = chan_list[i];
|
||||||
WMI_LOGD("%d,", roam_chan_list_array[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
wmi_mtrace(WMI_ROAM_CHAN_LIST, NO_SESSION, 0);
|
wmi_mtrace(WMI_ROAM_CHAN_LIST, NO_SESSION, 0);
|
||||||
status = wmi_unified_cmd_send(wmi_handle, buf,
|
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||||
@@ -1931,7 +1928,6 @@ static QDF_STATUS send_roam_scan_offload_chan_list_cmd_tlv(wmi_unified_t wmi_han
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
WMI_LOGD("%s: WMI --> WMI_ROAM_SCAN_CHAN_LIST", __func__);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
error:
|
error:
|
||||||
wmi_buf_free(buf);
|
wmi_buf_free(buf);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -1956,17 +1956,12 @@ static QDF_STATUS send_pdev_set_pcl_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
wmi_handle,
|
wmi_handle,
|
||||||
WMI_HOST_PDEV_ID_SOC);
|
WMI_HOST_PDEV_ID_SOC);
|
||||||
cmd->num_chan = chan_len;
|
cmd->num_chan = chan_len;
|
||||||
WMI_LOGD("%s: Total chan (PCL) len:%d", __func__, cmd->num_chan);
|
|
||||||
|
|
||||||
buf_ptr += sizeof(wmi_pdev_set_pcl_cmd_fixed_param);
|
buf_ptr += sizeof(wmi_pdev_set_pcl_cmd_fixed_param);
|
||||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
|
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
|
||||||
(chan_len * sizeof(uint32_t)));
|
(chan_len * sizeof(uint32_t)));
|
||||||
cmd_args = (uint32_t *) (buf_ptr + WMI_TLV_HDR_SIZE);
|
cmd_args = (uint32_t *) (buf_ptr + WMI_TLV_HDR_SIZE);
|
||||||
for (i = 0; i < chan_len ; i++) {
|
for (i = 0; i < chan_len ; i++)
|
||||||
cmd_args[i] = msg->weighed_valid_list[i];
|
cmd_args[i] = msg->weighed_valid_list[i];
|
||||||
WMI_LOGD("%s: freq:%d weight:%d", __func__,
|
|
||||||
msg->saved_chan_list[i], cmd_args[i]);
|
|
||||||
}
|
|
||||||
wmi_mtrace(WMI_PDEV_SET_PCL_CMDID, NO_SESSION, 0);
|
wmi_mtrace(WMI_PDEV_SET_PCL_CMDID, NO_SESSION, 0);
|
||||||
if (wmi_unified_cmd_send(wmi_handle, buf, len,
|
if (wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||||
WMI_PDEV_SET_PCL_CMDID)) {
|
WMI_PDEV_SET_PCL_CMDID)) {
|
||||||
|
@@ -3171,26 +3171,26 @@ static void wmi_scan_chanlist_dump(struct scan_chan_list_params *scan_chan_list)
|
|||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
uint8_t info[WMI_MAX_CHAN_INFO_LOG];
|
uint8_t info[WMI_MAX_CHAN_INFO_LOG];
|
||||||
int len = 0;
|
uint32_t len = 0;
|
||||||
struct channel_param *chan;
|
struct channel_param *chan;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
WMI_LOGD(FL("start (freq MHz, tx power dBm):"));
|
wmi_debug("Total chan %d", scan_chan_list->nallchans);
|
||||||
for (i = 0; i < scan_chan_list->nallchans; i++) {
|
for (i = 0; i < scan_chan_list->nallchans; i++) {
|
||||||
chan = &scan_chan_list->ch_param[i];
|
chan = &scan_chan_list->ch_param[i];
|
||||||
ret = scnprintf(info + len, sizeof(info) - len, "%d %d ",
|
ret = qdf_scnprintf(info + len, sizeof(info) - len,
|
||||||
chan->mhz, chan->maxregpower);
|
" %d[%d][%d]", chan->mhz, chan->maxregpower,
|
||||||
|
chan->dfs_set);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
break;
|
break;
|
||||||
len += ret;
|
len += ret;
|
||||||
if (len >= (sizeof(info) - 20)) {
|
if (len >= (sizeof(info) - 20)) {
|
||||||
WMI_LOGD(FL("%s"), info);
|
wmi_nofl_debug("Chan[TXPwr][DFS]:%s", info);
|
||||||
len = 0;
|
len = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (len > 0)
|
if (len)
|
||||||
WMI_LOGD(FL("%s"), info);
|
wmi_nofl_debug("Chan[TXPwr][DFS]:%s", info);
|
||||||
WMI_LOGD(FL("end total_count %d"), scan_chan_list->nallchans);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDF_STATUS send_scan_chan_list_cmd_tlv(wmi_unified_t wmi_handle,
|
static QDF_STATUS send_scan_chan_list_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
|
Reference in New Issue
Block a user