From b13a3c24f54caf20d56c552cf03a56ac9d318cdc Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Thu, 23 Aug 2018 11:34:35 +0530 Subject: [PATCH] qcacld-3.0: Do not Teardown tdls links if new interface is p2p device As part of any change interface TDLS links are toredown and tdls state set to disabled in FW. The assumption here is before adding new interface disable TDLS mode as TDLS is not supported in concurrency. Due to recent changes in framework, Driver may receive the change interface to P2P Device mode after STA connection then teardown is not expected as STA + P2P Device modes does not comes under concurrent operation. Check for current and new interface types before disabling TDLS. Change-Id: I26cfab077b3f83c64687479fba5c7a7c01491a52 CRs-Fixed: 2301650 --- core/hdd/src/wlan_hdd_cfg80211.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 8069607071d2..8e3f481df1f4 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12907,7 +12907,12 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, policy_mgr_clear_concurrency_mode(hdd_ctx->hdd_psoc, adapter->device_mode); - hdd_notify_teardown_tdls_links(adapter->hdd_vdev); + if (!(adapter->device_mode == QDF_P2P_DEVICE_MODE && + type == NL80211_IFTYPE_STATION)) { + hdd_debug("Teardown tdls links and disable tdls in FW as new interface is coming up"); + hdd_notify_teardown_tdls_links(adapter->hdd_vdev); + } + if ((adapter->device_mode == QDF_STA_MODE) || (adapter->device_mode == QDF_P2P_CLIENT_MODE) || (adapter->device_mode == QDF_P2P_DEVICE_MODE) ||