summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeshwanth Sriram Guntuka <ysriramg@codeaurora.org>2017-11-23 17:38:17 +0530
committersnandini <snandini@codeaurora.org>2017-11-28 22:29:59 -0800
commit094308723958faeb7eefa98435b36d82e22d3357 (patch)
tree12a9b055642ec475d9198bbfa7d32b2823608305
parent4c16ec13df7cbb19dd3f9abed165cdd14653f36f (diff)
qcacld-3.0: Print sme commands on sme close session timeout
Print active and pending sme commands on sme close session timeout. Change-Id: I05a7295f9f07ab854d90474b9c9764388f1af054 CRs-Fixed: 2150094
-rw-r--r--core/hdd/src/wlan_hdd_main.c1
-rw-r--r--core/sme/inc/sme_api.h7
-rw-r--r--core/sme/src/common/sme_api.c47
3 files changed, 55 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 3821e97eec62..48e98cd1ac05 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -4145,6 +4145,7 @@ static void hdd_wait_for_sme_close_sesion(hdd_context_t *hdd_ctx,
hdd_err("failure waiting for session_close QDF event");
if (adapter->device_mode == QDF_NDI_MODE)
hdd_ndp_session_end_handler(adapter);
+ sme_print_commands(hdd_ctx->hHal);
clear_bit(SME_SESSION_OPENED, &adapter->event_flags);
return;
}
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index 8fcc1f48e8b1..f88f0af09246 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -269,6 +269,13 @@ QDF_STATUS sme_close_session(tHalHandle hHal, uint8_t sessionId,
bool flush_all_sme_cmds,
csr_roamSessionCloseCallback callback,
void *pContext);
+/**
+ * sme_print_commands(): Print active, pending sme and scan commands
+ * @hal_handle: The handle returned by mac_open
+ *
+ * Return: None
+ */
+void sme_print_commands(tHalHandle hal_handle);
QDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id,
struct roam_ext_params *roam_params_src, int update_param);
#ifdef FEATURE_WLAN_SCAN_PNO
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 589f59d98d40..eadc887c738b 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -6132,6 +6132,53 @@ QDF_STATUS sme_close_session(tHalHandle hHal, uint8_t sessionId,
return status;
}
+void sme_print_commands(tHalHandle hal_handle)
+{
+ QDF_STATUS status;
+ tpAniSirGlobal pMac = PMAC_STRUCT(hal_handle);
+ tListElem *entry;
+ tSmeCmd *command;
+
+ status = sme_acquire_global_lock(&pMac->sme);
+ if (QDF_IS_STATUS_SUCCESS(status)) {
+ sme_err("Active sme commands:");
+ csr_ll_lock(&pMac->sme.smeCmdActiveList);
+ if (!csr_ll_is_list_empty(&pMac->sme.smeCmdActiveList,
+ LL_ACCESS_NOLOCK)) {
+ entry = csr_ll_peek_head(&pMac->sme.smeCmdActiveList,
+ false);
+ while (entry) {
+ command = GET_BASE_ADDR(entry, tSmeCmd, Link);
+ dump_csr_command_info(pMac, command);
+ entry = csr_ll_next(&pMac->sme.smeCmdActiveList,
+ entry, LL_ACCESS_NOLOCK);
+ }
+ }
+ csr_ll_unlock(&pMac->sme.smeCmdActiveList);
+ sme_err("Pending sme commands:");
+ csr_ll_lock(&pMac->sme.smeCmdPendingList);
+ if (!csr_ll_is_list_empty(&pMac->sme.smeCmdPendingList,
+ LL_ACCESS_NOLOCK)) {
+ entry = csr_ll_peek_head(&pMac->sme.smeCmdPendingList,
+ false);
+ while (entry) {
+ command = GET_BASE_ADDR(entry, tSmeCmd, Link);
+ dump_csr_command_info(pMac, command);
+ entry = csr_ll_next(&pMac->sme.
+ smeCmdPendingList,
+ entry, LL_ACCESS_NOLOCK);
+ }
+ }
+ csr_ll_unlock(&pMac->sme.smeCmdPendingList);
+ sme_err("active scan commands:%d pending scan commands:%d",
+ csr_ll_count(&pMac->sme.smeScanCmdActiveList),
+ csr_ll_count(&pMac->sme.smeScanCmdPendingList));
+
+ sme_release_global_lock(&pMac->sme);
+ }
+
+}
+
/**
* sme_roam_update_apwpsie() - To update AP's WPS IE. This function should be
* called after SME AP session is created