msm: ipa3: Add low-level IPA client support

Add low-level IPA client connect and disconnect
support.

Change-Id: Icb0aa110e2cbf71d9a5a19b88bb261667599461e
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: Chetan C R <cchinnad@codeaurora.org>
tirimbino
Praveen Kurapati 5 years ago
parent eae6f3d0d9
commit 5504e8edaa
  1. 49
      drivers/platform/msm/ipa/ipa_api.c
  2. 5
      drivers/platform/msm/ipa/ipa_clients/rndis_ipa.c

@ -399,6 +399,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

@ -1,4 +1,4 @@
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018,2020 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
@ -603,7 +603,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;

Loading…
Cancel
Save