The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e4d034ed0bcd5d5a8104ffe92ae422c01123e7cb
commit e4d034ed0bcd5d5a8104ffe92ae422c01123e7cb 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-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,