qcacld-3.0: Update TDLS current mode only for TDLS enabled vdev
When scan is complete, tdls notifier tries to update the tdls_current_mode for all available TDLS & P2P vdev. This causes the TDLS current mode to enabled wrongly and further add peer gets honored for P2P Client vdev in STA + P2P client concurrency. So avoid changing current mode for P2P cli when STA vdev is present. Also add check for P2P CLI mode in tdls_check_is_tdls_allowed() to avoid tdls commands going on P2P client vdev. Change-Id: I681de9781a4892e307681da5699ca7b30f8f9651 CRs-Fixed: 3626695
This commit is contained in:

committed by
Rahul Choudhary

parent
86666a12df
commit
0f95a0d1a3
@@ -2058,8 +2058,6 @@ QDF_STATUS tdls_process_setup_peer(struct tdls_oper_request *req)
|
|||||||
uint32_t pref_width;
|
uint32_t pref_width;
|
||||||
struct wlan_objmgr_pdev *pdev;
|
struct wlan_objmgr_pdev *pdev;
|
||||||
|
|
||||||
tdls_debug("Configure external TDLS peer " QDF_MAC_ADDR_FMT,
|
|
||||||
QDF_MAC_ADDR_REF(req->peer_addr));
|
|
||||||
|
|
||||||
/* reference cnt is acquired in ucfg_tdls_oper */
|
/* reference cnt is acquired in ucfg_tdls_oper */
|
||||||
vdev = req->vdev;
|
vdev = req->vdev;
|
||||||
@@ -2070,11 +2068,15 @@ QDF_STATUS tdls_process_setup_peer(struct tdls_oper_request *req)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!tdls_check_is_tdls_allowed(vdev)) {
|
if (!tdls_check_is_tdls_allowed(vdev)) {
|
||||||
tdls_err("TDLS not allowed, Reject setup peer");
|
tdls_err("TDLS not allowed on vdev:%d, Reject setup peer",
|
||||||
|
wlan_vdev_get_id(vdev));
|
||||||
status = QDF_STATUS_E_INVAL;
|
status = QDF_STATUS_E_INVAL;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tdls_debug("vdev:%d Configure external TDLS peer " QDF_MAC_ADDR_FMT,
|
||||||
|
wlan_vdev_get_id(vdev),
|
||||||
|
QDF_MAC_ADDR_REF(req->peer_addr));
|
||||||
qdf_mem_zero(&peer_req, sizeof(peer_req));
|
qdf_mem_zero(&peer_req, sizeof(peer_req));
|
||||||
peer_req.vdev = vdev;
|
peer_req.vdev = vdev;
|
||||||
qdf_mem_copy(peer_req.peer_addr, req->peer_addr, QDF_MAC_ADDR_SIZE);
|
qdf_mem_copy(peer_req.peer_addr, req->peer_addr, QDF_MAC_ADDR_SIZE);
|
||||||
|
@@ -997,7 +997,16 @@ bool tdls_check_is_tdls_allowed(struct wlan_objmgr_vdev *vdev)
|
|||||||
tdls_is_concurrency_allowed(tdls_soc_obj->soc))) {
|
tdls_is_concurrency_allowed(tdls_soc_obj->soc))) {
|
||||||
state = true;
|
state = true;
|
||||||
} else {
|
} else {
|
||||||
tdls_warn("Concurrent sessions exist disable TDLS");
|
tdls_warn("vdev:%d Concurrent sessions exist disable TDLS",
|
||||||
|
wlan_vdev_get_id(vdev));
|
||||||
|
state = false;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wlan_vdev_mlme_get_opmode(vdev) == QDF_P2P_CLIENT_MODE && sta_count) {
|
||||||
|
tdls_warn("vdev:%d Concurrent STA exists. TDLS not allowed for P2P vdev",
|
||||||
|
wlan_vdev_get_id(vdev));
|
||||||
|
state = false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1507,7 +1516,8 @@ void tdls_process_enable_for_vdev(struct wlan_objmgr_vdev *vdev)
|
|||||||
NULL);
|
NULL);
|
||||||
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
||||||
if (opmode == QDF_P2P_CLIENT_MODE && sta_count) {
|
if (opmode == QDF_P2P_CLIENT_MODE && sta_count) {
|
||||||
tdls_debug("STA + P2P concurrency. Don't allow TDLS on P2P vdev");
|
tdls_debug("STA + P2P concurrency. Don't allow TDLS on P2P vdev:%d",
|
||||||
|
wlan_vdev_get_id(vdev));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1827,18 +1837,17 @@ static void tdls_set_mode_in_vdev(struct tdls_vdev_priv_obj *tdls_vdev,
|
|||||||
enum tdls_feature_mode tdls_mode,
|
enum tdls_feature_mode tdls_mode,
|
||||||
enum tdls_disable_sources source)
|
enum tdls_disable_sources source)
|
||||||
{
|
{
|
||||||
if (!tdls_vdev)
|
tdls_debug("set tdls mode: %d source:%d", tdls_mode,
|
||||||
return;
|
source);
|
||||||
tdls_debug("enter tdls mode is %d", tdls_mode);
|
|
||||||
|
|
||||||
if (TDLS_SUPPORT_IMP_MODE == tdls_mode ||
|
switch (tdls_mode) {
|
||||||
TDLS_SUPPORT_EXT_CONTROL == tdls_mode) {
|
case TDLS_SUPPORT_IMP_MODE:
|
||||||
clear_bit((unsigned long)source,
|
fallthrough;
|
||||||
&tdls_soc->tdls_source_bitmap);
|
case TDLS_SUPPORT_EXT_CONTROL:
|
||||||
|
clear_bit((unsigned long)source, &tdls_soc->tdls_source_bitmap);
|
||||||
/*
|
/*
|
||||||
* Check if any TDLS source bit is set and if
|
* Check if any TDLS source bit is set and if
|
||||||
* bitmap is not zero then we should not
|
* bitmap is not zero then we should not enable TDLS
|
||||||
* enable TDLS
|
|
||||||
*/
|
*/
|
||||||
if (tdls_soc->tdls_source_bitmap) {
|
if (tdls_soc->tdls_source_bitmap) {
|
||||||
tdls_notice("Don't enable TDLS, source bitmap: %lu",
|
tdls_notice("Don't enable TDLS, source bitmap: %lu",
|
||||||
@@ -1846,12 +1855,15 @@ static void tdls_set_mode_in_vdev(struct tdls_vdev_priv_obj *tdls_vdev,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tdls_implicit_enable(tdls_vdev);
|
tdls_implicit_enable(tdls_vdev);
|
||||||
/* tdls implicit mode is enabled, so
|
/*
|
||||||
* enable the connection tracker
|
* tdls implicit mode is enabled, so enable the connection
|
||||||
|
* tracker
|
||||||
*/
|
*/
|
||||||
tdls_soc->enable_tdls_connection_tracker =
|
tdls_soc->enable_tdls_connection_tracker = true;
|
||||||
true;
|
|
||||||
} else if (TDLS_SUPPORT_DISABLED == tdls_mode) {
|
return;
|
||||||
|
|
||||||
|
case TDLS_SUPPORT_DISABLED:
|
||||||
set_bit((unsigned long)source,
|
set_bit((unsigned long)source,
|
||||||
&tdls_soc->tdls_source_bitmap);
|
&tdls_soc->tdls_source_bitmap);
|
||||||
tdls_implicit_disable(tdls_vdev);
|
tdls_implicit_disable(tdls_vdev);
|
||||||
@@ -1859,7 +1871,10 @@ static void tdls_set_mode_in_vdev(struct tdls_vdev_priv_obj *tdls_vdev,
|
|||||||
* stop the connection tracker.
|
* stop the connection tracker.
|
||||||
*/
|
*/
|
||||||
tdls_soc->enable_tdls_connection_tracker = false;
|
tdls_soc->enable_tdls_connection_tracker = false;
|
||||||
} else if (TDLS_SUPPORT_EXP_TRIG_ONLY == tdls_mode) {
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
case TDLS_SUPPORT_EXP_TRIG_ONLY:
|
||||||
clear_bit((unsigned long)source,
|
clear_bit((unsigned long)source,
|
||||||
&tdls_soc->tdls_source_bitmap);
|
&tdls_soc->tdls_source_bitmap);
|
||||||
tdls_implicit_disable(tdls_vdev);
|
tdls_implicit_disable(tdls_vdev);
|
||||||
@@ -1875,8 +1890,11 @@ static void tdls_set_mode_in_vdev(struct tdls_vdev_priv_obj *tdls_vdev,
|
|||||||
*/
|
*/
|
||||||
if (tdls_soc->tdls_source_bitmap)
|
if (tdls_soc->tdls_source_bitmap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
tdls_debug("exit ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1932,12 +1950,15 @@ static void tdls_set_current_mode(struct tdls_soc_priv_obj *tdls_soc,
|
|||||||
QDF_STA_MODE,
|
QDF_STA_MODE,
|
||||||
WLAN_TDLS_NB_ID);
|
WLAN_TDLS_NB_ID);
|
||||||
if (vdev) {
|
if (vdev) {
|
||||||
tdls_debug("set mode in tdls vdev ");
|
tdls_debug("set mode in tdls STA vdev:%d",
|
||||||
|
wlan_vdev_get_id(vdev));
|
||||||
tdls_vdev = wlan_vdev_get_tdls_vdev_obj(vdev);
|
tdls_vdev = wlan_vdev_get_tdls_vdev_obj(vdev);
|
||||||
if (tdls_vdev)
|
if (tdls_vdev)
|
||||||
tdls_set_mode_in_vdev(tdls_vdev, tdls_soc,
|
tdls_set_mode_in_vdev(tdls_vdev, tdls_soc,
|
||||||
tdls_mode, source);
|
tdls_mode, source);
|
||||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
||||||
|
|
||||||
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get p2p client vdev */
|
/* get p2p client vdev */
|
||||||
@@ -1945,7 +1966,8 @@ static void tdls_set_current_mode(struct tdls_soc_priv_obj *tdls_soc,
|
|||||||
QDF_P2P_CLIENT_MODE,
|
QDF_P2P_CLIENT_MODE,
|
||||||
WLAN_TDLS_NB_ID);
|
WLAN_TDLS_NB_ID);
|
||||||
if (vdev) {
|
if (vdev) {
|
||||||
tdls_debug("set mode in tdls vdev ");
|
tdls_debug("set mode in tdls P2P cli vdev:%d",
|
||||||
|
wlan_vdev_get_id(vdev));
|
||||||
tdls_vdev = wlan_vdev_get_tdls_vdev_obj(vdev);
|
tdls_vdev = wlan_vdev_get_tdls_vdev_obj(vdev);
|
||||||
if (tdls_vdev)
|
if (tdls_vdev)
|
||||||
tdls_set_mode_in_vdev(tdls_vdev, tdls_soc,
|
tdls_set_mode_in_vdev(tdls_vdev, tdls_soc,
|
||||||
@@ -1953,11 +1975,11 @@ static void tdls_set_current_mode(struct tdls_soc_priv_obj *tdls_soc,
|
|||||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit:
|
||||||
if (!update_last)
|
if (!update_last)
|
||||||
tdls_soc->tdls_last_mode = tdls_soc->tdls_current_mode;
|
tdls_soc->tdls_last_mode = tdls_soc->tdls_current_mode;
|
||||||
|
|
||||||
tdls_soc->tdls_current_mode = tdls_mode;
|
tdls_soc->tdls_current_mode = tdls_mode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QDF_STATUS tdls_set_operation_mode(struct tdls_set_mode_params *tdls_set_mode)
|
QDF_STATUS tdls_set_operation_mode(struct tdls_set_mode_params *tdls_set_mode)
|
||||||
|
Reference in New Issue
Block a user