[PATCH AUTOSEL 6.18] wifi: rtw89: mlo: rearrange MLSR link decision flow
From: Sasha Levin <sashal@kernel.org>
Date: 2026-08-31 13:49:27
Also in:
linux-patches, lkml, stable
Subsystem:
realtek wireless driver (rtw89), the rest · Maintainers:
Ping-Ke Shih, Linus Torvalds
From: Kuan-Chung Chen <redacted> [ Upstream commit 7284f5be5d298c901be1fc9fda6a2476f5ffdbaf ] The original MLSR link decision refers to RSSI, but it should be based on the premise of an existing link. Otherwise, make a link decision to select a new link from any available band. Signed-off-by: Kuan-Chung Chen <redacted> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260429132625.1659182-2-pkshih@realtek.com Signed-off-by: Sasha Levin <sashal@kernel.org> --- LLM Generated explanations, may be completely bogus: Two background git history lookups were interrupted (one had used `git log --all`, which is too slow in this repo). The follow-up without `--all` completed: `rtw89_core_mlo_track` first appears in this 6.18.43 tree at `5d324e5159d9e` (v6.18-rc8 era), so the MLSR code the patch fixes is present here. That matches the earlier analysis — **YES** for backport. drivers/net/wireless/realtek/rtw89/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 989c6b09b2706..c2bf839fd82a9 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c@@ -4276,13 +4276,19 @@ static void rtw89_core_mlsr_link_decision(struct rtw89_dev *rtwdev, { unsigned int sel_link_id = IEEE80211_MLD_MAX_NUM_LINKS; struct ieee80211_vif *vif = rtwvif_to_vif(rtwvif); + u8 decided_bands = BIT(RTW89_BAND_NUM) - 1; struct rtw89_vif_link *rtwvif_link; const struct rtw89_chan *chan; unsigned long usable_links; unsigned int link_id; - u8 decided_bands; u8 rssi; + usable_links = ieee80211_vif_usable_links(vif); + + rtwvif_link = rtw89_get_designated_link(rtwvif); + if (unlikely(!rtwvif_link)) + goto select; + rssi = ewma_rssi_read(&rtwdev->phystat.bcn_rssi); if (unlikely(!rssi)) return;
@@ -4294,12 +4300,6 @@ static void rtw89_core_mlsr_link_decision(struct rtw89_dev *rtwdev, else return; - usable_links = ieee80211_vif_usable_links(vif); - - rtwvif_link = rtw89_get_designated_link(rtwvif); - if (unlikely(!rtwvif_link)) - goto select; - chan = rtw89_chan_get(rtwdev, rtwvif_link->chanctx_idx); if (decided_bands & BIT(chan->band_type)) return;
--
2.53.0