summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2024-03-20 08:31:04 +0200
committeriwlwifi publisher <>2024-04-17 13:41:34 +0000
commitdb634e35cf35223e7ff28a9cdd6c165b3fe29b32 (patch)
tree6427dbe7d294f82f17dc063d11fe3c7671417854
parent80d53489c09babc9132bd06d9b5bb8a313bba61f (diff)
downloadbackport-iwlwifi-db634e35cf35223e7ff28a9cdd6c165b3fe29b32.tar.gz
[BUGFIX] 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. type=bugfix ticket=jira:WIFI-397899 ticket=jira:WIFI-396976 fixes=unknown Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Change-Id: I19add3f2152dcfd55a759de97b1d09265c1cde98 Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/100211 automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> Tested-by: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> (cherry picked from commit 6d04bae311e3588edd20e27daa00e7ac655ce579) Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/101524 x-iwlwifi-stack-dev: 9e52a05c3ed3c5b661f15c5148440a36bf018897
-rw-r--r--net/mac80211/iface.c5
-rw-r--r--net/mac80211/util.c7
-rw-r--r--versions2
3 files changed, 13 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index e65431a2c3..e541b634bb 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1793,8 +1793,13 @@ static void ieee80211_activate_links_work(struct wiphy *wiphy,
struct ieee80211_sub_if_data *sdata =
container_of(work, struct ieee80211_sub_if_data,
activate_links_work);
+ struct ieee80211_local *local = wiphy_priv(wiphy);
+
+ if (local->in_reconfig)
+ return;
ieee80211_set_active_links(&sdata->vif, sdata->desired_active_links);
+ sdata->desired_active_links = 0;
}
/*
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index cda398d8f6..0b893e9589 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 */
diff --git a/versions b/versions
index 9d23546dca..a0f80110de 100644
--- a/versions
+++ b/versions
@@ -2,5 +2,5 @@ BACKPORTS_VERSION="(see git)"
BACKPORTED_KERNEL_VERSION="(see git)"
BACKPORTED_KERNEL_NAME="iwlwifi"
BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12046:48bca211"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12047:9e52a05c"
BACKPORTS_BRANCH_TSTAMP="Apr 17 2024 13:11:40"