From nobody Wed Jun 11 09:14:11 2025 X-Original-To: dev-commits-src-all@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 4bHKjJ6ZNBz5yyxQ; Wed, 11 Jun 2025 09:14:12 +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 4bHKjH5Wyvz3lYG; Wed, 11 Jun 2025 09:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749633251; 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=VbA8zAYkAY5xvbx1YYsltw4LPquikStWJ14oX/2icZc=; b=r2HTu2TBbnZ8vCUwq6fNFjS5gpBWFd7HX3p3zjHZSLcl5OSbAcvBi5N4bP3E2Mp0/T22gB iVjtpg7HcDbHwRTevNPQvEpgGvNz23kCayYQWVzhcqPLOlFzhWfpsclWouGUMOZ/cmHFW3 cK3E+nsIejL7+6esTc/aG7InVjZovI32+ZIHKClEs5HpmdBppZLFoDskazObST/rB39GUH nGTcBNF74pzv467Kgpsih41zPHO4MZkszTHYvCqch0u0ZJ6mDIl0UvQgrf0QBZtzzHS93u 8zv0dNX3yF8HZ93eeqf6lPMY0PUicxLKIkYKaPkvse8D3EKhPW5no9Ov7DLpdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749633251; 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=VbA8zAYkAY5xvbx1YYsltw4LPquikStWJ14oX/2icZc=; b=r2IrU48hf15th5kSwouDu9mU9Y3oaek08Vr/NqbIynoBadQhoFuqchzIyd7ZifHbgOJOR6 1B/0ok9guLiyfcwZdmkecAKCIVnPdLhLZq5ByUI6wte93kBytcDr8tqmbpmHu/0Lyou7XW j1UlvYV2wqoJAgOnVTRzFB7x/L00NgTRHnidnDXXXCXF9CobucqNvih66a+gc2IFHQEyVZ tKXrN8YIWm38ZaussfPUkAb1pwHMl2dN9w9RavpAo+OTm+g628rFwCoSk/S0i1xgvzSKZy 8khaOIOxB9DJYf0a2J6TYxLhPZV3ltT4X7tIU6ennUppMGigy9n24N6GK3/EpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749633251; a=rsa-sha256; cv=none; b=p/z62ZDEDSSOJn/sm9/c3smAN+pk+pt9bWgxArucEIAEb37JzctlQu7E0xHIiwQ1d9lBPK fbxZGdPp5MVW6p2RYLrSsLBMfti2gzKZoGbgqBuvjYkpjwyroQy4egpUbQ0RrdIhSHP8ZV HE1ek5syUtByOQJdSgrf/cLp1abpwEq9SIto9kNC5Z11uaRB+Mejrn5/dH0w7Rc/DIZGBx xMn/2P7clUioI9ovFYj8ImCllb8VH6Tl8pmzVq6pxSNN1tgdN03gA4bKCMK2EV98TqSl+D Q65naQJ7QjusWxY7+a5RYjn7iqFRcr6M9pJGVm8Redr0xqLa0TExfeM46UPPKQ== 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 4bHKjH55rFz5VK; Wed, 11 Jun 2025 09:14:11 +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 55B9EBHj061837; Wed, 11 Jun 2025 09:14:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55B9EBNx061834; Wed, 11 Jun 2025 09:14:11 GMT (envelope-from git) Date: Wed, 11 Jun 2025 09:14:11 GMT Message-Id: <202506110914.55B9EBNx061834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e4d034ed0bcd - stable/14 - LinuxKPI: 802.11: use macros for locking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e4d034ed0bcd5d5a8104ffe92ae422c01123e7cb Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e4d034ed0bcd5d5a8104ffe92ae422c01123e7cb commit e4d034ed0bcd5d5a8104ffe92ae422c01123e7cb Author: Bjoern A. Zeeb AuthorDate: 2025-05-25 16:44:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-10 23:37:57 +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 (cherry picked from commit d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1) --- 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,