mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 05:49:47 -04:00
wifi: rtw89: mlo: rearrange MLSR link decision flow
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 <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260429132625.1659182-2-pkshih@realtek.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
ef771eabc7
commit
7284f5be5d
@@ -4746,13 +4746,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;
|
||||
@@ -4764,12 +4770,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;
|
||||
|
||||
Reference in New Issue
Block a user