aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAvri Altman <avri.altman@intel.com>2014-02-20 06:28:57 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-03-09 10:39:08 -0400
commit8ea0c68fe56983f40256d0407ecf19530fd31442 (patch)
treec3bab58b7a0e16dfa5368c53606e2bff98dd4843 /drivers/net
parent6ca89f1fd8c247e58d6e34528f3a4890dd8003c6 (diff)
iwlwifi: mvm: disable power on P2P client when BSS is added
When power update is initiated on BSS STA while P2P client exists, the power command will be sent only on BSS STA vif ignoring P2P client. Since the firmware has symmetric constraints on the power save enablement we can simplify the code a bit. The current firmware doesn't know how to enable power management on P2P client. Even BSS power management must be disabled when a P2P client is added. Future firmware will support power save on BSS and P2P client as long as they are on different channels. This was buggy since we didn't disable power management on P2P client interface if BSS added on the same channel. Signed-off-by: Avri Altman <avri.altman@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.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index def6ec5173b9..6b636eab3339 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -511,6 +511,7 @@ int iwl_mvm_power_uapsd_misbehaving_ap_notif(struct iwl_mvm *mvm,
511struct iwl_power_constraint { 511struct iwl_power_constraint {
512 struct ieee80211_vif *bf_vif; 512 struct ieee80211_vif *bf_vif;
513 struct ieee80211_vif *bss_vif; 513 struct ieee80211_vif *bss_vif;
514 struct ieee80211_vif *p2p_vif;
514 u16 bss_phyctx_id; 515 u16 bss_phyctx_id;
515 u16 p2p_phyctx_id; 516 u16 p2p_phyctx_id;
516 bool pm_disabled; 517 bool pm_disabled;
@@ -546,6 +547,10 @@ static void iwl_mvm_power_iterator(void *_data, u8 *mac,
546 if (mvmvif->phy_ctxt) 547 if (mvmvif->phy_ctxt)
547 power_iterator->p2p_phyctx_id = mvmvif->phy_ctxt->id; 548 power_iterator->p2p_phyctx_id = mvmvif->phy_ctxt->id;
548 549
550 /* we should have only one P2P vif */
551 WARN_ON(power_iterator->p2p_vif);
552 power_iterator->p2p_vif = vif;
553
549 IWL_DEBUG_POWER(mvm, "p2p: p2p_id=%d, bss_id=%d\n", 554 IWL_DEBUG_POWER(mvm, "p2p: p2p_id=%d, bss_id=%d\n",
550 power_iterator->p2p_phyctx_id, 555 power_iterator->p2p_phyctx_id,
551 power_iterator->bss_phyctx_id); 556 power_iterator->bss_phyctx_id);
@@ -633,16 +638,18 @@ int iwl_mvm_power_update_mac(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
633 return ret; 638 return ret;
634 } 639 }
635 640
636 ret = iwl_mvm_power_send_cmd(mvm, vif); 641 if (constraint.bss_vif) {
637 if (ret)
638 return ret;
639
640 if (constraint.bss_vif && vif != constraint.bss_vif) {
641 ret = iwl_mvm_power_send_cmd(mvm, constraint.bss_vif); 642 ret = iwl_mvm_power_send_cmd(mvm, constraint.bss_vif);
642 if (ret) 643 if (ret)
643 return ret; 644 return ret;
644 } 645 }
645 646
647 if (constraint.p2p_vif) {
648 ret = iwl_mvm_power_send_cmd(mvm, constraint.p2p_vif);
649 if (ret)
650 return ret;
651 }
652
646 if (!constraint.bf_vif) 653 if (!constraint.bf_vif)
647 return 0; 654 return 0;
648 655