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

Commit aa2cd681 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Skip power up/down for non QCA6174 devices"

parents 43cc5f8b fbbac480
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -746,6 +746,15 @@ int cnss_power_up(struct device *dev)
	void *bus_priv = cnss_bus_dev_to_bus_priv(dev);
	struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev);

	if (!bus_priv || !plat_priv)
		return -ENODEV;

	if (plat_priv->device_id != QCA6174_DEVICE_ID) {
		cnss_pr_dbg("Power up is not supported for device ID 0x%lx\n",
			    plat_priv->device_id);
		return 0;
	}

	ret = cnss_power_on_device(plat_priv);
	if (ret) {
		cnss_pr_err("Failed to power on device, err = %d\n", ret);
@@ -775,6 +784,12 @@ int cnss_power_down(struct device *dev)
	if (!bus_priv || !plat_priv)
		return -ENODEV;

	if (plat_priv->device_id != QCA6174_DEVICE_ID) {
		cnss_pr_dbg("Power down is not supported for device ID 0x%lx\n",
			    plat_priv->device_id);
		return 0;
	}

	cnss_request_bus_bandwidth(CNSS_BUS_WIDTH_NONE);
	cnss_pci_set_monitor_wake_intr(bus_priv, false);
	cnss_pci_set_auto_suspended(bus_priv, 0);