]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: mac80211: mlme: fix override calculation
authorJohannes Berg <johannes.berg@intel.com>
Sun, 17 Jul 2022 16:16:51 +0000 (18:16 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 22 Jul 2022 12:27:45 +0000 (14:27 +0200)
In my previous changes here, I neglected to take the old
conn_flags into account that might still be present from
the authentication, and thus ieee80211_setup_assoc_link()
can misbehave, as well as the override calculation being
wrong. Fix that by ORing in the old flags.

Fixes: 1845c1d4a455 ("wifi: mac80211: mlme: refactor assoc link setup")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index ee1a72519c15f14a327a0bc01417ef5339c2cbea..2d389e74c95358b107a22a7dc0b77c3e4d18152a 100644 (file)
@@ -7048,6 +7048,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
                goto err_clear;
        }
 
+       /* keep old conn_flags from ieee80211_prep_channel() from auth */
+       conn_flags |= link->u.mgd.conn_flags;
        conn_flags |= ieee80211_setup_assoc_link(sdata, assoc_data, req,
                                                 conn_flags, assoc_link_id);
        override = link->u.mgd.conn_flags != conn_flags;