Переглянути джерело

qcacmn: Set correct host ce count in epping mode

In epping mode, the host ce count is not set correctly. And
then host will receive interrupt with incorrect ce id which
will trigger watchdog bite. Set the correct host ce count
and this issue can be fixed.

Change-Id: Ia91534fcfd1265e96f39ffd961ad794db3a4748a
CRs-Fixed: 2901231
Guisen Yang 4 роки тому
батько
коміт
80d5b0dc18
3 змінених файлів з 11 додано та 5 видалено
  1. 2 0
      hif/src/ce/ce_assignment.h
  2. 4 2
      hif/src/ce/ce_main.c
  3. 5 3
      hif/src/ce/ce_main.h

+ 2 - 0
hif/src/ce/ce_assignment.h

@@ -219,6 +219,7 @@ static struct CE_pipe_config target_ce_config_wlan[] = {
 };
 
 #ifdef WLAN_FEATURE_EPPING
+#define EPPING_HOST_CE_COUNT 8
 static struct CE_attr host_ce_config_wlan_epping_poll[] = {
 	/* host->target HTC control and raw streams */
 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
@@ -371,6 +372,7 @@ static struct CE_pipe_config target_ce_config_wlan[] = {
 };
 
 #ifdef WLAN_FEATURE_EPPING
+#define EPPING_HOST_CE_COUNT 12
 static struct CE_attr host_ce_config_wlan_epping_poll[] = {
 	/* host->target HTC control and raw streams */
 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},

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

@@ -3234,7 +3234,8 @@ int hif_wlan_enable(struct hif_softc *scn)
 
 #define CE_EPPING_USES_IRQ true
 
-void hif_ce_prepare_epping_config(struct HIF_CE_state *hif_state)
+void hif_ce_prepare_epping_config(struct hif_softc *scn,
+				  struct HIF_CE_state *hif_state)
 {
 	if (CE_EPPING_USES_IRQ)
 		hif_state->host_ce_config = host_ce_config_wlan_epping_irq;
@@ -3244,6 +3245,7 @@ void hif_ce_prepare_epping_config(struct HIF_CE_state *hif_state)
 	hif_state->target_ce_config_sz = sizeof(target_ce_config_wlan_epping);
 	target_shadow_reg_cfg = target_shadow_reg_cfg_epping;
 	shadow_cfg_sz = sizeof(target_shadow_reg_cfg_epping);
+	scn->ce_count = EPPING_HOST_CE_COUNT;
 }
 #endif
 
@@ -3307,7 +3309,7 @@ void hif_ce_prepare_config(struct hif_softc *scn)
 	scn->ce_count = HOST_CE_COUNT;
 	/* if epping is enabled we need to use the epping configuration. */
 	if (QDF_IS_EPPING_ENABLED(mode)) {
-		hif_ce_prepare_epping_config(hif_state);
+		hif_ce_prepare_epping_config(scn, hif_state);
 		return;
 	}
 

+ 5 - 3
hif/src/ce/ce_main.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2021 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
@@ -344,14 +344,16 @@ void hif_get_target_ce_config(struct hif_softc *scn,
 		uint32_t *shadow_cfg_v1_sz_ret);
 
 #ifdef WLAN_FEATURE_EPPING
-void hif_ce_prepare_epping_config(struct HIF_CE_state *hif_state);
+void hif_ce_prepare_epping_config(struct hif_softc *scn,
+				  struct HIF_CE_state *hif_state);
 void hif_select_epping_service_to_pipe_map(struct service_to_pipe
 					   **tgt_svc_map_to_use,
 					   uint32_t *sz_tgt_svc_map_to_use);
 
 #else
 static inline
-void hif_ce_prepare_epping_config(struct HIF_CE_state *hif_state)
+void hif_ce_prepare_epping_config(struct hif_softc *scn,
+				  struct HIF_CE_state *hif_state)
 { }
 static inline
 void hif_select_epping_service_to_pipe_map(struct service_to_pipe