Skip to contentSkip to conversation

wifi: cw1200: Revert "Fix locking in error paths"

PATCH New Bart Van Assche 1 participant 1 message Apr 30 CW1200 wlan driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: cw1200: Revert "Fix locking in error paths"

Revert commit d98c24617a83 ("wifi: cw1200: Fix locking in error paths") because it introduces a locking bug instead of fixing a locking bug. cw1200_wow_resume() unlocks priv->conf_mutex. Hence, adding mutex_unlock(&priv->conf_mutex) just after cw1200_wow_resume() is wrong.

Fixes d98c24617a83 ("wifi: cw1200: Fix locking in error paths")
---
 drivers/net/wireless/st/cw1200/pm.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/wireless/st/cw1200/pm.c +0 -2
index 84eb15d729c7..120f0379f81d 100644
@@ -264,14 +264,12 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 		wiphy_err(priv->hw->wiphy,
 			  "PM request failed: %d. WoW is disabled.\n", ret);
 		cw1200_wow_resume(hw);
-		mutex_unlock(&priv->conf_mutex);
 		return -EBUSY;
 	}
 
 	/* Force resume if event is coming from the device. */
 	if (atomic_read(&priv->bh_rx)) {
 		cw1200_wow_resume(hw);
-		mutex_unlock(&priv->conf_mutex);
 		return -EAGAIN;
 	}