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

Commit 602a398f authored by Ashok Raj Deenadayalan's avatar Ashok Raj Deenadayalan Committed by Swetha Chikkaboraiah
Browse files

msm: ipa3: Add low-level IPA client support



Add low-level IPA client connect and disconnect
support.

Change-Id: Icb0aa110e2cbf71d9a5a19b88bb261667599461e
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: default avatarChetan C R <cchinnad@codeaurora.org>
Signed-off-by: default avatarAshok Raj Deenadayalan <adeenada@codeaurora.org>
Signed-off-by: default avatarSwetha Chikkaboraiah <schikk@codeaurora.org>
parent 9fe29030
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
@@ -384,6 +384,55 @@ int ipa_smmu_free_sgt(struct sg_table **out_sgt_ptr)
	return 0;
}

/**
 * ipa_connect() - low-level IPA client connect
 * @in: [in] input parameters from client
 * @sps:	[out] sps output from IPA needed by client for sps_connect
 * @clnt_hdl:   [out] opaque client handle assigned by IPA to client
 *
 * Should be called by the driver of the peripheral that wants to connect to
 * IPA in BAM-BAM mode. these peripherals are USB and HSIC. this api
 * expects caller to take responsibility to add any needed headers, routing
 * and filtering tables and rules as needed.
 *
 * Returns:     0 on success, negative on failure
 *
 * Note:	Should not be called from atomic context
 */
int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps,
	u32 *clnt_hdl)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_connect, in, sps, clnt_hdl);

	return ret;
}
EXPORT_SYMBOL(ipa_connect);

/**
 * ipa_disconnect() - low-level IPA client disconnect
 * @clnt_hdl:   [in] opaque client handle assigned by IPA to client
 *
 * Should be called by the driver of the peripheral that wants to disconnect
 * from IPA in BAM-BAM mode. this api expects caller to take responsibility to
 * free any needed headers, routing and filtering tables and rules as needed.
 *
 * Returns:     0 on success, negative on failure
 *
 * Note:	Should not be called from atomic context
 */
int ipa_disconnect(u32 clnt_hdl)
{
	int ret;

	IPA_API_DISPATCH_RETURN(ipa_disconnect, clnt_hdl);

	return ret;
}
EXPORT_SYMBOL(ipa_disconnect);


/**
 * ipa_clear_endpoint_delay() - Clear ep_delay.
 * @clnt_hdl:	[in] IPA client handle
+2 −1
Original line number Diff line number Diff line
@@ -589,7 +589,8 @@ int rndis_ipa_init(struct ipa_usb_init_params *params)
	}
	RNDIS_IPA_DEBUG("Device Ethernet address set %pM\n", net->dev_addr);

	if (ipa_is_vlan_mode(IPA_VLAN_IF_RNDIS,
	if ((ipa_get_hw_type() >= IPA_HW_v3_0) &&
		ipa_is_vlan_mode(IPA_VLAN_IF_RNDIS,
		&rndis_ipa_ctx->is_vlan_mode)) {
		RNDIS_IPA_ERROR("couldn't acquire vlan mode, is ipa ready?\n");
		goto fail_get_vlan_mode;