Sfoglia il codice sorgente

qcacld-3.0: Address race between ap stop and system suspend

A race between cfg80211 ap stop 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 ap stop when wiphy
suspend is already completed since scheduler thread gets suspended
as part of wiphy suspend and it can't process ap stop.

Change-Id: I5792b524a27326ca9e020600db2b82e16cc7ea96
CRs-Fixed: 3834305
Jianmin Zhu 1 anno fa
parent
commit
2b69562ed6
2 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 5 0
      core/hdd/src/wlan_hdd_hostapd.c
  2. 4 0
      os_if/sync/src/osif_psoc_sync.c

+ 5 - 0
core/hdd/src/wlan_hdd_hostapd.c

@@ -7217,6 +7217,11 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
 	if (ret)
 		goto exit;
 
+	if (hdd_ctx->is_wiphy_suspended) {
+		hdd_debug("wiphy is suspended");
+		return -EINVAL;
+	}
+
 	if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
 		hdd_err("Command not allowed in FTM mode");
 		goto exit;

+ 4 - 0
os_if/sync/src/osif_psoc_sync.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 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
@@ -25,6 +26,7 @@
 #include "qdf_types.h"
 #include "wlan_dsc_psoc.h"
 #include "wlan_dsc_vdev.h"
+#include "__wlan_dsc.h"
 
 /**
  * struct osif_psoc_sync - a psoc synchronization context
@@ -312,6 +314,8 @@ int __osif_psoc_sync_op_start(struct device *dev,
 	errno = __osif_psoc_sync_start_callback(dev, out_psoc_sync, func,
 						_dsc_psoc_op_start);
 	osif_psoc_sync_unlock();
+	if (errno)
+		dsc_exit_status(errno);
 
 	return errno;
 }