aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorAlexander Bondar <alexander.bondar@intel.com>2013-05-29 03:19:50 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-06-04 07:16:11 -0400
commit4bf881f5d55c2bb704771287613c8807ef181b3c (patch)
tree1e72a4c55499319b96b62cd196d3ca8a49a7e69b /drivers/net/wireless/iwlwifi/mvm/mac80211.c
parent86a91ec757338edbce51de5dabd7afb0366f485c (diff)
iwlwifi: mvm: Change location of vif_count verification for PM
Currently vif_count verification for power management enablement appear in different places. Move these verifications to one place in iwl_mvm_update_power_mode(). Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 12337aac2947..c13559b4b4fd 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -597,21 +597,11 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
597 mvmvif->phy_ctxt = NULL; 597 mvmvif->phy_ctxt = NULL;
598 iwl_mvm_mac_ctxt_remove(mvm, vif); 598 iwl_mvm_mac_ctxt_remove(mvm, vif);
599 out_release: 599 out_release:
600 /*
601 * TODO: remove this temporary code.
602 * Currently MVM FW supports power management only on single MAC.
603 * Check if only one additional interface remains after releasing
604 * current one. Update power mode on the remaining interface.
605 */
606 if (vif->type != NL80211_IFTYPE_P2P_DEVICE) 600 if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
607 mvm->vif_count--; 601 mvm->vif_count--;
608 IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n", 602 ieee80211_iterate_active_interfaces(
609 mvm->vif_count); 603 mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
610 if (mvm->vif_count == 1) { 604 iwl_mvm_power_update_iterator, mvm);
611 ieee80211_iterate_active_interfaces(
612 mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
613 iwl_mvm_power_update_iterator, mvm);
614 }
615 iwl_mvm_mac_ctxt_release(mvm, vif); 605 iwl_mvm_mac_ctxt_release(mvm, vif);
616 out_unlock: 606 out_unlock:
617 mutex_unlock(&mvm->mutex); 607 mutex_unlock(&mvm->mutex);
@@ -781,19 +771,9 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
781 iwl_mvm_remove_time_event(mvm, mvmvif, 771 iwl_mvm_remove_time_event(mvm, mvmvif,
782 &mvmvif->time_event_data); 772 &mvmvif->time_event_data);
783 } else if (changes & BSS_CHANGED_PS) { 773 } else if (changes & BSS_CHANGED_PS) {
784 /* 774 ret = iwl_mvm_power_update_mode(mvm, vif);
785 * TODO: remove this temporary code. 775 if (ret)
786 * Currently MVM FW supports power management only on single 776 IWL_ERR(mvm, "failed to update power mode\n");
787 * MAC. Avoid power mode update if more than one interface
788 * is active.
789 */
790 IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n",
791 mvm->vif_count);
792 if (mvm->vif_count == 1) {
793 ret = iwl_mvm_power_update_mode(mvm, vif);
794 if (ret)
795 IWL_ERR(mvm, "failed to update power mode\n");
796 }
797 } 777 }
798} 778}
799 779