From 761cf7ecffc4bc079679e65c3b1ab107c1c1fb56 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Sat, 21 Feb 2009 00:04:25 -0500 Subject: cfg80211: add assert_cfg80211_lock() to ensure proper protection Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville --- net/wireless/core.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net/wireless/core.h') diff --git a/net/wireless/core.h b/net/wireless/core.h index f3ab00cbf76..982cc6be348 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -73,6 +74,11 @@ bool wiphy_idx_valid(int wiphy_idx) extern struct mutex cfg80211_mutex; extern struct list_head cfg80211_drv_list; +static inline void assert_cfg80211_lock(void) +{ + BUG_ON(!mutex_is_locked(&cfg80211_mutex)); +} + struct cfg80211_internal_bss { struct list_head list; struct rb_node rbn; -- cgit v1.2.3