diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 5227c16f113e..7b278e9aa1a4 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -482,10 +482,9 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
482 | struct ieee80211_local *local = hw_to_local(hw); | 482 | struct ieee80211_local *local = hw_to_local(hw); |
483 | struct ieee80211_sub_if_data *sdata; | 483 | struct ieee80211_sub_if_data *sdata; |
484 | 484 | ||
485 | ASSERT_RTNL(); | 485 | rcu_read_lock(); |
486 | 486 | ||
487 | /* we hold the RTNL here so can safely walk the list */ | 487 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
488 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
489 | switch (sdata->type) { | 488 | switch (sdata->type) { |
490 | case IEEE80211_IF_TYPE_INVALID: | 489 | case IEEE80211_IF_TYPE_INVALID: |
491 | case IEEE80211_IF_TYPE_MNTR: | 490 | case IEEE80211_IF_TYPE_MNTR: |
@@ -503,5 +502,7 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
503 | iterator(data, sdata->dev->dev_addr, | 502 | iterator(data, sdata->dev->dev_addr, |
504 | sdata->dev->ifindex); | 503 | sdata->dev->ifindex); |
505 | } | 504 | } |
505 | |||
506 | rcu_read_unlock(); | ||
506 | } | 507 | } |
507 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | 508 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); |