summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cds/src/cds_concurrency.c3
-rw-r--r--core/hdd/inc/wlan_hdd_tdls.h6
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c3
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c2
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c20
5 files changed, 11 insertions, 23 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index ec1f1854a3b8..b78e1f2b4855 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -3840,8 +3840,7 @@ void cds_incr_active_session(enum tQDF_ADAPTER_MODE mode,
}
};
- /* set tdls connection tracker state */
- cds_set_tdls_ct_mode(hdd_ctx);
+ hdd_update_tdls_ct_and_teardown_links(hdd_ctx);
cds_dump_current_concurrency();
qdf_mutex_release(&cds_ctx->qdf_conc_list_lock);
diff --git a/core/hdd/inc/wlan_hdd_tdls.h b/core/hdd/inc/wlan_hdd_tdls.h
index 0bad4a40c9b4..7fed1ef50092 100644
--- a/core/hdd/inc/wlan_hdd_tdls.h
+++ b/core/hdd/inc/wlan_hdd_tdls.h
@@ -713,8 +713,7 @@ int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
#endif
#endif
-void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter,
- hdd_context_t *hddctx);
+void hdd_update_tdls_ct_and_teardown_links(hdd_context_t *hdd_ctx);
void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx);
hddTdlsPeer_t *wlan_hdd_tdls_find_first_connected_peer(hdd_adapter_t *adapter);
@@ -792,8 +791,7 @@ int wlan_hdd_cfg80211_configure_tdls_mode(struct wiphy *wiphy,
int data_len);
#else
-static inline void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter,
- hdd_context_t *hddctx)
+static inline void hdd_update_tdls_ct_and_teardown_links(hdd_context_t *hdd_ctx)
{
}
static inline void
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 4417abcd9079..0ff121afc4c3 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -10163,8 +10163,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
/* Reset the current device mode bit mask */
cds_clear_concurrency_mode(pAdapter->device_mode);
- hdd_tdls_notify_mode_change(pAdapter, pHddCtx);
-
+ hdd_update_tdls_ct_and_teardown_links(pHddCtx);
if ((pAdapter->device_mode == QDF_STA_MODE) ||
(pAdapter->device_mode == QDF_P2P_CLIENT_MODE) ||
(pAdapter->device_mode == QDF_P2P_DEVICE_MODE) ||
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index db92d6909687..ea14978a8922 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -2085,8 +2085,6 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
return ERR_PTR(-EINVAL);
}
- wlan_hdd_tdls_disable_offchan_and_teardown_links(pHddCtx);
-
pAdapter = hdd_get_adapter(pHddCtx, QDF_STA_MODE);
if ((pAdapter != NULL) &&
!(wlan_hdd_validate_session_id(pAdapter->sessionId))) {
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index ea8cc6255779..35a9da0e53b8 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -277,23 +277,17 @@ void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx)
}
/**
- * hdd_tdls_notify_mode_change - Notify mode change
- * @adapter: pointer to hdd adapter
- * @hddCtx : pointer to hdd context
+ * hdd_update_tdls_ct_and_teardown_links - Update TDLS connection tracker and
+ * teardown links.
+ * @hdd_ctx : pointer to hdd context
*
* Return: None
*/
-void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter, hdd_context_t *hddctx)
+void hdd_update_tdls_ct_and_teardown_links(hdd_context_t *hdd_ctx)
{
- /*
- * Disable tdls connection tracker, when interface
- * change happens in the system.
- */
- mutex_lock(&hddctx->tdls_lock);
- hddctx->enable_tdls_connection_tracker = false;
- mutex_unlock(&hddctx->tdls_lock);
- hdd_info("hdd_ctx->enable_tdls_connection_tracker: 0");
- wlan_hdd_tdls_disable_offchan_and_teardown_links(hddctx);
+ /* set tdls connection tracker state */
+ cds_set_tdls_ct_mode(hdd_ctx);
+ wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_ctx);
}
/**