From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9776C3806DD for ; Mon, 2 Feb 2026 16:51:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770051083; cv=none; b=fmpw0Ff9VOc1Scuyq0osyuVbFubtm4v1LCAytaBiPVwjF4o9vTtJ2ApVqbywnE6IsGKV/jaAIy1PPok5kvz9z1150mCEJyRZF2zkG9Z8b4DkpnFY4tg9JvVTbJwHKOjOoMsYNznuDLKuIuVfp76l3T1kM6+J6VbyY5eevqDon00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770051083; c=relaxed/simple; bh=+GZw2Ccyjs1GXRaOEe4tVxx0eiLCzS5WfrugO8sPmYo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pcAvQzQvxYjWB7NCgARsIWBiWUh8Mj6ZoxpvVCOdxLO3GRAHiqdHO4TrkpBH7FKZLvFqv1Gs+QsvKKeVXXMP/7tt1EE/YC0QN1+eFMzIM7I2DQxhbB2z+qyoaHf7UzINxRiLmwvHl6CLLPGAgYKLsix3+P15jZeTYzU2Lr/w8fg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ngpCQtK2; arc=none smtp.client-ip=209.85.208.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ngpCQtK2" Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-38305f05717so42332001fa.1 for ; Mon, 02 Feb 2026 08:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770051080; x=1770655880; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WCxKVpaSPMMkHK5YK3mSbB1f6oAthOa/gt2SpSMaGpQ=; b=ngpCQtK24yeuqk853Lz+/lC99Yk7GXQ0d7lFQ6olKJjCorE4nGvT44IhxU6O2o88H+ BalnmIm7SUuvPbiBUxyTMj/sfCERwHcuR7M/BDyAvl5gIyZ3rO7l4ar5GPU5xrbqt0vr 9TDOcyuwUhbH7gSB+3JKGcm6dMhvIJt9rBktBOq+ya5iBw6pRDv0SFJbgwH5cNe9ONyN IMNPOd9M86jdwKpjctJUcQjvVWIx/se74+GMEwSttlMgpjj3fAW//RjdLvcodIT4qEbd 87bJbiwu3LYSvVsM3cqJjX+qHWRTyBEwGe1imWiugoou33llfJUvvq/ps+3PkYzZOui/ HBYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770051080; x=1770655880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WCxKVpaSPMMkHK5YK3mSbB1f6oAthOa/gt2SpSMaGpQ=; b=RLCCTqDolB/5gc6QNLARyjzlkdrQEnR/g3r58iriWhtA9dqCQsSX8sm9y749fmUBub c7Us5NkpVRRXE0sWK+JqOO3H34hx6AyfD0fk0t5JsdnttVFctxhVIFDUL3UjvfGGobIr coUOxITvD6+YqpCQWWkapmLl1xxYclWIuTARtmD6N9JVF/1QMW85OzeGpR6MeUk5XrjU OzOnr88W5oGD8+lYtB/LOTIrTqZ8CMHjN2lX7GSgL1FCGwquIpIE2uRMPjtWTRHo13eT /cBvSR3T/9IWft1e13UTHB6B80NgqPWWDJjepTeEUElPEG17TiH+OQwRi9E9SsRwQ82F QbHA== X-Forwarded-Encrypted: i=1; AJvYcCVfqZLf+ov5MStkoJrjAQMxBYOql2xLl/nOWB6f3C/j5a3HkK64aPJNFKq7oJAIkpUiWf+A6GIexPkKWKw=@vger.kernel.org X-Gm-Message-State: AOJu0YzHJqxBwi4DolZtlT+Zq8pOQ42bm7txQGmTpRGuSbbp7RqZTOZd AkgPM9WzTRseU3Hy6Q6KZ7Km99NXXJgW3RPy4nxDbxcbGi6V15jwt66Z X-Gm-Gg: AZuq6aIG3+7DxEW4Ez8PzAZOsxv04pYu7RZNo0XBnM7VdonBpZYFTc/kcJ9oq69XPtf 7zKNTCcqrxuRC1c5UdNlXl9UvAyvZ7jaOYhN0wAfT1J+/5pOYm1xZ9+FSeolK9QVAg5Un/h+sfK i5MvOc8f1PZGZ6ZNk2ZvyYC3pnSqH6zWwboWuFUarn7eWBmEEG+pX52x3bGCn5S6mm1OWEIjFpb YHORSiWB+tgfYHNuWwxd0An1BcIRdbUb29P45Enlza4sknlXE3OS3e86kWS5o0PFakBEQeGUjsl QFkbQHIzU+7y/pXvw4Azw6kOIG4H/S9f9WOe7wE3GdBl75XjmH5LTGoH32jXgR5Y9T5zgDliO5b SDnGiSC/5aNshfK0rgFG8TlhsPXN+SswAQJTc58xenDJ/LG/NSLCco6kiwCiscbMOt8MsP/UtS/ wVh6dG/PUfVxpZukapide/ZNSTVud0Z1Iwv3sKJYph5UOlyng2b+HP9QHDCRnCrhJCr8tP70/sQ 2oCABzAxdnYFRNTfvC6 X-Received: by 2002:a2e:b8cd:0:b0:383:210a:7b2c with SMTP id 38308e7fff4ca-386466fb2famr41766161fa.44.1770051079638; Mon, 02 Feb 2026 08:51:19 -0800 (PST) Received: from uuba.fritz.box (2001-14ba-6e-3100-2ef5-59d5-c9b3-566.rev.dnainternet.fi. [2001:14ba:6e:3100:2ef5:59d5:c9b3:566]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38625ad8ae0sm31718571fa.0.2026.02.02.08.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 08:51:19 -0800 (PST) From: =?UTF-8?q?Hanne-Lotta=20M=C3=A4enp=C3=A4=C3=A4?= To: stable@vger.kernel.org Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Johannes Berg , Emmanuel Grumbach , =?UTF-8?q?Hanne-Lotta=20M=C3=A4enp=C3=A4=C3=A4?= Subject: [PATCH 5.15.y 3/3] wifi: mac80211: move TDLS work to wiphy work Date: Mon, 2 Feb 2026 18:50:38 +0200 Message-ID: <20260202165038.215693-3-hannelotta@gmail.com> X-Mailer: git-send-email 2.53.0.rc2.2.g2258446484 In-Reply-To: <20260202165038.215693-1-hannelotta@gmail.com> References: <20260202165038.215693-1-hannelotta@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Johannes Berg [ Upstream commit 777b26002b73127e81643d9286fadf3d41e0e477 ] Again, to have the wiphy locked for it. Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg [ Summary of conflict resolutions: - In mlme.c, move only tdls_peer_del_work to wiphy work, and none the other works ] Signed-off-by: Hanne-Lotta Mäenpää --- net/mac80211/ieee80211_i.h | 4 ++-- net/mac80211/mlme.c | 7 ++++--- net/mac80211/tdls.c | 11 ++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 8d6616f646e7..306359d43571 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -542,7 +542,7 @@ struct ieee80211_if_managed { /* TDLS support */ u8 tdls_peer[ETH_ALEN] __aligned(2); - struct delayed_work tdls_peer_del_work; + struct wiphy_delayed_work tdls_peer_del_work; struct sk_buff *orig_teardown_skb; /* The original teardown skb */ struct sk_buff *teardown_skb; /* A copy to send through the AP */ spinlock_t teardown_lock; /* To lock changing teardown_skb */ @@ -2494,7 +2494,7 @@ int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, size_t extra_ies_len); int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, const u8 *peer, enum nl80211_tdls_operation oper); -void ieee80211_tdls_peer_del_work(struct work_struct *wk); +void ieee80211_tdls_peer_del_work(struct wiphy *wiphy, struct wiphy_work *wk); int ieee80211_tdls_channel_switch(struct wiphy *wiphy, struct net_device *dev, const u8 *addr, u8 oper_class, struct cfg80211_chan_def *chandef); diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index d147760e8389..25468d5e874a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4890,8 +4890,8 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) INIT_WORK(&ifmgd->csa_connection_drop_work, ieee80211_csa_connection_drop_work); INIT_WORK(&ifmgd->request_smps_work, ieee80211_request_smps_mgd_work); - INIT_DELAYED_WORK(&ifmgd->tdls_peer_del_work, - ieee80211_tdls_peer_del_work); + wiphy_delayed_work_init(&ifmgd->tdls_peer_del_work, + ieee80211_tdls_peer_del_work); timer_setup(&ifmgd->timer, ieee80211_sta_timer, 0); timer_setup(&ifmgd->bcn_mon_timer, ieee80211_sta_bcn_mon_timer, 0); timer_setup(&ifmgd->conn_mon_timer, ieee80211_sta_conn_mon_timer, 0); @@ -6010,7 +6010,8 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) cancel_work_sync(&ifmgd->request_smps_work); cancel_work_sync(&ifmgd->csa_connection_drop_work); cancel_work_sync(&ifmgd->chswitch_work); - cancel_delayed_work_sync(&ifmgd->tdls_peer_del_work); + wiphy_delayed_work_cancel(sdata->local->hw.wiphy, + &ifmgd->tdls_peer_del_work); sdata_lock(sdata); if (ifmgd->assoc_data) { diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index 137be9ec94af..c2d7479c119a 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -21,7 +21,7 @@ /* give usermode some time for retries in setting up the TDLS session */ #define TDLS_PEER_SETUP_TIMEOUT (15 * HZ) -void ieee80211_tdls_peer_del_work(struct work_struct *wk) +void ieee80211_tdls_peer_del_work(struct wiphy *wiphy, struct wiphy_work *wk) { struct ieee80211_sub_if_data *sdata; struct ieee80211_local *local; @@ -1126,9 +1126,9 @@ ieee80211_tdls_mgmt_setup(struct wiphy *wiphy, struct net_device *dev, return ret; } - ieee80211_queue_delayed_work(&sdata->local->hw, - &sdata->u.mgd.tdls_peer_del_work, - TDLS_PEER_SETUP_TIMEOUT); + wiphy_delayed_work_queue(sdata->local->hw.wiphy, + &sdata->u.mgd.tdls_peer_del_work, + TDLS_PEER_SETUP_TIMEOUT); return 0; out_unlock: @@ -1425,7 +1425,8 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev, } if (ret == 0 && ether_addr_equal(sdata->u.mgd.tdls_peer, peer)) { - cancel_delayed_work(&sdata->u.mgd.tdls_peer_del_work); + wiphy_delayed_work_cancel(sdata->local->hw.wiphy, + &sdata->u.mgd.tdls_peer_del_work); eth_zero_addr(sdata->u.mgd.tdls_peer); } -- 2.53.0.rc2.2.g2258446484