提交 29a90a49 编写于 作者: E Eliad Peller 提交者: Emmanuel Grumbach

iwlwifi: mvm: add D0i3 ref/unref when ap, ibss or p2p_cli vifs are running

We don't want to go into D0i3, when P2P_CLI, AP (including
GO) or IBSS interfaces are running, so take appropriate
references.
Signed-off-by: NEliad Peller <eliadx.peller@intel.com>
Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
上级 9f45c36d
...@@ -1202,6 +1202,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm, ...@@ -1202,6 +1202,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
iwl_mvm_sf_update(mvm, vif, false); iwl_mvm_sf_update(mvm, vif, false);
iwl_mvm_power_vif_assoc(mvm, vif); iwl_mvm_power_vif_assoc(mvm, vif);
if (vif->p2p)
iwl_mvm_ref(mvm, IWL_MVM_REF_P2P_CLIENT);
} else if (mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) { } else if (mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) {
/* /*
* If update fails - SF might be running in associated * If update fails - SF might be running in associated
...@@ -1219,6 +1221,9 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm, ...@@ -1219,6 +1221,9 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
ret = iwl_mvm_update_quotas(mvm, NULL); ret = iwl_mvm_update_quotas(mvm, NULL);
if (ret) if (ret)
IWL_ERR(mvm, "failed to update quotas\n"); IWL_ERR(mvm, "failed to update quotas\n");
if (vif->p2p)
iwl_mvm_unref(mvm, IWL_MVM_REF_P2P_CLIENT);
} }
iwl_mvm_recalc_multicast(mvm); iwl_mvm_recalc_multicast(mvm);
...@@ -1327,6 +1332,8 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, ...@@ -1327,6 +1332,8 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
if (vif->p2p && mvm->p2p_device_vif) if (vif->p2p && mvm->p2p_device_vif)
iwl_mvm_mac_ctxt_changed(mvm, mvm->p2p_device_vif); iwl_mvm_mac_ctxt_changed(mvm, mvm->p2p_device_vif);
iwl_mvm_ref(mvm, IWL_MVM_REF_AP_IBSS);
iwl_mvm_bt_coex_vif_change(mvm); iwl_mvm_bt_coex_vif_change(mvm);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
...@@ -1360,6 +1367,8 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw, ...@@ -1360,6 +1367,8 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
iwl_mvm_bt_coex_vif_change(mvm); iwl_mvm_bt_coex_vif_change(mvm);
iwl_mvm_unref(mvm, IWL_MVM_REF_AP_IBSS);
/* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */
if (vif->p2p && mvm->p2p_device_vif) if (vif->p2p && mvm->p2p_device_vif)
iwl_mvm_mac_ctxt_changed(mvm, mvm->p2p_device_vif); iwl_mvm_mac_ctxt_changed(mvm, mvm->p2p_device_vif);
......
...@@ -243,6 +243,8 @@ enum iwl_mvm_ref_type { ...@@ -243,6 +243,8 @@ enum iwl_mvm_ref_type {
IWL_MVM_REF_UCODE_DOWN, IWL_MVM_REF_UCODE_DOWN,
IWL_MVM_REF_SCAN, IWL_MVM_REF_SCAN,
IWL_MVM_REF_ROC, IWL_MVM_REF_ROC,
IWL_MVM_REF_P2P_CLIENT,
IWL_MVM_REF_AP_IBSS,
IWL_MVM_REF_COUNT, IWL_MVM_REF_COUNT,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册