summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSen, Devendra <dsen@codeaurora.org>2017-02-15 17:51:56 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-06 04:35:32 -0800
commit7b0f7f9c10e23eeb8d068d0ec73dca006e95089e (patch)
tree19327a2bb5e88b691fd1c9c4ec666421bcda2458
parent31014521e7a9fea9b993a82f690f55b51298ca58 (diff)
qcacld-2.0: Add host diag event for ssr shutdown and ssr reinit
These event use to send SSR shutdown and SSR reinit status Change-Id: I89cd4942145301aaf44e8ae4eb3cc4cbc373407c CRs-Fixed: 1108380
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c49
-rw-r--r--CORE/VOSS/inc/event_defs.h4
-rw-r--r--CORE/VOSS/inc/vos_diag_core_event.h42
3 files changed, 93 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index e6d2bec7fd37..16fe55a389b0 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -1985,6 +1985,30 @@ void hdd_svc_fw_shutdown_ind(struct device *dev)
NULL, 0) : 0;
}
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+* hdd_wlan_ssr_shutdown_event() - Send ssr shutdown status
+*
+* This function sends ssr shutdown status diag event
+*
+* Return: - Void.
+*/
+static void hdd_wlan_ssr_shutdown_event(void)
+{
+ WLAN_VOS_DIAG_EVENT_DEF(ssr_shutdown,
+ struct host_event_wlan_ssr_shutdown);
+ vos_mem_zero(&ssr_shutdown, sizeof(ssr_shutdown));
+ ssr_shutdown.status = SSR_SUB_SYSTEM_SHUTDOWN;
+ WLAN_VOS_DIAG_EVENT_REPORT(&ssr_shutdown,
+ EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM);
+}
+#else
+static inline void hdd_wlan_ssr_shutdown_event(void)
+{
+
+};
+#endif
+
/* the HDD interface to WLAN driver shutdown,
* the primary shutdown function in SSR
*/
@@ -2176,6 +2200,7 @@ VOS_STATUS hdd_wlan_shutdown(void)
wlan_hdd_send_status_pkg(NULL, NULL, 0, 0);
#endif
+ hdd_wlan_ssr_shutdown_event();
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: WLAN driver shutdown complete"
,__func__);
return VOS_STATUS_SUCCESS;
@@ -2210,6 +2235,29 @@ static void hdd_ssr_restart_sap(hdd_context_t *hdd_ctx)
EXIT();
}
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * hdd_wlan_ssr_reinit_event - Send ssr reinit status
+ *
+ * This function sends ssr reinit status diag event
+ *
+ * Return: void.
+ */
+static void hdd_wlan_ssr_reinit_event(void)
+{
+ WLAN_VOS_DIAG_EVENT_DEF(ssr_reinit, struct host_event_wlan_ssr_reinit);
+ vos_mem_zero(&ssr_reinit, sizeof(ssr_reinit));
+ ssr_reinit.status = SSR_SUB_SYSTEM_REINIT;
+ WLAN_VOS_DIAG_EVENT_REPORT(&ssr_reinit,
+ EVENT_WLAN_SSR_REINIT_SUBSYSTEM);
+}
+#else
+static void hdd_wlan_ssr_reinit_event(void)
+{
+
+};
+#endif
+
/* the HDD interface to WLAN driver re-init.
* This is called to initialize/start WLAN driver after a shutdown.
*/
@@ -2508,6 +2556,7 @@ err_re_init:
hdd_wlan_wakelock_destroy();
return -EPERM;
success:
+ hdd_wlan_ssr_reinit_event();
if (pHddCtx->cfg_ini->sap_internal_restart)
hdd_ssr_restart_sap(pHddCtx);
pHddCtx->isLogpInProgress = FALSE;
diff --git a/CORE/VOSS/inc/event_defs.h b/CORE/VOSS/inc/event_defs.h
index a140ff587305..609b500f10cd 100644
--- a/CORE/VOSS/inc/event_defs.h
+++ b/CORE/VOSS/inc/event_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2015-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012, 2015-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1914,6 +1914,8 @@ typedef enum
EVENT_WLAN_TDLS_TX_RX_MGMT = 0xABA,
EVENT_WLAN_LOW_RESOURCE_FAILURE = 0xABB,
EVENT_WLAN_POWERSAVE_WOW_STATS = 0xB33,
+ EVENT_WLAN_SSR_REINIT_SUBSYSTEM = 0xB3C,
+ EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM = 0xB3D,
EVENT_NEXT_UNUSED_EVENT,
diff --git a/CORE/VOSS/inc/vos_diag_core_event.h b/CORE/VOSS/inc/vos_diag_core_event.h
index 7525abb95334..c62f9252b6d0 100644
--- a/CORE/VOSS/inc/vos_diag_core_event.h
+++ b/CORE/VOSS/inc/vos_diag_core_event.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -433,6 +433,46 @@ struct vos_event_tdls_tx_rx_mgmt {
};
/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_SSR_REINIT_SUBSYSTEM
+ ------------------------------------------------------------------------*/
+/**
+ * struct host_event_wlan_css - Holds diag event details
+ * @status: Indicates the status of event
+ *
+ * This structure holds the host diag event related information
+ */
+struct host_event_wlan_ssr_reinit {
+ uint32_t status;
+};
+
+/*-------------------------------------------------------------------------
+ Event ID: EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM
+ ------------------------------------------------------------------------*/
+/**
+ * struct host_event_wlan_ssr_shutdown - Holds diag event details
+ * @status: Indicates the status of event
+ *
+ * This structure holds the host diag event related information
+ */
+struct host_event_wlan_ssr_shutdown {
+ uint32_t status;
+};
+
+/*-------------------------------------------------------------------------
+ Function declarations and documenation
+ ------------------------------------------------------------------------*/
+/**
+ * enum_host_ssr_events - Enum containing ssr subtype
+ * @SSR_SUB_SYSTEM_REINIT: Indicate ssr reinit state
+ * @SSR_SUB_SYSTEM_SHUTDOWN: Indicate ssr shutdown status
+ *
+ */
+enum host_ssr_events {
+ SSR_SUB_SYSTEM_SHUTDOWN,
+ SSR_SUB_SYSTEM_REINIT,
+};
+
+/*-------------------------------------------------------------------------
Function declarations and documenation
------------------------------------------------------------------------*/