diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-04-15 10:27:13 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-04-19 10:14:29 +0200 |
commit | c6d075be966ddc1f08f843f78a82d092e5e4362e (patch) | |
tree | 3e2df66ccf5a93c78528fdc1a8c9932add01a59c /net/mac80211/util.c | |
parent | wifi: mac80211: transmit deauth only if link is available (diff) | |
download | linux-c6d075be966ddc1f08f843f78a82d092e5e4362e.tar.xz linux-c6d075be966ddc1f08f843f78a82d092e5e4362e.zip |
wifi: mac80211: defer link switch work in reconfig
If a link switch work was queued, and then a restart happened, the
worker might be executed before the reconfig, and obviously it will fail
(the HW might not respond to updates etc.)
So, don't perform the switch if we are in reconfig, instead - do it
at the end of the reconfig.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240415112355.1ef1008e3a0a.I19add3f2152dcfd55a759de97b1d09265c1cde98@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index cda398d8f60d..0b893e958959 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2106,6 +2106,13 @@ int ieee80211_reconfig(struct ieee80211_local *local) if (sdata->restart_active_links) ieee80211_set_active_links(&sdata->vif, sdata->restart_active_links); + /* + * If a link switch was scheduled before the restart, and ran + * before reconfig, it will do nothing, so re-schedule. + */ + if (sdata->desired_active_links) + wiphy_work_queue(sdata->local->hw.wiphy, + &sdata->activate_links_work); } /* Reconfigure sched scan if it was interrupted by FW restart */ |