|
@@ -7,7 +7,7 @@
|
|
|
*
|
|
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
|
|
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
|
|
- * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
|
|
|
+ * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
|
|
|
*
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of version 2 of the GNU General Public License as
|
|
@@ -34,7 +34,7 @@
|
|
|
*
|
|
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
|
|
* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
|
|
|
- * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
|
|
|
+ * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
|
|
|
* All rights reserved.
|
|
|
*
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
@@ -186,7 +186,7 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm,
|
|
|
if (!mvmvif->queue_params[ac].uapsd)
|
|
|
continue;
|
|
|
|
|
|
- if (mvm->cur_ucode != IWL_UCODE_WOWLAN)
|
|
|
+ if (mvm->fwrt.cur_fw_img != IWL_UCODE_WOWLAN)
|
|
|
cmd->flags |=
|
|
|
cpu_to_le16(POWER_FLAGS_ADVANCE_PM_ENA_MSK);
|
|
|
|
|
@@ -220,14 +220,15 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm,
|
|
|
BIT(IEEE80211_AC_BK))) {
|
|
|
cmd->flags |= cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK);
|
|
|
cmd->snooze_interval = cpu_to_le16(IWL_MVM_PS_SNOOZE_INTERVAL);
|
|
|
- cmd->snooze_window = (mvm->cur_ucode == IWL_UCODE_WOWLAN) ?
|
|
|
- cpu_to_le16(IWL_MVM_WOWLAN_PS_SNOOZE_WINDOW) :
|
|
|
- cpu_to_le16(IWL_MVM_PS_SNOOZE_WINDOW);
|
|
|
+ cmd->snooze_window =
|
|
|
+ (mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN) ?
|
|
|
+ cpu_to_le16(IWL_MVM_WOWLAN_PS_SNOOZE_WINDOW) :
|
|
|
+ cpu_to_le16(IWL_MVM_PS_SNOOZE_WINDOW);
|
|
|
}
|
|
|
|
|
|
cmd->uapsd_max_sp = mvm->hw->uapsd_max_sp_len;
|
|
|
|
|
|
- if (mvm->cur_ucode == IWL_UCODE_WOWLAN || cmd->flags &
|
|
|
+ if (mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN || cmd->flags &
|
|
|
cpu_to_le16(POWER_FLAGS_SNOOZE_ENA_MSK)) {
|
|
|
cmd->rx_data_timeout_uapsd =
|
|
|
cpu_to_le32(IWL_MVM_WOWLAN_PS_RX_DATA_TIMEOUT);
|
|
@@ -502,7 +503,7 @@ static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm,
|
|
|
struct iwl_mac_power_cmd cmd = {};
|
|
|
|
|
|
iwl_mvm_power_build_cmd(mvm, vif, &cmd,
|
|
|
- mvm->cur_ucode != IWL_UCODE_WOWLAN);
|
|
|
+ mvm->fwrt.cur_fw_img != IWL_UCODE_WOWLAN);
|
|
|
iwl_mvm_power_log(mvm, &cmd);
|
|
|
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
|
|
memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd));
|
|
@@ -525,8 +526,8 @@ int iwl_mvm_power_update_device(struct iwl_mvm *mvm)
|
|
|
cmd.flags |= cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK);
|
|
|
|
|
|
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
|
|
- if ((mvm->cur_ucode == IWL_UCODE_WOWLAN) ? mvm->disable_power_off_d3 :
|
|
|
- mvm->disable_power_off)
|
|
|
+ if ((mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN) ?
|
|
|
+ mvm->disable_power_off_d3 : mvm->disable_power_off)
|
|
|
cmd.flags &=
|
|
|
cpu_to_le16(~DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK);
|
|
|
#endif
|
|
@@ -933,7 +934,7 @@ static int iwl_mvm_power_set_ba(struct iwl_mvm *mvm,
|
|
|
if (!mvmvif->bf_data.bf_enabled)
|
|
|
return 0;
|
|
|
|
|
|
- if (mvm->cur_ucode == IWL_UCODE_WOWLAN)
|
|
|
+ if (mvm->fwrt.cur_fw_img == IWL_UCODE_WOWLAN)
|
|
|
cmd.ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER_D3);
|
|
|
|
|
|
mvmvif->bf_data.ba_enabled = !(!mvmvif->pm_enabled ||
|