Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1cb92fc authored by Emmanuel Grumbach's avatar Emmanuel Grumbach
Browse files

iwlwifi: mvm: remove support for legacy power API



If the driver detects old firmware, we disable support for
power management.
This greatly simplifies the code.

Reviewed-by: default avatarAlexander Bondar <alexander.bondar@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 474b50c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ obj-$(CONFIG_IWLMVM) += iwlmvm.o
iwlmvm-y += fw.o mac80211.o nvm.o ops.o phy-ctxt.o mac-ctxt.o
iwlmvm-y += utils.o rx.o tx.o binding.o quota.o sta.o sf.o
iwlmvm-y += scan.o time-event.o rs.o
iwlmvm-y += power.o power_legacy.o bt-coex.o
iwlmvm-y += power.o bt-coex.o
iwlmvm-y += led.o tt.o
iwlmvm-$(CONFIG_IWLWIFI_DEBUGFS) += debugfs.o debugfs-vif.o
iwlmvm-$(CONFIG_PM_SLEEP) += d3.o
+2 −2
Original line number Diff line number Diff line
@@ -1191,11 +1191,11 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
	if (ret)
		goto out;

	ret = iwl_mvm_power_update_device_mode(mvm);
	ret = iwl_mvm_power_update_device(mvm);
	if (ret)
		goto out;

	ret = iwl_mvm_power_update_mode(mvm, vif);
	ret = iwl_mvm_power_mac_update_mode(mvm, vif);
	if (ret)
		goto out;

+4 −3
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static ssize_t iwl_dbgfs_pm_params_write(struct ieee80211_vif *vif, char *buf,

	mutex_lock(&mvm->mutex);
	iwl_dbgfs_update_pm(mvm, vif, param, val);
	ret = iwl_mvm_power_update_mode(mvm, vif);
	ret = iwl_mvm_power_mac_update_mode(mvm, vif);
	mutex_unlock(&mvm->mutex);

	return ret ?: count;
@@ -202,7 +202,7 @@ static ssize_t iwl_dbgfs_pm_params_read(struct file *file,
	int bufsz = sizeof(buf);
	int pos;

	pos = iwl_mvm_power_dbgfs_read(mvm, vif, buf, bufsz);
	pos = iwl_mvm_power_mac_dbgfs_read(mvm, vif, buf, bufsz);

	return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}
@@ -587,7 +587,8 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
		return;
	}

	if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM &&
	if ((mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PM_CMD_SUPPORT) &&
	    iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM &&
	    ((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) ||
	     (vif->type == NL80211_IFTYPE_STATION && vif->p2p &&
	      mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PS)))
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ static ssize_t iwl_dbgfs_disable_power_off_write(struct iwl_mvm *mvm, char *buf,
	}

	mutex_lock(&mvm->mutex);
	ret = iwl_mvm_power_update_device_mode(mvm);
	ret = iwl_mvm_power_update_device(mvm);
	mutex_unlock(&mvm->mutex);

	return ret ?: count;
+7 −1
Original line number Diff line number Diff line
@@ -442,7 +442,13 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
	/* Initialize tx backoffs to the minimal possible */
	iwl_mvm_tt_tx_backoff(mvm, 0);

	ret = iwl_mvm_power_update_device_mode(mvm);
	if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PM_CMD_SUPPORT)) {
		ret = iwl_power_legacy_set_cam_mode(mvm);
		if (ret)
			goto error;
	}

	ret = iwl_mvm_power_update_device(mvm);
	if (ret)
		goto error;

Loading