|
@@ -997,7 +997,16 @@ bool tdls_check_is_tdls_allowed(struct wlan_objmgr_vdev *vdev)
|
|
|
tdls_is_concurrency_allowed(tdls_soc_obj->soc))) {
|
|
|
state = true;
|
|
|
} 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;
|
|
|
}
|
|
|
|
|
@@ -1507,7 +1516,8 @@ void tdls_process_enable_for_vdev(struct wlan_objmgr_vdev *vdev)
|
|
|
NULL);
|
|
|
opmode = wlan_vdev_mlme_get_opmode(vdev);
|
|
|
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;
|
|
|
}
|
|
|
|
|
@@ -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_disable_sources source)
|
|
|
{
|
|
|
- if (!tdls_vdev)
|
|
|
- return;
|
|
|
- tdls_debug("enter tdls mode is %d", tdls_mode);
|
|
|
+ tdls_debug("set tdls mode: %d source:%d", tdls_mode,
|
|
|
+ source);
|
|
|
|
|
|
- if (TDLS_SUPPORT_IMP_MODE == tdls_mode ||
|
|
|
- TDLS_SUPPORT_EXT_CONTROL == tdls_mode) {
|
|
|
- clear_bit((unsigned long)source,
|
|
|
- &tdls_soc->tdls_source_bitmap);
|
|
|
+ switch (tdls_mode) {
|
|
|
+ case TDLS_SUPPORT_IMP_MODE:
|
|
|
+ fallthrough;
|
|
|
+ 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
|
|
|
- * bitmap is not zero then we should not
|
|
|
- * enable TDLS
|
|
|
+ * bitmap is not zero then we should not enable TDLS
|
|
|
*/
|
|
|
if (tdls_soc->tdls_source_bitmap) {
|
|
|
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;
|
|
|
}
|
|
|
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 =
|
|
|
- true;
|
|
|
- } else if (TDLS_SUPPORT_DISABLED == tdls_mode) {
|
|
|
+ tdls_soc->enable_tdls_connection_tracker = true;
|
|
|
+
|
|
|
+ return;
|
|
|
+
|
|
|
+ case TDLS_SUPPORT_DISABLED:
|
|
|
set_bit((unsigned long)source,
|
|
|
&tdls_soc->tdls_source_bitmap);
|
|
|
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.
|
|
|
*/
|
|
|
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,
|
|
|
&tdls_soc->tdls_source_bitmap);
|
|
|
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)
|
|
|
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,
|
|
|
WLAN_TDLS_NB_ID);
|
|
|
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);
|
|
|
if (tdls_vdev)
|
|
|
tdls_set_mode_in_vdev(tdls_vdev, tdls_soc,
|
|
|
tdls_mode, source);
|
|
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
|
|
+
|
|
|
+ goto exit;
|
|
|
}
|
|
|
|
|
|
/* 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,
|
|
|
WLAN_TDLS_NB_ID);
|
|
|
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);
|
|
|
if (tdls_vdev)
|
|
|
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);
|
|
|
}
|
|
|
|
|
|
+exit:
|
|
|
if (!update_last)
|
|
|
tdls_soc->tdls_last_mode = tdls_soc->tdls_current_mode;
|
|
|
|
|
|
tdls_soc->tdls_current_mode = tdls_mode;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
QDF_STATUS tdls_set_operation_mode(struct tdls_set_mode_params *tdls_set_mode)
|