aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-06 14:23:30 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-09 11:34:35 -0500
commit8b2c98243e8d00f9c6b6059976d6de51491ee0c7 (patch)
treeff4d3dacbbe67d7886ac00b8738a532bb9bb8c76 /drivers/net/wireless/ath/ath5k
parent9214ad7f9a0bfbfb2c204305e7391ce8b7fe4d29 (diff)
mac80211: clarify interface iteration and make it configurable
During hardware restart, all interfaces are iterated even though they haven't been re-added to the driver, document this behaviour. The same also happens during resume, which is even more confusing since all of the interfaces were previously removed from the driver. Make this optional so drivers relying on the current behaviour can still use it, but to let drivers that don't want this behaviour disable it. Also convert all API users, keeping the old semantics except in hwsim, where the new normal ones are desired. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c10
-rw-r--r--drivers/net/wireless/ath/ath5k/mac80211-ops.c5
2 files changed, 9 insertions, 6 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) {