Преглед на файлове

qcacmn: Use qdf macro for epping mode

Use QDF macro to check if we are in epping mode.
Hardcode the ce engine to use interrupts in
epping mode.

Change-Id: Ie58c2efffdced03f24905469319eabc0af4ed228
CRs-Fixed: 1003792
Houston Hoffman преди 9 години
родител
ревизия
75ef5a55f2
променени са 8 файла, в които са добавени 17 реда и са изтрити 20 реда
  1. 0 1
      hif/src/ce/ce_bmi.c
  2. 0 1
      hif/src/ce/ce_diag.c
  3. 7 6
      hif/src/ce/ce_main.c
  4. 3 4
      hif/src/ce/ce_service.c
  5. 1 2
      hif/src/dispatcher/multibus_pci.c
  6. 2 3
      hif/src/hif_main.c
  7. 2 3
      hif/src/pcie/if_pci.c
  8. 2 0
      qdf/inc/qdf_types.h

+ 0 - 1
hif/src/ce/ce_bmi.c

@@ -43,7 +43,6 @@
 #ifdef CONFIG_CNSS
 #include <net/cnss.h>
 #endif
-#include "epping_main.h"
 #include "hif_debug.h"
 
 /* Track a BMI transaction that is in progress */

+ 0 - 1
hif/src/ce/ce_diag.c

@@ -44,7 +44,6 @@
 #include <net/cnss.h>
 #endif
 #include "hif_debug.h"
-#include "epping_main.h"
 
 void
 hif_dump_target_memory(struct hif_opaque_softc *hif_ctx, void *ramdump_base,

+ 7 - 6
hif/src/ce/ce_main.c

@@ -42,7 +42,6 @@
 #ifdef CONFIG_CNSS
 #include <net/cnss.h>
 #endif
-#include "epping_main.h"
 #include "hif_debug.h"
 #include "ce_internal.h"
 #include "ce_reg.h"
@@ -358,7 +357,7 @@ bool ce_mark_datapath(struct CE_state *ce_state)
 	bool   rc = false;
 
 	if (ce_state != NULL) {
-		if (WLAN_IS_EPPING_ENABLED(hif_get_conparam(ce_state->scn))) {
+		if (QDF_IS_EPPING_ENABLED(hif_get_conparam(ce_state->scn))) {
 			svc_map = target_service_to_ce_map_wlan_epping;
 			map_sz = sizeof(target_service_to_ce_map_wlan_epping) /
 				sizeof(struct service_to_pipe);
@@ -1737,7 +1736,7 @@ int hif_wlan_enable(struct hif_softc *scn)
 
 	if (QDF_GLOBAL_FTM_MODE == con_mode)
 		mode = ICNSS_FTM;
-	else if (WLAN_IS_EPPING_ENABLED(con_mode))
+	else if (QDF_IS_EPPING_ENABLED(con_mode))
 		mode = ICNSS_EPPING;
 	else
 		mode = ICNSS_MISSION;
@@ -1748,6 +1747,8 @@ int hif_wlan_enable(struct hif_softc *scn)
 		return icnss_wlan_enable(&cfg, mode, QWLAN_VERSIONSTR);
 }
 
+#define CE_EPPING_USES_IRQ true
+
 /**
  * hif_ce_prepare_config() - load the correct static tables.
  * @scn: hif context
@@ -1758,8 +1759,8 @@ void hif_ce_prepare_config(struct hif_softc *scn)
 {
 	uint32_t mode = hif_get_conparam(scn);
 	/* if epping is enabled we need to use the epping configuration. */
-	if (WLAN_IS_EPPING_ENABLED(mode)) {
-		if (WLAN_IS_EPPING_IRQ(mode))
+	if (QDF_IS_EPPING_ENABLED(mode)) {
+		if (CE_EPPING_USES_IRQ)
 			host_ce_config = host_ce_config_wlan_epping_irq;
 		else
 			host_ce_config = host_ce_config_wlan_epping_poll;
@@ -2241,7 +2242,7 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *hif_hdl, uint16_t svc_id,
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_hdl);
 	uint32_t mode = hif_get_conparam(scn);
 
-	if (WLAN_IS_EPPING_ENABLED(mode)) {
+	if (QDF_IS_EPPING_ENABLED(mode)) {
 		tgt_svc_map_to_use = target_service_to_ce_map_wlan_epping;
 		sz_tgt_svc_map_to_use =
 			sizeof(target_service_to_ce_map_wlan_epping);

+ 3 - 4
hif/src/ce/ce_service.c

@@ -33,7 +33,6 @@
 #include "ce_reg.h"
 #include "qdf_lock.h"
 #include "regtable.h"
-#include "epping_main.h"
 #include "hif_main.h"
 #include "hif_debug.h"
 
@@ -1612,7 +1611,7 @@ more_completions:
 			 &toeplitz_hash_result) == QDF_STATUS_SUCCESS) {
 
 			if (CE_id != CE_HTT_H2T_MSG ||
-			    WLAN_IS_EPPING_ENABLED(mode)) {
+			    QDF_IS_EPPING_ENABLED(mode)) {
 				qdf_spin_unlock(&CE_state->ce_index_lock);
 				CE_state->send_cb((struct CE_handle *)CE_state,
 						  CE_context, transfer_context,
@@ -1684,7 +1683,7 @@ more_watermarks:
 	 * we find no more events to process.
 	 */
 	if (CE_state->recv_cb && ce_recv_entries_done_nolock(scn, CE_state)) {
-		if (WLAN_IS_EPPING_ENABLED(mode) ||
+		if (QDF_IS_EPPING_ENABLED(mode) ||
 		    more_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) {
 			goto more_completions;
 		} else {
@@ -1698,7 +1697,7 @@ more_watermarks:
 	}
 
 	if (CE_state->send_cb && ce_send_entries_done_nolock(scn, CE_state)) {
-		if (WLAN_IS_EPPING_ENABLED(mode) ||
+		if (QDF_IS_EPPING_ENABLED(mode) ||
 		    more_snd_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) {
 			goto more_completions;
 		} else {

+ 1 - 2
hif/src/dispatcher/multibus_pci.c

@@ -26,7 +26,6 @@
  */
 
 #include "hif.h"
-#include "epping_main.h"
 #include "hif_main.h"
 #include "multibus.h"
 #include "pci_api.h"
@@ -52,7 +51,7 @@ QDF_STATUS hif_initialize_pci_ops(struct hif_softc *hif_sc)
 
 	/* do not put the target to sleep for epping or maxperf mode */
 	if (CONFIG_ATH_PCIE_MAX_PERF == 0 &&
-	    !WLAN_IS_EPPING_ENABLED(hif_get_conparam(hif_sc)))
+	    !QDF_IS_EPPING_ENABLED(hif_get_conparam(hif_sc)))
 		bus_ops->hif_target_sleep_state_adjust =
 			&hif_pci_target_sleep_state_adjust;
 	else

+ 2 - 3
hif/src/hif_main.c

@@ -47,7 +47,6 @@
 #ifdef CONFIG_CNSS
 #include <net/cnss.h>
 #endif
-#include "epping_main.h"
 #include "hif_debug.h"
 #include "mp_dev.h"
 #include "platform_icnss.h"
@@ -310,7 +309,7 @@ uint32_t hif_hia_item_address(uint32_t target_type, uint32_t item_offset)
  */
 bool hif_max_num_receives_reached(struct hif_softc *scn, unsigned int count)
 {
-	if (WLAN_IS_EPPING_ENABLED(hif_get_conparam(scn)))
+	if (QDF_IS_EPPING_ENABLED(hif_get_conparam(scn)))
 		return count > 120;
 	else
 		return count > MAX_NUM_OF_RECEIVES;
@@ -535,7 +534,7 @@ void hif_wlan_disable(struct hif_softc *scn)
 
 	if (QDF_GLOBAL_FTM_MODE == con_mode)
 		mode = ICNSS_FTM;
-	else if (WLAN_IS_EPPING_ENABLED(con_mode))
+	else if (QDF_IS_EPPING_ENABLED(con_mode))
 		mode = ICNSS_EPPING;
 	else
 		mode = ICNSS_MISSION;

+ 2 - 3
hif/src/pcie/if_pci.c

@@ -52,7 +52,6 @@
 #else
 #include "cnss_stub.h"
 #endif
-#include "epping_main.h"
 #include "mp_dev.h"
 #include "hif_debug.h"
 
@@ -1113,7 +1112,7 @@ static void hif_pm_runtime_start(struct hif_pci_softc *sc)
 		return;
 	}
 
-	if (mode == QDF_GLOBAL_FTM_MODE || WLAN_IS_EPPING_ENABLED(mode)) {
+	if (mode == QDF_GLOBAL_FTM_MODE || QDF_IS_EPPING_ENABLED(mode)) {
 		HIF_INFO("%s: RUNTIME PM is disabled for FTM/EPPING mode\n",
 				__func__);
 		return;
@@ -1145,7 +1144,7 @@ static void hif_pm_runtime_stop(struct hif_pci_softc *sc)
 	if (!ol_sc->hif_config.enable_runtime_pm)
 		return;
 
-	if (mode == QDF_GLOBAL_FTM_MODE || WLAN_IS_EPPING_ENABLED(mode))
+	if (mode == QDF_GLOBAL_FTM_MODE || QDF_IS_EPPING_ENABLED(mode))
 		return;
 
 	cnss_runtime_exit(sc->dev);

+ 2 - 0
qdf/inc/qdf_types.h

@@ -322,6 +322,8 @@ enum tQDF_GLOBAL_CON_MODE {
 	QDF_GLOBAL_MAX_MODE
 };
 
+#define  QDF_IS_EPPING_ENABLED(mode) (mode == QDF_GLOBAL_EPPING_MODE)
+
 #define qdf_print(args...) \
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, ## args)