Skip to content

Commit 645acc6

Browse files
committed
wifi: mac80211: mlme: re-parse with correct mode
When doing re-parsing in ieee80211_determine_chan_mode(), the conn->mode is changed, and the whole point of doing the parsing again was to parse as the downgraded mode. However, that didn't actually work, because the setting was copied before and never changed again. Fix that. Fixes: 310c838 ("wifi: mac80211: clean up connection process") Reviewed-by: Miriam Rachel Korenblit <[email protected]> Link: https://msgid.link/20240418105220.5e0d1fcb5622.Ib0673e0bc90033fd6d387b6a5f107c040eb907cf@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 8988445 commit 645acc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/mlme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,6 @@ ieee80211_determine_chan_mode(struct ieee80211_sub_if_data *sdata,
616616
.from_ap = true,
617617
.start = ies->data,
618618
.len = ies->len,
619-
.mode = conn->mode,
620619
};
621620
struct ieee802_11_elems *elems;
622621
struct ieee80211_supported_band *sband;
@@ -625,6 +624,7 @@ ieee80211_determine_chan_mode(struct ieee80211_sub_if_data *sdata,
625624
int ret;
626625

627626
again:
627+
parse_params.mode = conn->mode;
628628
elems = ieee802_11_parse_elems_full(&parse_params);
629629
if (!elems)
630630
return ERR_PTR(-ENOMEM);

0 commit comments

Comments
 (0)