Prechádzať zdrojové kódy

qcacmn: Remove unwanted header files in transport layer

Rename OL_TARGET_STATUS as HIF_TARGET_STATUS and move the enum to hif.h

Change-Id: Ib84514aa65404b4340b1be06a4adefff27bfdc6d
CRs-Fixed: 998536
Komal Seelam 9 rokov pred
rodič
commit
6ee559010d

+ 11 - 2
hif/inc/hif.h

@@ -45,6 +45,7 @@ extern "C" {
 
 typedef struct htc_callbacks HTC_CALLBACKS;
 typedef void __iomem *A_target_id_t;
+typedef void *hif_handle_t;
 
 #define HIF_TYPE_AR6002   2
 #define HIF_TYPE_AR6003   3
@@ -373,6 +374,13 @@ struct hif_msg_callbacks {
 	void (*fwEventHandler)(void *context, QDF_STATUS status);
 };
 
+enum hif_target_status {
+	TARGET_STATUS_CONNECTED = 0,  /* target connected */
+	TARGET_STATUS_RESET,  /* target got reset */
+	TARGET_STATUS_EJECT,  /* target got ejected */
+	TARGET_STATUS_SUSPEND /*target got suspend */
+};
+
 #define HIF_DATA_ATTR_SET_TX_CLASSIFY(attr, v) \
 	(attr |= (v & 0x01) << 5)
 #define HIF_DATA_ATTR_SET_ENCAPSULATION_TYPE(attr, v) \
@@ -525,8 +533,9 @@ struct hif_target_info *hif_get_target_info_handle(struct hif_opaque_softc *
 						   scn);
 struct hif_config_info *hif_get_ini_handle(struct hif_opaque_softc *scn);
 struct ramdump_info *hif_get_ramdump_ctx(struct hif_opaque_softc *hif_ctx);
-ol_target_status hif_get_target_status(struct hif_opaque_softc *hif_ctx);
-void hif_set_target_status(struct hif_opaque_softc *hif_ctx, ol_target_status);
+enum hif_target_status hif_get_target_status(struct hif_opaque_softc *hif_ctx);
+void hif_set_target_status(struct hif_opaque_softc *hif_ctx, enum
+			   hif_target_status);
 void hif_init_ini_config(struct hif_opaque_softc *hif_ctx,
 			 struct hif_config_info *cfg);
 

+ 0 - 1
hif/src/ath_procfs.c

@@ -31,7 +31,6 @@
 #include <linux/version.h>      /* We're doing kernel work */
 #include <linux/proc_fs.h>      /* Necessary because we use the proc fs */
 #include <asm/uaccess.h>        /* for copy_from_user */
-#include "ol_if_athvar.h"
 #include "hif.h"
 #if defined(HIF_USB)
 #include "if_usb.h"

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

@@ -31,7 +31,6 @@
 #include "qdf_status.h"
 #include <qdf_atomic.h>         /* qdf_atomic_read */
 #include <targaddrs.h>
-#include <bmi_msg.h>
 #include "hif_io32.h"
 #include <hif.h>
 #include "regtable.h"

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

@@ -31,10 +31,8 @@
 #include "qdf_status.h"
 #include <qdf_atomic.h>         /* qdf_atomic_read */
 #include <targaddrs.h>
-#include <bmi_msg.h>
 #include "hif_io32.h"
 #include <hif.h>
-#include <htc_services.h>
 #include "regtable.h"
 #include <a_debug.h>
 #include "hif_main.h"

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

@@ -30,7 +30,6 @@
 #include "qdf_status.h"
 #include <qdf_atomic.h>         /* qdf_atomic_read */
 #include <targaddrs.h>
-#include <bmi_msg.h>
 #include "hif_io32.h"
 #include <hif.h>
 #include "regtable.h"
@@ -1132,8 +1131,7 @@ hif_pci_ce_send_done(struct CE_handle *copyeng, void *ce_context,
 		 * when last fragment is complteted.
 		 */
 		if (transfer_context != CE_SENDLIST_ITEM_CTXT) {
-			if (scn->target_status
-					== OL_TRGET_STATUS_RESET)
+			if (scn->target_status == TARGET_STATUS_RESET)
 				qdf_nbuf_free(transfer_context);
 			else
 				msg_callbacks->txCompletionHandler(
@@ -1208,7 +1206,7 @@ hif_pci_ce_recv_data(struct CE_handle *copyeng, void *ce_context,
 
 		atomic_inc(&pipe_info->recv_bufs_needed);
 		hif_post_recv_buffers_for_pipe(pipe_info);
-		if (scn->target_status == OL_TRGET_STATUS_RESET)
+		if (scn->target_status == TARGET_STATUS_RESET)
 			qdf_nbuf_free(transfer_context);
 		else
 			hif_ce_do_recv(msg_callbacks, transfer_context,

+ 1 - 1
hif/src/ce/ce_tasklet.c

@@ -201,7 +201,7 @@ static void ce_tasklet(unsigned long data)
 		return;
 	}
 
-	if (scn->target_status != OL_TRGET_STATUS_RESET)
+	if (scn->target_status != TARGET_STATUS_RESET)
 		hif_irq_enable(scn, tasklet_entry->ce_id);
 
 	hif_record_ce_desc_event(scn, tasklet_entry->ce_id, HIF_CE_TASKLET_EXIT,

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

@@ -32,7 +32,8 @@
 #include "hif_main.h"
 #include "multibus.h"
 #include "ce_main.h"
-
+#include "htc_services.h"
+#include "a_types.h"
 /**
  * hif_intialize_default_ops() - intializes default operations values
  *

+ 1 - 2
hif/src/hif_io32.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -29,7 +29,6 @@
 #define __HIF_IO32_H__
 
 #include <linux/io.h>
-#include "ol_if_athvar.h"
 #include "hif.h"
 
 #define hif_read32_mb(addr)         ioread32((void __iomem *)addr)

+ 5 - 7
hif/src/hif_main.c

@@ -31,10 +31,8 @@
 #include "qdf_status.h"
 #include <qdf_atomic.h>         /* qdf_atomic_read */
 #include <targaddrs.h>
-#include <bmi_msg.h>
 #include "hif_io32.h"
 #include <hif.h>
-#include <htc_services.h>
 #include "regtable.h"
 #define ATH_MODULE_NAME hif
 #include <a_debug.h>
@@ -610,7 +608,7 @@ void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx)
 		return;
 	}
 
-	if (OL_TRGET_STATUS_RESET == scn->target_status) {
+	if (TARGET_STATUS_RESET == scn->target_status) {
 		HIF_INFO_MED("%s: Target is already asserted, ignore!",
 			    __func__);
 		return;
@@ -818,9 +816,9 @@ void hif_lro_flush_cb_deregister(struct hif_opaque_softc *scn)
  * hif_get_target_status - API to get target status
  * @hif_ctx: HIF Context
  *
- * Return: enum ol_target_status
+ * Return: enum hif_target_status
  */
-ol_target_status hif_get_target_status(struct hif_opaque_softc *hif_ctx)
+enum hif_target_status hif_get_target_status(struct hif_opaque_softc *hif_ctx)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
 
@@ -834,8 +832,8 @@ ol_target_status hif_get_target_status(struct hif_opaque_softc *hif_ctx)
  *
  * Return: void
  */
-void hif_set_target_status(struct hif_opaque_softc *hif_ctx,
-			   ol_target_status status)
+void hif_set_target_status(struct hif_opaque_softc *hif_ctx, enum
+			   hif_target_status status)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
 

+ 1 - 1
hif/src/hif_main.h

@@ -117,7 +117,7 @@ struct hif_softc {
 	bool request_irq_done;
 	/* Packet statistics */
 	struct hif_ce_stats pkt_stats;
-	ol_target_status target_status;
+	enum hif_target_status target_status;
 
 	struct targetdef_s *targetdef;
 	struct ce_reg_def *target_ce_def;

+ 4 - 4
hif/src/pcie/if_pci.c

@@ -144,7 +144,7 @@ static void pci_dispatch_interrupt(struct hif_softc *scn)
 	intr_summary = CE_INTERRUPT_SUMMARY(scn);
 
 	if (intr_summary == 0) {
-		if ((scn->target_status != OL_TRGET_STATUS_RESET) &&
+		if ((scn->target_status != TARGET_STATUS_RESET) &&
 			(!qdf_atomic_read(&scn->link_suspended))) {
 
 			hif_write32_mb(scn->mem +
@@ -899,7 +899,7 @@ static void wlan_tasklet(unsigned long data)
 
 	if (!ADRASTEA_BU) {
 		(irqreturn_t) hif_fw_interrupt_handler(sc->irq_event, scn);
-		if (scn->target_status == OL_TRGET_STATUS_RESET)
+		if (scn->target_status == TARGET_STATUS_RESET)
 			goto end;
 	}
 
@@ -2029,7 +2029,7 @@ static void wlan_tasklet_msi(unsigned long data)
 	if (entry->id == HIF_MAX_TASKLET_NUM) {
 		/* the last tasklet is for fw IRQ */
 		(irqreturn_t)hif_fw_interrupt_handler(sc->irq_event, scn);
-		if (scn->target_status == OL_TRGET_STATUS_RESET)
+		if (scn->target_status == TARGET_STATUS_RESET)
 			goto irq_handled;
 	} else if (entry->id < scn->ce_count) {
 		ce_per_engine_service(scn, entry->id);
@@ -3320,7 +3320,7 @@ void hif_pci_irq_enable(struct hif_softc *scn, int ce_id)
 	if (scn->ce_irq_summary == 0) {
 		/* Enable Legacy PCI line interrupts */
 		if (LEGACY_INTERRUPTS(sc) &&
-			(scn->target_status != OL_TRGET_STATUS_RESET) &&
+			(scn->target_status != TARGET_STATUS_RESET) &&
 			(!qdf_atomic_read(&scn->link_suspended))) {
 
 			hif_write32_mb(scn->mem +

+ 0 - 1
hif/src/pcie/if_pci.h

@@ -33,7 +33,6 @@
 #include <linux/interrupt.h>
 
 #define ATH_DBG_DEFAULT   0
-#include <ol_if_athvar.h>
 #include "hif.h"
 #include "cepci.h"
 #include "ce_main.h"

+ 0 - 2
hif/src/regtable.c

@@ -25,14 +25,12 @@
  * to the Linux Foundation.
  */
 
-#include "bmi_msg.h"
 #include "targaddrs.h"
 #include "cepci.h"
 #include "regtable.h"
 #include "ar9888def.h"
 #include "ar6320def.h"
 #include "ar6320v2def.h"
-#include "ol_if_athvar.h"
 #include "hif_main.h"
 #include "adrastea_reg_def.h"