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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user