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

Commit 90b48155 authored by Ashish's avatar Ashish
Browse files

qcacld-3.0: Address race between disconnect and system suspend

A race between cfg80211 disconnect and wiphy system suspend can lead
to either DPM WD or serialization VDEV disconnect active command
timeout since scheduler thread gets suspended as part of wiphy
suspend and both cfg80211_disconnect and wiphy suspend/resume acquire
RTNL lock. To address this race condition avoid disconnect when wiphy
suspend is already completed since scheduler thread gets suspended
as part of wiphy suspend and it can't process vdev disconnect.

Change-Id: Ia7e42cffb3f6b08b33c878b68122dbdc00bad251
CRs-Fixed: 3042442
parent eccf42a0
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -22067,15 +22067,21 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
	if (wlan_hdd_validate_vdev_id(adapter->vdev_id))
		return -EINVAL;
	status = wlan_hdd_validate_context(hdd_ctx);
	if (status)
		return status;
	if (hdd_ctx->is_wiphy_suspended) {
		hdd_info_rl("wiphy is suspended retry disconnect");
		return -EAGAIN;
	}
	qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD,
		   TRACE_CODE_HDD_CFG80211_DISCONNECT,
		   adapter->vdev_id, reason);
	hdd_print_netdev_txq_status(dev);
	status = wlan_hdd_validate_context(hdd_ctx);
	if (0 != status)
		return status;
	qdf_mutex_acquire(&adapter->disconnection_status_lock);
	if (adapter->disconnection_in_progress) {