diff --git a/umac/scan/core/src/wlan_scan_manager.c b/umac/scan/core/src/wlan_scan_manager.c index ed2aa55738..4f14bdb99d 100644 --- a/umac/scan/core/src/wlan_scan_manager.c +++ b/umac/scan/core/src/wlan_scan_manager.c @@ -1285,8 +1285,9 @@ static inline void scm_print_scan_req_info(struct scan_req_params *req) uint32_t buff_len; char *chan_buff; uint32_t len = 0; - uint8_t idx; + uint8_t idx, count = 0; 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", 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 * 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); if (!chan_buff) return; - - for (idx = 0; idx < chan_lst->num_chan; idx++) + scm_nofl_debug("Total freq %d", chan_lst->num_chan); + for (idx = 0; idx < chan_lst->num_chan; idx++) { len += qdf_scnprintf(chan_buff + len, buff_len - len, "%d ", chan_lst->chan[idx].freq); - - scm_nofl_debug("Freq list[%d]: %s", chan_lst->num_chan, chan_buff); + count++; + 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); } diff --git a/wmi/src/wmi_unified_roam_tlv.c b/wmi/src/wmi_unified_roam_tlv.c index b57a3c9858..7c1291b612 100644 --- a/wmi/src/wmi_unified_roam_tlv.c +++ b/wmi/src/wmi_unified_roam_tlv.c @@ -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, (chan_list_fp->num_chan * sizeof(uint32_t))); 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) && - (i < WMI_ROAM_MAX_CHANNELS)); i++) { + (i < WMI_ROAM_MAX_CHANNELS)); 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); 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; } - WMI_LOGD("%s: WMI --> WMI_ROAM_SCAN_CHAN_LIST", __func__); return QDF_STATUS_SUCCESS; error: wmi_buf_free(buf); diff --git a/wmi/src/wmi_unified_sta_tlv.c b/wmi/src/wmi_unified_sta_tlv.c index eacfedf523..a5b570d4d4 100644 --- a/wmi/src/wmi_unified_sta_tlv.c +++ b/wmi/src/wmi_unified_sta_tlv.c @@ -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 * 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_HOST_PDEV_ID_SOC); 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); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32, (chan_len * sizeof(uint32_t))); 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]; - 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); if (wmi_unified_cmd_send(wmi_handle, buf, len, WMI_PDEV_SET_PCL_CMDID)) { diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 88b402b861..7868b04f21 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -3171,26 +3171,26 @@ static void wmi_scan_chanlist_dump(struct scan_chan_list_params *scan_chan_list) { uint32_t i; uint8_t info[WMI_MAX_CHAN_INFO_LOG]; - int len = 0; + uint32_t len = 0; struct channel_param *chan; 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++) { chan = &scan_chan_list->ch_param[i]; - ret = scnprintf(info + len, sizeof(info) - len, "%d %d ", - chan->mhz, chan->maxregpower); + ret = qdf_scnprintf(info + len, sizeof(info) - len, + " %d[%d][%d]", chan->mhz, chan->maxregpower, + chan->dfs_set); if (ret <= 0) break; len += ret; if (len >= (sizeof(info) - 20)) { - WMI_LOGD(FL("%s"), info); + wmi_nofl_debug("Chan[TXPwr][DFS]:%s", info); len = 0; } } - if (len > 0) - WMI_LOGD(FL("%s"), info); - WMI_LOGD(FL("end total_count %d"), scan_chan_list->nallchans); + if (len) + wmi_nofl_debug("Chan[TXPwr][DFS]:%s", info); } static QDF_STATUS send_scan_chan_list_cmd_tlv(wmi_unified_t wmi_handle,