summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c6
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c12
-rw-r--r--CORE/SAP/inc/sapApi.h2
-rw-r--r--CORE/SAP/src/sapModule.c25
4 files changed, 42 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 1e720d4a2b05..14c5f3648b45 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -2316,6 +2316,9 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
/* Pass FW version to HIF layer */
hif_set_fw_info(hif_sc, pHddCtx->target_fw_version);
+ wlan_hdd_send_svc_nlink_msg(pHddCtx->radio_index,
+ WLAN_SVC_FW_CRASHED_IND, NULL, 0);
+
/* Restart all adapters */
hdd_start_all_adapters(pHddCtx);
@@ -2362,9 +2365,6 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
pHddCtx->btCoexModeSet = false;
hdd_register_mcast_bcast_filter(pHddCtx);
- wlan_hdd_send_svc_nlink_msg(pHddCtx->radio_index,
- WLAN_SVC_FW_CRASHED_IND, NULL, 0);
-
/* Allow the phone to go to sleep */
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_REINIT);
/* register for riva power on lock */
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index d2ba037d80db..e8878a5274d7 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -11723,6 +11723,18 @@ VOS_STATUS hdd_reset_all_adapters( hdd_context_t *pHddCtx )
clear_bit(WMM_INIT_DONE, &pAdapter->event_flags);
}
+ /*
+ * If adapter is SAP, set session ID to invalid since SAP
+ * session will be cleanup during SSR.
+ */
+ if (pAdapter->device_mode == WLAN_HDD_SOFTAP)
+ wlansap_set_invalid_session(
+#ifdef WLAN_FEATURE_MBSSID
+ WLAN_HDD_GET_SAP_CTX_PTR(pAdapter));
+#else
+ (WLAN_HDD_GET_CTX(pAdapter))->pvosContext);
+#endif
+
status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
pAdapterNode = pNext;
}
diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h
index a3cbbd68d7ba..9801f896d094 100644
--- a/CORE/SAP/inc/sapApi.h
+++ b/CORE/SAP/inc/sapApi.h
@@ -2407,6 +2407,8 @@ VOS_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal,
VOS_STATUS wlansap_get_chan_width(void *pvosctx,
uint32_t *pchanwidth);
+VOS_STATUS wlansap_set_invalid_session(v_PVOID_t pctx);
+
#ifdef __cplusplus
}
#endif
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c
index 01185e9a327d..64a33006e6c5 100644
--- a/CORE/SAP/src/sapModule.c
+++ b/CORE/SAP/src/sapModule.c
@@ -3917,3 +3917,28 @@ wlansap_get_chan_width(void *pvosctx, uint32_t *pchanwidth)
return VOS_STATUS_SUCCESS;
}
+/*
+ * wlansap_set_invalid_session() - set session ID to invalid
+ * @pctx: pointer of global context
+ *
+ * This function sets session ID to invalid
+ *
+ * Return: VOS_STATUS
+ */
+VOS_STATUS
+wlansap_set_invalid_session(v_PVOID_t pctx)
+{
+ ptSapContext psapctx;
+ psapctx = VOS_GET_SAP_CB(pctx);
+ if ( NULL == psapctx) {
+ VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
+ FL("Invalid SAP pointer from pctx"));
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ psapctx->sessionId = CSR_SESSION_ID_INVALID;
+ psapctx->isSapSessionOpen = eSAP_FALSE;
+
+ return VOS_STATUS_SUCCESS;
+}
+