From nobody Tue Jun 3 18:37:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bBfbF32QQz5y1Bb; Tue, 03 Jun 2025 18:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bBfbF146Vz3bH9; Tue, 03 Jun 2025 18:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748975865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eL5F2AdF7sbTMN+KOyR3GVo8BcYCOnJjK2lp8VzZS8o=; b=SlrHusNnOGaKv1YUt08+5fn5M4biXQpZzkmsjym1v2aQFgLsHl2xUyv3gwd4556O6uVlpo OsiozJHWQyNw2Kvp5tr5bnw9Ibfdj2mVZpwevJhvnFzKq9bA0xj1ig81dZln1rkeEmSrZ3 18w8XoUAvMarHfpGzgYWbuFYGI9DeYVL6V39zlJjsEgDH02BllZmXf5YqzOysqbuM9aj2+ du0TvkRN1VZK/6YKv4dt01fK1AQYDV3PAksLct72LDPsYQbFC6tiz5N1D7BmhBHOfx+Iau TS2j2b14gCtHlq+QB43C788h8+Bl13FjUvLkYJKg3WEGOOhdiEsmdd8DLC3kZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748975865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eL5F2AdF7sbTMN+KOyR3GVo8BcYCOnJjK2lp8VzZS8o=; b=gwQYabDcxnj0uFPo6UInD1Rc7vr7s2MxGTpcoznjY3jBQJUXwQsCcJpJOpU67S4BcvaUax E7HiWjfJWeHNokh7QA3lDzjEBbcVx+Kzq6we1ncNKFZ22eJzaw2dpUq9an3gM8ZHeu6bKT 6zQ2vTzt7EO6Qch+8fyog3YN4/mxwiruGGAb5rN8x3vw66dF+jL0A5VZ9whcw1zGPApzKh R0Jk08FW7At7zMWN7yiMRdGcT2ZQkD3o3oq6B9Rj5iiprtMghIVopOPWNKMGPLWepBaDpp a0cudxTX6aMZytfVWoA+j2yte/+j33lgFoBTr9EvLRODqgHk45+WS6YqzgLnug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748975865; a=rsa-sha256; cv=none; b=kvWq7QhIC60tL1CTtvToxWuNHflX2LzEcMCiExqFH7zNZm7I4LUHNev+kT/WIojpcMfD5Q o88D4BMmD+MqZVjkyKCI6/u7lHPXy0c8Jjs4oghHfjHWpUlTxdc55RDQZ1dE4PLnFfGhvM xeAN1TBJnmopa4ssS0/9Pc7vQI96NJmqG5jrUPIokoNEkGfUZOTvCBUNlAs7r6QuE1llG1 u7J9v3f+GsGMtdB7oQrVmRrWS1YbTJpiwwp2FEetk0eO3suxtHu4zIEa6qJdyjMwJp9fN0 XpxaWtCKfnAVqQ9IU7INU8Wcm+gjvU4z673a4cqmaK0mjwPogxrZT81hGIkGZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bBfbF0WqWzr0q; Tue, 03 Jun 2025 18:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 553IbjRx000604; Tue, 3 Jun 2025 18:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 553Ibjgm000601; Tue, 3 Jun 2025 18:37:45 GMT (envelope-from git) Date: Tue, 3 Jun 2025 18:37:45 GMT Message-Id: <202506031837.553Ibjgm000601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d87ee937ed85 - main - LinuxKPI: 802.11: use macros for locking List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1 commit d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1 Author: Bjoern A. Zeeb AuthorDate: 2025-05-25 16:44:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-03 18:35:10 +0000 LinuxKPI: 802.11: use macros for locking Rather than using inline functions use macros so we know where we are taking the lock in the code rather than only recording the inline function location. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 1e4f917a2796..7849c77062dc 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1408,20 +1408,11 @@ wiphy_dev(struct wiphy *wiphy) return (wiphy->dev); } -#define wiphy_dereference(wiphy, p) \ - rcu_dereference_check(p, lockdep_is_held(&(wiphy)->mtx)) +#define wiphy_dereference(_w, p) \ + rcu_dereference_check(p, lockdep_is_held(&(_w)->mtx)) -static __inline void -wiphy_lock(struct wiphy *wiphy) -{ - mutex_lock(&wiphy->mtx); -} - -static __inline void -wiphy_unlock(struct wiphy *wiphy) -{ - mutex_unlock(&wiphy->mtx); -} +#define wiphy_lock(_w) mutex_lock(&(_w)->mtx) +#define wiphy_unlock(_w) mutex_unlock(&(_w)->mtx) static __inline void wiphy_rfkill_set_hw_state_reason(struct wiphy *wiphy, bool blocked,