Loading drivers/platform/msm/ipa_fmwk/ipa_fmwk.c +71 −3 Original line number Diff line number Diff line Loading @@ -251,6 +251,9 @@ struct ipa_fmwk_contex { int (*ipa_usb_xdci_resume)(u32 ul_clnt_hdl, u32 dl_clnt_hdl, enum ipa_usb_teth_prot teth_prot); bool (*ipa_usb_is_teth_prot_connected)( enum ipa_usb_teth_prot usb_teth_prot); /* ipa_wdi3 APIs */ int (*ipa_wdi_init)(struct ipa_wdi_init_in_params *in, struct ipa_wdi_init_out_params *out); Loading Loading @@ -309,6 +312,8 @@ struct ipa_fmwk_contex { int (*ipa_dereg_uc_rdyCB)(void); bool (*ipa_wdi_is_tx1_used)(void); /* ipa_gsb APIs*/ int (*ipa_bridge_init)(struct ipa_bridge_init_params *params, u32 *hdl); Loading Loading @@ -425,8 +430,15 @@ struct ipa_fmwk_contex { int (*ipa_eth_client_conn_evt)(struct ipa_ecm_msg *msg); int (*ipa_eth_client_disconn_evt)(struct ipa_ecm_msg *msg); int (*ipa_get_default_aggr_time_limit)(enum ipa_client_type client, u32 *default_aggr_time_limit); enum ipa_client_type (*ipa_eth_get_ipa_client_type_from_eth_type)( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir); bool (*ipa_eth_client_exist)( enum ipa_eth_client_type eth_client_type, int inst_id); }; static struct ipa_fmwk_contex *ipa_fmwk_ctx; Loading Loading @@ -1056,7 +1068,8 @@ int ipa_fmwk_register_ipa_usb(const struct ipa_usb_data *in) ipa_fmwk_ctx->ipa_usb_xdci_disconnect || ipa_fmwk_ctx->ipa_usb_deinit_teth_prot || ipa_fmwk_ctx->ipa_usb_xdci_suspend || ipa_fmwk_ctx->ipa_usb_xdci_resume) { ipa_fmwk_ctx->ipa_usb_xdci_resume || ipa_fmwk_ctx->ipa_usb_is_teth_prot_connected) { pr_err("ipa_usb APIs were already initialized\n"); return -EPERM; } Loading @@ -1066,6 +1079,8 @@ int ipa_fmwk_register_ipa_usb(const struct ipa_usb_data *in) ipa_fmwk_ctx->ipa_usb_deinit_teth_prot = in->ipa_usb_deinit_teth_prot; ipa_fmwk_ctx->ipa_usb_xdci_suspend = in->ipa_usb_xdci_suspend; ipa_fmwk_ctx->ipa_usb_xdci_resume = in->ipa_usb_xdci_resume; ipa_fmwk_ctx->ipa_usb_is_teth_prot_connected = in->ipa_usb_is_teth_prot_connected; pr_info("ipa_usb registered successfully\n"); Loading Loading @@ -1153,6 +1168,17 @@ int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } EXPORT_SYMBOL(ipa_usb_xdci_resume); bool ipa_usb_is_teth_prot_connected(enum ipa_usb_teth_prot usb_teth_prot) { int ret; IPA_FMWK_DISPATCH_RETURN(ipa_usb_is_teth_prot_connected, usb_teth_prot); return ret; } EXPORT_SYMBOL(ipa_usb_is_teth_prot_connected); /* registration API for IPA wdi3 module */ int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in) { Loading @@ -1175,7 +1201,8 @@ int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in) || ipa_fmwk_ctx->ipa_wdi_release_smmu_mapping || ipa_fmwk_ctx->ipa_wdi_get_stats || ipa_fmwk_ctx->ipa_get_wdi_version || ipa_fmwk_ctx->ipa_wdi_sw_stats) { || ipa_fmwk_ctx->ipa_wdi_sw_stats || ipa_fmwk_ctx->ipa_wdi_is_tx1_used) { pr_err("ipa_wdi3 APIs were already initialized\n"); return -EPERM; } Loading @@ -1197,6 +1224,7 @@ int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in) ipa_fmwk_ctx->ipa_wdi_get_stats = in->ipa_wdi_get_stats; ipa_fmwk_ctx->ipa_wdi_sw_stats = in->ipa_wdi_sw_stats; ipa_fmwk_ctx->ipa_get_wdi_version = in->ipa_get_wdi_version; ipa_fmwk_ctx->ipa_wdi_is_tx1_used = in->ipa_wdi_is_tx1_used; pr_info("ipa_wdi3 registered successfully\n"); Loading @@ -1217,6 +1245,16 @@ int ipa_wdi_init(struct ipa_wdi_init_in_params *in, } EXPORT_SYMBOL(ipa_wdi_init); bool ipa_wdi_is_tx1_used(void) { int ret; IPA_FMWK_DISPATCH_RETURN(ipa_wdi_is_tx1_used); return ret; } EXPORT_SYMBOL(ipa_wdi_is_tx1_used); int ipa_wdi_cleanup(void) { int ret; Loading Loading @@ -2125,7 +2163,9 @@ int ipa_fmwk_register_ipa_eth(const struct ipa_eth_data *in) || ipa_fmwk_ctx->ipa_eth_client_unreg_intf || ipa_fmwk_ctx->ipa_eth_client_set_perf_profile || ipa_fmwk_ctx->ipa_eth_client_conn_evt || ipa_fmwk_ctx->ipa_eth_client_disconn_evt) { || ipa_fmwk_ctx->ipa_eth_client_disconn_evt || ipa_fmwk_ctx->ipa_eth_get_ipa_client_type_from_eth_type || ipa_fmwk_ctx->ipa_eth_client_exist) { pr_err("ipa_eth APIs were already initialized\n"); return -EPERM; } Loading @@ -2143,6 +2183,10 @@ int ipa_fmwk_register_ipa_eth(const struct ipa_eth_data *in) ipa_fmwk_ctx->ipa_eth_client_conn_evt = in->ipa_eth_client_conn_evt; ipa_fmwk_ctx->ipa_eth_client_disconn_evt = in->ipa_eth_client_disconn_evt; ipa_fmwk_ctx->ipa_eth_get_ipa_client_type_from_eth_type = in->ipa_eth_get_ipa_client_type_from_eth_type; ipa_fmwk_ctx->ipa_eth_client_exist = in->ipa_eth_client_exist; pr_info("ipa_eth registered successfully\n"); Loading Loading @@ -2275,6 +2319,30 @@ int ipa_get_default_aggr_time_limit(enum ipa_client_type client, } EXPORT_SYMBOL(ipa_get_default_aggr_time_limit); enum ipa_client_type ipa_eth_get_ipa_client_type_from_eth_type( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir) { int ret; IPA_FMWK_DISPATCH_RETURN_DP(ipa_eth_get_ipa_client_type_from_eth_type, eth_client_type, dir); return ret; } EXPORT_SYMBOL(ipa_eth_get_ipa_client_type_from_eth_type); bool ipa_eth_client_exist( enum ipa_eth_client_type eth_client_type, int inst_id) { int ret; IPA_FMWK_DISPATCH_RETURN_DP(ipa_eth_client_exist, eth_client_type, inst_id); return ret; } EXPORT_SYMBOL(ipa_eth_client_exist); /* module functions */ static int __init ipa_fmwk_init(void) { Loading include/linux/ipa_eth.h +5 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. */ #ifndef _IPA_ETH_H_ Loading Loading @@ -1094,5 +1094,9 @@ int ipa_eth_client_set_perf_profile(struct ipa_eth_client *client, struct ipa_eth_perf_profile *profile); int ipa_eth_client_conn_evt(struct ipa_ecm_msg *msg); int ipa_eth_client_disconn_evt(struct ipa_ecm_msg *msg); enum ipa_client_type ipa_eth_get_ipa_client_type_from_eth_type( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir); bool ipa_eth_client_exist( enum ipa_eth_client_type eth_client_type, int inst_id); #endif // _IPA_ETH_H_ include/linux/ipa_fmwk.h +11 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,8 @@ struct ipa_usb_data { int (*ipa_usb_xdci_resume)(u32 ul_clnt_hdl, u32 dl_clnt_hdl, enum ipa_usb_teth_prot teth_prot); bool (*ipa_usb_is_teth_prot_connected)(enum ipa_usb_teth_prot usb_teth_prot); }; struct ipa_wdi3_data { Loading Loading @@ -199,6 +201,8 @@ struct ipa_wdi3_data { int (*ipa_wdi_sw_stats)(struct ipa_wdi_tx_info *info); int (*ipa_get_wdi_version)(void); bool (*ipa_wdi_is_tx1_used)(void); }; struct ipa_qdss_data { Loading Loading @@ -327,6 +331,13 @@ struct ipa_eth_data { int (*ipa_eth_client_conn_evt)(struct ipa_ecm_msg *msg); int (*ipa_eth_client_disconn_evt)(struct ipa_ecm_msg *msg); enum ipa_client_type (*ipa_eth_get_ipa_client_type_from_eth_type)( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir); bool (*ipa_eth_client_exist)( enum ipa_eth_client_type eth_client_type, int inst_id); }; #if IS_ENABLED(CONFIG_IPA3) Loading include/linux/ipa_usb.h +15 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ #ifndef _IPA_USB_H_ Loading Loading @@ -292,6 +292,15 @@ int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl, int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl, enum ipa_usb_teth_prot teth_prot); /** * ipa_usb_is_teth_prot_connected - Internal API for checking USB * protocol is connected * * @usb_teth_prot: USB tethering protocol * @Return true if connected, false if not */ bool ipa_usb_is_teth_prot_connected(enum ipa_usb_teth_prot usb_teth_prot); #else /* IS_ENABLED(CONFIG_IPA3) */ static inline int ipa_usb_init_teth_prot(enum ipa_usb_teth_prot teth_prot, Loading Loading @@ -337,6 +346,11 @@ static inline int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl, return -EPERM; } static inline int ipa_usb_is_teth_prot_connected(enum ipa_usb_teth_prot usb_teth_prot) { return -EPERM; } #endif /* IS_ENABLED(CONFIG_IPA3) */ Loading include/linux/ipa_wdi3.h +11 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,12 @@ struct ipa_wdi_perf_profile { int ipa_wdi_init(struct ipa_wdi_init_in_params *in, struct ipa_wdi_init_out_params *out); /** ipa_wdi_is_tx1_used - return if DBS mode is active * * @Return bool */ bool ipa_wdi_is_tx1_used(void); /** * ipa_wdi_cleanup - Client should call this function to * clean up WDI IPA offload data path Loading Loading @@ -399,6 +405,11 @@ static inline int ipa_get_wdi_version(void) return -EPERM; } static inline int ipa_wdi_is_tx1_used(void) { return -EPERM; } static inline int ipa_wdi_cleanup(void) { return -EPERM; Loading Loading
drivers/platform/msm/ipa_fmwk/ipa_fmwk.c +71 −3 Original line number Diff line number Diff line Loading @@ -251,6 +251,9 @@ struct ipa_fmwk_contex { int (*ipa_usb_xdci_resume)(u32 ul_clnt_hdl, u32 dl_clnt_hdl, enum ipa_usb_teth_prot teth_prot); bool (*ipa_usb_is_teth_prot_connected)( enum ipa_usb_teth_prot usb_teth_prot); /* ipa_wdi3 APIs */ int (*ipa_wdi_init)(struct ipa_wdi_init_in_params *in, struct ipa_wdi_init_out_params *out); Loading Loading @@ -309,6 +312,8 @@ struct ipa_fmwk_contex { int (*ipa_dereg_uc_rdyCB)(void); bool (*ipa_wdi_is_tx1_used)(void); /* ipa_gsb APIs*/ int (*ipa_bridge_init)(struct ipa_bridge_init_params *params, u32 *hdl); Loading Loading @@ -425,8 +430,15 @@ struct ipa_fmwk_contex { int (*ipa_eth_client_conn_evt)(struct ipa_ecm_msg *msg); int (*ipa_eth_client_disconn_evt)(struct ipa_ecm_msg *msg); int (*ipa_get_default_aggr_time_limit)(enum ipa_client_type client, u32 *default_aggr_time_limit); enum ipa_client_type (*ipa_eth_get_ipa_client_type_from_eth_type)( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir); bool (*ipa_eth_client_exist)( enum ipa_eth_client_type eth_client_type, int inst_id); }; static struct ipa_fmwk_contex *ipa_fmwk_ctx; Loading Loading @@ -1056,7 +1068,8 @@ int ipa_fmwk_register_ipa_usb(const struct ipa_usb_data *in) ipa_fmwk_ctx->ipa_usb_xdci_disconnect || ipa_fmwk_ctx->ipa_usb_deinit_teth_prot || ipa_fmwk_ctx->ipa_usb_xdci_suspend || ipa_fmwk_ctx->ipa_usb_xdci_resume) { ipa_fmwk_ctx->ipa_usb_xdci_resume || ipa_fmwk_ctx->ipa_usb_is_teth_prot_connected) { pr_err("ipa_usb APIs were already initialized\n"); return -EPERM; } Loading @@ -1066,6 +1079,8 @@ int ipa_fmwk_register_ipa_usb(const struct ipa_usb_data *in) ipa_fmwk_ctx->ipa_usb_deinit_teth_prot = in->ipa_usb_deinit_teth_prot; ipa_fmwk_ctx->ipa_usb_xdci_suspend = in->ipa_usb_xdci_suspend; ipa_fmwk_ctx->ipa_usb_xdci_resume = in->ipa_usb_xdci_resume; ipa_fmwk_ctx->ipa_usb_is_teth_prot_connected = in->ipa_usb_is_teth_prot_connected; pr_info("ipa_usb registered successfully\n"); Loading Loading @@ -1153,6 +1168,17 @@ int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } EXPORT_SYMBOL(ipa_usb_xdci_resume); bool ipa_usb_is_teth_prot_connected(enum ipa_usb_teth_prot usb_teth_prot) { int ret; IPA_FMWK_DISPATCH_RETURN(ipa_usb_is_teth_prot_connected, usb_teth_prot); return ret; } EXPORT_SYMBOL(ipa_usb_is_teth_prot_connected); /* registration API for IPA wdi3 module */ int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in) { Loading @@ -1175,7 +1201,8 @@ int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in) || ipa_fmwk_ctx->ipa_wdi_release_smmu_mapping || ipa_fmwk_ctx->ipa_wdi_get_stats || ipa_fmwk_ctx->ipa_get_wdi_version || ipa_fmwk_ctx->ipa_wdi_sw_stats) { || ipa_fmwk_ctx->ipa_wdi_sw_stats || ipa_fmwk_ctx->ipa_wdi_is_tx1_used) { pr_err("ipa_wdi3 APIs were already initialized\n"); return -EPERM; } Loading @@ -1197,6 +1224,7 @@ int ipa_fmwk_register_ipa_wdi3(const struct ipa_wdi3_data *in) ipa_fmwk_ctx->ipa_wdi_get_stats = in->ipa_wdi_get_stats; ipa_fmwk_ctx->ipa_wdi_sw_stats = in->ipa_wdi_sw_stats; ipa_fmwk_ctx->ipa_get_wdi_version = in->ipa_get_wdi_version; ipa_fmwk_ctx->ipa_wdi_is_tx1_used = in->ipa_wdi_is_tx1_used; pr_info("ipa_wdi3 registered successfully\n"); Loading @@ -1217,6 +1245,16 @@ int ipa_wdi_init(struct ipa_wdi_init_in_params *in, } EXPORT_SYMBOL(ipa_wdi_init); bool ipa_wdi_is_tx1_used(void) { int ret; IPA_FMWK_DISPATCH_RETURN(ipa_wdi_is_tx1_used); return ret; } EXPORT_SYMBOL(ipa_wdi_is_tx1_used); int ipa_wdi_cleanup(void) { int ret; Loading Loading @@ -2125,7 +2163,9 @@ int ipa_fmwk_register_ipa_eth(const struct ipa_eth_data *in) || ipa_fmwk_ctx->ipa_eth_client_unreg_intf || ipa_fmwk_ctx->ipa_eth_client_set_perf_profile || ipa_fmwk_ctx->ipa_eth_client_conn_evt || ipa_fmwk_ctx->ipa_eth_client_disconn_evt) { || ipa_fmwk_ctx->ipa_eth_client_disconn_evt || ipa_fmwk_ctx->ipa_eth_get_ipa_client_type_from_eth_type || ipa_fmwk_ctx->ipa_eth_client_exist) { pr_err("ipa_eth APIs were already initialized\n"); return -EPERM; } Loading @@ -2143,6 +2183,10 @@ int ipa_fmwk_register_ipa_eth(const struct ipa_eth_data *in) ipa_fmwk_ctx->ipa_eth_client_conn_evt = in->ipa_eth_client_conn_evt; ipa_fmwk_ctx->ipa_eth_client_disconn_evt = in->ipa_eth_client_disconn_evt; ipa_fmwk_ctx->ipa_eth_get_ipa_client_type_from_eth_type = in->ipa_eth_get_ipa_client_type_from_eth_type; ipa_fmwk_ctx->ipa_eth_client_exist = in->ipa_eth_client_exist; pr_info("ipa_eth registered successfully\n"); Loading Loading @@ -2275,6 +2319,30 @@ int ipa_get_default_aggr_time_limit(enum ipa_client_type client, } EXPORT_SYMBOL(ipa_get_default_aggr_time_limit); enum ipa_client_type ipa_eth_get_ipa_client_type_from_eth_type( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir) { int ret; IPA_FMWK_DISPATCH_RETURN_DP(ipa_eth_get_ipa_client_type_from_eth_type, eth_client_type, dir); return ret; } EXPORT_SYMBOL(ipa_eth_get_ipa_client_type_from_eth_type); bool ipa_eth_client_exist( enum ipa_eth_client_type eth_client_type, int inst_id) { int ret; IPA_FMWK_DISPATCH_RETURN_DP(ipa_eth_client_exist, eth_client_type, inst_id); return ret; } EXPORT_SYMBOL(ipa_eth_client_exist); /* module functions */ static int __init ipa_fmwk_init(void) { Loading
include/linux/ipa_eth.h +5 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. */ #ifndef _IPA_ETH_H_ Loading Loading @@ -1094,5 +1094,9 @@ int ipa_eth_client_set_perf_profile(struct ipa_eth_client *client, struct ipa_eth_perf_profile *profile); int ipa_eth_client_conn_evt(struct ipa_ecm_msg *msg); int ipa_eth_client_disconn_evt(struct ipa_ecm_msg *msg); enum ipa_client_type ipa_eth_get_ipa_client_type_from_eth_type( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir); bool ipa_eth_client_exist( enum ipa_eth_client_type eth_client_type, int inst_id); #endif // _IPA_ETH_H_
include/linux/ipa_fmwk.h +11 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,8 @@ struct ipa_usb_data { int (*ipa_usb_xdci_resume)(u32 ul_clnt_hdl, u32 dl_clnt_hdl, enum ipa_usb_teth_prot teth_prot); bool (*ipa_usb_is_teth_prot_connected)(enum ipa_usb_teth_prot usb_teth_prot); }; struct ipa_wdi3_data { Loading Loading @@ -199,6 +201,8 @@ struct ipa_wdi3_data { int (*ipa_wdi_sw_stats)(struct ipa_wdi_tx_info *info); int (*ipa_get_wdi_version)(void); bool (*ipa_wdi_is_tx1_used)(void); }; struct ipa_qdss_data { Loading Loading @@ -327,6 +331,13 @@ struct ipa_eth_data { int (*ipa_eth_client_conn_evt)(struct ipa_ecm_msg *msg); int (*ipa_eth_client_disconn_evt)(struct ipa_ecm_msg *msg); enum ipa_client_type (*ipa_eth_get_ipa_client_type_from_eth_type)( enum ipa_eth_client_type eth_client_type, enum ipa_eth_pipe_direction dir); bool (*ipa_eth_client_exist)( enum ipa_eth_client_type eth_client_type, int inst_id); }; #if IS_ENABLED(CONFIG_IPA3) Loading
include/linux/ipa_usb.h +15 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ #ifndef _IPA_USB_H_ Loading Loading @@ -292,6 +292,15 @@ int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl, int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl, enum ipa_usb_teth_prot teth_prot); /** * ipa_usb_is_teth_prot_connected - Internal API for checking USB * protocol is connected * * @usb_teth_prot: USB tethering protocol * @Return true if connected, false if not */ bool ipa_usb_is_teth_prot_connected(enum ipa_usb_teth_prot usb_teth_prot); #else /* IS_ENABLED(CONFIG_IPA3) */ static inline int ipa_usb_init_teth_prot(enum ipa_usb_teth_prot teth_prot, Loading Loading @@ -337,6 +346,11 @@ static inline int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl, return -EPERM; } static inline int ipa_usb_is_teth_prot_connected(enum ipa_usb_teth_prot usb_teth_prot) { return -EPERM; } #endif /* IS_ENABLED(CONFIG_IPA3) */ Loading
include/linux/ipa_wdi3.h +11 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,12 @@ struct ipa_wdi_perf_profile { int ipa_wdi_init(struct ipa_wdi_init_in_params *in, struct ipa_wdi_init_out_params *out); /** ipa_wdi_is_tx1_used - return if DBS mode is active * * @Return bool */ bool ipa_wdi_is_tx1_used(void); /** * ipa_wdi_cleanup - Client should call this function to * clean up WDI IPA offload data path Loading Loading @@ -399,6 +405,11 @@ static inline int ipa_get_wdi_version(void) return -EPERM; } static inline int ipa_wdi_is_tx1_used(void) { return -EPERM; } static inline int ipa_wdi_cleanup(void) { return -EPERM; Loading