diff options
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 64493a7bef1a..39b82fee4904 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -529,6 +529,11 @@ void ieee80211_iterate_active_interfaces( | |||
529 | &sdata->vif); | 529 | &sdata->vif); |
530 | } | 530 | } |
531 | 531 | ||
532 | sdata = rcu_dereference_protected(local->monitor_sdata, | ||
533 | lockdep_is_held(&local->iflist_mtx)); | ||
534 | if (sdata) | ||
535 | iterator(data, sdata->vif.addr, &sdata->vif); | ||
536 | |||
532 | mutex_unlock(&local->iflist_mtx); | 537 | mutex_unlock(&local->iflist_mtx); |
533 | } | 538 | } |
534 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | 539 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); |
@@ -557,6 +562,10 @@ void ieee80211_iterate_active_interfaces_atomic( | |||
557 | &sdata->vif); | 562 | &sdata->vif); |
558 | } | 563 | } |
559 | 564 | ||
565 | sdata = rcu_dereference(local->monitor_sdata); | ||
566 | if (sdata) | ||
567 | iterator(data, sdata->vif.addr, &sdata->vif); | ||
568 | |||
560 | rcu_read_unlock(); | 569 | rcu_read_unlock(); |
561 | } | 570 | } |
562 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); | 571 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); |
@@ -999,6 +1008,8 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, | |||
999 | int ext_rates_len; | 1008 | int ext_rates_len; |
1000 | 1009 | ||
1001 | sband = local->hw.wiphy->bands[band]; | 1010 | sband = local->hw.wiphy->bands[band]; |
1011 | if (WARN_ON_ONCE(!sband)) | ||
1012 | return 0; | ||
1002 | 1013 | ||
1003 | pos = buffer; | 1014 | pos = buffer; |
1004 | 1015 | ||