From 930336208fe2c7fd1ef283f9899ae3674224d40b Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 22 Sep 2026 14:48:37 +0200 Subject: [PATCH] wifi: mac80211: mesh: don't send peering close in listen In listen state, nothing has been sent, so there's no need to send a WLAN_SP_MESH_PEERING_CLOSE frame. Also, in case the station just failed to insert, e.g. due to a missing channel context, it might not be possible to transmit the frame at all, leading to a warning. Reported-by: syzbot+8bd4574e8c52c48c2595@syzkaller.appspotmail.com Link: https://patch.msgid.link/20260922144838.b1b35f44b069.I80ab9ad25eb48d291807ca968fcba6b64d8fb6ab@changeid Signed-off-by: Johannes Berg --- net/mac80211/mesh_plink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 268857467f29..6ce3ae3fb39b 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -399,11 +399,13 @@ u64 mesh_plink_deactivate(struct sta_info *sta) { struct ieee80211_sub_if_data *sdata = sta->sdata; u64 changed; + bool send_close; spin_lock_bh(&sta->mesh->plink_lock); + send_close = sta->mesh->plink_state != NL80211_PLINK_LISTEN; changed = __mesh_plink_deactivate(sta); - if (!sdata->u.mesh.user_mpm) { + if (!sdata->u.mesh.user_mpm && send_close) { sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED; mesh_plink_frame_tx(sdata, sta, WLAN_SP_MESH_PEERING_CLOSE, sta->sta.addr, sta->mesh->llid,