Skip to content

Commit ea183d0

Browse files
ilanpeer2jmberg-intel
authored andcommitted
iwlwifi: mvm: Disable managed PS when GO is added
The managed interface PS was not disabled when a GO interface was added. As a consequence, when the station VMAC was in PS, the GO also was not on the medium. Fix this. Signed-off-by: Ilan Peer <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 2997494 commit ea183d0

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

drivers/net/wireless/iwlwifi/mvm/mac80211.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,27 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
511511
if (ret)
512512
goto out_unlock;
513513

514+
/*
515+
* TODO: remove this temporary code.
516+
* Currently MVM FW supports power management only on single MAC.
517+
* If new interface added, disable PM on existing interface.
518+
* P2P device is a special case, since it is handled by FW similary to
519+
* scan. If P2P deviced is added, PM remains enabled on existing
520+
* interface.
521+
* Note: the method below does not count the new interface being added
522+
* at this moment.
523+
*/
524+
if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
525+
mvm->vif_count++;
526+
if (mvm->vif_count > 1) {
527+
IWL_DEBUG_MAC80211(mvm,
528+
"Disable power on existing interfaces\n");
529+
ieee80211_iterate_active_interfaces_atomic(
530+
mvm->hw,
531+
IEEE80211_IFACE_ITER_NORMAL,
532+
iwl_mvm_pm_disable_iterator, mvm);
533+
}
534+
514535
/*
515536
* The AP binding flow can be done only after the beacon
516537
* template is configured (which happens only in the mac80211
@@ -534,27 +555,6 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
534555
goto out_unlock;
535556
}
536557

537-
/*
538-
* TODO: remove this temporary code.
539-
* Currently MVM FW supports power management only on single MAC.
540-
* If new interface added, disable PM on existing interface.
541-
* P2P device is a special case, since it is handled by FW similary to
542-
* scan. If P2P deviced is added, PM remains enabled on existing
543-
* interface.
544-
* Note: the method below does not count the new interface being added
545-
* at this moment.
546-
*/
547-
if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
548-
mvm->vif_count++;
549-
if (mvm->vif_count > 1) {
550-
IWL_DEBUG_MAC80211(mvm,
551-
"Disable power on existing interfaces\n");
552-
ieee80211_iterate_active_interfaces_atomic(
553-
mvm->hw,
554-
IEEE80211_IFACE_ITER_NORMAL,
555-
iwl_mvm_pm_disable_iterator, mvm);
556-
}
557-
558558
ret = iwl_mvm_mac_ctxt_add(mvm, vif);
559559
if (ret)
560560
goto out_release;

0 commit comments

Comments
 (0)