net/mac80211/cfg.c | 3 ++- net/mac80211/rx.c | 7 ++++++- net/mac80211/sta_info.c | 7 ++++++- net/mac80211/sta_info.h | 2 +- net/mac80211/tx.c | 2 ++ 5 files changed, 17 insertions(+), 4 deletions(-)
This serie aims to allow non-MLD sta to roam between same MLD AP links as if they were two BSSs belonging to the same ESS. The first issue is that when a non-MLD STA is connected to one MLD AP link all received management frames are reported to userland with the current associated link id even if STA sent those frames on one of the other links (e.g. offchannel probe request). Because hostapd relies on this link id information to select the proper link for answering those management frames, probe responses to offchannel requests are sent through the wrong link and the sta misses them. To fix that, the first patch of this serie does not report management frames with a link id (link id == -1) and let hostapd do the freq to link conversion to respond. This relies on the fact that hostapd knows how to do this freq to link conversion which is needed anyway for the first pre-association scan. We can also do this conversion in mac80211 instead if it is deem preferrable. The second issue comes from the fact that hostapd queries a sta removal for the previous association even after the sta has successfully roamed to the new link, causing the current sta to be removed. To avoid that the second patch checks the sta removal link id parameter. If a link id is supplied and the sta is not currently using this link, this removal is ignored. An additionnal hostapd patch is needed so that a link id parameter is added with NL80211_CMD_DEL_STATION requests, and will be sent to hostapd mailing if it appears that this serie makes sense. The third patch fixes the link id information initialization when tx frame with 802.11 HW offloading, this will be needed later to get sta roaming working with ath12k. An additionnal ath12k fix will also be provided in order to get non-MLD sta roaming working with this driver. This serie along with the mentionned hostapd patch allowes a non-MLD STA to successfully roam between several MLD AP links with hwsim. Remi Pommarel (3): wifi: mac80211: Do not set link_id for received management frame wifi: mac80211: Check link id at station removal wifi: mac80211: Correctly init MLO link in ieee80211_8023_xmit() net/mac80211/cfg.c | 3 ++- net/mac80211/rx.c | 7 ++++++- net/mac80211/sta_info.c | 7 ++++++- net/mac80211/sta_info.h | 2 +- net/mac80211/tx.c | 2 ++ 5 files changed, 17 insertions(+), 4 deletions(-) -- 2.40.0
On Fri, 2025-06-27 at 22:46 +0200, Remi Pommarel wrote: > > To fix that, the first patch of this serie does not report management > frames with a link id (link id == -1) and let hostapd do the freq to > link conversion to respond. This relies on the fact that hostapd knows > how to do this freq to link conversion which is needed anyway for the > first pre-association scan. We can also do this conversion in mac80211 > instead if it is deem preferrable. You should probably send patches as RFC if you have things like that. > This serie along with the mentionned hostapd patch allowes a non-MLD > STA to successfully roam between several MLD AP links with hwsim. Maybe so, but does anything _else_ MLO related still work? Surely it cannot, given you just unconditionally made it no longer have a link ID ... And indeed most of the EHT hwsim tests no longer pass, and even crash the kernel. Since you clearly were running hwsim tests, please run the existing ones too :) Also, I suspect that https://lore.kernel.org/linux- wireless/20250630084119.3583593-1-quic_sarishar@quicinc.com/ might go some way towards fixing this as well? johannes
On Tue, Jul 08, 2025 at 11:00:26AM +0200, Johannes Berg wrote: > On Fri, 2025-06-27 at 22:46 +0200, Remi Pommarel wrote: > > > > To fix that, the first patch of this serie does not report management > > frames with a link id (link id == -1) and let hostapd do the freq to > > link conversion to respond. This relies on the fact that hostapd knows > > how to do this freq to link conversion which is needed anyway for the > > first pre-association scan. We can also do this conversion in mac80211 > > instead if it is deem preferrable. > > You should probably send patches as RFC if you have things like that. Sure. Some subsystems have a tendency to ignore those RFCs patches but that does not seem to be the case for linux-wireless. > > > This serie along with the mentionned hostapd patch allowes a non-MLD > > STA to successfully roam between several MLD AP links with hwsim. > > Maybe so, but does anything _else_ MLO related still work? Surely it > cannot, given you just unconditionally made it no longer have a link ID > ... And indeed most of the EHT hwsim tests no longer pass, and even > crash the kernel. > > Since you clearly were running hwsim tests, please run the existing ones > too :) Agh, sorry about that. I was not running the hostapd's hwsim tests because I just discovered they exist. With the mentionned hostapd patch most of them pass, but yes of course, let's not break old wpa_supplicant/hostapd with kernel changes. Doing freq to link id conversion instead makes all eht test to pass (I will of course also add a hwsim test for this specific issue). > > Also, I suspect that https://lore.kernel.org/linux- > wireless/20250630084119.3583593-1-quic_sarishar@quicinc.com/ might go > some way towards fixing this as well? No I am afraid this one won't help. The issue here is receiving off channel management frames and using the link id the sta is currently associated with to report them to userland. For example if sta is associated with link 0 and send a probe request on link 1 (off channel scan), this frame should be reported to hostapd with either no link id or a link id of 1. Thanks -- Remi
© 2016 - 2025 Red Hat, Inc.