aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 56f18c2eb919..99acd51343b1 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -56,6 +56,9 @@ struct cfg80211_registered_device {
56 56
57 u32 ap_beacons_nlpid; 57 u32 ap_beacons_nlpid;
58 58
59 int num_running_ifaces;
60 int num_running_monitor_ifaces;
61
59 /* BSSes/scanning */ 62 /* BSSes/scanning */
60 spinlock_t bss_lock; 63 spinlock_t bss_lock;
61 struct list_head bss_list; 64 struct list_head bss_list;
@@ -197,6 +200,14 @@ static inline void wdev_unlock(struct wireless_dev *wdev)
197#define ASSERT_RDEV_LOCK(rdev) lockdep_assert_held(&(rdev)->mtx) 200#define ASSERT_RDEV_LOCK(rdev) lockdep_assert_held(&(rdev)->mtx)
198#define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx) 201#define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx)
199 202
203static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev)
204{
205 ASSERT_RDEV_LOCK(rdev);
206
207 return rdev->num_running_ifaces == rdev->num_running_monitor_ifaces &&
208 rdev->num_running_ifaces > 0;
209}
210
200enum cfg80211_event_type { 211enum cfg80211_event_type {
201 EVENT_CONNECT_RESULT, 212 EVENT_CONNECT_RESULT,
202 EVENT_ROAMED, 213 EVENT_ROAMED,
@@ -444,6 +455,9 @@ int ieee80211_get_ratemask(struct ieee80211_supported_band *sband,
444int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev, 455int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev,
445 u32 beacon_int); 456 u32 beacon_int);
446 457
458void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev,
459 enum nl80211_iftype iftype, int num);
460
447#ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS 461#ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS
448#define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond) 462#define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond)
449#else 463#else