iwlwifi: mvm: fix d3_test with unified D0/D3 images
When a unified D0/D3 image is used, we don't restart the FW in the
D0->D3->D0 transitions. Therefore, the d3_test functionality should
not call ieee8021_restart_hw() when the resuming either.
Fixes: commit 23ae61282b ("iwlwifi: mvm: Do not switch to D3 image on suspend")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
@@ -2271,7 +2271,8 @@ static void iwl_mvm_d3_test_disconn_work_iter(void *_data, u8 *mac,
|
|||||||
static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file)
|
static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct iwl_mvm *mvm = inode->i_private;
|
struct iwl_mvm *mvm = inode->i_private;
|
||||||
int remaining_time = 10;
|
bool unified_image = fw_has_capa(&mvm->fw->ucode_capa,
|
||||||
|
IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG);
|
||||||
|
|
||||||
mvm->d3_test_active = false;
|
mvm->d3_test_active = false;
|
||||||
|
|
||||||
@@ -2282,6 +2283,9 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file)
|
|||||||
mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED;
|
mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED;
|
||||||
|
|
||||||
iwl_abort_notification_waits(&mvm->notif_wait);
|
iwl_abort_notification_waits(&mvm->notif_wait);
|
||||||
|
if (!unified_image) {
|
||||||
|
int remaining_time = 10;
|
||||||
|
|
||||||
ieee80211_restart_hw(mvm->hw);
|
ieee80211_restart_hw(mvm->hw);
|
||||||
|
|
||||||
/* wait for restart and disconnect all interfaces */
|
/* wait for restart and disconnect all interfaces */
|
||||||
@@ -2292,7 +2296,8 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (remaining_time == 0)
|
if (remaining_time == 0)
|
||||||
IWL_ERR(mvm, "Timed out waiting for HW restart to finish!\n");
|
IWL_ERR(mvm, "Timed out waiting for HW restart!\n");
|
||||||
|
}
|
||||||
|
|
||||||
ieee80211_iterate_active_interfaces_atomic(
|
ieee80211_iterate_active_interfaces_atomic(
|
||||||
mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
|
mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
|
||||||
|
|||||||
Reference in New Issue
Block a user