From patchwork Mon May 6 19:10:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13655913 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EAC615572C for ; Mon, 6 May 2024 19:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715022643; cv=none; b=bMxe92m10E3fq5U5+vBbAJGnNhQdjA9Lv3m0A3BRgqB2e3cL9SUYr1+5Au8tuiMS6iVdB3B1mr0AwP16EjPpnqZKicIr4tokVW42Kk/iFfRtS+5/FHwEvlIVQouEYnTFD3Do+zmw56s9D/7PWg0NpulD4XKU/H7X6up0TeSmwYo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715022643; c=relaxed/simple; bh=gGXhPP90yeHFvktdUR2v5tNk1s/+rUuhxsStnwLtvhc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MrJSds7UhpuLMkcT8iXIJGpBg4HVUKxnUquXTS/xdp1rKSdMwxKCBWZ4v2I1VL5mnMZXdhPR49lYGuuEAyAg/gFzQh88xFekTwRjTegHRa1FhaPWoi5n+BTkh7LNaZImICPS+pzUqPTTSuT1SL1oYOlxffq6s3zuLZOwO1lA/5k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=G+6bbI85; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="G+6bbI85" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=zUkCLm9OfxbR+Ki1x7eaABorT4P2VsGMjl6gM2Zxuf8=; t=1715022640; x=1716232240; b=G+6bbI856TaCwoe0d9ADe6MB0uo8Wl2/Or4Y2gmYjzLLdyk4PhHmXqSkFSviWZp9osu3biUT1TY HdolYpVT7ICT//Q4EQKC7WQqYet5QAu52SM+5bAHTkYuJ//XcITdCIF9933rNpnB+BiHIR0k/HOQ0 AcyGEpguq71WgQLpTDY+2fPJcA3tf1ypUULJERDW0xR7A0gmsQf9z7u9apPKMZon7tarGtVK8VUXj y+HqNA8QtbSymUKc3dSxG3lOQ43dZYg+V4TsCSzilCgHOs8HwG+ZjLh3sjkvwbRnwX1XjaqUJhKzd V2k6Mdj+i9OxpDA5engLLh9fSk+fdf35z6Aw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s43jQ-000000089kh-3voZ; Mon, 06 May 2024 21:10:37 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Ilan Peer , Miriam Rachel Korenblit Subject: [PATCH 1/3] wifi: mac80211: cancel multi-link reconf work on disconnect Date: Mon, 6 May 2024 21:10:33 +0200 Message-ID: <20240506211034.ac754794279f.Ib9fbb1dab50c6b67f6de9be09a6c452ce89bbd50@changeid> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This work shouldn't run after we're disconnecting. Cancel it earlier (and then don't cancel it in stop later.) Fixes: 8eb8dd2ffbbb ("wifi: mac80211: Support link removal using Reconfiguration ML element") Reviewed-by: Ilan Peer Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a5f2d3cfe60d..49bcd800bdca 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3289,6 +3289,11 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->neg_ttlm_timeout_work); + + sdata->u.mgd.removed_links = 0; + wiphy_delayed_work_cancel(sdata->local->hw.wiphy, + &sdata->u.mgd.ml_reconf_work); + ieee80211_vif_set_links(sdata, 0, 0); ifmgd->mcast_seq_last = IEEE80211_SN_MODULO; @@ -8708,8 +8713,6 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) &ifmgd->teardown_ttlm_work); wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->tdls_peer_del_work); - wiphy_delayed_work_cancel(sdata->local->hw.wiphy, - &ifmgd->ml_reconf_work); wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->ttlm_work); wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->neg_ttlm_timeout_work); From patchwork Mon May 6 19:10:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13655911 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EB03158DC4 for ; Mon, 6 May 2024 19:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715022642; cv=none; b=RQacjtynD6zY5QDi0cJdDCOsMvQjWmEXr6CYfqVux8Rpt1PUsUag0l8DoX6aGoVMjBbH/uAS2GCfNvB1B5nCJXQ5t6L7TZwbHvB/vjUdD4QLmkC3Sml87WFvc/BvW2nz4Htf8hcg1jx0GpFyQMA3bVpJt5UKjKz/gM2Q0IaAiIs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715022642; c=relaxed/simple; bh=/rXrdo3guuU7PaSMKhSAyCkNqtmcZL6SPoVLSwhntkw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ui4gsiHKxb21SvnA+ucIrBsaFWFHesRXy7LSvupPlHPl9SUVjjVHLgJC38/IL1imUjclIDcBM4reuYXtP4I1iTORNsmBYGiczcY/EW71U0yRitT3eHZLQD4TzqSebP2LzeuE+QKxj5j1qjUtZDcR9ZsCCQaikxf+dZw+vy4DZlU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=CVjecVzD; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="CVjecVzD" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=aNY+0nK6q0pEgSp3NsTAxoeeRRjfxMRo9+I59wMAixI=; t=1715022640; x=1716232240; b=CVjecVzDnUuhmIbRqfS1YSjuLHMfpejDm0yZfqSSXcYtJ9c ur3o5cSeKonGmrlQyKbSlKCcI24+qx0k3KjhaqsR4PEv553Ly8Wh5qR6MEZbFarOLx+ujLWeswRI/ xSbgB24JJnLegwiNRPwB0xckqC9JtAshVRH4NgfFk0BUysfzU9uchrITQgXGQ8ICRXxnaDeTg3B8I QbJIUDRpzzS1UmLQd6q92U5CcBj7e0snhl3nC+Zh8kTXBZI49MYqk7A53VnmR7uB3doV9TM3sV4EI mrZH14ksQ8p5o2XPJMCOoafcnOLMdXDYiJDyAx9147R+i4aBGvtLNO1OpirLjV6Q==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s43jR-000000089kh-44Pe; Mon, 06 May 2024 21:10:38 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit Subject: [PATCH 2/3] wifi: mac80211: cancel TTLM teardown work earlier Date: Mon, 6 May 2024 21:10:34 +0200 Message-ID: <20240506211034.096a10ccebec.I5584a21c27eb9b3e87b9e26380b627114b32ccba@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240506211034.ac754794279f.Ib9fbb1dab50c6b67f6de9be09a6c452ce89bbd50@changeid> References: <20240506211034.ac754794279f.Ib9fbb1dab50c6b67f6de9be09a6c452ce89bbd50@changeid> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg It shouldn't be possible to run this after disconnecting, so cancel the work earlier. Fixes: a17a58ad2ff2 ("wifi: mac80211: add support for tearing down negotiated TTLM") Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 49bcd800bdca..9b0598b42d48 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3294,6 +3294,9 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &sdata->u.mgd.ml_reconf_work); + wiphy_work_cancel(sdata->local->hw.wiphy, + &ifmgd->teardown_ttlm_work); + ieee80211_vif_set_links(sdata, 0, 0); ifmgd->mcast_seq_last = IEEE80211_SN_MODULO; @@ -8709,8 +8712,6 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) &ifmgd->beacon_connection_loss_work); wiphy_work_cancel(sdata->local->hw.wiphy, &ifmgd->csa_connection_drop_work); - wiphy_work_cancel(sdata->local->hw.wiphy, - &ifmgd->teardown_ttlm_work); wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->tdls_peer_del_work); wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->ttlm_work); From patchwork Mon May 6 19:10:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13655912 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5F72158DD7 for ; Mon, 6 May 2024 19:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715022643; cv=none; b=YZfbIuDWSB12g0wuBio+S6r6Jv+M/yLwB3zvCcnhVhmhpvWOZ2n9kjv//VuLTswHyV/OrTlXeLUMImgMLmZtj21sVNSrK/lC+kELNhRZOEW+pP6rn6P1fXuwg+KaP+5F5EM0u1YwIT5U8Yd3syONKA/y6bE5OPVz1fzhd068MBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715022643; c=relaxed/simple; bh=b+Dj2cqUDvPB/fZ/kV2hEOcl4chUDeaAhAvguYwWH5E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D6UuxQ9fHHr04i1U/1WHlETKQiHGlU4/YFD9i5SJPmChWuvu85N3kEKnzcbbFs2t22Bt4gAe9G3mPlPdERbWRfd9HxdH9gzYoDUqWQCQz6E6XZ/TqoO5hq9+pzmrI+zmabEXxBLlilOnMIH3Akpee/r/6n6uW53BOOY3QFD1DyU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=qp7iOicP; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="qp7iOicP" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=h6QVOh7HAtToWoQFnR5alrlPTrq9JbbxnxZ6/Y0lQgU=; t=1715022641; x=1716232241; b=qp7iOicPN/+1S6/SON08Wph0UD2o4TxCleQ4SYZ4MJmZHbo g0nP6PqIO9b7YSk46hIx3XC0aU2AFso8A/Vdx3Zmb34mRPBAj4e7W4CN1YAips0+uLFSuLTNEKEhT 0v4xiHtiK5ACvcb/Elwplvd04Y/FltXFu5e1tu3PzRW4H0tiYikRmdsYKmzvrK9jIYe1kg3pw0dYA xbiHTTi/Xeazpq5ElRR9zYcoSLhDKG4u0ojECNiF0S+uMOy83a/Vd5WcttGK2uR/lSyqxwiTKbhwt oVun6boxVT3Ix1rOx5fLBy53jfR7sr0kL0a/HTtjJoOGgpnYijwFT2bhJrrvLv/A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s43jS-000000089kh-2j6t; Mon, 06 May 2024 21:10:38 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit Subject: [PATCH 3/3] wifi: mac80211: don't stop TTLM works again Date: Mon, 6 May 2024 21:10:35 +0200 Message-ID: <20240506211034.f8434be19f56.I021afadc538508da3bc8f95c89f424ca62b94bef@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240506211034.ac754794279f.Ib9fbb1dab50c6b67f6de9be09a6c452ce89bbd50@changeid> References: <20240506211034.ac754794279f.Ib9fbb1dab50c6b67f6de9be09a6c452ce89bbd50@changeid> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg There's no need to stop works that have already been stopped during disconnect, so don't. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 9b0598b42d48..a481728d78c7 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8714,9 +8714,6 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) &ifmgd->csa_connection_drop_work); wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->tdls_peer_del_work); - wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->ttlm_work); - wiphy_delayed_work_cancel(sdata->local->hw.wiphy, - &ifmgd->neg_ttlm_timeout_work); if (ifmgd->assoc_data) ieee80211_destroy_assoc_data(sdata, ASSOC_TIMEOUT);