aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/power.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-07-31 07:39:40 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-08 02:17:49 -0400
commit717e2390dc72e87380d6ccf62134b0ab84ee43d2 (patch)
treebf40def3374c069554cd45bd4203379368ecfb9f /drivers/net/wireless/iwlwifi/mvm/power.c
parentaa11bbf3df026d6b1c6b528bef634fd9de7c2619 (diff)
iwlwiwi: mvm: use bss_conf->dtim_period instead of conf.ps_dtim_period
The latter is meant for software implementation of power save and is not per-virtual interface. Since our driver supports multiple virtual interfaces, we need to use vif->bss_conf.dtim_period. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/power.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index 2b2d10800a55..d9769a23c68b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -281,7 +281,6 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
281 struct ieee80211_vif *vif, 281 struct ieee80211_vif *vif,
282 struct iwl_mac_power_cmd *cmd) 282 struct iwl_mac_power_cmd *cmd)
283{ 283{
284 struct ieee80211_hw *hw = mvm->hw;
285 struct ieee80211_chanctx_conf *chanctx_conf; 284 struct ieee80211_chanctx_conf *chanctx_conf;
286 struct ieee80211_channel *chan; 285 struct ieee80211_channel *chan;
287 int dtimper, dtimper_msec; 286 int dtimper, dtimper_msec;
@@ -292,7 +291,7 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
292 291
293 cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, 292 cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id,
294 mvmvif->color)); 293 mvmvif->color));
295 dtimper = hw->conf.ps_dtim_period ?: 1; 294 dtimper = vif->bss_conf.dtim_period;
296 295
297 /* 296 /*
298 * Regardless of power management state the driver must set 297 * Regardless of power management state the driver must set
@@ -885,7 +884,7 @@ int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm,
885 iwl_mvm_power_build_cmd(mvm, vif, &cmd); 884 iwl_mvm_power_build_cmd(mvm, vif, &cmd);
886 if (enable) { 885 if (enable) {
887 /* configure skip over dtim up to 300 msec */ 886 /* configure skip over dtim up to 300 msec */
888 int dtimper = mvm->hw->conf.ps_dtim_period ?: 1; 887 int dtimper = vif->bss_conf.dtim_period ?: 1;
889 int dtimper_msec = dtimper * vif->bss_conf.beacon_int; 888 int dtimper_msec = dtimper * vif->bss_conf.beacon_int;
890 889
891 if (WARN_ON(!dtimper_msec)) 890 if (WARN_ON(!dtimper_msec))