qcacmn: Add fix to avoid deadlock in back to back connect

Add fix to avoid deadlock in back to back connect handling

Change-Id: I831a64f14270dceb9e7cfae2f9d4b05fec99d8d2
CRs-Fixed: 3342240
This commit is contained in:
Himanshu Batra
2022-11-21 20:03:25 +05:30
committed by Madan Koyyalamudi
vanhempi 4ff65dc760
commit d729483efc

Näytä tiedosto

@@ -389,6 +389,8 @@ static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
struct wlan_mlo_sta *sta_ctx = NULL;
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct wlan_objmgr_vdev *assoc_vdev = NULL;
uint8_t i = 0;
if (mlo_dev_ctx)
sta_ctx = mlo_dev_ctx->sta_ctx;
@@ -403,6 +405,10 @@ static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
if (!sta_ctx)
return QDF_STATUS_E_FAILURE;
assoc_vdev = mlo_get_assoc_link_vdev(mlo_dev_ctx);
if (!assoc_vdev)
return QDF_STATUS_E_FAILURE;
if (sta_ctx->connect_req) {
mlo_free_connect_ies(sta_ctx->connect_req);
qdf_mem_free(sta_ctx->connect_req);
@@ -417,8 +423,19 @@ static QDF_STATUS mlo_disconnect_no_lock(struct wlan_objmgr_vdev *vdev,
return status;
}
status = mlo_send_link_disconnect(vdev, source,
reason_code, bssid);
for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
if (!mlo_dev_ctx->wlan_vdev_list[i])
continue;
if (qdf_test_bit(i, mlo_dev_ctx->sta_ctx->wlan_connected_links) &&
mlo_dev_ctx->wlan_vdev_list[i] != assoc_vdev)
wlan_cm_disconnect(mlo_dev_ctx->wlan_vdev_list[i],
source, reason_code,
NULL);
}
wlan_cm_disconnect(assoc_vdev,
source, reason_code, NULL);
}
return status;