Skip to content

Commit 134d715

Browse files
AyalaBkrjmberg-intel
authored andcommitted
wifi: mac80211: correctly set active links upon TTLM
Fix ieee80211_ttlm_set_links() to not set all active links, but instead let the driver know that valid links status changed and select the active links properly. Fixes: 8f500fb ("wifi: mac80211: process and save negotiated TID to Link mapping request") Signed-off-by: Ayala Beker <ayala.beker@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.acddbbf39584.Ide858f95248fcb3e483c97fcaa14b0cd4e964b10@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent a8b5d48 commit 134d715

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

net/mac80211/mlme.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5874,6 +5874,15 @@ static int ieee80211_ttlm_set_links(struct ieee80211_sub_if_data *sdata,
58745874
}
58755875

58765876
if (sdata->vif.active_links != active_links) {
5877+
/* usable links are affected when active_links are changed,
5878+
* so notify the driver about the status change
5879+
*/
5880+
changed |= BSS_CHANGED_MLD_VALID_LINKS;
5881+
active_links &= sdata->vif.active_links;
5882+
if (!active_links)
5883+
active_links =
5884+
BIT(__ffs(sdata->vif.valid_links &
5885+
~dormant_links));
58775886
ret = ieee80211_set_active_links(&sdata->vif, active_links);
58785887
if (ret) {
58795888
sdata_info(sdata, "Failed to set TTLM active links\n");
@@ -5888,7 +5897,6 @@ static int ieee80211_ttlm_set_links(struct ieee80211_sub_if_data *sdata,
58885897
goto out;
58895898
}
58905899

5891-
changed |= BSS_CHANGED_MLD_VALID_LINKS;
58925900
sdata->vif.suspended_links = suspended_links;
58935901
if (sdata->vif.suspended_links)
58945902
changed |= BSS_CHANGED_MLD_TTLM;

0 commit comments

Comments
 (0)