diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 8 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 6 | ||||
| -rw-r--r-- | core/sap/inc/sap_api.h | 3 | ||||
| -rw-r--r-- | core/sap/src/sap_module.c | 26 |
4 files changed, 40 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 89ad0e1e6b23..fe7834855895 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3796,6 +3796,14 @@ QDF_STATUS hdd_reset_all_adapters(hdd_context_t *hdd_ctx) clear_bit(WMM_INIT_DONE, &adapter->event_flags); } + /* + * If adapter is SAP, set session ID to invalid since SAP + * session will be cleanup during SSR. + */ + if (adapter->device_mode == QDF_SAP_MODE) + wlansap_set_invalid_session( + WLAN_HDD_GET_SAP_CTX_PTR(adapter)); + status = hdd_get_next_adapter(hdd_ctx, adapterNode, &pNext); adapterNode = pNext; } diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 301ffc747ce1..b808bf38807b 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1566,15 +1566,15 @@ QDF_STATUS hdd_wlan_re_init(void) hdd_wlan_get_version(pHddCtx, NULL, NULL); + wlan_hdd_send_svc_nlink_msg(pHddCtx->radio_index, + WLAN_SVC_FW_CRASHED_IND, NULL, 0); + /* Restart all adapters */ hdd_start_all_adapters(pHddCtx); pHddCtx->hdd_mcastbcast_filter_set = false; pHddCtx->btCoexModeSet = false; - 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); diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 7812900ad903..522810777738 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -970,6 +970,9 @@ uint32_t wlansap_get_chan_width(void *cds_ctx); QDF_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal, uint16_t tx_leakage_threshold); + +QDF_STATUS wlansap_set_invalid_session(void *cds_ctx); + #ifdef __cplusplus } #endif diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 1bdb2aa9a11b..ef590f42c8e4 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -3665,3 +3665,29 @@ QDF_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal, mac->sap.SapDfsInfo.tx_leakage_threshold); return QDF_STATUS_SUCCESS; } + +/* + * wlansap_set_invalid_session() - set session ID to invalid + * @cds_ctx: pointer of global context + * + * This function sets session ID to invalid + * + * Return: QDF_STATUS + */ +QDF_STATUS +wlansap_set_invalid_session(void *cds_ctx) +{ + ptSapContext psapctx; + + psapctx = CDS_GET_SAP_CB(cds_ctx); + if (NULL == psapctx) { + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, + FL("Invalid SAP pointer from pctx")); + return QDF_STATUS_E_FAILURE; + } + + psapctx->sessionId = CSR_SESSION_ID_INVALID; + psapctx->isSapSessionOpen = eSAP_FALSE; + + return QDF_STATUS_SUCCESS; +} |
