diff mbox series

[v2] wifi: cfg80211: Clear mlo_links info when STA disconnect

Message ID 20240410031048.23372-1-quic_deng@quicinc.com
State New
Headers show
Series [v2] wifi: cfg80211: Clear mlo_links info when STA disconnect | expand

Commit Message

Xin Deng April 10, 2024, 3:10 a.m. UTC
wdev->valid_links is not cleared when upper layer disconnect from a
wdev->AP MLD. It has been observed that this would prevent offchannel
operations like remain-on-channel which would be needed for user space
operations with Public Action frame.
Clear the wdev->valid_links when STA disconnect.

Signed-off-by: Xin Deng <quic_deng@quicinc.com>
---
 net/wireless/sme.c | 1 +
 1 file changed, 1 insertion(+)


base-commit: 8027a466a77a288eccd2d11868f504e24231f3b7

Comments

Johannes Berg April 17, 2024, 7:32 a.m. UTC | #1
On Tue, 2024-04-09 at 20:10 -0700, Xin Deng wrote:
> wdev->valid_links is not cleared when upper layer disconnect from a
> wdev->AP MLD. It has been observed that this would prevent offchannel
> operations like remain-on-channel which would be needed for user space
> operations with Public Action frame.
> Clear the wdev->valid_links when STA disconnect.
> 

OK, so now we have a version that actually _works_.

However, I'm not convinced it's _correct_.

You say "on disconnect", but also do it before connect (where maybe it
makes sense?), on roaming (where it doesn't), on connect result (where
presumably if we do it correct, it's already 0), and finally on
disconnect.

And also in a function that never even mentions anything about doing
something to links in the name.

All that doesn't feel right to me.

johannes
diff mbox series

Patch

diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 82e3ce42206c..6a08f9d35eb2 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -477,6 +477,7 @@  static void cfg80211_wdev_release_bsses(struct wireless_dev *wdev)
 				 &wdev->links[link].client.current_bss->pub);
 		wdev->links[link].client.current_bss = NULL;
 	}
+	wdev->valid_links = 0;
 }
 
 void cfg80211_wdev_release_link_bsses(struct wireless_dev *wdev, u16 link_mask)