qcacld-3.0: Reduce the log spam in wlan_hdd_scan.c

Move the logs to appropriate log levels to reduce
the log spam in wlan_hdd_scan.c

Change-Id: I0210c57968d26819de5e15bbe00193cd3e65703a
CRs-Fixed: 2014745
This commit is contained in:
Srinivas Girigowda
2017-03-06 18:51:21 -08:00
committed by Sandeep Puligilla
parent af2bfa43dc
commit df41e12969

View File

@@ -222,7 +222,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo,
char custom[MAX_CUSTOM_LEN];
char *p;
hdd_notice(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(descriptor->bssId));
hdd_debug(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(descriptor->bssId));
error = 0;
last_event = current_event;
@@ -263,7 +263,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo,
modestr = "n";
break;
default:
hdd_warn("Unknown network type [%d]", descriptor->nwType);
hdd_warn("Unknown network type: %d", descriptor->nwType);
modestr = "?";
break;
}
@@ -415,7 +415,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo,
if ((maxNumRates - numBasicRates) > MAX_RATES) {
no_of_rates = MAX_RATES;
hdd_warn("Accessing array out of bound that array is pDot11ExtSuppRates->rates ");
hdd_debug("Limit rates to MAX_RATES");
} else {
no_of_rates = maxNumRates - numBasicRates;
}
@@ -538,7 +538,7 @@ static bool wlan_hdd_is_scan_pending(hdd_adapter_t *adapter)
/* Any scan pending on the adapter */
if (adapter == hdd_scan_req->adapter) {
qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
hdd_info("pending scan id %d", hdd_scan_req->scan_id);
hdd_debug("pending scan id %d", hdd_scan_req->scan_id);
return true;
}
} while (QDF_STATUS_SUCCESS ==
@@ -569,7 +569,7 @@ static int wlan_hdd_scan_request_enqueue(hdd_adapter_t *adapter,
ENTER();
hdd_scan_req = qdf_mem_malloc(sizeof(*hdd_scan_req));
if (NULL == hdd_scan_req) {
hdd_alert("malloc failed for Scan req");
hdd_err("malloc failed for Scan req");
return -ENOMEM;
}
@@ -611,7 +611,7 @@ static QDF_STATUS wlan_hdd_scan_request_dequeue(hdd_context_t *hdd_ctx,
struct hdd_scan_req *hdd_scan_req;
qdf_list_node_t *pNode = NULL, *ppNode = NULL;
hdd_info("Dequeue Scan id: %d", scan_id);
hdd_debug("Dequeue Scan id: %d", scan_id);
if ((source == NULL) || (timestamp == NULL) || (req == NULL))
return QDF_STATUS_E_NULL_VALUE;
@@ -642,7 +642,7 @@ static QDF_STATUS wlan_hdd_scan_request_dequeue(hdd_context_t *hdd_ctx,
*timestamp = hdd_scan_req->timestamp;
qdf_mem_free(hdd_scan_req);
qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
hdd_info("removed Scan id: %d, req = %p, pending scans %d",
hdd_debug("removed Scan id: %d, req = %p, pending scans %d",
scan_id, req,
qdf_list_size(&hdd_ctx->hdd_scan_req_q));
return QDF_STATUS_SUCCESS;
@@ -691,7 +691,7 @@ hdd_scan_request_callback(tHalHandle halHandle, void *pContext,
uint32_t timestamp;
ENTER();
hdd_warn("called with halHandle = %p, pContext = %p, scanID = %d, returned status = %d",
hdd_debug("called with halHandle = %p, pContext = %p, scanID = %d, returned status = %d",
halHandle, pContext, (int)scanId, (int)status);
/* if there is a scan request pending when the wlan driver is unloaded
@@ -700,7 +700,7 @@ hdd_scan_request_callback(tHalHandle halHandle, void *pContext,
* do some quick sanity before proceeding
*/
if (pAdapter->dev != dev) {
hdd_warn("device mismatch %p vs %p", pAdapter->dev, dev);
hdd_debug("device mismatch %p vs %p", pAdapter->dev, dev);
return QDF_STATUS_SUCCESS;
}
@@ -874,7 +874,7 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info,
pAdapter->sessionId, &scanRequest,
&hdd_scan_request_callback, dev);
if (!QDF_IS_STATUS_SUCCESS(status)) {
hdd_alert("sme_scan_request fail %d!!!", status);
hdd_err("sme_scan_request fail %d!!!", status);
goto error;
}
@@ -947,11 +947,11 @@ static int __iw_get_scan(struct net_device *dev,
if (0 != ret)
return ret;
hdd_notice("enter buffer length %d!!!",
hdd_debug("enter buffer length %d!!!",
(wrqu->data.length) ? wrqu->data.length : IW_SCAN_MAX_DATA);
if (true == pAdapter->scan_info.mScanPending) {
hdd_alert("mScanPending is true !!!");
hdd_err("mScanPending is true !!!");
return -EAGAIN;
}
@@ -969,7 +969,7 @@ static int __iw_get_scan(struct net_device *dev,
if (NULL == pResult) {
/* no scan results */
hdd_notice("iw_get_scan: NULL Scan Result ");
hdd_debug("iw_get_scan: NULL Scan Result ");
return 0;
}
@@ -986,7 +986,7 @@ static int __iw_get_scan(struct net_device *dev,
sme_scan_result_purge(pResult);
hdd_notice("exit total %d BSS reported !!!", i);
hdd_debug("exit total %d BSS reported !!!", i);
EXIT();
return status;
}
@@ -1213,7 +1213,7 @@ static QDF_STATUS hdd_cfg80211_scan_done_callback(tHalHandle halHandle,
if (0 != ret)
return QDF_STATUS_E_INVAL;
hdd_notice("called with hal = %p, pContext = %p, ID = %d, status = %d",
hdd_debug("called with hal = %p, pContext = %p, ID = %d, status = %d",
halHandle, pContext, (int)scanId, (int)status);
pScanInfo->mScanPendingCounter = 0;
@@ -1239,7 +1239,7 @@ static QDF_STATUS hdd_cfg80211_scan_done_callback(tHalHandle halHandle,
}
if (!aborted && !hddctx->beacon_probe_rsp_cnt_per_scan) {
hdd_notice("NO SCAN result");
hdd_debug("NO SCAN result");
if (hddctx->config->bug_report_for_no_scan_results) {
current_timestamp = jiffies_to_msecs(jiffies);
time_elapsed = current_timestamp -
@@ -1331,7 +1331,7 @@ static bool wlan_hdd_sap_skip_scan_check(hdd_context_t *hdd_ctx,
int i, j;
bool skip;
hdd_info("HDD_ACS_SKIP_STATUS = %d",
hdd_debug("HDD_ACS_SKIP_STATUS = %d",
hdd_ctx->skip_acs_scan_status);
if (hdd_ctx->skip_acs_scan_status != eSAP_SKIP_ACS_SCAN)
return false;
@@ -1354,7 +1354,7 @@ static bool wlan_hdd_sap_skip_scan_check(hdd_context_t *hdd_ctx,
}
if (!find) {
skip = false;
hdd_info("Chan %d isn't in ACS chan list",
hdd_debug("Chan %d isn't in ACS chan list",
request->channels[i]->hw_value);
break;
}
@@ -1533,7 +1533,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
if (!sme_is_session_id_valid(pHddCtx->hHal, pAdapter->sessionId))
return -EINVAL;
hdd_notice("Device_mode %s(%d)",
hdd_debug("Device_mode %s(%d)",
hdd_device_mode_to_string(pAdapter->device_mode),
pAdapter->device_mode);
@@ -1572,7 +1572,6 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
return 0;
}
}
#ifdef FEATURE_WLAN_TDLS
/* if tdls disagree scan right now, return immediately.
* tdls will schedule the scan when scan is allowed.
@@ -1587,7 +1586,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
hdd_err("TDLS in progress.scan rejected %d",
status);
else
hdd_err("TDLS teardown is ongoing %d",
hdd_warn("TDLS teardown is ongoing %d",
status);
hdd_wlan_block_scan_by_tdls_event();
return status;
@@ -1606,7 +1605,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
pHddCtx->last_scan_reject_timestamp =
jiffies_to_msecs(jiffies);
} else {
hdd_err("curr_session id %d curr_reason %d time delta %lu",
hdd_debug("curr_session id %d curr_reason %d time delta %lu",
curr_session_id, curr_reason,
(jiffies_to_msecs(jiffies) -
pHddCtx->last_scan_reject_timestamp));
@@ -1634,7 +1633,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
/* Check whether SAP scan can be skipped or not */
if (pAdapter->device_mode == QDF_SAP_MODE &&
wlan_hdd_sap_skip_scan_check(pHddCtx, request)) {
hdd_err("sap scan skipped");
hdd_debug("sap scan skipped");
pAdapter->request = request;
INIT_WORK(&pAdapter->scan_block_work,
wlan_hdd_cfg80211_scan_block_cb);
@@ -1703,7 +1702,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
&request->ssids[j].ssid[0],
SsidInfo->SSID.length);
SsidInfo->SSID.ssId[SsidInfo->SSID.length] = '\0';
hdd_notice("SSID number %d: %s", j,
hdd_debug("SSID number %d: %s", j,
SsidInfo->SSID.ssId);
}
/* set the scan type to active */
@@ -1757,8 +1756,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
len += snprintf(chList + len, 5, "%d ", channelList[i]);
num_chan++;
}
hdd_notice("Channel-List: %s", chList);
hdd_notice("No. of Scan Channels: %d", num_chan);
hdd_debug("Channel-List: %s", chList);
hdd_debug("No. of Scan Channels: %d", num_chan);
}
if (!num_chan) {
hdd_err("Received zero non-dsrc channels");
@@ -1809,8 +1808,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
&& (QDF_P2P_CLIENT_MODE == pAdapter->device_mode)) {
global_p2p_connection_status =
P2P_CLIENT_CONNECTING_STATE_1;
hdd_err("[P2P State] Changing state from Go nego completed to Connection is started");
hdd_err("[P2P]P2P Scanning is started for 8way Handshake");
hdd_debug("[P2P State] Changing state from Go nego completed to Connection is started");
hdd_debug("[P2P]P2P Scanning is started for 8way Handshake");
} else
if ((global_p2p_connection_status ==
P2P_CLIENT_DISCONNECTED_STATE)
@@ -1818,14 +1817,14 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
pAdapter->device_mode)) {
global_p2p_connection_status =
P2P_CLIENT_CONNECTING_STATE_2;
hdd_err("[P2P State] Changing state from Disconnected state to Connection is started");
hdd_err("[P2P]P2P Scanning is started for 4way Handshake");
hdd_debug("[P2P State] Changing state from Disconnected state to Connection is started");
hdd_debug("[P2P]P2P Scanning is started for 4way Handshake");
}
#endif
/* no_cck will be set during p2p find to disable 11b rates */
if (request->no_cck) {
hdd_notice("This is a P2P Search");
hdd_debug("This is a P2P Search");
scan_req.p2pSearch = 1;
if (request->n_channels ==
@@ -1869,7 +1868,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
hdd_prevent_suspend_timeout(HDD_WAKE_LOCK_SCAN_DURATION,
WIFI_POWER_EVENT_WAKELOCK_SCAN);
hdd_info("requestType %d, scanType %d, minChnTime %d, maxChnTime %d,p2pSearch %d, skipDfsChnlIn P2pSearch %d",
hdd_debug("requestType %d, scanType %d, minChnTime %d, maxChnTime %d,p2pSearch %d, skipDfsChnlIn P2pSearch %d",
scan_req.requestType, scan_req.scanType,
scan_req.minChnTime, scan_req.maxChnTime,
scan_req.p2pSearch, scan_req.skipDfsChnlInP2pSearch);
@@ -2519,7 +2518,7 @@ hdd_sched_scan_callback(void *callbackContext,
if (true == pHddCtx->isWiphySuspended) {
pHddCtx->isSchedScanUpdatePending = true;
qdf_spin_unlock(&pHddCtx->sched_scan_lock);
hdd_notice("Update cfg80211 scan database after it resume");
hdd_debug("Update cfg80211 scan database after it resume");
return;
}
qdf_spin_unlock(&pHddCtx->sched_scan_lock);
@@ -2527,10 +2526,10 @@ hdd_sched_scan_callback(void *callbackContext,
ret = wlan_hdd_cfg80211_update_bss(pHddCtx->wiphy, pAdapter, 0);
if (0 > ret)
hdd_notice("NO SCAN result");
hdd_debug("NO SCAN result");
cfg80211_sched_scan_results(pHddCtx->wiphy);
hdd_notice("cfg80211 scan result database updated");
hdd_debug("cfg80211 scan result database updated");
}
/**
@@ -2545,7 +2544,7 @@ hdd_sched_scan_callback(void *callbackContext,
*/
static QDF_STATUS wlan_hdd_is_pno_allowed(hdd_adapter_t *adapter)
{
hdd_notice("dev_mode=%d, conn_state=%d, session ID=%d",
hdd_debug("dev_mode=%d, conn_state=%d, session ID=%d",
adapter->device_mode,
adapter->sessionCtx.station.conn_info.connState,
adapter->sessionId);
@@ -2586,7 +2585,7 @@ static void hdd_config_sched_scan_plan(tpSirPNOScanReq pno_req,
request->scan_plans[0].iterations;
pno_req->slow_scan_period =
request->scan_plans[1].interval * MSEC_PER_SEC;
hdd_notice("Base scan interval: %d sec, scan cycles: %d, slow scan interval %d",
hdd_debug("Base scan interval: %d sec, scan cycles: %d, slow scan interval %d",
request->scan_plans[0].interval,
request->scan_plans[0].iterations,
request->scan_plans[1].interval);
@@ -2617,7 +2616,7 @@ static void hdd_config_sched_scan_plan(tpSirPNOScanReq pno_req,
pno_req->slow_scan_period =
hdd_ctx->config->pno_slow_scan_multiplier *
pno_req->fast_scan_period;
hdd_notice("Base scan interval: %d sec PNOScanTimerRepeatValue: %d",
hdd_debug("Base scan interval: %d sec PNOScanTimerRepeatValue: %d",
(request->interval / 1000),
hdd_ctx->config->configPNOScanTimerRepeatValue);
}
@@ -2755,7 +2754,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
&& (CHANNEL_STATE_DFS ==
cds_get_channel_state(
channels_allowed[indx]))) {
hdd_notice("Dropping DFS channel : %d",
hdd_debug("Dropping DFS channel : %d",
channels_allowed[indx]);
num_ignore_dfs_ch++;
break;
@@ -2774,13 +2773,13 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
}
}
}
hdd_notice("Channel-List: %s ", chList);
hdd_debug("Channel-List: %s ", chList);
/* If all channels are DFS and dropped,
* then ignore the PNO request
*/
if (!num_ch) {
hdd_notice("Channel list empty due to filtering of DSRC,DFS channels");
hdd_debug("Channel list empty due to filtering of DSRC,DFS channels");
ret = -EINVAL;
goto error;
}
@@ -2829,7 +2828,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
j++;
}
}
hdd_notice("Number of hidden networks being Configured = %d",
hdd_debug("Number of hidden networks being Configured = %d",
request->n_ssids);
/*
@@ -2851,13 +2850,13 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
*/
hdd_config_sched_scan_plan(pPnoRequest, request, pHddCtx);
hdd_info("Base scan interval: %d sec PNOScanTimerRepeatValue: %d",
hdd_debug("Base scan interval: %d sec PNOScanTimerRepeatValue: %d",
(pPnoRequest->fast_scan_period / 1000),
config->configPNOScanTimerRepeatValue);
pPnoRequest->modePNO = SIR_PNO_MODE_IMMEDIATE;
hdd_info("SessionId %d, enable %d, modePNO %d",
hdd_debug("SessionId %d, enable %d, modePNO %d",
pAdapter->sessionId, pPnoRequest->enable, pPnoRequest->modePNO);
status = sme_set_preferred_network_list(WLAN_HDD_GET_HAL_CTX(pAdapter),
@@ -2871,7 +2870,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
goto error;
}
hdd_notice("PNO scanRequest offloaded");
hdd_debug("PNO scanRequest offloaded");
error:
qdf_mem_free(pPnoRequest);
@@ -2966,7 +2965,7 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev)
goto exit;
}
hdd_notice("PNO scan disabled");
hdd_debug("PNO scan disabled");
exit:
EXIT();
@@ -3000,13 +2999,13 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct net_device *dev)
* to the first one leading to a crash.
*/
if (cds_is_driver_recovering()) {
hdd_err("Recovery in Progress. State: 0x%x Ignore!!!",
hdd_info("Recovery in Progress. State: 0x%x Ignore!!!",
cds_get_driver_state());
return 0;
}
if (cds_is_load_or_unload_in_progress()) {
hdd_err("Unload/Load in Progress, state: 0x%x. Ignore!!!",
hdd_info("Unload/Load in Progress, state: 0x%x. Ignore!!!",
cds_get_driver_state());
return 0;
}
@@ -3133,7 +3132,7 @@ void hdd_cleanup_scan_queue(hdd_context_t *hdd_ctx)
hdd_cfg80211_scan_done(adapter, req, aborted);
else
hdd_vendor_scan_callback(adapter, req, aborted);
hdd_info("removed Scan id: %d, req = %p",
hdd_debug("removed Scan id: %d, req = %p",
hdd_scan_req->scan_id, req);
}
qdf_mem_free(hdd_scan_req);