summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-08-17 11:34:33 -0700
committerLinux Build Service Account <lnxbuild@localhost>2018-08-17 11:34:33 -0700
commiteffa2de16f65fbfa28bae907d736bb7815fd216d (patch)
treed662cc71d8fdc9fea95c1475fbb3c47ee7fb8194
parent68dd78766eba8bc12fd7507a6541ed394499d51f (diff)
parentae56618cef3208f07d401c7dcc0c8179a1d6b215 (diff)
Merge ae56618cef3208f07d401c7dcc0c8179a1d6b215 on remote branch
Change-Id: Id29cefe83a7a75a2f4d74af01d06d55feb42b2d0
-rw-r--r--hif/src/ce/ce_main.c7
-rw-r--r--hif/src/ce/ce_service.c2
-rw-r--r--wmi/inc/wmi_unified_api.h9
-rw-r--r--wmi/inc/wmi_unified_priv.h1
-rw-r--r--wmi/src/wmi_unified.c8
5 files changed, 25 insertions, 2 deletions
diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c
index 458fff0afb8b..c6816b2a8bea 100644
--- a/hif/src/ce/ce_main.c
+++ b/hif/src/ce/ce_main.c
@@ -2313,13 +2313,18 @@ void hif_unconfig_ce(struct hif_softc *hif_sc)
if (pipe_info->ce_hdl) {
ce_unregister_irq(hif_state, (1 << pipe_num));
hif_sc->request_irq_done = false;
+ }
+ }
+ deinit_tasklet_workers(hif_hdl);
+ for (pipe_num = 0; pipe_num < hif_sc->ce_count; pipe_num++) {
+ pipe_info = &hif_state->pipe_info[pipe_num];
+ if (pipe_info->ce_hdl) {
ce_fini(pipe_info->ce_hdl);
pipe_info->ce_hdl = NULL;
pipe_info->buf_sz = 0;
qdf_spinlock_destroy(&pipe_info->recv_bufs_needed_lock);
}
}
- deinit_tasklet_workers(hif_hdl);
if (hif_sc->athdiag_procfs_inited) {
athdiag_procfs_remove();
hif_sc->athdiag_procfs_inited = false;
diff --git a/hif/src/ce/ce_service.c b/hif/src/ce/ce_service.c
index 2500829a4a26..79d71ba1bb1d 100644
--- a/hif/src/ce/ce_service.c
+++ b/hif/src/ce/ce_service.c
@@ -99,7 +99,7 @@ struct hif_ce_desc_event {
};
/* max history to record per copy engine */
-#define HIF_CE_HISTORY_MAX 512
+#define HIF_CE_HISTORY_MAX 2048
qdf_atomic_t hif_ce_desc_history_index[CE_COUNT_MAX];
struct hif_ce_desc_event hif_ce_desc_history[CE_COUNT_MAX][HIF_CE_HISTORY_MAX];
diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h
index 8c98fe836152..1592ce5876d6 100644
--- a/wmi/inc/wmi_unified_api.h
+++ b/wmi/inc/wmi_unified_api.h
@@ -1613,4 +1613,13 @@ QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
*/
QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
struct wmi_invoke_neighbor_report_params *params);
+/**
+ * wmi_register_tgt_ready_cb() - Register target ready check callback
+ * with wmi_handle
+ * @wmi_handle: wmi handle
+ * @cb: Callback to check target ready
+ *
+ * Return: None
+ */
+void wmi_register_tgt_ready_cb(wmi_unified_t wmi_handle, bool (*cb)(void));
#endif /* _WMI_UNIFIED_API_H_ */
diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h
index 5394bbdfb8ba..8ecd32c83a96 100644
--- a/wmi/inc/wmi_unified_priv.h
+++ b/wmi/inc/wmi_unified_priv.h
@@ -1323,6 +1323,7 @@ struct wmi_unified {
uint32_t vdev_param[wmi_vdev_param_max];
uint32_t services[wmi_services_max];
#endif
+ bool (*is_target_ready)(void);
};
#ifdef WMI_NON_TLV_SUPPORT
/* ONLY_NON_TLV_TARGET:TLV attach dummy function defintion for case when
diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c
index d9f128dbba10..4ee9d67da8e5 100644
--- a/wmi/src/wmi_unified.c
+++ b/wmi/src/wmi_unified.c
@@ -1283,6 +1283,9 @@ QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf,
QDF_STATUS status;
uint16_t htc_tag = 0;
+ if (wmi_handle->is_target_ready && !wmi_handle->is_target_ready())
+ return QDF_STATUS_E_FAILURE;
+
if (wmi_get_runtime_pm_inprogress(wmi_handle)) {
htc_tag =
(A_UINT16)wmi_handle->ops->wmi_set_htc_tx_tag(
@@ -2129,6 +2132,11 @@ wmi_stop(wmi_unified_t wmi_handle)
return 0;
}
+void wmi_register_tgt_ready_cb(wmi_unified_t wmi_handle, bool (*cb)(void))
+{
+ wmi_handle->is_target_ready = cb;
+}
+
#ifdef WMI_NON_TLV_SUPPORT
/**
* API to flush all the previous packets associated with the wmi endpoint