]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mac80211: fix U-APSD check in ML reconfiguration
authorJohannes Berg <johannes.berg@intel.com>
Sat, 8 Mar 2025 21:03:31 +0000 (23:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:48 +0000 (11:12 +0200)
[ Upstream commit 7a6a740be17e049a2742c76bb1dadb3d78c930d9 ]

If U-APSD isn't enabled by us, then IEEE80211_STA_UAPSD_ENABLED
won't be set, but the AP can still support it in that case. Only
require U-APSD from the AP if we enabled it, don't require it to
be disabled on the AP if we didn't.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250308225541.b4674be12a38.I01959e448c6a2a3e8bc5d561bbae9e8d2cca616a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/mlme.c

index 3f30c4c1f78bb592846744c2267fcb127512b64a..f92cbbc32a9e5c403b5811683cdf6162a24a4ac7 100644 (file)
@@ -10216,12 +10216,11 @@ int ieee80211_mgd_assoc_ml_reconf(struct ieee80211_sub_if_data *sdata,
                        }
                }
 
-               /* Require U-APSD support to be similar to the current valid
-                * links
-                */
-               if (uapsd_supported !=
-                   !!(sdata->u.mgd.flags & IEEE80211_STA_UAPSD_ENABLED)) {
+               /* Require U-APSD support if we enabled it */
+               if (sdata->u.mgd.flags & IEEE80211_STA_UAPSD_ENABLED &&
+                   !uapsd_supported) {
                        err = -EINVAL;
+                       sdata_info(sdata, "U-APSD on but not available on (all) new links\n");
                        goto err_free;
                }