summaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-11 16:38:09 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-07-12 12:10:50 +0200
commit685fb72b63faf09a767cc28332545f5830b91be8 (patch)
tree236e971df0e369a17a4938131ff20d4b60ec568d /net/mac80211/util.c
parent8e95ea49c94908cb10e698c5637d57f0fbdc796d (diff)
downloadop-kernel-dev-685fb72b63faf09a767cc28332545f5830b91be8.zip
op-kernel-dev-685fb72b63faf09a767cc28332545f5830b91be8.tar.gz
mac80211: iterate the virtual monitor interface
If the virtual monitor interface is requested by the driver, it should also be iterated over when the driver wants to iterate all active interfaces. To allow that protect it with the iflist_mtx. Change-Id: I58ac5de2f4ce93d12c5a98ecd2859f60158d5d69 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 596db0c..39b82fe 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -529,6 +529,11 @@ void ieee80211_iterate_active_interfaces(
&sdata->vif);
}
+ sdata = rcu_dereference_protected(local->monitor_sdata,
+ lockdep_is_held(&local->iflist_mtx));
+ if (sdata)
+ iterator(data, sdata->vif.addr, &sdata->vif);
+
mutex_unlock(&local->iflist_mtx);
}
EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces);
@@ -557,6 +562,10 @@ void ieee80211_iterate_active_interfaces_atomic(
&sdata->vif);
}
+ sdata = rcu_dereference(local->monitor_sdata);
+ if (sdata)
+ iterator(data, sdata->vif.addr, &sdata->vif);
+
rcu_read_unlock();
}
EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic);
OpenPOWER on IntegriCloud