mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
msm: ipa5: Adding rmnet_ll module APIs to ipa_fmwk
To support 2 new low latency data pipes for LA. Change-Id: Icb001633adcf379d752371d83c55b76193452df8 Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
This commit is contained in:
parent
fe3afbfb53
commit
d75403bb07
5 changed files with 171 additions and 3 deletions
|
|
@ -211,6 +211,20 @@ struct ipa_fmwk_contex {
|
|||
|
||||
int (*ipa_deregister_intf)(const char *name);
|
||||
|
||||
/* rmnet_ll APIs */
|
||||
int (*ipa_rmnet_ll_xmit)(struct sk_buff *skb);
|
||||
|
||||
int (*ipa_register_rmnet_ll_cb)(
|
||||
void (*ipa_rmnet_ll_ready_cb)(void *user_data1),
|
||||
void *user_data1,
|
||||
void (*ipa_rmnet_ll_stop_cb)(void *user_data2),
|
||||
void *user_data2,
|
||||
void (*ipa_rmnet_ll_rx_notify_cb)(
|
||||
void *user_data3, void *rx_data),
|
||||
void *user_data3);
|
||||
|
||||
int (*ipa_unregister_rmnet_ll_cb)(void);
|
||||
|
||||
/* ipa_usb APIs */
|
||||
int (*ipa_usb_init_teth_prot)(enum ipa_usb_teth_prot teth_prot,
|
||||
struct ipa_usb_teth_params *teth_params,
|
||||
|
|
@ -526,6 +540,10 @@ int ipa_fmwk_register_ipa(const struct ipa_core_data *in)
|
|||
ipa_fmwk_ctx->ipa_disconnect_wdi_pipe = in->ipa_disconnect_wdi_pipe;
|
||||
ipa_fmwk_ctx->ipa_reg_uc_rdyCB = in->ipa_uc_reg_rdyCB;
|
||||
ipa_fmwk_ctx->ipa_dereg_uc_rdyCB = in->ipa_uc_dereg_rdyCB;
|
||||
ipa_fmwk_ctx->ipa_rmnet_ll_xmit = in->ipa_rmnet_ll_xmit;
|
||||
ipa_fmwk_ctx->ipa_register_rmnet_ll_cb = in->ipa_register_rmnet_ll_cb;
|
||||
ipa_fmwk_ctx->ipa_unregister_rmnet_ll_cb =
|
||||
in->ipa_unregister_rmnet_ll_cb;
|
||||
|
||||
ipa_fmwk_ctx->ipa_ready = true;
|
||||
ipa_trigger_ipa_ready_cbs();
|
||||
|
|
@ -984,6 +1002,47 @@ int ipa_unregister_rmnet_ctl_cb(void)
|
|||
}
|
||||
EXPORT_SYMBOL(ipa_unregister_rmnet_ctl_cb);
|
||||
|
||||
/* registration API for rmnet_ll module */
|
||||
int ipa_rmnet_ll_xmit(struct sk_buff *skb)
|
||||
{
|
||||
int ret;
|
||||
|
||||
IPA_FMWK_DISPATCH_RETURN(ipa_rmnet_ll_xmit, skb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ipa_rmnet_ll_xmit);
|
||||
|
||||
int ipa_register_rmnet_ll_cb(
|
||||
void (*ipa_rmnet_ll_ready_cb)(void *user_data1),
|
||||
void *user_data1,
|
||||
void (*ipa_rmnet_ll_stop_cb)(void *user_data2),
|
||||
void *user_data2,
|
||||
void (*ipa_rmnet_ll_rx_notify_cb)(
|
||||
void *user_data3, void *rx_data),
|
||||
void *user_data3)
|
||||
{
|
||||
int ret;
|
||||
|
||||
IPA_FMWK_DISPATCH_RETURN(ipa_register_rmnet_ll_cb,
|
||||
ipa_rmnet_ll_ready_cb, user_data1,
|
||||
ipa_rmnet_ll_stop_cb, user_data2,
|
||||
ipa_rmnet_ll_rx_notify_cb, user_data3);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ipa_register_rmnet_ll_cb);
|
||||
|
||||
int ipa_unregister_rmnet_ll_cb(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
IPA_FMWK_DISPATCH_RETURN(ipa_unregister_rmnet_ll_cb);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ipa_unregister_rmnet_ll_cb);
|
||||
|
||||
/* registration API for IPA usb module */
|
||||
int ipa_fmwk_register_ipa_usb(const struct ipa_usb_data *in)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1565,6 +1565,18 @@ int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
|
|||
*/
|
||||
int ipa_rmnet_ctl_xmit(struct sk_buff *skb);
|
||||
|
||||
/*
|
||||
* ipa_rmnet_ll_xmit - Low lat data Tx
|
||||
*
|
||||
* @skb - tx low lat data packet
|
||||
*
|
||||
* Note: This need to be called after client receive rmnet_ll_
|
||||
* ready_cb and want to send TX ll data message.
|
||||
*
|
||||
* This funciton will return 0 on success, -EAGAIN if pipe if full.
|
||||
*/
|
||||
int ipa_rmnet_ll_xmit(struct sk_buff *skb);
|
||||
|
||||
void ipa_free_skb(struct ipa_rx_data *data);
|
||||
|
||||
/*
|
||||
|
|
@ -1748,6 +1760,12 @@ typedef void (*ipa_rmnet_ctl_rx_notify_cb)(void *user_data, void *rx_data);
|
|||
int ipa_get_default_aggr_time_limit(enum ipa_client_type client,
|
||||
u32 *default_aggr_time_limit);
|
||||
|
||||
typedef void (*ipa_rmnet_ll_ready_cb)(void *user_data);
|
||||
|
||||
typedef void (*ipa_rmnet_ll_stop_cb)(void *user_data);
|
||||
|
||||
typedef void (*ipa_rmnet_ll_rx_notify_cb)(void *user_data, void *rx_data);
|
||||
|
||||
/**
|
||||
* ipa_register_ipa_ready_cb() - register a callback to be invoked
|
||||
* when IPA core driver initialization is complete.
|
||||
|
|
@ -1809,6 +1827,45 @@ int ipa_register_rmnet_ctl_cb(
|
|||
*/
|
||||
int ipa_unregister_rmnet_ctl_cb(void);
|
||||
|
||||
/**
|
||||
* ipa_register_rmnet_ll_cb() - register callbacks to be invoked
|
||||
* to rmnet_ll for low latency data pipes setup/teardown/rx_notify.
|
||||
*
|
||||
* @ipa_rmnet_ll_ready_cb: CB to be called when pipes setup.
|
||||
* @user_data1: user_data for ipa_rmnet_ctl_ready_cb.
|
||||
* @ipa_rmnet_ll_stop_cb: CB to be called when pipes teardown.
|
||||
* @user_data2: user_data for ipa_rmnet_ctl_stop_cb.
|
||||
* @ipa_rmnet_ll_rx_notify_cb: CB to be called when receive rx pkts.
|
||||
* @user_data3: user_data for ipa_rmnet_ctl_rx_notify_cb.
|
||||
* @rx_data: RX data buffer.
|
||||
*
|
||||
* Note: This function is expected to be utilized for rmnet_ll
|
||||
* module.
|
||||
*
|
||||
* The function will return 0 on success, -EAGAIN if IPA not ready,
|
||||
* -ENXIO is feature is not enabled, -EEXIST if already called.
|
||||
*/
|
||||
int ipa_register_rmnet_ll_cb(
|
||||
void (*ipa_rmnet_ll_ready_cb)(void *user_data1),
|
||||
void *user_data1,
|
||||
void (*ipa_rmnet_ll_stop_cb)(void *user_data2),
|
||||
void *user_data2,
|
||||
void (*ipa_rmnet_ll_rx_notify_cb)(void *user_data3, void *rx_data),
|
||||
void *user_data3);
|
||||
|
||||
/**
|
||||
* ipa_unregister_rmnet_ll_cb() - unregister callbacks to be
|
||||
* invoked to rmnet_ll for low lat data pipes
|
||||
* setup/teardown/rx_notify.
|
||||
*
|
||||
* Note: This function is expected to be utilized for rmnet_ll
|
||||
* module.
|
||||
*
|
||||
* The function will return 0 on success, -EAGAIN if IPA not ready,
|
||||
* -ENXIO is feature is not enabled.
|
||||
*/
|
||||
int ipa_unregister_rmnet_ll_cb(void);
|
||||
|
||||
int ipa_get_smmu_params(struct ipa_smmu_in_params *in,
|
||||
struct ipa_smmu_out_params *out);
|
||||
/**
|
||||
|
|
@ -1943,6 +2000,14 @@ static inline int ipa_rmnet_ctl_xmit(struct sk_buff *skb)
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
/*
|
||||
* Low Latency data Tx
|
||||
*/
|
||||
static inline int ipa_rmnet_ll_xmit(struct sk_buff *skb)
|
||||
{
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
static inline void ipa_free_skb(struct ipa_rx_data *rx_in)
|
||||
{
|
||||
}
|
||||
|
|
@ -2140,6 +2205,22 @@ static inline int ipa_get_default_aggr_time_limit(enum ipa_client_type client,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
static inline int ipa_register_rmnet_ll_cb(
|
||||
void (*ipa_rmnet_ll_ready_cb)(void *user_data1),
|
||||
void *user_data1,
|
||||
void (*ipa_rmnet_ll_stop_cb)(void *user_data2),
|
||||
void *user_data2,
|
||||
void (*ipa_rmnet_ll_rx_notify_cb)(void *user_data3, void *rx_data),
|
||||
void *user_data3)
|
||||
{
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
static inline int ipa_unregister_rmnet_ll_cb(void)
|
||||
{
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_IPA3) */
|
||||
|
||||
/* stubs - to be removed once dependent drivers remove references */
|
||||
|
|
|
|||
|
|
@ -122,6 +122,19 @@ struct ipa_core_data {
|
|||
int (*ipa_disconnect_wdi_pipe)(u32 clnt_hdl);
|
||||
int (*ipa_uc_reg_rdyCB)(struct ipa_wdi_uc_ready_params *param);
|
||||
int (*ipa_uc_dereg_rdyCB)(void);
|
||||
|
||||
int (*ipa_rmnet_ll_xmit)(struct sk_buff *skb);
|
||||
|
||||
int (*ipa_register_rmnet_ll_cb)(
|
||||
void (*ipa_rmnet_ll_ready_cb)(void *user_data1),
|
||||
void *user_data1,
|
||||
void (*ipa_rmnet_ll_stop_cb)(void *user_data2),
|
||||
void *user_data2,
|
||||
void (*ipa_rmnet_ll_rx_notify_cb)(
|
||||
void *user_data3, void *rx_data),
|
||||
void *user_data3);
|
||||
|
||||
int (*ipa_unregister_rmnet_ll_cb)(void);
|
||||
};
|
||||
|
||||
struct ipa_usb_data {
|
||||
|
|
|
|||
|
|
@ -443,9 +443,15 @@ enum ipa_client_type {
|
|||
|
||||
/* RESERVED PROD = 118, */
|
||||
IPA_CLIENT_WLAN2_CONS1 = 119,
|
||||
|
||||
IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_PROD = 120,
|
||||
IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS = 121,
|
||||
|
||||
IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD = 122,
|
||||
/* RESERVED CONS = 123, */
|
||||
};
|
||||
|
||||
#define IPA_CLIENT_MAX (IPA_CLIENT_WLAN2_CONS1 + 1)
|
||||
#define IPA_CLIENT_MAX (IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD + 1)
|
||||
|
||||
#define IPA_CLIENT_WLAN2_PROD IPA_CLIENT_A5_WLAN_AMPDU_PROD
|
||||
#define IPA_CLIENT_Q6_DL_NLO_DATA_PROD IPA_CLIENT_Q6_DL_NLO_DATA_PROD
|
||||
|
|
@ -470,17 +476,22 @@ enum ipa_client_type {
|
|||
#define IPA_CLIENT_MHI_QDSS_CONS IPA_CLIENT_MHI_QDSS_CONS
|
||||
#define IPA_CLIENT_QDSS_PROD IPA_CLIENT_QDSS_PROD
|
||||
#define IPA_CLIENT_WLAN2_CONS1 IPA_CLIENT_WLAN2_CONS1
|
||||
#define IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_PROD IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_PROD
|
||||
#define IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS
|
||||
#define IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD
|
||||
|
||||
#define IPA_CLIENT_IS_APPS_CONS(client) \
|
||||
((client) == IPA_CLIENT_APPS_LAN_CONS || \
|
||||
(client) == IPA_CLIENT_APPS_WAN_CONS || \
|
||||
(client) == IPA_CLIENT_APPS_WAN_COAL_CONS || \
|
||||
(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_CONS)
|
||||
(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_CONS || \
|
||||
(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS)
|
||||
|
||||
#define IPA_CLIENT_IS_APPS_PROD(client) \
|
||||
((client) == IPA_CLIENT_APPS_LAN_PROD || \
|
||||
(client) == IPA_CLIENT_APPS_WAN_PROD || \
|
||||
(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_PROD)
|
||||
(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_PROD || \
|
||||
(client) == IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_PROD)
|
||||
|
||||
#define IPA_CLIENT_IS_USB_CONS(client) \
|
||||
((client) == IPA_CLIENT_USB_CONS || \
|
||||
|
|
@ -526,6 +537,7 @@ enum ipa_client_type {
|
|||
(client) == IPA_CLIENT_Q6_CMD_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_DECOMP_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_DECOMP2_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_DL_NLO_DATA_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_CV2X_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_AUDIO_DMA_MHI_PROD)
|
||||
|
|
@ -550,6 +562,7 @@ enum ipa_client_type {
|
|||
(client) == IPA_CLIENT_Q6_WAN_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_CMD_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_DL_NLO_DATA_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_CV2X_PROD || \
|
||||
(client) == IPA_CLIENT_Q6_AUDIO_DMA_MHI_PROD)
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@
|
|||
#define RMNET_IOCTL_SET_OFFLOAD 0x0018 /* Set IPA offload */
|
||||
#define RMNET_IOCTL_GET_MTU 0x0019 /* Get v4/v6 MTU */
|
||||
#define RMNET_IOCTL_SET_MTU 0x0020 /* Set v4/v6 MTU */
|
||||
#define RMNET_IOCTL_GET_EPID_LL 0x0021 /* Get LL ep ID */
|
||||
#define RMNET_IOCTL_GET_EP_PAIR_LL 0x0022 /* LL ep pair */
|
||||
|
||||
/**
|
||||
* RMNET_IOCTL_EXTENDED_V2 ioctl types.
|
||||
|
|
|
|||
Loading…
Reference in a new issue