diff options
| author | Nitesh Shah <niteshs@codeaurora.org> | 2017-02-23 19:57:50 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-03-01 00:38:12 -0800 |
| commit | 20764d2837d79a5e20190d0211f69e7d7a2c66ee (patch) | |
| tree | 13763b5609f07aab3697c4c50c91c5773775f7ae | |
| parent | e798a4fe6d575c85902b9c5a040b6579e1fb8232 (diff) | |
qcacld-3.0: Teardown TDLS connection when TDLS not allowed
When TDLS exists and new virtual interface is added, then
TDLS gets teardown. But TDLS connection tracker is disabled
only when new connection comes up successfully. When STA
interface is present and TDLS is running and SAP is started,
TDLS gets teardown while adding new virtual interface. But
TDLS gets formed again if there is delay in starting BSS.
Thus, TDLS gets formed, but TDLS connection tracker gets
disabled.
The change is to teardown TDLS links if TDLS connection
tracker is disabled in cds_incr_active_session().
Change-Id: I0ae6526ad0aa321b666e62d09c2ca5b1be8f9157
CRs-Fixed: 2010694
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 3 | ||||
| -rw-r--r-- | core/hdd/inc/wlan_hdd_tdls.h | 6 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_tdls.c | 20 |
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); } /** |
