Skip to content

Commit cb55e08

Browse files
committed
wifi: mac80211: remove link before AP
If the AP removal timer is long, we don't really want to remove the link immediately. However, we really should do it _before_ the AP removes it (which happens at or after count reaches 0), so subtract 1 from the countdown when scheduling the timer. This causes the link removal work to run just after the beacon with value 1 is received. If the counter is already zero, do it immediately. This fixes an issue where we do the removal too late and receive a beacon from the AP that's no longer associated with the MLD, but thus removed EHT and ML elements, and then we disconnect instead from the whole MLD, since one of the associated APs changed mode from EHT to HE. Fixes: 8eb8dd2 ("wifi: mac80211: Support link removal using Reconfiguration ML element") Reviewed-by: Ilan Peer <[email protected]> Reviewed-by: Miriam Rachel Korenblit <[email protected]> Link: https://msgid.link/20240418105220.03ac4a09fa74.Ifb8c8d38e3402721a81ce5981568f47b5c5889cb@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 2a4e01e commit cb55e08

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

net/mac80211/mlme.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5844,8 +5844,11 @@ static void ieee80211_ml_reconfiguration(struct ieee80211_sub_if_data *sdata,
58445844
continue;
58455845
}
58465846

5847-
link_delay = link_conf->beacon_int *
5848-
link_removal_timeout[link_id];
5847+
if (link_removal_timeout[link_id] < 1)
5848+
link_delay = 0;
5849+
else
5850+
link_delay = link_conf->beacon_int *
5851+
(link_removal_timeout[link_id] - 1);
58495852

58505853
if (!delay)
58515854
delay = link_delay;

0 commit comments

Comments
 (0)