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

Commit 2eb731a1 authored by Yue Ma's avatar Yue Ma Committed by Gerrit - the friendly Code Review server
Browse files

cnss2: Check if MHI state is correct for handling RDDM state



MHI state should be proper before proceeding RDDM state.

Change-Id: I833a5c5ca481d9d32b5f36b4d6069297d4587ee5
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent d83b852b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1927,7 +1927,10 @@ static int cnss_pci_check_mhi_state_bit(struct cnss_pci_data *pci_priv,
			return 0;
		break;
	case CNSS_MHI_TRIGGER_RDDM:
		if (test_bit(CNSS_MHI_POWER_ON, &pci_priv->mhi_state) &&
		    !test_bit(CNSS_MHI_TRIGGER_RDDM, &pci_priv->mhi_state))
			return 0;
		break;
	default:
		cnss_pr_err("Unhandled MHI state: %s(%d)\n",
			    cnss_mhi_state_to_str(mhi_state), mhi_state);