diff options
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/mac80211-ops.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 2 | ||||
-rw-r--r-- | include/net/mac80211.h | 23 | ||||
-rw-r--r-- | net/mac80211/util.c | 18 |
11 files changed, 90 insertions, 45 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 9f31cfa56cc0..cdd19232960c 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -511,8 +511,9 @@ ath5k_update_bssid_mask_and_opmode(struct ath5k_hw *ah, | |||
511 | ath5k_vif_iter(&iter_data, vif->addr, vif); | 511 | ath5k_vif_iter(&iter_data, vif->addr, vif); |
512 | 512 | ||
513 | /* Get list of all active MAC addresses */ | 513 | /* Get list of all active MAC addresses */ |
514 | ieee80211_iterate_active_interfaces_atomic(ah->hw, ath5k_vif_iter, | 514 | ieee80211_iterate_active_interfaces_atomic( |
515 | &iter_data); | 515 | ah->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
516 | ath5k_vif_iter, &iter_data); | ||
516 | memcpy(ah->bssidmask, iter_data.mask, ETH_ALEN); | 517 | memcpy(ah->bssidmask, iter_data.mask, ETH_ALEN); |
517 | 518 | ||
518 | ah->opmode = iter_data.opmode; | 519 | ah->opmode = iter_data.opmode; |
@@ -3045,8 +3046,9 @@ ath5k_any_vif_assoc(struct ath5k_hw *ah) | |||
3045 | iter_data.need_set_hw_addr = false; | 3046 | iter_data.need_set_hw_addr = false; |
3046 | iter_data.found_active = true; | 3047 | iter_data.found_active = true; |
3047 | 3048 | ||
3048 | ieee80211_iterate_active_interfaces_atomic(ah->hw, ath5k_vif_iter, | 3049 | ieee80211_iterate_active_interfaces_atomic( |
3049 | &iter_data); | 3050 | ah->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
3051 | ath5k_vif_iter, &iter_data); | ||
3050 | return iter_data.any_assoc; | 3052 | return iter_data.any_assoc; |
3051 | } | 3053 | } |
3052 | 3054 | ||
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c index 7a28538e6e05..1ea8c8795c8e 100644 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c | |||
@@ -452,8 +452,9 @@ ath5k_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, | |||
452 | iter_data.hw_macaddr = NULL; | 452 | iter_data.hw_macaddr = NULL; |
453 | iter_data.n_stas = 0; | 453 | iter_data.n_stas = 0; |
454 | iter_data.need_set_hw_addr = false; | 454 | iter_data.need_set_hw_addr = false; |
455 | ieee80211_iterate_active_interfaces_atomic(ah->hw, ath5k_vif_iter, | 455 | ieee80211_iterate_active_interfaces_atomic( |
456 | &iter_data); | 456 | ah->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
457 | ath5k_vif_iter, &iter_data); | ||
457 | 458 | ||
458 | /* Set up RX Filter */ | 459 | /* Set up RX Filter */ |
459 | if (iter_data.n_stas > 1) { | 460 | if (iter_data.n_stas > 1) { |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c index f42d2eb6af99..1318d79f5c44 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | |||
@@ -587,9 +587,9 @@ static bool ath9k_htc_check_beacon_config(struct ath9k_htc_priv *priv, | |||
587 | (priv->num_sta_vif > 1) && | 587 | (priv->num_sta_vif > 1) && |
588 | (vif->type == NL80211_IFTYPE_STATION)) { | 588 | (vif->type == NL80211_IFTYPE_STATION)) { |
589 | beacon_configured = false; | 589 | beacon_configured = false; |
590 | ieee80211_iterate_active_interfaces_atomic(priv->hw, | 590 | ieee80211_iterate_active_interfaces_atomic( |
591 | ath9k_htc_beacon_iter, | 591 | priv->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
592 | &beacon_configured); | 592 | ath9k_htc_beacon_iter, &beacon_configured); |
593 | 593 | ||
594 | if (beacon_configured) { | 594 | if (beacon_configured) { |
595 | ath_dbg(common, CONFIG, | 595 | ath_dbg(common, CONFIG, |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 66f6a74c508e..02cce95331d8 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -127,8 +127,9 @@ static void ath9k_htc_vif_reconfig(struct ath9k_htc_priv *priv) | |||
127 | priv->rearm_ani = false; | 127 | priv->rearm_ani = false; |
128 | priv->reconfig_beacon = false; | 128 | priv->reconfig_beacon = false; |
129 | 129 | ||
130 | ieee80211_iterate_active_interfaces_atomic(priv->hw, | 130 | ieee80211_iterate_active_interfaces_atomic( |
131 | ath9k_htc_vif_iter, priv); | 131 | priv->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
132 | ath9k_htc_vif_iter, priv); | ||
132 | if (priv->rearm_ani) | 133 | if (priv->rearm_ani) |
133 | ath9k_htc_start_ani(priv); | 134 | ath9k_htc_start_ani(priv); |
134 | 135 | ||
@@ -165,8 +166,9 @@ static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, | |||
165 | ath9k_htc_bssid_iter(&iter_data, vif->addr, vif); | 166 | ath9k_htc_bssid_iter(&iter_data, vif->addr, vif); |
166 | 167 | ||
167 | /* Get list of all active MAC addresses */ | 168 | /* Get list of all active MAC addresses */ |
168 | ieee80211_iterate_active_interfaces_atomic(priv->hw, ath9k_htc_bssid_iter, | 169 | ieee80211_iterate_active_interfaces_atomic( |
169 | &iter_data); | 170 | priv->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
171 | ath9k_htc_bssid_iter, &iter_data); | ||
170 | 172 | ||
171 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); | 173 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); |
172 | ath_hw_setbssidmask(common); | 174 | ath_hw_setbssidmask(common); |
@@ -1144,8 +1146,9 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw, | |||
1144 | */ | 1146 | */ |
1145 | if ((vif->type == NL80211_IFTYPE_AP) && (priv->num_ap_vif == 0)) { | 1147 | if ((vif->type == NL80211_IFTYPE_AP) && (priv->num_ap_vif == 0)) { |
1146 | priv->rearm_ani = false; | 1148 | priv->rearm_ani = false; |
1147 | ieee80211_iterate_active_interfaces_atomic(priv->hw, | 1149 | ieee80211_iterate_active_interfaces_atomic( |
1148 | ath9k_htc_vif_iter, priv); | 1150 | priv->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
1151 | ath9k_htc_vif_iter, priv); | ||
1149 | if (!priv->rearm_ani) | 1152 | if (!priv->rearm_ani) |
1150 | ath9k_htc_stop_ani(priv); | 1153 | ath9k_htc_stop_ani(priv); |
1151 | } | 1154 | } |
@@ -1466,8 +1469,9 @@ static void ath9k_htc_bss_iter(void *data, u8 *mac, struct ieee80211_vif *vif) | |||
1466 | static void ath9k_htc_choose_set_bssid(struct ath9k_htc_priv *priv) | 1469 | static void ath9k_htc_choose_set_bssid(struct ath9k_htc_priv *priv) |
1467 | { | 1470 | { |
1468 | if (priv->num_sta_assoc_vif == 1) { | 1471 | if (priv->num_sta_assoc_vif == 1) { |
1469 | ieee80211_iterate_active_interfaces_atomic(priv->hw, | 1472 | ieee80211_iterate_active_interfaces_atomic( |
1470 | ath9k_htc_bss_iter, priv); | 1473 | priv->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
1474 | ath9k_htc_bss_iter, priv); | ||
1471 | ath9k_htc_set_bssid(priv); | 1475 | ath9k_htc_set_bssid(priv); |
1472 | } | 1476 | } |
1473 | } | 1477 | } |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 578a7234aa56..c084532291a1 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -924,8 +924,9 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw, | |||
924 | ath9k_vif_iter(iter_data, vif->addr, vif); | 924 | ath9k_vif_iter(iter_data, vif->addr, vif); |
925 | 925 | ||
926 | /* Get list of all active MAC addresses */ | 926 | /* Get list of all active MAC addresses */ |
927 | ieee80211_iterate_active_interfaces_atomic(sc->hw, ath9k_vif_iter, | 927 | ieee80211_iterate_active_interfaces_atomic( |
928 | iter_data); | 928 | sc->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
929 | ath9k_vif_iter, iter_data); | ||
929 | } | 930 | } |
930 | 931 | ||
931 | /* Called with sc->mutex held. */ | 932 | /* Called with sc->mutex held. */ |
@@ -975,8 +976,9 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, | |||
975 | if (ah->opmode == NL80211_IFTYPE_STATION && | 976 | if (ah->opmode == NL80211_IFTYPE_STATION && |
976 | old_opmode == NL80211_IFTYPE_AP && | 977 | old_opmode == NL80211_IFTYPE_AP && |
977 | test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) { | 978 | test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) { |
978 | ieee80211_iterate_active_interfaces_atomic(sc->hw, | 979 | ieee80211_iterate_active_interfaces_atomic( |
979 | ath9k_sta_vif_iter, sc); | 980 | sc->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
981 | ath9k_sta_vif_iter, sc); | ||
980 | } | 982 | } |
981 | } | 983 | } |
982 | 984 | ||
@@ -1505,8 +1507,9 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, | |||
1505 | clear_bit(SC_OP_BEACONS, &sc->sc_flags); | 1507 | clear_bit(SC_OP_BEACONS, &sc->sc_flags); |
1506 | } | 1508 | } |
1507 | 1509 | ||
1508 | ieee80211_iterate_active_interfaces_atomic(sc->hw, | 1510 | ieee80211_iterate_active_interfaces_atomic( |
1509 | ath9k_bss_assoc_iter, sc); | 1511 | sc->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
1512 | ath9k_bss_assoc_iter, sc); | ||
1510 | 1513 | ||
1511 | if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags) && | 1514 | if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags) && |
1512 | ah->opmode == NL80211_IFTYPE_STATION) { | 1515 | ah->opmode == NL80211_IFTYPE_STATION) { |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 9b4f76718db7..a8ec7086ad09 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -571,6 +571,7 @@ static bool mac80211_hwsim_addr_match(struct mac80211_hwsim_data *data, | |||
571 | md.ret = false; | 571 | md.ret = false; |
572 | md.addr = addr; | 572 | md.addr = addr; |
573 | ieee80211_iterate_active_interfaces_atomic(data->hw, | 573 | ieee80211_iterate_active_interfaces_atomic(data->hw, |
574 | IEEE80211_IFACE_ITER_NORMAL, | ||
574 | mac80211_hwsim_addr_iter, | 575 | mac80211_hwsim_addr_iter, |
575 | &md); | 576 | &md); |
576 | 577 | ||
@@ -744,8 +745,8 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw, | |||
744 | if (!hwsim_chans_compat(chan, data2->tmp_chan) && | 745 | if (!hwsim_chans_compat(chan, data2->tmp_chan) && |
745 | !hwsim_chans_compat(chan, data2->channel)) { | 746 | !hwsim_chans_compat(chan, data2->channel)) { |
746 | ieee80211_iterate_active_interfaces_atomic( | 747 | ieee80211_iterate_active_interfaces_atomic( |
747 | data2->hw, mac80211_hwsim_tx_iter, | 748 | data2->hw, IEEE80211_IFACE_ITER_NORMAL, |
748 | &tx_iter_data); | 749 | mac80211_hwsim_tx_iter, &tx_iter_data); |
749 | if (!tx_iter_data.receive) | 750 | if (!tx_iter_data.receive) |
750 | continue; | 751 | continue; |
751 | } | 752 | } |
@@ -958,7 +959,8 @@ static void mac80211_hwsim_beacon(unsigned long arg) | |||
958 | return; | 959 | return; |
959 | 960 | ||
960 | ieee80211_iterate_active_interfaces_atomic( | 961 | ieee80211_iterate_active_interfaces_atomic( |
961 | hw, mac80211_hwsim_beacon_tx, hw); | 962 | hw, IEEE80211_IFACE_ITER_NORMAL, |
963 | mac80211_hwsim_beacon_tx, hw); | ||
962 | 964 | ||
963 | data->beacon_timer.expires = jiffies + data->beacon_int; | 965 | data->beacon_timer.expires = jiffies + data->beacon_int; |
964 | add_timer(&data->beacon_timer); | 966 | add_timer(&data->beacon_timer); |
@@ -1680,14 +1682,17 @@ static int hwsim_fops_ps_write(void *dat, u64 val) | |||
1680 | 1682 | ||
1681 | if (val == PS_MANUAL_POLL) { | 1683 | if (val == PS_MANUAL_POLL) { |
1682 | ieee80211_iterate_active_interfaces(data->hw, | 1684 | ieee80211_iterate_active_interfaces(data->hw, |
1685 | IEEE80211_IFACE_ITER_NORMAL, | ||
1683 | hwsim_send_ps_poll, data); | 1686 | hwsim_send_ps_poll, data); |
1684 | data->ps_poll_pending = true; | 1687 | data->ps_poll_pending = true; |
1685 | } else if (old_ps == PS_DISABLED && val != PS_DISABLED) { | 1688 | } else if (old_ps == PS_DISABLED && val != PS_DISABLED) { |
1686 | ieee80211_iterate_active_interfaces(data->hw, | 1689 | ieee80211_iterate_active_interfaces(data->hw, |
1690 | IEEE80211_IFACE_ITER_NORMAL, | ||
1687 | hwsim_send_nullfunc_ps, | 1691 | hwsim_send_nullfunc_ps, |
1688 | data); | 1692 | data); |
1689 | } else if (old_ps != PS_DISABLED && val == PS_DISABLED) { | 1693 | } else if (old_ps != PS_DISABLED && val == PS_DISABLED) { |
1690 | ieee80211_iterate_active_interfaces(data->hw, | 1694 | ieee80211_iterate_active_interfaces(data->hw, |
1695 | IEEE80211_IFACE_ITER_NORMAL, | ||
1691 | hwsim_send_nullfunc_no_ps, | 1696 | hwsim_send_nullfunc_no_ps, |
1692 | data); | 1697 | data); |
1693 | } | 1698 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 69097d1faeb6..67d167993d45 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -157,6 +157,7 @@ static void rt2x00lib_intf_scheduled(struct work_struct *work) | |||
157 | * requested configurations. | 157 | * requested configurations. |
158 | */ | 158 | */ |
159 | ieee80211_iterate_active_interfaces(rt2x00dev->hw, | 159 | ieee80211_iterate_active_interfaces(rt2x00dev->hw, |
160 | IEEE80211_IFACE_ITER_RESUME_ALL, | ||
160 | rt2x00lib_intf_scheduled_iter, | 161 | rt2x00lib_intf_scheduled_iter, |
161 | rt2x00dev); | 162 | rt2x00dev); |
162 | } | 163 | } |
@@ -225,9 +226,9 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev) | |||
225 | return; | 226 | return; |
226 | 227 | ||
227 | /* send buffered bc/mc frames out for every bssid */ | 228 | /* send buffered bc/mc frames out for every bssid */ |
228 | ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, | 229 | ieee80211_iterate_active_interfaces_atomic( |
229 | rt2x00lib_bc_buffer_iter, | 230 | rt2x00dev->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
230 | rt2x00dev); | 231 | rt2x00lib_bc_buffer_iter, rt2x00dev); |
231 | /* | 232 | /* |
232 | * Devices with pre tbtt interrupt don't need to update the beacon | 233 | * Devices with pre tbtt interrupt don't need to update the beacon |
233 | * here as they will fetch the next beacon directly prior to | 234 | * here as they will fetch the next beacon directly prior to |
@@ -237,9 +238,9 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev) | |||
237 | return; | 238 | return; |
238 | 239 | ||
239 | /* fetch next beacon */ | 240 | /* fetch next beacon */ |
240 | ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, | 241 | ieee80211_iterate_active_interfaces_atomic( |
241 | rt2x00lib_beaconupdate_iter, | 242 | rt2x00dev->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
242 | rt2x00dev); | 243 | rt2x00lib_beaconupdate_iter, rt2x00dev); |
243 | } | 244 | } |
244 | EXPORT_SYMBOL_GPL(rt2x00lib_beacondone); | 245 | EXPORT_SYMBOL_GPL(rt2x00lib_beacondone); |
245 | 246 | ||
@@ -249,9 +250,9 @@ void rt2x00lib_pretbtt(struct rt2x00_dev *rt2x00dev) | |||
249 | return; | 250 | return; |
250 | 251 | ||
251 | /* fetch next beacon */ | 252 | /* fetch next beacon */ |
252 | ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, | 253 | ieee80211_iterate_active_interfaces_atomic( |
253 | rt2x00lib_beaconupdate_iter, | 254 | rt2x00dev->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
254 | rt2x00dev); | 255 | rt2x00lib_beaconupdate_iter, rt2x00dev); |
255 | } | 256 | } |
256 | EXPORT_SYMBOL_GPL(rt2x00lib_pretbtt); | 257 | EXPORT_SYMBOL_GPL(rt2x00lib_pretbtt); |
257 | 258 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 98a9e48f8e4a..ed7a1bb3f245 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -424,9 +424,9 @@ int rt2x00mac_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, | |||
424 | if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) | 424 | if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
425 | return 0; | 425 | return 0; |
426 | 426 | ||
427 | ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, | 427 | ieee80211_iterate_active_interfaces_atomic( |
428 | rt2x00mac_set_tim_iter, | 428 | rt2x00dev->hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
429 | rt2x00dev); | 429 | rt2x00mac_set_tim_iter, rt2x00dev); |
430 | 430 | ||
431 | /* queue work to upodate the beacon template */ | 431 | /* queue work to upodate the beacon template */ |
432 | ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->intf_work); | 432 | ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->intf_work); |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 25530c8760cb..380cf1ff6cd1 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -677,7 +677,7 @@ static void wl12xx_get_vif_count(struct ieee80211_hw *hw, | |||
677 | memset(data, 0, sizeof(*data)); | 677 | memset(data, 0, sizeof(*data)); |
678 | data->cur_vif = cur_vif; | 678 | data->cur_vif = cur_vif; |
679 | 679 | ||
680 | ieee80211_iterate_active_interfaces(hw, | 680 | ieee80211_iterate_active_interfaces(hw, IEEE80211_IFACE_ITER_RESUME_ALL, |
681 | wl12xx_vif_count_iter, data); | 681 | wl12xx_vif_count_iter, data); |
682 | } | 682 | } |
683 | 683 | ||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index e1d830992319..a789dd1d4c10 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -3413,6 +3413,21 @@ void ieee80211_sched_scan_results(struct ieee80211_hw *hw); | |||
3413 | void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); | 3413 | void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); |
3414 | 3414 | ||
3415 | /** | 3415 | /** |
3416 | * enum ieee80211_interface_iteration_flags - interface iteration flags | ||
3417 | * @IEEE80211_IFACE_ITER_NORMAL: Iterate over all interfaces that have | ||
3418 | * been added to the driver; However, note that during hardware | ||
3419 | * reconfiguration (after restart_hw) it will iterate over a new | ||
3420 | * interface and over all the existing interfaces even if they | ||
3421 | * haven't been re-added to the driver yet. | ||
3422 | * @IEEE80211_IFACE_ITER_RESUME_ALL: During resume, iterate over all | ||
3423 | * interfaces, even if they haven't been re-added to the driver yet. | ||
3424 | */ | ||
3425 | enum ieee80211_interface_iteration_flags { | ||
3426 | IEEE80211_IFACE_ITER_NORMAL = 0, | ||
3427 | IEEE80211_IFACE_ITER_RESUME_ALL = BIT(0), | ||
3428 | }; | ||
3429 | |||
3430 | /** | ||
3416 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 3431 | * ieee80211_iterate_active_interfaces - iterate active interfaces |
3417 | * | 3432 | * |
3418 | * This function iterates over the interfaces associated with a given | 3433 | * This function iterates over the interfaces associated with a given |
@@ -3420,13 +3435,15 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); | |||
3420 | * This function allows the iterator function to sleep, when the iterator | 3435 | * This function allows the iterator function to sleep, when the iterator |
3421 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can | 3436 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can |
3422 | * be used. | 3437 | * be used. |
3423 | * Does not iterate over a new interface during add_interface() | 3438 | * Does not iterate over a new interface during add_interface(). |
3424 | * | 3439 | * |
3425 | * @hw: the hardware struct of which the interfaces should be iterated over | 3440 | * @hw: the hardware struct of which the interfaces should be iterated over |
3441 | * @iter_flags: iteration flags, see &enum ieee80211_interface_iteration_flags | ||
3426 | * @iterator: the iterator function to call | 3442 | * @iterator: the iterator function to call |
3427 | * @data: first argument of the iterator function | 3443 | * @data: first argument of the iterator function |
3428 | */ | 3444 | */ |
3429 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | 3445 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, |
3446 | u32 iter_flags, | ||
3430 | void (*iterator)(void *data, u8 *mac, | 3447 | void (*iterator)(void *data, u8 *mac, |
3431 | struct ieee80211_vif *vif), | 3448 | struct ieee80211_vif *vif), |
3432 | void *data); | 3449 | void *data); |
@@ -3438,13 +3455,15 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
3438 | * hardware that are currently active and calls the callback for them. | 3455 | * hardware that are currently active and calls the callback for them. |
3439 | * This function requires the iterator callback function to be atomic, | 3456 | * This function requires the iterator callback function to be atomic, |
3440 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. | 3457 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. |
3441 | * Does not iterate over a new interface during add_interface() | 3458 | * Does not iterate over a new interface during add_interface(). |
3442 | * | 3459 | * |
3443 | * @hw: the hardware struct of which the interfaces should be iterated over | 3460 | * @hw: the hardware struct of which the interfaces should be iterated over |
3461 | * @iter_flags: iteration flags, see &enum ieee80211_interface_iteration_flags | ||
3444 | * @iterator: the iterator function to call, cannot sleep | 3462 | * @iterator: the iterator function to call, cannot sleep |
3445 | * @data: first argument of the iterator function | 3463 | * @data: first argument of the iterator function |
3446 | */ | 3464 | */ |
3447 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | 3465 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, |
3466 | u32 iter_flags, | ||
3448 | void (*iterator)(void *data, | 3467 | void (*iterator)(void *data, |
3449 | u8 *mac, | 3468 | u8 *mac, |
3450 | struct ieee80211_vif *vif), | 3469 | struct ieee80211_vif *vif), |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 84858a14c8bf..01b9fa62f3e3 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -512,7 +512,7 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw) | |||
512 | EXPORT_SYMBOL(ieee80211_wake_queues); | 512 | EXPORT_SYMBOL(ieee80211_wake_queues); |
513 | 513 | ||
514 | void ieee80211_iterate_active_interfaces( | 514 | void ieee80211_iterate_active_interfaces( |
515 | struct ieee80211_hw *hw, | 515 | struct ieee80211_hw *hw, u32 iter_flags, |
516 | void (*iterator)(void *data, u8 *mac, | 516 | void (*iterator)(void *data, u8 *mac, |
517 | struct ieee80211_vif *vif), | 517 | struct ieee80211_vif *vif), |
518 | void *data) | 518 | void *data) |
@@ -530,6 +530,9 @@ void ieee80211_iterate_active_interfaces( | |||
530 | default: | 530 | default: |
531 | break; | 531 | break; |
532 | } | 532 | } |
533 | if (!(iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL) && | ||
534 | !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) | ||
535 | continue; | ||
533 | if (ieee80211_sdata_running(sdata)) | 536 | if (ieee80211_sdata_running(sdata)) |
534 | iterator(data, sdata->vif.addr, | 537 | iterator(data, sdata->vif.addr, |
535 | &sdata->vif); | 538 | &sdata->vif); |
@@ -537,7 +540,9 @@ void ieee80211_iterate_active_interfaces( | |||
537 | 540 | ||
538 | sdata = rcu_dereference_protected(local->monitor_sdata, | 541 | sdata = rcu_dereference_protected(local->monitor_sdata, |
539 | lockdep_is_held(&local->iflist_mtx)); | 542 | lockdep_is_held(&local->iflist_mtx)); |
540 | if (sdata) | 543 | if (sdata && |
544 | (iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL || | ||
545 | sdata->flags & IEEE80211_SDATA_IN_DRIVER)) | ||
541 | iterator(data, sdata->vif.addr, &sdata->vif); | 546 | iterator(data, sdata->vif.addr, &sdata->vif); |
542 | 547 | ||
543 | mutex_unlock(&local->iflist_mtx); | 548 | mutex_unlock(&local->iflist_mtx); |
@@ -545,7 +550,7 @@ void ieee80211_iterate_active_interfaces( | |||
545 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | 550 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); |
546 | 551 | ||
547 | void ieee80211_iterate_active_interfaces_atomic( | 552 | void ieee80211_iterate_active_interfaces_atomic( |
548 | struct ieee80211_hw *hw, | 553 | struct ieee80211_hw *hw, u32 iter_flags, |
549 | void (*iterator)(void *data, u8 *mac, | 554 | void (*iterator)(void *data, u8 *mac, |
550 | struct ieee80211_vif *vif), | 555 | struct ieee80211_vif *vif), |
551 | void *data) | 556 | void *data) |
@@ -563,13 +568,18 @@ void ieee80211_iterate_active_interfaces_atomic( | |||
563 | default: | 568 | default: |
564 | break; | 569 | break; |
565 | } | 570 | } |
571 | if (!(iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL) && | ||
572 | !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) | ||
573 | continue; | ||
566 | if (ieee80211_sdata_running(sdata)) | 574 | if (ieee80211_sdata_running(sdata)) |
567 | iterator(data, sdata->vif.addr, | 575 | iterator(data, sdata->vif.addr, |
568 | &sdata->vif); | 576 | &sdata->vif); |
569 | } | 577 | } |
570 | 578 | ||
571 | sdata = rcu_dereference(local->monitor_sdata); | 579 | sdata = rcu_dereference(local->monitor_sdata); |
572 | if (sdata) | 580 | if (sdata && |
581 | (iter_flags & IEEE80211_IFACE_ITER_RESUME_ALL || | ||
582 | sdata->flags & IEEE80211_SDATA_IN_DRIVER)) | ||
573 | iterator(data, sdata->vif.addr, &sdata->vif); | 583 | iterator(data, sdata->vif.addr, &sdata->vif); |
574 | 584 | ||
575 | rcu_read_unlock(); | 585 | rcu_read_unlock(); |