diff options
author | Alexander Bondar <alexander.bondar@intel.com> | 2013-03-05 03:16:40 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-03 16:49:14 -0400 |
commit | 5ee2b2154e73fe1e80c6ec4c84ad9ffadb524aec (patch) | |
tree | ead006969661a7785b0b935e44476f30b4376162 /drivers/net/wireless/iwlwifi/mvm/mac80211.c | |
parent | f4a3e2fefec24c92c803e709b8cf1ef005118b8e (diff) |
iwlwifi: mvm: don't disable power management due to P2P device
Currently power management is supported only when only a single
virtual interface is present. The driver verifies number of created
interfaces and disables power management when multiple interfaces
present. However, this rule does not extend to a P2P device that is
handled differently in the firmware. If a P2P device is added power
management can remain enabled.
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.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 9baa3d53ffee..c0043fca836d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -502,11 +502,15 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, | |||
502 | /* | 502 | /* |
503 | * TODO: remove this temporary code. | 503 | * TODO: remove this temporary code. |
504 | * Currently MVM FW supports power management only on single MAC. | 504 | * Currently MVM FW supports power management only on single MAC. |
505 | * Iterate and disable PM on all active interfaces. | 505 | * If new interface added, disable PM on existing interface. |
506 | * P2P device is a special case, since it is handled by FW similary to | ||
507 | * scan. If P2P deviced is added, PM remains enabled on existing | ||
508 | * interface. | ||
506 | * Note: the method below does not count the new interface being added | 509 | * Note: the method below does not count the new interface being added |
507 | * at this moment. | 510 | * at this moment. |
508 | */ | 511 | */ |
509 | mvm->vif_count++; | 512 | if (vif->type != NL80211_IFTYPE_P2P_DEVICE) |
513 | mvm->vif_count++; | ||
510 | if (mvm->vif_count > 1) { | 514 | if (mvm->vif_count > 1) { |
511 | IWL_DEBUG_MAC80211(mvm, | 515 | IWL_DEBUG_MAC80211(mvm, |
512 | "Disable power on existing interfaces\n"); | 516 | "Disable power on existing interfaces\n"); |
@@ -576,10 +580,11 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, | |||
576 | /* | 580 | /* |
577 | * TODO: remove this temporary code. | 581 | * TODO: remove this temporary code. |
578 | * Currently MVM FW supports power management only on single MAC. | 582 | * Currently MVM FW supports power management only on single MAC. |
579 | * Check if only one additional interface remains after rereasing | 583 | * Check if only one additional interface remains after releasing |
580 | * current one. Update power mode on the remaining interface. | 584 | * current one. Update power mode on the remaining interface. |
581 | */ | 585 | */ |
582 | mvm->vif_count--; | 586 | if (vif->type != NL80211_IFTYPE_P2P_DEVICE) |
587 | mvm->vif_count--; | ||
583 | IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n", | 588 | IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n", |
584 | mvm->vif_count); | 589 | mvm->vif_count); |
585 | if (mvm->vif_count == 1) { | 590 | if (mvm->vif_count == 1) { |
@@ -666,7 +671,7 @@ static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw, | |||
666 | * Check if only one additional interface remains after removing | 671 | * Check if only one additional interface remains after removing |
667 | * current one. Update power mode on the remaining interface. | 672 | * current one. Update power mode on the remaining interface. |
668 | */ | 673 | */ |
669 | if (mvm->vif_count) | 674 | if (mvm->vif_count && vif->type != NL80211_IFTYPE_P2P_DEVICE) |
670 | mvm->vif_count--; | 675 | mvm->vif_count--; |
671 | IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n", | 676 | IWL_DEBUG_MAC80211(mvm, "Currently %d interfaces active\n", |
672 | mvm->vif_count); | 677 | mvm->vif_count); |