From bab49091efdfd406e61c446a4edbd78f4cbe1bd3 Mon Sep 17 00:00:00 2001 From: Sandeep Singh Date: Tue, 16 Jun 2020 18:11:26 +0530 Subject: [PATCH] qcacld-3.0: Add ipci apis to send data over QMI Add PLD layer ipci bus apis to send driver data to wlan fw over QMI. Change-Id: I55d4cb337749492cc767da4d024918bcbdd98301 CRs-Fixed: 2714312 --- core/pld/src/pld_common.c | 3 ++- core/pld/src/pld_ipci.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 58fbbcce2f6b..4a6292808e16 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -2639,8 +2639,9 @@ int pld_qmi_send(struct device *dev, int type, void *cmd, case PLD_BUS_TYPE_SNOC: case PLD_BUS_TYPE_SDIO: case PLD_BUS_TYPE_USB: - case PLD_BUS_TYPE_IPCI: return -EINVAL; + case PLD_BUS_TYPE_IPCI: + return pld_ipci_qmi_send(dev, type, cmd, cmd_len, cb_ctx, cb); default: pr_err("Invalid device type %d\n", bus_type); return -EINVAL; diff --git a/core/pld/src/pld_ipci.h b/core/pld/src/pld_ipci.h index 964313f62c5f..116202fbe1d1 100644 --- a/core/pld/src/pld_ipci.h +++ b/core/pld/src/pld_ipci.h @@ -149,6 +149,13 @@ static inline int pld_ipci_athdiag_write(struct device *dev, uint32_t offset, return 0; } +static inline int +pld_ipci_qmi_send(struct device *dev, int type, void *cmd, + int cmd_len, void *cb_ctx, + int (*cb)(void *ctx, void *event, int event_len)) +{ + return 0; +} #else int pld_ipci_register_driver(void); void pld_ipci_unregister_driver(void); @@ -254,5 +261,13 @@ static inline int pld_ipci_athdiag_write(struct device *dev, uint32_t offset, { return icnss_athdiag_write(dev, offset, memtype, datalen, input); } + +static inline int +pld_ipci_qmi_send(struct device *dev, int type, void *cmd, + int cmd_len, void *cb_ctx, + int (*cb)(void *ctx, void *event, int event_len)) +{ + return icnss_qmi_send(dev, type, cmd, cmd_len, cb_ctx, cb); +} #endif #endif