The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1
commit d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1 Author: Bjoern A. Zeeb <b...@freebsd.org> AuthorDate: 2025-05-25 16:44:55 +0000 Commit: Bjoern A. Zeeb <b...@freebsd.org> 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,