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

Commit 4ed096b9 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Fix a bug when setting MHI dev state



Fix a bug in order to properly handle MHI_DEV_CTRL_DE_INIT case.
Also correct internal MHI state enum to match MHI dev state enum.

Change-Id: I20dc1b86e9fa19db636c620991ccee7b76b774e4
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent a1c3a94c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -942,6 +942,7 @@ static void cnss_pci_set_mhi_state_bit(struct cnss_pci_data *pci_priv,
		break;
	case MHI_DEV_CTRL_DE_INIT:
		clear_bit(MHI_DEV_CTRL_INIT, &pci_priv->mhi_state);
		break;
	case MHI_DEV_CTRL_POWER_ON:
		set_bit(MHI_DEV_CTRL_POWER_ON, &pci_priv->mhi_state);
		break;
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -33,8 +33,8 @@ enum cnss_mhi_state {
	CNSS_MHI_DEINIT,
	CNSS_MHI_SUSPEND,
	CNSS_MHI_RESUME,
	CNSS_MHI_POWER_ON,
	CNSS_MHI_POWER_OFF,
	CNSS_MHI_POWER_ON,
	CNSS_MHI_RAM_DUMP,
	CNSS_MHI_NOTIFY_LINK_ERROR,
};