mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
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
This commit is contained in:
parent
c549dd59ee
commit
e635975954
5 changed files with 11 additions and 23 deletions
|
|
@ -1964,8 +1964,7 @@ void cds_incr_active_session(enum tQDF_ADAPTER_MODE mode,
|
|||
qdf_mutex_acquire(&cds_ctx->qdf_conc_list_lock);
|
||||
}
|
||||
|
||||
/* 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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -11050,8 +11050,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) ||
|
||||
|
|
|
|||
|
|
@ -2089,8 +2089,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))) {
|
||||
|
|
|
|||
|
|
@ -278,23 +278,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue