From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEB821FF5F5; Wed, 6 Nov 2024 12:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730896770; cv=none; b=hVI6nAv7yPbaOG+Zo6uQqjBmylrRu2yMx1y/+uWE7BP/AYHbi2i7IivBIa1imoxCpx4N1IPsb3L7OK9f4+CfFjLDjmSe13rqIyYXCJiUiWtfCP127mNNolcqYRN4JubkJ2eSDMPtLbFeH7gbfYYUpvDwXt9ACLvsKCgou+OMrF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730896770; c=relaxed/simple; bh=Mqa1gKXlIafa+BKSf5xBNZoP5ydU2mz/p/3KyOO28K0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eppqUO+CBd1+WY71P9kpwk/vAEr8bR80ygifvxS+NIbBVlDcjbKNUjfEZzndSKVlLTADESqA9svkSscJm066lRifceSg5dic5El+eFdVM5nGQ2F3VFWA9mopsQ4YkYwOT1u392jpZ0iG0QhlMWz+vM7JXuh+0vC6N+zqNSOfpoQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tGVcoSma; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tGVcoSma" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77D06C4CED4; Wed, 6 Nov 2024 12:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730896769; bh=Mqa1gKXlIafa+BKSf5xBNZoP5ydU2mz/p/3KyOO28K0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tGVcoSmaDzlWy1Ej7H+iiTyNUuGRwtuWwq0YFiR7ta7jgJdGMC8tVnicMhjUYbSDY YmmFjZiE4sm1fl9s7qzb2gYMG6np+AXVwkqH9rLEgNeap9uO7TEpkg/+2cd8s63nnx 60HZscSuISzqbNhtAs+nNOe7ySLL+R+aqV9k6RMw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johannes Berg , Luca Coelho , Sasha Levin Subject: [PATCH 5.10 065/110] mac80211: do drv_reconfig_complete() before restarting all Date: Wed, 6 Nov 2024 13:04:31 +0100 Message-ID: <20241106120304.988992010@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106120303.135636370@linuxfoundation.org> References: <20241106120303.135636370@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg [ Upstream commit 13dee10b30c058ee2c58c5da00339cc0d4201aa6 ] When we reconfigure, the driver might do some things to complete the reconfiguration. It's strange and could be broken in some cases because we restart other works (e.g. remain-on-channel and TX) before this happens, yet only start queues later. Change this to do the reconfig complete when reconfiguration is actually complete, not when we've already started doing other things again. For iwlwifi, this should fix a race where the reconfig can race with TX, for ath10k and ath11k that also use this it won't make a difference because they just start queues there, and mac80211 also stopped the queues and will restart them later as before. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20211129152938.cab99f22fe19.Iefe494687f15fd85f77c1b989d1149c8efdfdc36@changeid Signed-off-by: Johannes Berg Stable-dep-of: 07a6e3b78a65 ("wifi: iwlwifi: mvm: Fix response handling in iwl_mvm_send_recovery_cmd()") Signed-off-by: Sasha Levin --- net/mac80211/util.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 7fa6efa8b83c1..997ce9c64336a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2632,6 +2632,13 @@ int ieee80211_reconfig(struct ieee80211_local *local) mutex_unlock(&local->sta_mtx); } + /* + * If this is for hw restart things are still running. + * We may want to change that later, however. + */ + if (local->open_count && (!suspended || reconfig_due_to_wowlan)) + drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART); + if (local->in_reconfig) { local->in_reconfig = false; barrier(); @@ -2650,13 +2657,6 @@ int ieee80211_reconfig(struct ieee80211_local *local) IEEE80211_QUEUE_STOP_REASON_SUSPEND, false); - /* - * If this is for hw restart things are still running. - * We may want to change that later, however. - */ - if (local->open_count && (!suspended || reconfig_due_to_wowlan)) - drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART); - if (!suspended) return 0; -- 2.43.0