From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
Luca Coelho <luciano.coelho@intel.com>,
Sasha Levin <sashal@kernel.org>,
johannes@sipsolutions.net, davem@davemloft.net, kuba@kernel.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.15 17/29] mac80211: do drv_reconfig_complete() before restarting all
Date: Mon, 20 Dec 2021 20:57:38 -0500 [thread overview]
Message-ID: <20211221015751.116328-17-sashal@kernel.org> (raw)
In-Reply-To: <20211221015751.116328-1-sashal@kernel.org>
From: Johannes Berg <johannes.berg@intel.com>
[ 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 <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211129152938.cab99f22fe19.Iefe494687f15fd85f77c1b989d1149c8efdfdc36@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 39961a4f55d12..a94223710d48d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2644,6 +2644,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();
@@ -2662,13 +2669,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.34.1
next prev parent reply other threads:[~2021-12-21 1:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211221015751.116328-1-sashal@kernel.org>
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 04/29] mac80211: fix TCP performance on mesh interface Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 05/29] mac80211: set up the fwd_skb->dev for mesh forwarding Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 06/29] mac80211: fix a memory leak where sta_info is not freed Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 07/29] nl80211: reset regdom when reloading regdb Sasha Levin
2021-12-25 18:23 ` Sedat Dilek
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 08/29] iwlwifi: fix LED dependencies Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 09/29] phonet: refcount leak in pep_sock_accep Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 10/29] net: usb: qmi_wwan: add Telit 0x1070 composition Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 12/29] net: bcmgenet: Fix NULL vs IS_ERR() checking Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 13/29] net: ethernet: ti: add missing of_node_put before return Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 15/29] mac80211: Fix the size used for building probe request Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 16/29] mac80211: update channel context before station state Sasha Levin
2021-12-21 1:57 ` Sasha Levin [this message]
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 21/29] net: usb: lan78xx: add Allied Telesis AT29M2-AF Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 22/29] virtio_net: fix rx_drops stat for small pkts Sasha Levin
2021-12-21 1:57 ` [PATCH AUTOSEL 5.15 23/29] bpf: Make 32->64 bounds propagation slightly more robust Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211221015751.116328-17-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).