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

Commit d4528417 authored by Michael Adisumarta's avatar Michael Adisumarta
Browse files

msm:ipa: changes to defer remote channel starting for rndis connect



this change defers starting of remote channels on device for rndis to
wan state ioctl is received thus avoiding double channel starts from
usb connect and wan state ioctl.


Change-Id: I4b091bc0205f7eef3b1b52ee091c6dcc56319051
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent cd914bbc
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
@@ -2553,11 +2553,18 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot)
		}
	}

	if (probe_id == IPA_MPM_MHIP_CH_ID_MAX) {
	if ((probe_id < IPA_MPM_MHIP_CH_ID_0) ||
		(probe_id >= IPA_MPM_MHIP_CH_ID_MAX)) {
		IPA_MPM_ERR("Unknown probe_id\n");
		return 0;
	}

	if (probe_id == IPA_MPM_MHIP_CH_ID_0) {
		/* For rndis, the MPM processing happens in WAN State IOCTL */
		IPA_MPM_DBG("MPM Xdci connect for rndis, no -op\n");
		return 0;
	}

	IPA_MPM_DBG("Connect xdci prot %d -> mhip_client = %d probe_id = %d\n",
			xdci_teth_prot, mhip_client, probe_id);

@@ -2602,7 +2609,7 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot)
		atomic_set(&ipa_mpm_ctx->adpl_over_usb_available, 1);
		return 0;
	default:
		IPA_MPM_DBG("mhip_client = %d not processed\n", mhip_client);
		IPA_MPM_ERR("mhip_client = %d not processed\n", mhip_client);
		if (is_acted) {
			ret = ipa_mpm_vote_unvote_pcie_clk(CLK_OFF, probe_id,
				false, &is_acted);
@@ -2612,7 +2619,8 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot)
				return ret;
			}
		}
		return 0;
		ipa_assert();
		return -EINVAL;
	}

	if (mhip_client != IPA_MPM_MHIP_USB_DPL)
@@ -2685,12 +2693,19 @@ int ipa_mpm_mhip_xdci_pipe_disable(enum ipa_usb_teth_prot xdci_teth_prot)
		}
	}

	if (probe_id == IPA_MPM_MHIP_CH_ID_MAX) {
		IPA_MPM_ERR("Invalid probe_id\n");
	if ((probe_id < IPA_MPM_MHIP_CH_ID_0) ||
		(probe_id >= IPA_MPM_MHIP_CH_ID_MAX)) {
		IPA_MPM_ERR("Unknown probe_id\n");
		return 0;
	}

	if (probe_id == IPA_MPM_MHIP_CH_ID_0) {
		/* For rndis, the MPM processing happens in WAN State IOCTL */
		IPA_MPM_DBG("MPM Xdci disconnect for rndis, no -op\n");
		return 0;
	}

	IPA_MPM_ERR("xdci disconnect prot %d mhip_client = %d probe_id = %d\n",
	IPA_MPM_DBG("xdci disconnect prot %d mhip_client = %d probe_id = %d\n",
			xdci_teth_prot, mhip_client, probe_id);
	/*
	 * Make sure to stop Device side channels before