aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2015-02-22 12:15:04 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-12 03:57:39 -0400
commitfcf23352e0ff500676ac4923c68c20a1fe55fb5e (patch)
tree8e9c14aa7af523bed18c1e0855ff5a8b16dc38c8 /drivers/net
parent9beda940594f6646f97b7927e202ae9504654f9d (diff)
iwlwifi: mvm: reflect TDLS pm state in mvmvif->pm_enabled
When entering D0i3, the MVM mutex cannot be grabbed. This interferes with the calculation of the number of connected TDLS stations during the setup of the power cmd. The goal is to disable power saving for all vifs while any TDLS station is connected. For this purpose it is enough to keep the pm_enabled member of all mvmvifs as false. An update of the power state already occurs when a TDLS station is added/removed, so the values are correctly updated. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index 2620dd0c45f9..9c6fce10fe0b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -357,7 +357,7 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
357 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK); 357 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK);
358 358
359 if (!vif->bss_conf.ps || iwl_mvm_vif_low_latency(mvmvif) || 359 if (!vif->bss_conf.ps || iwl_mvm_vif_low_latency(mvmvif) ||
360 !mvmvif->pm_enabled || iwl_mvm_tdls_sta_count(mvm, vif)) 360 !mvmvif->pm_enabled)
361 return; 361 return;
362 362
363 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); 363 cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK);
@@ -638,6 +638,10 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm,
638 if (vifs->ap_vif) 638 if (vifs->ap_vif)
639 ap_mvmvif = iwl_mvm_vif_from_mac80211(vifs->ap_vif); 639 ap_mvmvif = iwl_mvm_vif_from_mac80211(vifs->ap_vif);
640 640
641 /* don't allow PM if any TDLS stations exist */
642 if (iwl_mvm_tdls_sta_count(mvm, NULL))
643 return;
644
641 /* enable PM on bss if bss stand alone */ 645 /* enable PM on bss if bss stand alone */
642 if (vifs->bss_active && !vifs->p2p_active && !vifs->ap_active) { 646 if (vifs->bss_active && !vifs->p2p_active && !vifs->ap_active) {
643 bss_mvmvif->pm_enabled = true; 647 bss_mvmvif->pm_enabled = true;