summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-04-09 11:37:09 +0200
committeriwlwifi publisher <>2024-04-17 13:44:06 +0000
commite63d4dbfb22cb1ef4a5a50e3ae67b43c9376c0a3 (patch)
tree3f1663681e602c60fe4ea608bb32b763f9101a4a
parent5b1614913165acd99d2c015d828213fc14b27e57 (diff)
downloadbackport-iwlwifi-e63d4dbfb22cb1ef4a5a50e3ae67b43c9376c0a3.tar.gz
wifi: mac80211: simplify ieee80211_assign_link_chanctx()
There's no need for a label/goto here, the only thing is that drv_assign_vif_chanctx() must succeed to set 'conf' and add the new context to the list, the remaining code is (and must be) the same regardless. type=cleanup ticket=none Change-Id: I9d647178ab25636372ed79e5312c68a06e0bf60c Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/104035 automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> Tested-by: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/104939 x-iwlwifi-stack-dev: f65577123b87ebf31edbd9ffae45c54e62594304
-rw-r--r--net/mac80211/chan.c15
-rw-r--r--versions2
2 files changed, 9 insertions, 8 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 6d0148dea1..8fc92d8f11 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -836,15 +836,16 @@ static int ieee80211_assign_link_chanctx(struct ieee80211_link_data *link,
ieee80211_recalc_chanctx_min_def(local, new_ctx, link);
ret = drv_assign_vif_chanctx(local, sdata, link->conf, new_ctx);
- if (ret)
- goto out;
-
- conf = &new_ctx->conf;
- list_add(&link->assigned_chanctx_list,
- &new_ctx->assigned_links);
+ if (!ret) {
+ /* succeeded, so commit it to the data structures */
+ conf = &new_ctx->conf;
+ list_add(&link->assigned_chanctx_list,
+ &new_ctx->assigned_links);
+ }
+ } else {
+ ret = 0;
}
-out:
rcu_assign_pointer(link->conf->chanctx_conf, conf);
sdata->vif.cfg.idle = !conf;
diff --git a/versions b/versions
index e21296aee0..738d0ca36a 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:12060:ff54f05d"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12061:f6557712"
BACKPORTS_BRANCH_TSTAMP="Apr 17 2024 13:11:40"