From ab30be31ba10b2b5600c61ce25dddce3c6686530 Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Fri, 20 Sep 2019 13:07:21 +0530 Subject: [PATCH] qcacld-3.0: Do not send enable TDLS in case of DBS Currently, TDLS set state command is sent to FW after any session decrement without checking the HW mode is DBS. This can lead to FW assert. Check for HW mode before enabling TDLS in FW. Change-Id: I70d5ba15c9b891f5d9b411960d51d684105061e8 CRs-Fixed: 2530773 --- .../cmn_services/policy_mgr/src/wlan_policy_mgr_core.c | 3 +++ components/tdls/core/src/wlan_tdls_main.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c index 1d63f1108d02..603f91946a96 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c @@ -984,6 +984,9 @@ void policy_mgr_pdev_set_hw_mode_cb(uint32_t status, ret = policy_mgr_set_connection_update(context); if (!QDF_IS_STATUS_SUCCESS(ret)) policy_mgr_err("ERROR: set connection_update_done event failed"); + /* Notify tdls */ + if (pm_ctx->tdls_cbacks.tdls_notify_decrement_session) + pm_ctx->tdls_cbacks.tdls_notify_decrement_session(pm_ctx->psoc); if (PM_NOP != next_action) policy_mgr_next_actions(context, session_id, diff --git a/components/tdls/core/src/wlan_tdls_main.c b/components/tdls/core/src/wlan_tdls_main.c index bd8bdf3a0cc8..cc8272718453 100644 --- a/components/tdls/core/src/wlan_tdls_main.c +++ b/components/tdls/core/src/wlan_tdls_main.c @@ -988,7 +988,11 @@ tdls_process_decrement_active_session(struct wlan_objmgr_psoc *psoc) tdls_debug("Enter"); if (!psoc) return QDF_STATUS_E_NULL_VALUE; - + if(!policy_mgr_is_hw_dbs_2x2_capable(psoc) && + policy_mgr_is_current_hwmode_dbs(psoc)) { + tdls_err("Current HW mode is 1*1 DBS. Wait for Opportunistic timer to expire to enable TDLS in FW"); + return QDF_STATUS_SUCCESS; + } tdls_obj_vdev = tdls_get_vdev(psoc, WLAN_TDLS_NB_ID); if (tdls_obj_vdev) { tdls_debug("Enable TDLS in FW and host as only one active sta/p2p_cli interface is present");