aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorAlexander Bondar <alexander.bondar@intel.com>2013-03-05 06:47:04 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-04-03 16:49:14 -0400
commitf4a3e2fefec24c92c803e709b8cf1ef005118b8e (patch)
treee212167c7bf4a993709dd4c37c3eb3fbfc114bbb /drivers/net/wireless/iwlwifi
parent83bdad52a3430d0f6c35b64012062ffc4e7ceb13 (diff)
iwlwifi: mvm: Rename some power management definitions and methods
Replace SLEEP_OVER_DTIM by SKIP_OVER_DTIM. Add iwl_mvm prefix to a function name. 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')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api-power.h4
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c11
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h
index f77d823cbad0..3440b56d6240 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h
@@ -72,7 +72,7 @@
72 * receiver and transmitter. '0' - does not allow. 72 * receiver and transmitter. '0' - does not allow.
73 * @POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management, 73 * @POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management,
74 * '1' Driver enables PM (use rest of parameters) 74 * '1' Driver enables PM (use rest of parameters)
75 * @POWER_FLAGS_SLEEP_OVER_DTIM_MSK: '0' PM have to walk up every DTIM, 75 * @POWER_FLAGS_SKIP_OVER_DTIM_MSK: '0' PM have to walk up every DTIM,
76 * '1' PM could sleep over DTIM till listen Interval. 76 * '1' PM could sleep over DTIM till listen Interval.
77 * @POWER_FLAGS_ADVANCE_PM_ENA_MSK: Advanced PM (uAPSD) enable mask 77 * @POWER_FLAGS_ADVANCE_PM_ENA_MSK: Advanced PM (uAPSD) enable mask
78 * @POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable. 78 * @POWER_FLAGS_LPRX_ENA_MSK: Low Power RX enable.
@@ -80,7 +80,7 @@
80enum iwl_power_flags { 80enum iwl_power_flags {
81 POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), 81 POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0),
82 POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK = BIT(1), 82 POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK = BIT(1),
83 POWER_FLAGS_SLEEP_OVER_DTIM_MSK = BIT(2), 83 POWER_FLAGS_SKIP_OVER_DTIM_MSK = BIT(2),
84 POWER_FLAGS_ADVANCE_PM_ENA_MSK = BIT(9), 84 POWER_FLAGS_ADVANCE_PM_ENA_MSK = BIT(9),
85 POWER_FLAGS_LPRX_ENA_MSK = BIT(11), 85 POWER_FLAGS_LPRX_ENA_MSK = BIT(11),
86}; 86};
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index 55eee6e505d2..7a278f31a8a7 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -75,8 +75,9 @@
75 75
76#define POWER_KEEP_ALIVE_PERIOD_SEC 25 76#define POWER_KEEP_ALIVE_PERIOD_SEC 25
77 77
78static void iwl_power_build_cmd(struct iwl_mvm *mvm, struct ieee80211_vif *vif, 78static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
79 struct iwl_powertable_cmd *cmd) 79 struct ieee80211_vif *vif,
80 struct iwl_powertable_cmd *cmd)
80{ 81{
81 struct ieee80211_hw *hw = mvm->hw; 82 struct ieee80211_hw *hw = mvm->hw;
82 struct ieee80211_chanctx_conf *chanctx_conf; 83 struct ieee80211_chanctx_conf *chanctx_conf;
@@ -107,7 +108,7 @@ static void iwl_power_build_cmd(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
107 /* Check skip over DTIM conditions */ 108 /* Check skip over DTIM conditions */
108 if (!radar_detect && (dtimper <= 10) && 109 if (!radar_detect && (dtimper <= 10) &&
109 (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP)) 110 (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP))
110 cmd->flags |= cpu_to_le16(POWER_FLAGS_SLEEP_OVER_DTIM_MSK); 111 cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK);
111 112
112 /* Check that keep alive period is at least 3 * DTIM */ 113 /* Check that keep alive period is at least 3 * DTIM */
113 dtimper_msec = dtimper * vif->bss_conf.beacon_int; 114 dtimper_msec = dtimper * vif->bss_conf.beacon_int;
@@ -139,7 +140,7 @@ int iwl_mvm_power_update_mode(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
139 if (vif->type != NL80211_IFTYPE_STATION || vif->p2p) 140 if (vif->type != NL80211_IFTYPE_STATION || vif->p2p)
140 return 0; 141 return 0;
141 142
142 iwl_power_build_cmd(mvm, vif, &cmd); 143 iwl_mvm_power_build_cmd(mvm, vif, &cmd);
143 144
144 IWL_DEBUG_POWER(mvm, 145 IWL_DEBUG_POWER(mvm,
145 "Sending power table command for power level %d, flags = 0x%X\n", 146 "Sending power table command for power level %d, flags = 0x%X\n",
@@ -184,6 +185,6 @@ int iwl_mvm_power_disable(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
184void iwl_power_get_params(struct iwl_mvm *mvm, struct ieee80211_vif *vif, 185void iwl_power_get_params(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
185 struct iwl_powertable_cmd *cmd) 186 struct iwl_powertable_cmd *cmd)
186{ 187{
187 iwl_power_build_cmd(mvm, vif, cmd); 188 iwl_mvm_power_build_cmd(mvm, vif, cmd);
188} 189}
189#endif /* CONFIG_IWLWIFI_DEBUGFS */ 190#endif /* CONFIG_IWLWIFI_DEBUGFS */