summaryrefslogtreecommitdiff
path: root/hif
diff options
context:
space:
mode:
authorBalamurugan Mahalingam <bmahalin@codeaurora.org>2018-01-29 19:15:02 +0530
committersnandini <snandini@codeaurora.org>2018-02-23 06:06:00 -0800
commit3ab3633184d4c8a378f72efd5a1622c1f113e09c (patch)
treeb3ee9c5859ffc07173481827c6c6dc8dc21d8406 /hif
parentce6b9444a440408276830ea0f50bca303d75121f (diff)
downloadqca-wfi-host-cmn-3ab3633184d4c8a378f72efd5a1622c1f113e09c.tar.gz
qcacmn: Add support for QCA6290 platform
Add support for QCA6290 platform and introduced an hif api to enable, disable polled mode. Change-Id: I16e210fef93251b33928788cf873117249c2d70f
Diffstat (limited to 'hif')
-rw-r--r--hif/inc/hif.h3
-rw-r--r--hif/src/ce/ce_main.c18
-rw-r--r--hif/src/hif_main.h1
-rw-r--r--hif/src/pcie/if_pci.c4
4 files changed, 25 insertions, 1 deletions
diff --git a/hif/inc/hif.h b/hif/inc/hif.h
index 2316724d0..3df076e4f 100644
--- a/hif/inc/hif.h
+++ b/hif/inc/hif.h
@@ -490,6 +490,9 @@ QDF_STATUS hif_diag_write_mem(struct hif_opaque_softc *hif_ctx,
typedef void (*fastpath_msg_handler)(void *, qdf_nbuf_t *, uint32_t);
+void hif_enable_polled_mode(struct hif_opaque_softc *hif_ctx);
+bool hif_is_polled_mode_enabled(struct hif_opaque_softc *hif_ctx);
+
/*
* Set the FASTPATH_mode_on flag in sc, for use by data path
*/
diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c
index 002580389..483ddf19b 100644
--- a/hif/src/ce/ce_main.c
+++ b/hif/src/ce/ce_main.c
@@ -1214,7 +1214,8 @@ struct CE_handle *ce_init(struct hif_softc *scn,
/* epping */
/* poll timer */
- if ((CE_state->attr_flags & CE_ATTR_ENABLE_POLL)) {
+ if ((CE_state->attr_flags & CE_ATTR_ENABLE_POLL) ||
+ scn->polled_mode_on) {
qdf_timer_init(scn->qdf_dev,
&CE_state->poll_timer,
ce_poll_timeout,
@@ -1274,6 +1275,14 @@ void hif_enable_fastpath(struct hif_opaque_softc *hif_ctx)
scn->fastpath_mode_on = true;
}
+void hif_enable_polled_mode(struct hif_opaque_softc *hif_ctx)
+{
+ struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
+ HIF_DBG("%s, Enabling polled mode", __func__);
+
+ scn->polled_mode_on = true;
+}
+
/**
* hif_is_fastpath_mode_enabled - API to query if fasthpath mode is enabled
* @hif_ctx: HIF Context
@@ -1289,6 +1298,13 @@ bool hif_is_fastpath_mode_enabled(struct hif_opaque_softc *hif_ctx)
return scn->fastpath_mode_on;
}
+bool hif_is_polled_mode_enabled(struct hif_opaque_softc *hif_ctx)
+{
+ struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
+
+ return scn->polled_mode_on;
+}
+
/**
* hif_get_ce_handle - API to get CE handle for FastPath mode
* @hif_ctx: HIF Context
diff --git a/hif/src/hif_main.h b/hif/src/hif_main.h
index 0e2e5cf74..c61ac2006 100644
--- a/hif/src/hif_main.h
+++ b/hif/src/hif_main.h
@@ -168,6 +168,7 @@ struct hif_softc {
qdf_dma_addr_t paddr_rri_on_ddr;
int linkstate_vote;
bool fastpath_mode_on;
+ bool polled_mode_on;
atomic_t tasklet_from_intr;
int htc_htt_tx_endpoint;
qdf_dma_addr_t mem_pa;
diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c
index 5f336184b..55b7f1b90 100644
--- a/hif/src/pcie/if_pci.c
+++ b/hif/src/pcie/if_pci.c
@@ -3689,6 +3689,10 @@ int hif_configure_irq(struct hif_softc *scn)
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
HIF_TRACE("%s: E", __func__);
+ if (scn->polled_mode_on) {
+ scn->request_irq_done = false;
+ return 0;
+ }
hif_init_reschedule_tasklet_work(sc);