summary refs log tree commit diff
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-05-28 13:01:53 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-05-29 09:11:56 +0200
commit31eba5bc56a9324f056d28569a4f89f39c1c3f70 (patch)
treeb070a7f1871763d66562678ff23daa4613a3eab9 /net/mac80211/util.c
parente057d3c31bdf87616b415c4b2cbf7310f54b9219 (diff)
downloadlinux-31eba5bc56a9324f056d28569a4f89f39c1c3f70.tar.gz
mac80211: support active monitor interfaces
Support them only if the driver advertises support for them via
IEEE80211_HW_SUPPORTS_ACTIVE_MONITOR. Unlike normal monitor interfaces,
they are added to the driver, along with their MAC address.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 2a8d759324c2..89a83770d152 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -560,6 +560,9 @@ void ieee80211_iterate_active_interfaces(
 	list_for_each_entry(sdata, &local->interfaces, list) {
 		switch (sdata->vif.type) {
 		case NL80211_IFTYPE_MONITOR:
+			if (!(sdata->u.mntr_flags & MONITOR_FLAG_ACTIVE))
+				continue;
+			break;
 		case NL80211_IFTYPE_AP_VLAN:
 			continue;
 		default:
@@ -598,6 +601,9 @@ void ieee80211_iterate_active_interfaces_atomic(
 	list_for_each_entry_rcu(sdata, &local->interfaces, list) {
 		switch (sdata->vif.type) {
 		case NL80211_IFTYPE_MONITOR:
+			if (!(sdata->u.mntr_flags & MONITOR_FLAG_ACTIVE))
+				continue;
+			break;
 		case NL80211_IFTYPE_AP_VLAN:
 			continue;
 		default: