Forráskód Böngészése

qcacmn: Fix kernel module check patch warnings in HIF files

Fix kernel module check patch warnings in HIF files

Change-Id: I3ddc76399004f15f325b56709e4f2e96bf4cda96
CRs-fixed: 2033001
Manikandan Mohan 8 éve
szülő
commit
bd0ef8a249

+ 94 - 84
hif/inc/hif.h

@@ -48,7 +48,6 @@ extern "C" {
 #endif
 #define ENABLE_MBOX_DUMMY_SPACE_FEATURE 1
 
-typedef struct htc_callbacks HTC_CALLBACKS;
 typedef void __iomem *A_target_id_t;
 typedef void *hif_handle_t;
 
@@ -181,7 +180,8 @@ struct CE_state;
 #define HIF_NAPI_MAX_RECEIVES (QCA_NAPI_BUDGET * QCA_NAPI_DEF_SCALE)
 
 /* NOTE: "napi->scale" can be changed,
-   but this does not change the number of buckets */
+ * but this does not change the number of buckets
+ */
 #define QCA_NAPI_NUM_BUCKETS 4
 struct qca_napi_stat {
 	uint32_t napi_schedules;
@@ -203,7 +203,7 @@ struct qca_napi_stat {
  */
 struct qca_napi_info {
 	struct net_device    netdev; /* dummy net_dev */
-	void 		     *hif_ctx;
+	void                 *hif_ctx;
 	struct napi_struct   napi;
 	uint8_t              scale;   /* currently same on all instances */
 	uint8_t              id;
@@ -211,7 +211,7 @@ struct qca_napi_info {
 	int                  irq;
 	struct qca_napi_stat stats[NR_CPUS];
 	/* will only be present for data rx CE's */
-	void (*lro_flush_cb)(void *);
+	void (*lro_flush_cb)(void *arg);
 	void                 *lro_ctx;
 	qdf_spinlock_t lro_unloading_lock;
 };
@@ -262,10 +262,10 @@ struct qca_napi_cpu {
 struct qca_napi_data {
 	qdf_spinlock_t           lock;
 	uint32_t             state;
-	uint32_t             ce_map; /* bitmap of created/registered NAPI
-					instances, indexed by pipe_id,
-					not used by clients (clients use an
-					id returned by create) */
+	/* bitmap of created/registered NAPI instances, indexed by pipe_id,
+	 * not used by clients (clients use an id returned by create)
+	 */
+	uint32_t             ce_map;
 	struct qca_napi_info napis[CE_COUNT_MAX];
 	struct qca_napi_cpu  napi_cpu[NR_CPUS];
 	int                  lilcl_head, bigcl_head;
@@ -308,17 +308,22 @@ struct hif_target_info {
 struct hif_opaque_softc {
 };
 
-typedef enum {
-	HIF_DEVICE_POWER_UP,       /* HIF layer should power up interface
-				    * and/or module */
-	HIF_DEVICE_POWER_DOWN,     /* HIF layer should initiate bus-specific
-				    * measures to minimize power */
-	HIF_DEVICE_POWER_CUT       /* HIF layer should initiate bus-specific
-				    * AND/OR platform-specific measures
-				    * to completely power-off the module and
-				    * associated hardware (i.e. cut power
-				    * supplies) */
-} HIF_DEVICE_POWER_CHANGE_TYPE;
+/**
+ * enum HIF_DEVICE_POWER_CHANGE_TYPE: Device Power change type
+ *
+ * @HIF_DEVICE_POWER_UP:   HIF layer should power up interface and/or module
+ * @HIF_DEVICE_POWER_DOWN: HIF layer should initiate bus-specific measures to
+ *                         minimize power
+ * @HIF_DEVICE_POWER_CUT:  HIF layer should initiate bus-specific AND/OR
+ *                         platform-specific measures to completely power-off
+ *                         the module and associated hardware (i.e. cut power
+ *                         supplies)
+ */
+enum HIF_DEVICE_POWER_CHANGE_TYPE {
+	HIF_DEVICE_POWER_UP,
+	HIF_DEVICE_POWER_DOWN,
+	HIF_DEVICE_POWER_CUT
+};
 
 /**
  * enum hif_enable_type: what triggered the enabling of hif
@@ -336,8 +341,7 @@ enum hif_enable_type {
  * enum hif_disable_type: what triggered the disabling of hif
  *
  * @HIF_DISABLE_TYPE_PROBE_ERROR: probe error triggered disable
- * @HIF_DISABLE_TYPE_REINIT_ERROR: reinit error triggered
- *  							 disable
+ * @HIF_DISABLE_TYPE_REINIT_ERROR: reinit error triggered disable
  * @HIF_DISABLE_TYPE_REMOVE: remove triggered disable
  * @HIF_DISABLE_TYPE_SHUTDOWN: shutdown triggered disable
  */
@@ -386,12 +390,12 @@ enum hif_device_config_opcode {
 };
 
 #ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG
-typedef struct _HID_ACCESS_LOG {
+struct HID_ACCESS_LOG {
 	uint32_t seqnum;
 	bool is_write;
 	void *addr;
 	uint32_t value;
-} HIF_ACCESS_LOG;
+};
 #endif
 
 void hif_reg_write(struct hif_opaque_softc *hif_ctx, uint32_t offset,
@@ -399,11 +403,16 @@ void hif_reg_write(struct hif_opaque_softc *hif_ctx, uint32_t offset,
 uint32_t hif_reg_read(struct hif_opaque_softc *hif_ctx, uint32_t offset);
 
 #define HIF_MAX_DEVICES                 1
-
+/**
+ * struct htc_callbacks - Structure for HTC Callbacks methods
+ * @context:             context to pass to the dsrhandler
+ *                       note : rwCompletionHandler is provided the context
+ *                       passed to hif_read_write
+ * @rwCompletionHandler: Read / write completion handler
+ * @dsrHandler:          DSR Handler
+ */
 struct htc_callbacks {
-	void *context;		/* context to pass to the dsrhandler
-				 * note : rwCompletionHandler is provided
-				 * the context passed to hif_read_write  */
+	void *context;
 	QDF_STATUS(*rwCompletionHandler)(void *rwContext, QDF_STATUS status);
 	QDF_STATUS(*dsrHandler)(void *context);
 };
@@ -428,7 +437,7 @@ struct hif_driver_state_callbacks {
 };
 
 /* This API detaches the HTC layer from the HIF device */
-void hif_detach_htc(struct hif_opaque_softc *scn);
+void hif_detach_htc(struct hif_opaque_softc *hif_ctx);
 
 /****************************************************************/
 /* BMI and Diag window abstraction                              */
@@ -438,12 +447,14 @@ void hif_detach_htc(struct hif_opaque_softc *scn);
 
 #define DIAG_TRANSFER_LIMIT 2048U   /* maximum number of bytes that can be
 				     * handled atomically by
-				     * DiagRead/DiagWrite */
+				     * DiagRead/DiagWrite
+				     */
 
 /*
  * API to handle HIF-specific BMI message exchanges, this API is synchronous
- * and only allowed to be called from a context that can block (sleep) */
-QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *scn,
+ * and only allowed to be called from a context that can block (sleep)
+ */
+QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx,
 				qdf_dma_addr_t cmd, qdf_dma_addr_t rsp,
 				uint8_t *pSendMessage, uint32_t Length,
 				uint8_t *pResponseMessage,
@@ -459,12 +470,12 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *scn,
  *
  * hif_diag_read_mem reads an arbitrary length of arbitrarily aligned memory.
  */
-QDF_STATUS hif_diag_read_access(struct hif_opaque_softc *scn, uint32_t address,
-			 uint32_t *data);
-QDF_STATUS hif_diag_read_mem(struct hif_opaque_softc *scn, uint32_t address,
+QDF_STATUS hif_diag_read_access(struct hif_opaque_softc *hif_ctx,
+				uint32_t address, uint32_t *data);
+QDF_STATUS hif_diag_read_mem(struct hif_opaque_softc *hif_ctx, uint32_t address,
 		      uint8_t *data, int nbytes);
-void hif_dump_target_memory(struct hif_opaque_softc *scn, void *ramdump_base,
-			    uint32_t address, uint32_t size);
+void hif_dump_target_memory(struct hif_opaque_softc *hif_ctx,
+			void *ramdump_base, uint32_t address, uint32_t size);
 /*
  * APIs to handle HIF specific diagnostic write accesses. These APIs are
  * synchronous and only allowed to be called from a context that
@@ -476,10 +487,10 @@ void hif_dump_target_memory(struct hif_opaque_softc *scn, void *ramdump_base,
  *
  * hif_diag_write_mem writes an arbitrary length of arbitrarily aligned memory.
  */
-QDF_STATUS hif_diag_write_access(struct hif_opaque_softc *scn, uint32_t address,
-				 uint32_t data);
-QDF_STATUS hif_diag_write_mem(struct hif_opaque_softc *scn, uint32_t address,
-		       uint8_t *data, int nbytes);
+QDF_STATUS hif_diag_write_access(struct hif_opaque_softc *hif_ctx,
+				 uint32_t address, uint32_t data);
+QDF_STATUS hif_diag_write_mem(struct hif_opaque_softc *hif_ctx,
+			uint32_t address, uint8_t *data, int nbytes);
 
 typedef void (*fastpath_msg_handler)(void *, qdf_nbuf_t *, uint32_t);
 typedef uint32_t (*ext_intr_handler)(void *, uint32_t);
@@ -514,7 +525,7 @@ static inline void *hif_get_ce_handle(struct hif_opaque_softc *hif_ctx, int ret)
  */
 #define CONFIG_DISABLE_CDC_MAX_PERF_WAR 0
 
-void hif_ipa_get_ce_resource(struct hif_opaque_softc *scn,
+void hif_ipa_get_ce_resource(struct hif_opaque_softc *hif_ctx,
 			     qdf_dma_addr_t *ce_sr_base_paddr,
 			     uint32_t *ce_sr_ring_size,
 			     qdf_dma_addr_t *ce_reg_paddr);
@@ -596,52 +607,51 @@ struct hif_pipe_addl_info {
 };
 
 struct hif_bus_id;
-typedef struct hif_bus_id hif_bus_id;
 
 void hif_claim_device(struct hif_opaque_softc *hif_ctx);
 QDF_STATUS hif_get_config_item(struct hif_opaque_softc *hif_ctx,
 		     int opcode, void *config, uint32_t config_len);
 void hif_set_mailbox_swap(struct hif_opaque_softc *hif_ctx);
-void hif_mask_interrupt_call(struct hif_opaque_softc *scn);
-void hif_post_init(struct hif_opaque_softc *scn, void *hHTC,
+void hif_mask_interrupt_call(struct hif_opaque_softc *hif_ctx);
+void hif_post_init(struct hif_opaque_softc *hif_ctx, void *hHTC,
 		   struct hif_msg_callbacks *callbacks);
-QDF_STATUS hif_start(struct hif_opaque_softc *scn);
-void hif_stop(struct hif_opaque_softc *scn);
-void hif_flush_surprise_remove(struct hif_opaque_softc *scn);
-void hif_dump(struct hif_opaque_softc *scn, uint8_t CmdId, bool start);
+QDF_STATUS hif_start(struct hif_opaque_softc *hif_ctx);
+void hif_stop(struct hif_opaque_softc *hif_ctx);
+void hif_flush_surprise_remove(struct hif_opaque_softc *hif_ctx);
+void hif_dump(struct hif_opaque_softc *hif_ctx, uint8_t CmdId, bool start);
 void hif_trigger_dump(struct hif_opaque_softc *hif_ctx,
 		      uint8_t cmd_id, bool start);
 
-QDF_STATUS hif_send_head(struct hif_opaque_softc *scn, uint8_t PipeID,
+QDF_STATUS hif_send_head(struct hif_opaque_softc *hif_ctx, uint8_t PipeID,
 				  uint32_t transferID, uint32_t nbytes,
 				  qdf_nbuf_t wbuf, uint32_t data_attr);
-void hif_send_complete_check(struct hif_opaque_softc *scn, uint8_t PipeID,
+void hif_send_complete_check(struct hif_opaque_softc *hif_ctx, uint8_t PipeID,
 			     int force);
-void hif_shut_down_device(struct hif_opaque_softc *scn);
-void hif_get_default_pipe(struct hif_opaque_softc *scn, uint8_t *ULPipe,
+void hif_shut_down_device(struct hif_opaque_softc *hif_ctx);
+void hif_get_default_pipe(struct hif_opaque_softc *hif_ctx, uint8_t *ULPipe,
 			  uint8_t *DLPipe);
-int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
+int hif_map_service_to_pipe(struct hif_opaque_softc *hif_ctx, uint16_t svc_id,
 			uint8_t *ul_pipe, uint8_t *dl_pipe, int *ul_is_polled,
 			int *dl_is_polled);
 uint16_t
-hif_get_free_queue_number(struct hif_opaque_softc *scn, uint8_t PipeID);
-void *hif_get_targetdef(struct hif_opaque_softc *scn);
+hif_get_free_queue_number(struct hif_opaque_softc *hif_ctx, uint8_t PipeID);
+void *hif_get_targetdef(struct hif_opaque_softc *hif_ctx);
 uint32_t hif_hia_item_address(uint32_t target_type, uint32_t item_offset);
-void hif_set_target_sleep(struct hif_opaque_softc *scn, bool sleep_ok,
+void hif_set_target_sleep(struct hif_opaque_softc *hif_ctx, bool sleep_ok,
 		     bool wait_for_it);
-int hif_check_fw_reg(struct hif_opaque_softc *scn);
+int hif_check_fw_reg(struct hif_opaque_softc *hif_ctx);
 #ifndef HIF_PCI
-static inline int hif_check_soc_status(struct hif_opaque_softc *scn)
+static inline int hif_check_soc_status(struct hif_opaque_softc *hif_ctx)
 {
 	return 0;
 }
 #else
-int hif_check_soc_status(struct hif_opaque_softc *scn);
+int hif_check_soc_status(struct hif_opaque_softc *hif_ctx);
 #endif
-void hif_get_hw_info(struct hif_opaque_softc *scn, u32 *version, u32 *revision,
-		     const char **target_name);
-void hif_disable_isr(struct hif_opaque_softc *scn);
-void hif_reset_soc(struct hif_opaque_softc *scn);
+void hif_get_hw_info(struct hif_opaque_softc *hif_ctx, u32 *version,
+			u32 *revision, const char **target_name);
+void hif_disable_isr(struct hif_opaque_softc *hif_ctx);
+void hif_reset_soc(struct hif_opaque_softc *hif_ctx);
 void hif_save_htc_htt_config_endpoint(struct hif_opaque_softc *hif_ctx,
 				      int htc_htt_tx_endpoint);
 struct hif_opaque_softc *hif_open(qdf_device_t qdf_ctx, uint32_t mode,
@@ -649,7 +659,7 @@ struct hif_opaque_softc *hif_open(qdf_device_t qdf_ctx, uint32_t mode,
 				  struct hif_driver_state_callbacks *cbk);
 void hif_close(struct hif_opaque_softc *hif_ctx);
 QDF_STATUS hif_enable(struct hif_opaque_softc *hif_ctx, struct device *dev,
-		      void *bdev, const hif_bus_id *bid,
+		      void *bdev, const struct hif_bus_id *bid,
 		      enum qdf_bus_type bus_type,
 		      enum hif_enable_type type);
 void hif_disable(struct hif_opaque_softc *hif_ctx, enum hif_disable_type type);
@@ -705,9 +715,9 @@ void hif_enable_power_management(struct hif_opaque_softc *hif_ctx,
 				 bool is_packet_log_enabled);
 void hif_disable_power_management(struct hif_opaque_softc *hif_ctx);
 
-void hif_vote_link_down(struct hif_opaque_softc *);
-void hif_vote_link_up(struct hif_opaque_softc *);
-bool hif_can_suspend_link(struct hif_opaque_softc *);
+void hif_vote_link_down(struct hif_opaque_softc *hif_ctx);
+void hif_vote_link_up(struct hif_opaque_softc *hif_ctx);
+bool hif_can_suspend_link(struct hif_opaque_softc *hif_ctx);
 
 #ifdef IPA_OFFLOAD
 /**
@@ -723,7 +733,7 @@ enum ipa_hw_type hif_get_ipa_hw_type(void)
 	return ipa_get_hw_type();
 }
 #endif
-int hif_bus_resume(struct hif_opaque_softc *);
+int hif_bus_resume(struct hif_opaque_softc *hif_ctx);
 /**
  * hif_bus_ealry_suspend() - stop non wmi tx traffic
  * @context: hif context
@@ -735,9 +745,9 @@ int hif_bus_early_suspend(struct hif_opaque_softc *hif_ctx);
  * @context: hif context
  */
 int hif_bus_late_resume(struct hif_opaque_softc *hif_ctx);
-int hif_bus_suspend(struct hif_opaque_softc *);
-int hif_bus_resume_noirq(struct hif_opaque_softc *);
-int hif_bus_suspend_noirq(struct hif_opaque_softc *);
+int hif_bus_suspend(struct hif_opaque_softc *hif_ctx);
+int hif_bus_resume_noirq(struct hif_opaque_softc *hif_ctx);
+int hif_bus_suspend_noirq(struct hif_opaque_softc *hif_ctx);
 
 /**
  * hif_apps_irqs_enable() - Enables all irqs from the APPS side
@@ -788,27 +798,27 @@ int hif_pre_runtime_suspend(struct hif_opaque_softc *hif_ctx);
 void hif_pre_runtime_resume(struct hif_opaque_softc *hif_ctx);
 int hif_runtime_suspend(struct hif_opaque_softc *hif_ctx);
 int hif_runtime_resume(struct hif_opaque_softc *hif_ctx);
-void hif_process_runtime_suspend_success(struct hif_opaque_softc *);
-void hif_process_runtime_suspend_failure(struct hif_opaque_softc *);
-void hif_process_runtime_resume_success(struct hif_opaque_softc *);
+void hif_process_runtime_suspend_success(struct hif_opaque_softc *hif_ctx);
+void hif_process_runtime_suspend_failure(struct hif_opaque_softc *hif_ctx);
+void hif_process_runtime_resume_success(struct hif_opaque_softc *hif_ctx);
 #endif
 
 int hif_get_irq_num(struct hif_opaque_softc *scn, int *irq, uint32_t size);
 int hif_dump_registers(struct hif_opaque_softc *scn);
 int ol_copy_ramdump(struct hif_opaque_softc *scn);
 void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx);
-void hif_get_hw_info(struct hif_opaque_softc *scn, u32 *version, u32 *revision,
-		     const char **target_name);
-void hif_lro_flush_cb_register(struct hif_opaque_softc *scn,
-			       void (lro_flush_handler)(void *),
+void hif_get_hw_info(struct hif_opaque_softc *hif_ctx, u32 *version,
+		     u32 *revision, const char **target_name);
+void hif_lro_flush_cb_register(struct hif_opaque_softc *hif_ctx,
+			       void (lro_flush_handler)(void *arg),
 			       void *(lro_init_handler)(void));
-void hif_lro_flush_cb_deregister(struct hif_opaque_softc *scn,
-				 void (lro_deinit_cb)(void *));
-bool hif_needs_bmi(struct hif_opaque_softc *scn);
+void hif_lro_flush_cb_deregister(struct hif_opaque_softc *hif_ctx,
+				 void (lro_deinit_cb)(void *arg));
+bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx);
 enum qdf_bus_type hif_get_bus_type(struct hif_opaque_softc *hif_hdl);
 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 hif_config_info *hif_get_ini_handle(struct hif_opaque_softc *hif_ctx);
 struct ramdump_info *hif_get_ramdump_ctx(struct hif_opaque_softc *hif_ctx);
 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
@@ -834,9 +844,9 @@ uint32_t hif_set_nss_wifiol_mode(struct hif_opaque_softc *osc,
 int32_t hif_get_nss_wifiol_bypass_nw_process(struct hif_opaque_softc *osc);
 #endif /* QCA_NSS_WIFI_OFFLOAD_SUPPORT */
 
-void hif_set_bundle_mode(struct hif_opaque_softc *scn, bool enabled,
+void hif_set_bundle_mode(struct hif_opaque_softc *hif_ctx, bool enabled,
 				int rx_bundle_cnt);
-int hif_bus_reset_resume(struct hif_opaque_softc *scn);
+int hif_bus_reset_resume(struct hif_opaque_softc *hif_ctx);
 
 void hif_set_attribute(struct hif_opaque_softc *osc, uint8_t hif_attrib);
 

+ 5 - 4
hif/inc/hif_napi.h

@@ -97,11 +97,11 @@ enum qca_napi_event {
 #define NAPI_PIPE2ID(p) ((p)+1)
 
 int hif_napi_lro_flush_cb_register(struct hif_opaque_softc *hif_hdl,
-				   void (lro_flush_handler)(void *),
+				   void (lro_flush_handler)(void *arg),
 				   void *(lro_init_handler)(void));
 
 void hif_napi_lro_flush_cb_deregister(struct hif_opaque_softc *hif_hdl,
-				      void (lro_deinit_cb)(void *));
+				      void (lro_deinit_cb)(void *arg));
 
 void *hif_napi_get_lro_info(struct hif_opaque_softc *hif_hdl, int napi_id);
 #ifdef FEATURE_NAPI
@@ -157,7 +157,7 @@ static inline void hif_napi_update_yield_stats(struct CE_state *ce_state,
 
 #ifdef FEATURE_NAPI_DEBUG
 #define NAPI_DEBUG(fmt, ...)			\
-	qdf_print("wlan: NAPI: %s:%d "fmt, __func__, __LINE__, ##__VA_ARGS__);
+	qdf_print("wlan: NAPI: %s:%d "fmt, __func__, __LINE__, ##__VA_ARGS__)
 #else
 #define NAPI_DEBUG(fmt, ...) /* NO-OP */
 #endif /* FEATURE NAPI_DEBUG */
@@ -173,7 +173,8 @@ enum qca_blacklist_op {
 	BLACKLIST_ON
 };
 
-int hif_napi_cpu_blacklist(struct qca_napi_data *napid, enum qca_blacklist_op op);
+int hif_napi_cpu_blacklist(struct qca_napi_data *napid,
+			   enum qca_blacklist_op op);
 /**
  * Local interface to HIF implemented functions of NAPI CPU affinity management.
  * Note:

+ 5 - 5
hif/src/ar6320def.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -471,15 +471,15 @@ struct targetdef_s ar6320_targetdef = {
 	.d_RX_MSDU_END_4_FIRST_MSDU_MASK =
 		AR6320_RX_MSDU_END_4_FIRST_MSDU_MASK,
 	.d_RX_MSDU_END_4_FIRST_MSDU_LSB = AR6320_RX_MSDU_END_4_FIRST_MSDU_LSB,
-    .d_RX_MPDU_START_0_RETRY_LSB = AR6320_RX_MPDU_START_0_RETRY_LSB,
-    .d_RX_MPDU_START_0_RETRY_MASK = AR6320_RX_MPDU_START_0_RETRY_MASK,
+	.d_RX_MPDU_START_0_RETRY_LSB = AR6320_RX_MPDU_START_0_RETRY_LSB,
+	.d_RX_MPDU_START_0_RETRY_MASK = AR6320_RX_MPDU_START_0_RETRY_MASK,
 	.d_RX_MPDU_START_0_SEQ_NUM_MASK = AR6320_RX_MPDU_START_0_SEQ_NUM_MASK,
 	.d_RX_MPDU_START_0_SEQ_NUM_LSB = AR6320_RX_MPDU_START_0_SEQ_NUM_LSB,
 	.d_RX_MPDU_START_2_PN_47_32_LSB = AR6320_RX_MPDU_START_2_PN_47_32_LSB,
 	.d_RX_MPDU_START_2_PN_47_32_MASK =
 		AR6320_RX_MPDU_START_2_PN_47_32_MASK,
-    .d_RX_MPDU_START_2_TID_LSB = AR6320_RX_MPDU_START_2_TID_LSB,
-    .d_RX_MPDU_START_2_TID_MASK = AR6320_RX_MPDU_START_2_TID_MASK,
+	.d_RX_MPDU_START_2_TID_LSB = AR6320_RX_MPDU_START_2_TID_LSB,
+	.d_RX_MPDU_START_2_TID_MASK = AR6320_RX_MPDU_START_2_TID_MASK,
 	.d_RX_MSDU_END_1_KEY_ID_OCT_MASK =
 		AR6320_RX_MSDU_END_1_KEY_ID_OCT_MASK,
 	.d_RX_MSDU_END_1_KEY_ID_OCT_LSB = AR6320_RX_MSDU_END_1_KEY_ID_OCT_LSB,

+ 5 - 5
hif/src/ar6320v2def.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -476,9 +476,9 @@ struct targetdef_s ar6320v2_targetdef = {
 		AR6320V2_RX_MSDU_END_4_FIRST_MSDU_MASK,
 	.d_RX_MSDU_END_4_FIRST_MSDU_LSB =
 		AR6320V2_RX_MSDU_END_4_FIRST_MSDU_LSB,
-    .d_RX_MPDU_START_0_RETRY_MASK =
+	.d_RX_MPDU_START_0_RETRY_MASK =
 		AR6320V2_RX_MPDU_START_0_RETRY_MASK,
-    .d_RX_MPDU_START_0_SEQ_NUM_MASK =
+	.d_RX_MPDU_START_0_SEQ_NUM_MASK =
 		AR6320V2_RX_MPDU_START_0_SEQ_NUM_MASK,
 	.d_RX_MPDU_START_0_SEQ_NUM_MASK =
 		AR6320V2_RX_MPDU_START_0_SEQ_NUM_MASK,
@@ -487,9 +487,9 @@ struct targetdef_s ar6320v2_targetdef = {
 		AR6320V2_RX_MPDU_START_2_PN_47_32_LSB,
 	.d_RX_MPDU_START_2_PN_47_32_MASK =
 		AR6320V2_RX_MPDU_START_2_PN_47_32_MASK,
-    .d_RX_MPDU_START_2_TID_LSB =
+	.d_RX_MPDU_START_2_TID_LSB =
 		AR6320V2_RX_MPDU_START_2_TID_LSB,
-    .d_RX_MPDU_START_2_TID_MASK =
+	.d_RX_MPDU_START_2_TID_MASK =
 		AR6320V2_RX_MPDU_START_2_TID_MASK,
 	.d_RX_MSDU_END_1_EXT_WAPI_PN_63_48_MASK =
 		AR6320V2_RX_MSDU_END_1_EXT_WAPI_PN_63_48_MASK,

+ 6 - 6
hif/src/ar900Bdef.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010,2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010, 2016-2017 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
@@ -31,11 +31,11 @@
 #include "AR900B/hw/si_reg.h"
 #include "AR900B/extra/hw/pcie_local_reg.h"
 #include "AR900B/hw/ce_wrapper_reg_csr.h"
-#if 0
-#include "hw/soc_core_reg.h"
-#include "hw/soc_pcie_reg.h"
-#include "hw/ce_reg_csr.h"
-#endif
+/* TODO
+ * #include "hw/soc_core_reg.h"
+ * #include "hw/soc_pcie_reg.h"
+ * #include "hw/ce_reg_csr.h"
+ */
 
 #include "AR900B/extra/hw/soc_core_reg.h"
 #include "AR900B/hw/soc_pcie_reg.h"

+ 11 - 13
hif/src/ath_procfs.c

@@ -30,7 +30,7 @@
 #include <linux/kernel.h>       /* We're doing kernel work */
 #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 <linux/uaccess.h>        /* for copy_from_user */
 #include "hif.h"
 #include "hif_main.h"
 #if defined(HIF_USB)
@@ -112,9 +112,8 @@ out:
 		HIF_ERROR("%s: copy_to_user error in /proc/%s",
 			__func__, PROCFS_NAME);
 		return -EFAULT;
-	} else
-		qdf_mem_free(read_buffer);
-
+	}
+	qdf_mem_free(read_buffer);
 	return count;
 }
 
@@ -160,6 +159,7 @@ static ssize_t ath_procfs_diag_write(struct file *file,
 	if ((count == 4) && ((((uint32_t) (*pos)) & 3) == 0)) {
 		/* reading a word? */
 		uint32_t value = *((uint32_t *)write_buffer);
+
 		rv = hif_diag_write_access(hif_hdl, (uint32_t)(*pos), value);
 	} else {
 		rv = hif_diag_write_mem(hif_hdl, (uint32_t)(*pos),
@@ -169,11 +169,10 @@ static ssize_t ath_procfs_diag_write(struct file *file,
 out:
 
 	qdf_mem_free(write_buffer);
-	if (rv == 0) {
+	if (rv == 0)
 		return count;
-	} else {
+	else
 		return -EIO;
-	}
 }
 
 static const struct file_operations athdiag_fops = {
@@ -181,8 +180,8 @@ static const struct file_operations athdiag_fops = {
 	.write = ath_procfs_diag_write,
 };
 
-/**
-   *This function is called when the module is loaded
+/*
+ * This function is called when the module is loaded
  *
  */
 int athdiag_procfs_init(void *scn)
@@ -195,8 +194,7 @@ int athdiag_procfs_init(void *scn)
 		return -ENOMEM;
 	}
 
-	proc_file = proc_create_data(PROCFS_NAME,
-				     S_IRUSR | S_IWUSR, proc_dir,
+	proc_file = proc_create_data(PROCFS_NAME, 0600, proc_dir,
 				     &athdiag_fops, (void *)scn);
 	if (proc_file == NULL) {
 		remove_proc_entry(PROCFS_NAME, proc_dir);
@@ -209,8 +207,8 @@ int athdiag_procfs_init(void *scn)
 	return 0;               /* everything is ok */
 }
 
-/**
-   *This function is called when the module is unloaded
+/*
+ * This function is called when the module is unloaded
  *
  */
 void athdiag_procfs_remove(void)

+ 1 - 1
hif/src/ce/ce_assignment.h

@@ -58,7 +58,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif, "hif", "PCIe Host Interface",
 /* globals are initialized to 0 by the compiler */;
 spinlock_t pcie_access_log_lock;
 unsigned int pcie_access_log_seqnum;
-HIF_ACCESS_LOG pcie_access_log[PCIE_ACCESS_LOG_NUM];
+struct HIF_ACCESS_LOG pcie_access_log[PCIE_ACCESS_LOG_NUM];
 static void hif_target_dump_access_log(void);
 #endif
 

+ 1 - 1
hif/src/dispatcher/ahb_api.h

@@ -29,7 +29,7 @@ void hif_ahb_nointrs(struct hif_softc *scn);
 void hif_ahb_reset_soc(struct hif_softc *hif_ctx);
 QDF_STATUS hif_ahb_enable_bus(struct hif_softc *ol_sc,
 			  struct device *dev, void *bdev,
-			  const hif_bus_id *bid,
+			  const struct hif_bus_id *bid,
 			  enum hif_enable_type type);
 void hif_ahb_disable_bus(struct hif_softc *scn);
 int hif_ahb_bus_configure(struct hif_softc *scn);

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

@@ -258,7 +258,7 @@ void hif_nointrs(struct hif_softc *hif_sc)
 }
 
 QDF_STATUS hif_enable_bus(struct hif_softc *hif_sc, struct device *dev,
-			  void *bdev, const hif_bus_id *bid,
+			  void *bdev, const struct hif_bus_id *bid,
 			  enum hif_enable_type type)
 {
 	return hif_sc->bus_ops.hif_enable_bus(hif_sc, dev, bdev, bid, type);

+ 1 - 1
hif/src/dispatcher/pci_api.h

@@ -42,7 +42,7 @@ void hif_pci_disable_isr(struct hif_softc *scn);
 void hif_pci_nointrs(struct hif_softc *scn);
 QDF_STATUS hif_pci_enable_bus(struct hif_softc *scn,
 			struct device *dev, void *bdev,
-			const hif_bus_id *bid,
+			const struct hif_bus_id *bid,
 			enum hif_enable_type type);
 void hif_pci_disable_bus(struct hif_softc *scn);
 int hif_pci_bus_configure(struct hif_softc *scn);

+ 3 - 2
hif/src/dispatcher/sdio_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 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
@@ -22,7 +22,8 @@ void hif_sdio_close(struct hif_softc *hif_sc);
 int hif_sdio_bus_suspend(struct hif_softc *hif_ctx);
 int hif_sdio_bus_resume(struct hif_softc *hif_ctx);
 QDF_STATUS hif_sdio_enable_bus(struct hif_softc *hif_sc,
-			struct device *dev, void *bdev, const hif_bus_id *bid,
+			struct device *dev, void *bdev,
+			const struct hif_bus_id *bid,
 			enum hif_enable_type type);
 void hif_sdio_disable_bus(struct hif_softc *hif_sc);
 QDF_STATUS

+ 1 - 1
hif/src/dispatcher/snoc_api.h

@@ -37,7 +37,7 @@ void hif_snoc_disable_isr(struct hif_softc *hif_ctx);
 void hif_snoc_nointrs(struct hif_softc *scn);
 QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
 			  struct device *dev, void *bdev,
-			  const hif_bus_id *bid,
+			  const struct hif_bus_id *bid,
 			  enum hif_enable_type type);
 void hif_snoc_disable_bus(struct hif_softc *scn);
 int hif_snoc_bus_configure(struct hif_softc *scn);

+ 2 - 2
hif/src/dispatcher/usb_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 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
@@ -27,7 +27,7 @@ void hif_usb_disable_isr(struct hif_softc *hif_ctx);
 void hif_usb_nointrs(struct hif_softc *scn);
 QDF_STATUS hif_usb_enable_bus(struct hif_softc *ol_sc,
 			  struct device *dev, void *bdev,
-			  const hif_bus_id *bid,
+			  const struct hif_bus_id *bid,
 			  enum hif_enable_type type);
 void hif_usb_disable_bus(struct hif_softc *scn);
 int hif_usb_bus_configure(struct hif_softc *scn);

+ 14 - 7
hif/src/hif_main.c

@@ -100,8 +100,8 @@ void *hif_get_targetdef(struct hif_opaque_softc *hif_ctx)
 void hif_vote_link_down(struct hif_opaque_softc *hif_ctx)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
-	QDF_BUG(scn);
 
+	QDF_BUG(scn);
 	scn->linkstate_vote--;
 	if (scn->linkstate_vote == 0)
 		hif_bus_prevent_linkdown(scn, false);
@@ -121,8 +121,8 @@ void hif_vote_link_down(struct hif_opaque_softc *hif_ctx)
 void hif_vote_link_up(struct hif_opaque_softc *hif_ctx)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
-	QDF_BUG(scn);
 
+	QDF_BUG(scn);
 	scn->linkstate_vote++;
 	if (scn->linkstate_vote == 1)
 		hif_bus_prevent_linkdown(scn, true);
@@ -143,8 +143,8 @@ void hif_vote_link_up(struct hif_opaque_softc *hif_ctx)
 bool hif_can_suspend_link(struct hif_opaque_softc *hif_ctx)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
-	QDF_BUG(scn);
 
+	QDF_BUG(scn);
 	return scn->linkstate_vote == 0;
 }
 
@@ -426,7 +426,8 @@ struct hif_opaque_softc *hif_open(qdf_device_t qdf_ctx, uint32_t mode,
 	qdf_atomic_init(&scn->active_grp_tasklet_cnt);
 	qdf_atomic_init(&scn->link_suspended);
 	qdf_atomic_init(&scn->tasklet_from_intr);
-	qdf_mem_copy(&scn->callbacks, cbk, sizeof(struct hif_driver_state_callbacks));
+	qdf_mem_copy(&scn->callbacks, cbk,
+		     sizeof(struct hif_driver_state_callbacks));
 	scn->bus_type  = bus_type;
 	status = hif_bus_open(scn, bus_type);
 	if (status != QDF_STATUS_SUCCESS) {
@@ -461,6 +462,7 @@ void hif_close(struct hif_opaque_softc *hif_ctx)
 
 	if (scn->target_info.hw_name) {
 		char *hw_name = scn->target_info.hw_name;
+
 		scn->target_info.hw_name = "ErrUnloading";
 		qdf_mem_free(hw_name);
 	}
@@ -499,7 +501,8 @@ static QDF_STATUS hif_hal_attach(struct hif_softc *scn)
  * Return: QDF_STATUS
  */
 QDF_STATUS hif_enable(struct hif_opaque_softc *hif_ctx, struct device *dev,
-					  void *bdev, const hif_bus_id *bid,
+					  void *bdev,
+					  const struct hif_bus_id *bid,
 					  enum qdf_bus_type bus_type,
 					  enum hif_enable_type type)
 {
@@ -646,7 +649,6 @@ void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx)
 {
 	HIF_INFO_MED("%s: Collecting target RAM dump disabled",
 		__func__);
-	return;
 }
 #endif /* TARGET_RAMDUMP_AFTER_KERNEL_PANIC */
 
@@ -805,6 +807,7 @@ bool hif_needs_bmi(struct hif_opaque_softc *hif_ctx)
 enum qdf_bus_type hif_get_bus_type(struct hif_opaque_softc *hif_hdl)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_hdl);
+
 	return scn->bus_type;
 }
 
@@ -984,7 +987,8 @@ uint32_t hif_get_conparam(struct hif_softc *scn)
  *
  * Return: pointer to HIF Callbacks
  */
-struct hif_driver_state_callbacks *hif_get_callbacks_handle(struct hif_softc *scn)
+struct hif_driver_state_callbacks *hif_get_callbacks_handle(
+							struct hif_softc *scn)
 {
 	return &scn->callbacks;
 }
@@ -1098,6 +1102,7 @@ qdf_nbuf_t hif_batch_send(struct hif_opaque_softc *osc, qdf_nbuf_t msdu,
 void hif_update_tx_ring(struct hif_opaque_softc *osc, u_int32_t num_htt_cmpls)
 {
 	void *ce_tx_hdl = hif_get_ce_handle(osc, CE_HTT_TX_CE);
+
 	ce_update_tx_ring(ce_tx_hdl, num_htt_cmpls);
 }
 
@@ -1155,6 +1160,7 @@ void hif_reg_write(struct hif_opaque_softc *hif_ctx, uint32_t offset,
 		uint32_t value)
 {
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
+
 	hif_write32_mb(scn->mem + offset, value);
 
 }
@@ -1171,6 +1177,7 @@ uint32_t hif_reg_read(struct hif_opaque_softc *hif_ctx, uint32_t offset)
 {
 
 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
+
 	return hif_read32_mb(scn->mem + offset);
 }
 

+ 3 - 2
hif/src/hif_main.h

@@ -237,13 +237,14 @@ void hif_bus_close(struct hif_softc *ol_sc);
 QDF_STATUS hif_bus_open(struct hif_softc *ol_sc,
 	enum qdf_bus_type bus_type);
 QDF_STATUS hif_enable_bus(struct hif_softc *ol_sc, struct device *dev,
-	void *bdev, const hif_bus_id *bid, enum hif_enable_type type);
+	void *bdev, const struct hif_bus_id *bid, enum hif_enable_type type);
 void hif_disable_bus(struct hif_softc *scn);
 void hif_bus_prevent_linkdown(struct hif_softc *scn, bool flag);
 int hif_bus_get_context_size(enum qdf_bus_type bus_type);
 void hif_read_phy_mem_base(struct hif_softc *scn, qdf_dma_addr_t *bar_value);
 uint32_t hif_get_conparam(struct hif_softc *scn);
-struct hif_driver_state_callbacks *hif_get_callbacks_handle(struct hif_softc *scn);
+struct hif_driver_state_callbacks *hif_get_callbacks_handle(
+							struct hif_softc *scn);
 bool hif_is_driver_unloading(struct hif_softc *scn);
 bool hif_is_load_or_unload_in_progress(struct hif_softc *scn);
 bool hif_is_recovery_in_progress(struct hif_softc *scn);

+ 16 - 19
hif/src/hif_napi.c

@@ -547,7 +547,7 @@ int hif_napi_event(struct hif_opaque_softc *hif_ctx, enum qca_napi_event event,
 				   __func__);
 			blacklist_pending = BLACKLIST_OFF_PENDING;
 			/*
-			.*.Ideally we should "collapse" interrupts here, since
+			 * Ideally we should "collapse" interrupts here, since
 			 * we are "dispersing" interrupts in the "else" case.
 			 * This allows the possibility that our interrupts may
 			 * still be on the perf cluster the next time we enter
@@ -721,7 +721,7 @@ bool hif_napi_correct_cpu(struct qca_napi_info *napi_info)
 	bool right_cpu = true;
 	int rc = 0;
 	cpumask_t cpumask;
-	int cpu ;
+	int cpu;
 	struct qca_napi_data *napid;
 
 	napid = hif_napi_get_all(GET_HIF_OPAQUE_HDL(napi_info->hif_ctx));
@@ -743,7 +743,8 @@ bool hif_napi_correct_cpu(struct qca_napi_info *napi_info)
 			irq_modify_status(napi_info->irq, 0, IRQ_NO_BALANCING);
 
 			if (rc)
-				HIF_ERROR("error setting irq affinity hint: %d", rc);
+				HIF_ERROR("error setting irq affinity hint: %d",
+					  rc);
 			else
 				napi_info->stats[cpu].cpu_corrected++;
 		}
@@ -914,12 +915,11 @@ void hif_napi_update_yield_stats(struct CE_state *ce_state,
 	if (unlikely(NULL == hif)) {
 		QDF_ASSERT(NULL != hif);
 		return;
-	} else {
-		napi_data = &(hif->napi_data);
-		if (unlikely(NULL == napi_data)) {
-			QDF_ASSERT(NULL != napi_data);
-			return;
-		}
+	}
+	napi_data = &(hif->napi_data);
+	if (unlikely(NULL == napi_data)) {
+		QDF_ASSERT(NULL != napi_data);
+		return;
 	}
 
 	ce_id = ce_state->id;
@@ -957,9 +957,7 @@ void hif_napi_stats(struct qca_napi_data *napid)
 	qdf_print("lilclhead=%d, bigclhead=%d",
 		  napid->lilcl_head, napid->bigcl_head);
 	for (i = 0; i < NR_CPUS; i++) {
-		qdf_print("CPU[%02d]: state:%d crid=%02d clid=%02d "
-			  "crmk:0x%0lx thmk:0x%0lx frq:%d "
-			  "napi = 0x%08x lnk:%d",
+		qdf_print("CPU[%02d]: state:%d crid=%02d clid=%02d crmk:0x%0lx thmk:0x%0lx frq:%d napi = 0x%08x lnk:%d",
 			  i,
 			  cpu[i].state, cpu[i].core_id, cpu[i].cluster_id,
 			  cpu[i].core_mask.bits[0],
@@ -1038,8 +1036,7 @@ static int hnc_link_clusters(struct qca_napi_data *napid)
 				continue;
 			}
 			if (cl_done & (0x01 << cl)) {
-				NAPI_DEBUG("Cluster already processed. "
-					   "SKIPPED\n");
+				NAPI_DEBUG("Cluster already processed. SKIPPED\n");
 				continue;
 			} else {
 				if (more == 0) {
@@ -1050,8 +1047,7 @@ static int hnc_link_clusters(struct qca_napi_data *napid)
 					prev = -1;
 				};
 				if ((curcl >= 0) && (curcl != cl)) {
-					NAPI_DEBUG("Entry cl(%d) != curcl(%d). "
-						   "SKIPPED\n",
+					NAPI_DEBUG("Entry cl(%d) != curcl(%d). SKIPPED\n",
 						   cl, curcl);
 					continue;
 				}
@@ -1389,9 +1385,8 @@ retry_collapse:
 			if (napid->napi_cpu[i].state == QCA_NAPI_CPU_UP) {
 				destidx = i;
 				break;
-			} else {
-				i = napid->napi_cpu[i].cluster_nxt;
 			}
+			i = napid->napi_cpu[i].cluster_nxt;
 		}
 		if ((destidx < 0) && (head == napid->lilcl_head)) {
 			NAPI_DEBUG("%s: COLLAPSE: no lilcl dest, try bigcl",
@@ -1513,6 +1508,7 @@ hncm_return:
 static inline void hif_napi_bl_irq(struct qca_napi_data *napid, bool bl_flag)
 {
 	int i;
+
 	for (i = 0; i < CE_COUNT_MAX; i++) {
 		/* check if NAPI is enabled on the CE */
 		if (!(napid->ce_map & (0x01 << i)))
@@ -1556,7 +1552,8 @@ static inline int hif_napi_core_ctl_set_boost(bool boost)
  *         for BLACKLIST_ON op    - return value from core_ctl_set_boost API
  *         for BLACKLIST_OFF op   - return value from core_ctl_set_boost API
  */
-int hif_napi_cpu_blacklist(struct qca_napi_data *napid, enum qca_blacklist_op op)
+int hif_napi_cpu_blacklist(struct qca_napi_data *napid,
+			   enum qca_blacklist_op op)
 {
 	int rc = 0;
 	static int ref_count; /* = 0 by the compiler */

+ 3 - 2
hif/src/mp_dev.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2014, 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 2016-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -83,6 +83,7 @@ static inline void set_target_reg_bits(void __iomem *mem, uint32_t reg,
 {
 	uint32_t value = hif_read32_mb(mem + (reg));
 	uint32_t shift = 0;
+
 	value &= ~(bitmask);
 	while (!((bitmask >> shift) & 0x01))
 		shift++;
@@ -96,6 +97,7 @@ static inline uint32_t get_target_reg_bits(void __iomem *mem,
 {
 	uint32_t value = hif_read32_mb(mem + (reg));
 	uint32_t shift = 0;
+
 	while (!((bitmask >> shift) & 0x01))
 		shift++;
 
@@ -309,7 +311,6 @@ void priv_dump_agc(struct hif_softc *scn)
 
 	Q_TARGET_ACCESS_END(scn);
 
-	return;
 }
 
 void priv_dump_bbwatchdog(struct hif_softc *scn)

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

@@ -3781,7 +3781,7 @@ static void hif_pci_get_soc_info(struct hif_pci_softc *sc, struct device *dev)
  */
 QDF_STATUS hif_pci_enable_bus(struct hif_softc *ol_sc,
 			  struct device *dev, void *bdev,
-			  const hif_bus_id *bid,
+			  const struct hif_bus_id *bid,
 			  enum hif_enable_type type)
 {
 	int ret = 0;

+ 6 - 6
hif/src/sdio/hif_sdio_dev.c

@@ -437,7 +437,7 @@ QDF_STATUS hif_dev_setup(struct hif_sdio_device *pdev)
 {
 	QDF_STATUS status;
 	uint32_t blocksizes[MAILBOX_COUNT];
-	HTC_CALLBACKS htc_callbacks;
+	struct htc_callbacks htc_cbs;
 	struct hif_sdio_dev *hif_device = pdev->HIFDevice;
 
 	HIF_ENTER();
@@ -516,12 +516,12 @@ QDF_STATUS hif_dev_setup(struct hif_sdio_device *pdev)
 
 	status = hif_dev_disable_interrupts(pdev);
 
-	qdf_mem_zero(&htc_callbacks, sizeof(HTC_CALLBACKS));
+	qdf_mem_zero(&htc_cbs, sizeof(struct htc_callbacks));
 	/* the device layer handles these */
-	htc_callbacks.rwCompletionHandler = hif_dev_rw_completion_handler;
-	htc_callbacks.dsrHandler = hif_dev_dsr_handler;
-	htc_callbacks.context = pdev;
-	status = hif_attach_htc(pdev->HIFDevice, &htc_callbacks);
+	htc_cbs.rwCompletionHandler = hif_dev_rw_completion_handler;
+	htc_cbs.dsrHandler = hif_dev_dsr_handler;
+	htc_cbs.context = pdev;
+	status = hif_attach_htc(pdev->HIFDevice, &htc_cbs);
 
 	HIF_EXIT();
 	return status;

+ 2 - 1
hif/src/sdio/if_sdio.c

@@ -479,7 +479,8 @@ void hif_get_target_revision(struct hif_softc *ol_sc)
  * Return: QDF_STATUS
  */
 QDF_STATUS hif_sdio_enable_bus(struct hif_softc *hif_sc,
-			struct device *dev, void *bdev, const hif_bus_id *bid,
+			struct device *dev, void *bdev,
+			const struct hif_bus_id *bid,
 			enum hif_enable_type type)
 {
 	int ret = 0;

+ 3 - 3
hif/src/sdio/native_sdio/include/hif_internal.h

@@ -214,7 +214,7 @@ struct hif_sdio_dev {
 	bool is_suspend;
 	bool is_disabled;
 	atomic_t irq_handling;
-	HIF_DEVICE_POWER_CHANGE_TYPE power_config;
+	enum HIF_DEVICE_POWER_CHANGE_TYPE power_config;
 	enum hif_sdio_device_state device_state;
 	const struct sdio_device_id *id;
 	struct mmc_host *host;
@@ -268,7 +268,7 @@ struct osdrv_callbacks {
 	int (*device_resume_handler)(void *context);
 	int (*device_wakeup_handler)(void *context);
 	int (*device_power_change_handler)(void *context,
-					HIF_DEVICE_POWER_CHANGE_TYPE
+					enum HIF_DEVICE_POWER_CHANGE_TYPE
 					config);
 };
 
@@ -306,7 +306,7 @@ QDF_STATUS hif_configure_device(struct hif_sdio_dev *device,
 QDF_STATUS hif_init(struct osdrv_callbacks *callbacks);
 
 QDF_STATUS hif_attach_htc(struct hif_sdio_dev *device,
-			  HTC_CALLBACKS *callbacks);
+			  struct htc_callbacks *callbacks);
 
 QDF_STATUS hif_read_write(struct hif_sdio_dev *device,
 			uint32_t address,

+ 11 - 12
hif/src/sdio/native_sdio/src/hif.c

@@ -1031,7 +1031,7 @@ static int sdio_enable4bits(struct hif_sdio_dev *device, int enable)
  */
 QDF_STATUS
 power_state_change_notify(struct hif_sdio_dev *device,
-			HIF_DEVICE_POWER_CHANGE_TYPE config)
+			enum HIF_DEVICE_POWER_CHANGE_TYPE config)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct sdio_func *func = device->func;
@@ -1288,7 +1288,7 @@ hif_configure_device(struct hif_sdio_dev *device,
 	case HIF_DEVICE_POWER_STATE_CHANGE:
 		status =
 			power_state_change_notify(device,
-					  *(HIF_DEVICE_POWER_CHANGE_TYPE *)
+					  *(enum HIF_DEVICE_POWER_CHANGE_TYPE *)
 					   config);
 		break;
 	case HIF_DEVICE_GET_IRQ_YIELD_PARAMS:
@@ -2222,7 +2222,7 @@ int hif_device_suspend(struct device *dev)
 	int ret = QDF_STATUS_SUCCESS;
 #if defined(MMC_PM_KEEP_POWER)
 	mmc_pm_flag_t pm_flag = 0;
-	HIF_DEVICE_POWER_CHANGE_TYPE config;
+	enum HIF_DEVICE_POWER_CHANGE_TYPE config;
 	struct mmc_host *host = NULL;
 #endif
 
@@ -2276,7 +2276,7 @@ int hif_device_suspend(struct device *dev)
 					   HIF_DEVICE_POWER_STATE_CHANGE,
 					   &config,
 					   sizeof
-					   (HIF_DEVICE_POWER_CHANGE_TYPE));
+					   (enum HIF_DEVICE_POWER_CHANGE_TYPE));
 			if (ret) {
 				AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
 				   ("%s: hif config device failed: %d\n",
@@ -2307,7 +2307,7 @@ int hif_device_suspend(struct device *dev)
 				   HIF_DEVICE_POWER_STATE_CHANGE,
 				   &config,
 				   sizeof
-				   (HIF_DEVICE_POWER_CHANGE_TYPE));
+				   (enum HIF_DEVICE_POWER_CHANGE_TYPE));
 
 			if (ret) {
 				AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
@@ -2315,9 +2315,8 @@ int hif_device_suspend(struct device *dev)
 					 __func__, ret));
 				return ret;
 			}
-			ret =
-				sdio_set_host_pm_flags(func,
-					       MMC_PM_WAKE_SDIO_IRQ);
+			ret = sdio_set_host_pm_flags(func,
+						     MMC_PM_WAKE_SDIO_IRQ);
 			if (ret) {
 				AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
 					("%s: set sdio pm flags %d\n",
@@ -2385,7 +2384,7 @@ int hif_device_resume(struct device *dev)
 {
 	struct sdio_func *func = dev_to_sdio_func(dev);
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	HIF_DEVICE_POWER_CHANGE_TYPE config;
+	enum HIF_DEVICE_POWER_CHANGE_TYPE config;
 	struct hif_sdio_dev *device;
 
 	device = get_hif_device(func);
@@ -2395,8 +2394,8 @@ int hif_device_resume(struct device *dev)
 		status = hif_configure_device(device,
 					      HIF_DEVICE_POWER_STATE_CHANGE,
 					      &config,
-					      sizeof
-					      (HIF_DEVICE_POWER_CHANGE_TYPE));
+					      sizeof(enum
+						 HIF_DEVICE_POWER_CHANGE_TYPE));
 		if (status) {
 			AR_DEBUG_PRINTF(ATH_DEBUG_ERROR,
 				("%s: hif_configure_device failed\n",
@@ -2589,7 +2588,7 @@ void hif_release_device(struct hif_opaque_softc *hif_ctx)
 }
 
 QDF_STATUS hif_attach_htc(struct hif_sdio_dev *device,
-				HTC_CALLBACKS *callbacks)
+				struct htc_callbacks *callbacks)
 {
 	if (device->htc_callbacks.context != NULL)
 		/* already in use! */

+ 1 - 1
hif/src/snoc/if_ahb.c

@@ -463,7 +463,7 @@ void hif_ahb_disable_bus(struct hif_softc *scn)
  */
 QDF_STATUS hif_ahb_enable_bus(struct hif_softc *ol_sc,
 		struct device *dev, void *bdev,
-		const hif_bus_id *bid,
+		const struct hif_bus_id *bid,
 		enum hif_enable_type type)
 {
 	int ret = 0;

+ 2 - 2
hif/src/snoc/if_snoc.c

@@ -201,7 +201,7 @@ int hif_snoc_bus_configure(struct hif_softc *scn)
  * Return: 0 for success
  */
 static inline int hif_snoc_get_target_type(struct hif_softc *ol_sc,
-	struct device *dev, void *bdev, const hif_bus_id *bid,
+	struct device *dev, void *bdev, const struct hif_bus_id *bid,
 	uint32_t *hif_type, uint32_t *target_type)
 {
 	/* TODO: need to use HW version. Hard code for now */
@@ -245,7 +245,7 @@ static int hif_set_dma_coherent_mask(struct device *dev)
  */
 QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
 			  struct device *dev, void *bdev,
-			  const hif_bus_id *bid,
+			  const struct hif_bus_id *bid,
 			  enum hif_enable_type type)
 {
 	int ret;

+ 1 - 1
hif/src/usb/if_usb.c

@@ -184,7 +184,7 @@ exit:
  */
 QDF_STATUS hif_usb_enable_bus(struct hif_softc *scn,
 			struct device *dev, void *bdev,
-			const hif_bus_id *bid,
+			const struct hif_bus_id *bid,
 			enum hif_enable_type type)
 
 {