diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-02-21 00:04:25 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:56 -0500 |
commit | 761cf7ecffc4bc079679e65c3b1ab107c1c1fb56 (patch) | |
tree | bd9ff2715f6f191c31368c9efc534fdc68187705 /net/wireless/core.h | |
parent | bcf4f99b7b1e0971b79e8df40331e77fc1744049 (diff) |
cfg80211: add assert_cfg80211_lock() to ensure proper protection
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index f3ab00cbf766..982cc6be3484 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/netdevice.h> | 10 | #include <linux/netdevice.h> |
11 | #include <linux/kref.h> | 11 | #include <linux/kref.h> |
12 | #include <linux/rbtree.h> | 12 | #include <linux/rbtree.h> |
13 | #include <linux/mutex.h> | ||
13 | #include <net/genetlink.h> | 14 | #include <net/genetlink.h> |
14 | #include <net/wireless.h> | 15 | #include <net/wireless.h> |
15 | #include <net/cfg80211.h> | 16 | #include <net/cfg80211.h> |
@@ -73,6 +74,11 @@ bool wiphy_idx_valid(int wiphy_idx) | |||
73 | extern struct mutex cfg80211_mutex; | 74 | extern struct mutex cfg80211_mutex; |
74 | extern struct list_head cfg80211_drv_list; | 75 | extern struct list_head cfg80211_drv_list; |
75 | 76 | ||
77 | static inline void assert_cfg80211_lock(void) | ||
78 | { | ||
79 | BUG_ON(!mutex_is_locked(&cfg80211_mutex)); | ||
80 | } | ||
81 | |||
76 | struct cfg80211_internal_bss { | 82 | struct cfg80211_internal_bss { |
77 | struct list_head list; | 83 | struct list_head list; |
78 | struct rb_node rbn; | 84 | struct rb_node rbn; |