From e3e86ab602781208c78915b92cf7dbea53ae1dc7 Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Mon, 8 May 2017 10:48:24 -0700 Subject: [PATCH] qcacld-3.0: Restore pdev for module start/stop and SSR cases For module start/stop and SSR cases, pdev is reused so it needs to be restored to MAC/WMA contexts again. Change-Id: Ifce95437d2c32a71c9376164f821f4e27df38409 CRs-fixed: 2021415 --- core/hdd/src/wlan_hdd_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index eeb6353e5e3f..fe14ab262d5a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1382,10 +1382,12 @@ void hdd_update_tgt_cfg(void *context, void *param) struct cds_config_info *cds_cfg = cds_get_ini_config(); uint8_t antenna_mode; - /* Reuse same pdev for module stop and start */ + /* Reuse same pdev for module start/stop or SSR */ if ((hdd_get_conparam() == QDF_GLOBAL_FTM_MODE) || - (!cds_is_driver_loading())) { - hdd_err("Reuse pdev for module start/stop"); + !cds_is_driver_loading()) { + hdd_err("Reuse pdev for module start/stop or SSR"); + /* Restore pdev to MAC/WMA contexts */ + sme_store_pdev(hdd_ctx->hHal, hdd_ctx->hdd_pdev); } else { ret = hdd_objmgr_create_and_store_pdev(hdd_ctx); if (ret) {