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>
This commit is contained in:
committed by
John W. Linville
parent
bcf4f99b7b
commit
761cf7ecff
@@ -10,6 +10,7 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <net/genetlink.h>
|
||||
#include <net/wireless.h>
|
||||
#include <net/cfg80211.h>
|
||||
@@ -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;
|
||||
|
Reference in New Issue
Block a user