Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27e8e324 authored by Abhishek Singh's avatar Abhishek Singh
Browse files

qcacld-3.0: Do not take SME lock to check roaming in progress

Checking for roaming in progress wait on SME lock from work queue,
while the other thread who has taken SME lock wait for this
work queue to complete the execution.

To fix avoid taking SME lock while checking for roaming in progress.

Change-Id: I428bc957c276f36751cdb9a4b3337a8cc2d45f7f
CRs-Fixed: 3344013
parent 8ed9cddc
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 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
@@ -189,21 +190,12 @@ QDF_STATUS wlan_cm_abort_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
bool wlan_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
{
	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
	QDF_STATUS status;

	status = cm_roam_acquire_lock();
	if (QDF_IS_STATUS_ERROR(status))
		return false;

	if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id) ||
	    MLME_IS_ROAMING_IN_PROG(psoc, vdev_id) ||
	    mlme_is_roam_invoke_in_progress(psoc, vdev_id) ||
	    wlan_cm_neighbor_roam_in_progress(psoc, vdev_id)) {
		cm_roam_release_lock();
	    wlan_cm_neighbor_roam_in_progress(psoc, vdev_id))
		return true;
	}

	cm_roam_release_lock();

	return false;
}