From 66f9169b50a3997273fdf2e5044affcd3fffbea0 Mon Sep 17 00:00:00 2001 From: Arunk Khandavalli Date: Thu, 9 Mar 2017 21:02:21 +0530 Subject: [PATCH] qcacld-3.0: Set the driver_type in the mac during the mac_open Presently during the mac open the globalmac context is memset to zero and the based on the driver_type pe sessions will be created. During the switch from the FTM to mission mode, pe checks the driver mode from the mac context and tries to access the invalid lim sessions which are not created for FTM mode. To mitigate the issue set the driver_type in the mac context during mac_open CRs-Fixed: 2017035 Change-Id: Iddefd2f74afb71197c3830a51f107d86736745f1 --- core/mac/src/sys/legacy/src/system/src/mac_init_api.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c index e6b7458b3460..236dc9191bd0 100644 --- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c +++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c @@ -129,6 +129,12 @@ tSirRetStatus mac_open(struct wlan_objmgr_psoc *psoc, tHalHandle *pHalHandle, *pHalHandle = (tHalHandle) p_mac; { + /* + * For Non-FTM cases this value will be reset during mac_start + */ + if (cds_cfg->driver_type) + p_mac->gDriverType = eDRIVER_TYPE_MFG; + /* Call routine to initialize CFG data structures */ if (eSIR_SUCCESS != cfg_init(p_mac)) return eSIR_FAILURE;