Browse Source

qcacmn: Fix pktlog pipe callbacks assignment for Adrastea

PKTLOG callback is not updated for Adrastea target as
htt_htc_soc_attach does not get called during initialization.
Fix pktlog pipe callbacks assignment for Adrastea target by
checking only CE_ATTR_INIT_ON_DEMAND attribute.

Change-Id: I16f2d2e493440315343087417a8d4c341065ae9a
Govind Singh 4 years ago
parent
commit
b481b85018
2 changed files with 7 additions and 3 deletions
  1. 4 2
      hif/src/ce/ce_main.c
  2. 3 1
      hif/src/dispatcher/multibus_snoc.c

+ 4 - 2
hif/src/ce/ce_main.c

@@ -2373,11 +2373,13 @@ static int hif_completion_thread_startup_by_ceid(struct HIF_CE_state *hif_state,
 	struct hif_msg_callbacks *hif_msg_callbacks =
 		&hif_state->msg_callbacks_current;
 	struct HIF_CE_pipe_info *pipe_info;
+	struct CE_state *ce_state;
 
 	if (pipe_num >= CE_COUNT_MAX)
 		return -EINVAL;
 
 	pipe_info = &hif_state->pipe_info[pipe_num];
+	ce_state = scn->ce_id_to_state[pipe_num];
 
 	if (!hif_msg_callbacks ||
 	    !hif_msg_callbacks->rxCompletionHandler ||
@@ -2408,10 +2410,10 @@ static int hif_completion_thread_startup_by_ceid(struct HIF_CE_state *hif_state,
 	if (attr.src_nentries)
 		qdf_spinlock_create(&pipe_info->completion_freeq_lock);
 
-	/* PKTLOG callback is already updated from htt_htc_soc_attach() */
-	if (pipe_num != hif_get_pktlog_ce_num(scn))
+	if (!(ce_state->attr_flags & CE_ATTR_INIT_ON_DEMAND))
 		qdf_mem_copy(&pipe_info->pipe_callbacks, hif_msg_callbacks,
 			     sizeof(pipe_info->pipe_callbacks));
+
 	return 0;
 }
 

+ 3 - 1
hif/src/dispatcher/multibus_snoc.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2018, 2020 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -75,6 +75,8 @@ QDF_STATUS hif_initialize_snoc_ops(struct hif_bus_ops *bus_ops)
 	bus_ops->hif_map_ce_to_irq = &hif_snoc_map_ce_to_irq;
 	bus_ops->hif_addr_in_boundary = &hif_dummy_addr_in_boundary;
 	bus_ops->hif_needs_bmi = &hif_snoc_needs_bmi;
+	bus_ops->hif_config_irq_affinity = &hif_dummy_config_irq_affinity;
+	bus_ops->hif_config_irq_by_ceid = &hif_dummy_config_irq_by_ceid;
 
 	return QDF_STATUS_SUCCESS;
 }