diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-05-20 04:28:18 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-05-22 03:10:44 -0400 |
commit | 13b7232225749cb339a545edaa3f053e5e219d31 (patch) | |
tree | 3106834215400146f8b49197bda13f430124624b /drivers/net/wireless/iwlwifi | |
parent | 1fa477c65a404a9e5a961efcf2acd1efc5eedd04 (diff) |
iwlwifi: mvm: make iwl_mvm_update_beacon_abort static
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/power.c | 103 |
2 files changed, 52 insertions, 53 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 20884b70ca83..4b7461e4ac48 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -997,8 +997,6 @@ int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, | |||
997 | int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, | 997 | int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, |
998 | struct ieee80211_vif *vif, | 998 | struct ieee80211_vif *vif, |
999 | u32 flags); | 999 | u32 flags); |
1000 | int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm, | ||
1001 | struct ieee80211_vif *vif, bool enable); | ||
1002 | /* SMPS */ | 1000 | /* SMPS */ |
1003 | void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | 1001 | void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif, |
1004 | enum iwl_mvm_smps_type_request req_type, | 1002 | enum iwl_mvm_smps_type_request req_type, |
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c index a2b426b39ab0..b0b8f5c2fe8b 100644 --- a/drivers/net/wireless/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/iwlwifi/mvm/power.c | |||
@@ -642,55 +642,6 @@ iwl_mvm_power_set_pm(struct iwl_mvm *mvm, | |||
642 | } | 642 | } |
643 | } | 643 | } |
644 | 644 | ||
645 | int iwl_mvm_power_update_mac(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | ||
646 | { | ||
647 | struct iwl_mvm_vif *mvmvif; | ||
648 | struct iwl_power_vifs vifs = {}; | ||
649 | bool ba_enable; | ||
650 | int ret; | ||
651 | |||
652 | lockdep_assert_held(&mvm->mutex); | ||
653 | |||
654 | iwl_mvm_power_set_pm(mvm, &vifs); | ||
655 | |||
656 | /* disable PS if CAM */ | ||
657 | if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM) { | ||
658 | mvm->ps_disabled = true; | ||
659 | } else { | ||
660 | /* don't update device power state unless we add / remove monitor */ | ||
661 | if (vifs.monitor_vif) { | ||
662 | if (vifs.monitor_active) | ||
663 | mvm->ps_disabled = true; | ||
664 | ret = iwl_mvm_power_update_device(mvm); | ||
665 | if (ret) | ||
666 | return ret; | ||
667 | } | ||
668 | } | ||
669 | |||
670 | if (vifs.bss_vif) { | ||
671 | ret = iwl_mvm_power_send_cmd(mvm, vifs.bss_vif); | ||
672 | if (ret) | ||
673 | return ret; | ||
674 | } | ||
675 | |||
676 | if (vifs.p2p_vif) { | ||
677 | ret = iwl_mvm_power_send_cmd(mvm, vifs.p2p_vif); | ||
678 | if (ret) | ||
679 | return ret; | ||
680 | } | ||
681 | |||
682 | if (!vifs.bf_vif) | ||
683 | return 0; | ||
684 | |||
685 | vif = vifs.bf_vif; | ||
686 | mvmvif = iwl_mvm_vif_from_mac80211(vif); | ||
687 | |||
688 | ba_enable = !(!mvmvif->pm_enabled || mvm->ps_disabled || | ||
689 | !vif->bss_conf.ps || iwl_mvm_vif_low_latency(mvmvif)); | ||
690 | |||
691 | return iwl_mvm_update_beacon_abort(mvm, vifs.bf_vif, ba_enable); | ||
692 | } | ||
693 | |||
694 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 645 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
695 | int iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm *mvm, | 646 | int iwl_mvm_power_mac_dbgfs_read(struct iwl_mvm *mvm, |
696 | struct ieee80211_vif *vif, char *buf, | 647 | struct ieee80211_vif *vif, char *buf, |
@@ -838,8 +789,9 @@ int iwl_mvm_enable_beacon_filter(struct iwl_mvm *mvm, | |||
838 | return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, flags, false); | 789 | return _iwl_mvm_enable_beacon_filter(mvm, vif, &cmd, flags, false); |
839 | } | 790 | } |
840 | 791 | ||
841 | int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm, | 792 | static int iwl_mvm_update_beacon_abort(struct iwl_mvm *mvm, |
842 | struct ieee80211_vif *vif, bool enable) | 793 | struct ieee80211_vif *vif, |
794 | bool enable) | ||
843 | { | 795 | { |
844 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 796 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
845 | struct iwl_beacon_filter_cmd cmd = { | 797 | struct iwl_beacon_filter_cmd cmd = { |
@@ -876,6 +828,55 @@ int iwl_mvm_disable_beacon_filter(struct iwl_mvm *mvm, | |||
876 | return ret; | 828 | return ret; |
877 | } | 829 | } |
878 | 830 | ||
831 | int iwl_mvm_power_update_mac(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | ||
832 | { | ||
833 | struct iwl_mvm_vif *mvmvif; | ||
834 | struct iwl_power_vifs vifs = {}; | ||
835 | bool ba_enable; | ||
836 | int ret; | ||
837 | |||
838 | lockdep_assert_held(&mvm->mutex); | ||
839 | |||
840 | iwl_mvm_power_set_pm(mvm, &vifs); | ||
841 | |||
842 | /* disable PS if CAM */ | ||
843 | if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM) { | ||
844 | mvm->ps_disabled = true; | ||
845 | } else { | ||
846 | /* don't update device power state unless we add / remove monitor */ | ||
847 | if (vifs.monitor_vif) { | ||
848 | if (vifs.monitor_active) | ||
849 | mvm->ps_disabled = true; | ||
850 | ret = iwl_mvm_power_update_device(mvm); | ||
851 | if (ret) | ||
852 | return ret; | ||
853 | } | ||
854 | } | ||
855 | |||
856 | if (vifs.bss_vif) { | ||
857 | ret = iwl_mvm_power_send_cmd(mvm, vifs.bss_vif); | ||
858 | if (ret) | ||
859 | return ret; | ||
860 | } | ||
861 | |||
862 | if (vifs.p2p_vif) { | ||
863 | ret = iwl_mvm_power_send_cmd(mvm, vifs.p2p_vif); | ||
864 | if (ret) | ||
865 | return ret; | ||
866 | } | ||
867 | |||
868 | if (!vifs.bf_vif) | ||
869 | return 0; | ||
870 | |||
871 | vif = vifs.bf_vif; | ||
872 | mvmvif = iwl_mvm_vif_from_mac80211(vif); | ||
873 | |||
874 | ba_enable = !(!mvmvif->pm_enabled || mvm->ps_disabled || | ||
875 | !vif->bss_conf.ps || iwl_mvm_vif_low_latency(mvmvif)); | ||
876 | |||
877 | return iwl_mvm_update_beacon_abort(mvm, vifs.bf_vif, ba_enable); | ||
878 | } | ||
879 | |||
879 | int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm, | 880 | int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm, |
880 | struct ieee80211_vif *vif, | 881 | struct ieee80211_vif *vif, |
881 | bool enable, u32 flags) | 882 | bool enable, u32 flags) |