diff options
author | Benjamin Berg <benjamin.berg@intel.com> | 2024-03-07 10:34:12 +0100 |
---|---|---|
committer | iwlwifi publisher <> | 2024-04-17 13:37:31 +0000 |
commit | 67e6664e0b0baa5c3e2014b1355a09f8d6463a2f (patch) | |
tree | d7dffe6e35b6e930128509a68a739a2acb027b13 | |
parent | bcd6c3833a7b28531d9dda33bfa015ed5a167461 (diff) | |
download | backport-iwlwifi-67e6664e0b0baa5c3e2014b1355a09f8d6463a2f.tar.gz |
wifi: mac80211: improve association error reporting slightly
There is no reason to check the request flags for each of the links, so
pull that out of the loop. Also, within the loop we can set the per-link
error everywhere.
type=feature
ticket=none
Change-Id: I71b11a8d66a9cae4c27e242a47d1d92922609b03
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/98021
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/99323
Reviewed-by: Golan Ben Ami <golan.ben.ami@intel.com>
x-iwlwifi-stack-dev: 4b01b90544d3335d9153101f1f5c7f03d94a0c40
-rw-r--r-- | net/mac80211/mlme.c | 18 | ||||
-rw-r--r-- | versions | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 32311462e1..8b86a2ea64 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8524,6 +8524,14 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, if (req->ap_mld_addr) { uapsd_supported = true; + if (req->flags & (ASSOC_REQ_DISABLE_HT | + ASSOC_REQ_DISABLE_VHT | + ASSOC_REQ_DISABLE_HE | + ASSOC_REQ_DISABLE_EHT)) { + err = -EINVAL; + goto err_free; + } + for (i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) { struct ieee80211_supported_band *sband; struct cfg80211_bss *link_cbss = req->links[i].bss; @@ -8536,19 +8544,13 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, if (!bss->wmm_used) { err = -EINVAL; - goto err_free; - } - - if (req->flags & (ASSOC_REQ_DISABLE_HT | - ASSOC_REQ_DISABLE_VHT | - ASSOC_REQ_DISABLE_HE | - ASSOC_REQ_DISABLE_EHT)) { - err = -EINVAL; + req->links[i].error = err; goto err_free; } if (link_cbss->channel->band == NL80211_BAND_S1GHZ) { err = -EINVAL; + req->links[i].error = err; goto err_free; } @@ -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:12022:baa8405b" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12023:4b01b905" BACKPORTS_BRANCH_TSTAMP="Apr 17 2024 13:11:40" |