qcacld-3.0: Don't increment discovery attempt for TDLS vdev

For MLO vdev currently the discovery attempts threshold is
multiplied by 2 to increase the discovery window thereby
increasing the discovery probability in noisy environmental
conditions. But 5 discovery attempts on each link is
sufficient threshold. Increased discovery attempts causes TP
issues with peer connected to different AP for MLO vdev since
frequent link active/inactive change happens.

So remove the discovery attempt multiplier for MLO TDLS vdev.
Enhance few debug logs.

CRs-Fixed: 3702198
Change-Id: If5513987447296140788c1ee021329dc721df65f
This commit is contained in:
Pragaspathi Thilagaraj
2024-02-29 01:19:57 +05:30
committed by Ravindra Konda
parent 3a931e6324
commit d1e3e92c23
3 changed files with 20 additions and 24 deletions

View File

@@ -165,7 +165,7 @@ void tdls_discovery_timeout_peer_cb(void *user_data)
peer = qdf_container_of(p_node, struct tdls_peer,
node);
tdls_debug("Peer: " QDF_MAC_ADDR_FMT "link status %d, vdev id %d",
tdls_debug("Peer: " QDF_MAC_ADDR_FMT " link status %d, vdev id %d",
QDF_MAC_ADDR_REF(peer->peer_mac.bytes),
peer->link_status, wlan_vdev_get_id(vdev));
@@ -901,9 +901,10 @@ static void tdls_ct_process_connected_link(
*
* Return: None
*/
static void tdls_ct_process_cap_supported(struct tdls_peer *curr_peer,
struct tdls_vdev_priv_obj *tdls_vdev,
struct tdls_soc_priv_obj *tdls_soc_obj)
static void
tdls_ct_process_cap_supported(struct tdls_peer *curr_peer,
struct tdls_vdev_priv_obj *tdls_vdev,
struct tdls_soc_priv_obj *tdls_soc_obj)
{
if (curr_peer->rx_pkt || curr_peer->tx_pkt)
tdls_debug(QDF_MAC_ADDR_FMT "link_status %d tdls_support %d tx %d rx %d rssi %d vdev %d",
@@ -915,10 +916,11 @@ static void tdls_ct_process_cap_supported(struct tdls_peer *curr_peer,
switch (curr_peer->link_status) {
case TDLS_LINK_IDLE:
case TDLS_LINK_DISCOVERING:
if (TDLS_IS_EXTERNAL_CONTROL_ENABLED(
tdls_soc_obj->tdls_configs.tdls_feature_flags) &&
(!curr_peer->is_forced_peer))
if (!curr_peer->is_forced_peer &&
TDLS_IS_EXTERNAL_CONTROL_ENABLED(
tdls_soc_obj->tdls_configs.tdls_feature_flags))
break;
tdls_ct_process_idle_and_discovery(curr_peer, tdls_vdev,
tdls_soc_obj);
break;
@@ -951,7 +953,7 @@ static void tdls_ct_process_cap_unknown(struct tdls_peer *curr_peer,
return;
if (curr_peer->rx_pkt || curr_peer->tx_pkt)
tdls_debug(QDF_MAC_ADDR_FMT "link_status %d tdls_support %d tx %d rx %d vdev %d",
tdls_debug(QDF_MAC_ADDR_FMT " link_status %d tdls_support %d tx %d rx %d vdev %d",
QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
curr_peer->link_status, curr_peer->tdls_support,
curr_peer->tx_pkt, curr_peer->rx_pkt,
@@ -971,7 +973,10 @@ static void tdls_ct_process_cap_unknown(struct tdls_peer *curr_peer,
if (curr_peer->is_forced_peer ||
curr_peer->discovery_attempt <
tdls_vdev->threshold_config.discovery_tries_n) {
tdls_debug("TDLS UNKNOWN discover ");
tdls_debug("TDLS UNKNOWN discover num_attempts:%d num_left:%d forced_peer:%d",
curr_peer->discovery_attempt,
tdls_vdev->threshold_config.discovery_tries_n,
curr_peer->is_forced_peer);
tdls_vdev->curr_candidate = curr_peer;
tdls_implicit_send_discovery_request(tdls_vdev);
@@ -1027,8 +1032,8 @@ static void tdls_ct_process_handler(struct wlan_objmgr_vdev *vdev)
struct tdls_vdev_priv_obj *tdls_vdev_obj;
struct tdls_soc_priv_obj *tdls_soc_obj;
if (QDF_STATUS_SUCCESS != tdls_get_vdev_objects(vdev, &tdls_vdev_obj,
&tdls_soc_obj))
status = tdls_get_vdev_objects(vdev, &tdls_vdev_obj, &tdls_soc_obj);
if (QDF_IS_STATUS_ERROR(status))
return;
/* If any concurrency is detected */

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1606,15 +1606,6 @@ tdls_update_discovery_tries(struct wlan_objmgr_vdev *vdev)
vdev_config->discovery_tries_n =
tdls_config->tdls_max_discovery_attempt;
/*
* For MLO peer discovery will happen on 2 links and the best link
* will be chosen based on score for TDLS. So factor that into the
* number of discovery attempts to increase the discoverability
* window for the peer.
*/
if (wlan_vdev_mlme_is_mlo_vdev(vdev))
vdev_config->discovery_tries_n *= 2;
}
QDF_STATUS tdls_notify_sta_connect(struct tdls_sta_notify_params *notify)

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -502,8 +502,8 @@ void wlan_tdls_increment_discovery_attempts(struct wlan_objmgr_psoc *psoc,
}
peer->discovery_attempt++;
tdls_debug("vdev:%d peer discovery attempts:%d", vdev_id,
peer->discovery_attempt);
tdls_debug("vdev:%d peer: " QDF_MAC_ADDR_FMT " discovery attempts:%d ", vdev_id,
QDF_MAC_ADDR_REF(peer_addr), peer->discovery_attempt);
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
}