diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-03-12 17:34:03 +0200 |
---|---|---|
committer | iwlwifi publisher <> | 2024-04-17 13:37:00 +0000 |
commit | d1ed6f9da4cd72d04b049436c88f01308b63dc63 (patch) | |
tree | 2febb6ddb4c98797202098a66894fc076585c60f | |
parent | c828ea9b10fa556a7f09264ba587063a5e84c31a (diff) | |
download | backport-iwlwifi-d1ed6f9da4cd72d04b049436c88f01308b63dc63.tar.gz |
[BUGFIX] wifi: mac80211: fix prep_connection error path
If prep_channel fails in prep_connection, the code releases
the deflink's chanctx, which is wrong since we may be using
a different link. It's already wrong to even do that always
though, since we might still have the station. Remove it
only if prep_channel succeeded and later updates fail.
type=bugfix
fixes=unknown
ticket=jira:WIFI-390588
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Change-Id: I033c9b15483933088f32a2c0789612a33dd33d82
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/98829
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>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
(cherry picked from commit bf425245a0567060cca3b918bf4fc16fe93d1cfe)
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/98265
Reviewed-by: Golan Ben Ami <golan.ben.ami@intel.com>
x-iwlwifi-stack-dev: 416dba3ba22c47acc3284d2198c22a308ab6e863
-rw-r--r-- | net/mac80211/mlme.c | 5 | ||||
-rw-r--r-- | versions | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 640b503d29..516ab62e48 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -7975,7 +7975,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, sdata_info(sdata, "failed to insert STA entry for the AP (error %d)\n", err); - goto out_err; + goto out_release_chan; } } else WARN_ON_ONCE(!ether_addr_equal(link->u.mgd.bssid, cbss->bssid)); @@ -7986,8 +7986,9 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, return 0; +out_release_chan: + ieee80211_link_release_channel(link); out_err: - ieee80211_link_release_channel(&sdata->deflink); ieee80211_vif_set_links(sdata, 0, 0); return err; } @@ -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:12019:f5f15c8f" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12020:416dba3b" BACKPORTS_BRANCH_TSTAMP="Apr 17 2024 13:11:40" |