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

qcacmn: Replace void * wmi_hdl with abstract type (7/10)

Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: I53d14cc548e0d9aae4de7db4dcf6f63ed2a74fe5
CRs-Fixed: 2482590
Himanshu Batra 5 éve
szülő
commit
cefe93ef3b

+ 6 - 6
wmi/inc/wmi_unified_nan_api.h

@@ -47,34 +47,34 @@ QDF_STATUS wmi_unified_nan_disable_req_cmd(wmi_unified_t wmi_handle,
 
 /**
  * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @req: pointer to request buffer
  *
  * Return: status of operation
  */
 QDF_STATUS
-wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
+wmi_unified_ndp_initiator_req_cmd_send(wmi_unified_t wmi_handle,
 				       struct nan_datapath_initiator_req *req);
 
 /**
  * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @req: pointer to request buffer
  *
  * Return: status of operation
  */
 QDF_STATUS
-wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
+wmi_unified_ndp_responder_req_cmd_send(wmi_unified_t wmi_handle,
 				       struct nan_datapath_responder_req *req);
 
 /**
  * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @req: pointer to request buffer
  *
  * Return: status of operation
  */
-QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
+QDF_STATUS wmi_unified_ndp_end_req_cmd_send(wmi_unified_t wmi_handle,
 					    struct nan_datapath_end_req *req);
 
 /**

+ 18 - 16
wmi/inc/wmi_unified_p2p_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 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
@@ -26,22 +26,22 @@
 
 /**
  * wmi_unified_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
- * @wmi_hdl: wmi handle
- * @opps: p2p opp power save parameters
+ * @wmi_handle: wmi handle
+ * @oppps: p2p opp power save parameters
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_p2pgo_oppps_req(wmi_unified_t wmi_handle,
 					   struct p2p_ps_params *oppps);
 
 /**
  * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @noa: p2p power save parameters
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(wmi_unified_t wmi_handle,
 					     struct p2p_ps_params *noa);
 
 /**
@@ -52,52 +52,54 @@ QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl,
+QDF_STATUS wmi_extract_p2p_noa_ev_param(wmi_unified_t wmi_handle,
 					void *evt_buf,
 					struct p2p_noa_info *param);
 
 /**
  * wmi_send_set_mac_addr_rx_filter_cmd() - set mac addr rx filter cmd
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @param: Pointer to set mac filter struct
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
 QDF_STATUS
-wmi_send_set_mac_addr_rx_filter_cmd(void *wmi_hdl,
+wmi_send_set_mac_addr_rx_filter_cmd(wmi_unified_t wmi_handle,
 				    struct p2p_set_mac_filter *param);
 
 /**
  * wmi_extract_mac_addr_rx_filter_evt_param() - extract mac addr rx filter evt
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @evt_buf: pointer to event buffer
  * @param: Pointer to extracted evt info
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
 QDF_STATUS
-wmi_extract_mac_addr_rx_filter_evt_param(void *wmi_hdl, void *evt_buf,
+wmi_extract_mac_addr_rx_filter_evt_param(wmi_unified_t wmi_handle,
+					 void *evt_buf,
 					 struct p2p_set_mac_filter_evt *param);
 
 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
 /**
  * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @param: p2p listen offload start parameters
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_p2p_lo_start_cmd(wmi_unified_t wmi_handle,
 					struct p2p_lo_start *param);
 
 /**
  * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @vdev_id: vdev id
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
+QDF_STATUS wmi_unified_p2p_lo_stop_cmd(wmi_unified_t wmi_handle,
+				       uint8_t vdev_id);
 
 /**
  * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
@@ -107,7 +109,7 @@ QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl,
+QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(wmi_unified_t wmi_handle,
 					    void *evt_buf,
 					    struct p2p_lo_event *param);
 #endif /* FEATURE_P2P_LISTEN_OFFLOAD */

+ 78 - 50
wmi/inc/wmi_unified_pmo_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 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
@@ -33,21 +33,23 @@
 #ifdef FEATURE_WLAN_D0WOW
 /**
  *  wmi_unified_d0wow_enable_send() - WMI d0 wow enable function
- *  @param wmi_handle: handle to WMI.
+ *  @wmi_handle: handle to WMI.
  *  @mac_id: radio context
  *
  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl, uint8_t mac_id);
+QDF_STATUS wmi_unified_d0wow_enable_send(wmi_unified_t wmi_handle,
+					 uint8_t mac_id);
 
 /**
  *  wmi_unified_d0wow_disable_send() - WMI d0 wow disable function
- *  @param wmi_handle: handle to WMI.
+ *  @wmi_handle: handle to WMI.
  *  @mac_id: radio context
  *
  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl, uint8_t mac_id);
+QDF_STATUS wmi_unified_d0wow_disable_send(wmi_unified_t wmi_handle,
+					  uint8_t mac_id);
 #endif /* FEATURE_WLAN_D0WOW */
 
 /**
@@ -59,7 +61,7 @@ QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl, uint8_t mac_id);
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(wmi_unified_t wmi_handle,
 						uint32_t vdev_id,
 						uint32_t *bitmap,
 						bool enable);
@@ -79,7 +81,8 @@ QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(
+				wmi_unified_t wmi_handle,
 				uint8_t vdev_id, uint8_t ptrn_id,
 				const uint8_t *ptrn, uint8_t ptrn_len,
 				uint8_t ptrn_offset, const uint8_t *mask,
@@ -91,25 +94,27 @@ QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(void *wmi_hdl,
  * @wmi_handle: wmi handle
  * @vdev_id: vdev id
  * @multicastAddr: mcast address
- * @clearList: clear list flag
+ * @clear_list: clear list flag
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_add_clear_mcbc_filter_cmd(void *wmi_hdl,
-					 uint8_t vdev_id,
-					 struct qdf_mac_addr multicast_addr,
-					 bool clearList);
+QDF_STATUS wmi_unified_add_clear_mcbc_filter_cmd(
+					wmi_unified_t wmi_handle,
+					uint8_t vdev_id,
+					struct qdf_mac_addr multicast_addr,
+					bool clear_list);
 
 /**
  * wmi_unified_multiple_add_clear_mcbc_filter_cmd() - send multiple mcast
  *						      filter command to fw
  * @wmi_handle: wmi handle
  * @vdev_id: vdev id
- * @mcast_filter_params: mcast filter params
+ * @filter_params: mcast filter params
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_multiple_add_clear_mcbc_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_multiple_add_clear_mcbc_filter_cmd(
+				wmi_unified_t wmi_handle,
 				uint8_t vdev_id,
 				struct pmo_mcast_filter_params *filter_param);
 
@@ -118,10 +123,12 @@ QDF_STATUS wmi_unified_multiple_add_clear_mcbc_filter_cmd(void *wmi_hdl,
  * wmi_unified_wow_sta_ra_filter_cmd() - set RA filter pattern in fw
  * @wmi_handle: wmi handle
  * @vdev_id: vdev id
+ * @default_pattern: default pattern id
+ * @rate_limit_interval: rate limit interval
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(wmi_unified_t wmi_handle,
 					     uint8_t vdev_id,
 					     uint8_t default_pattern,
 					     uint16_t rate_limit_interval);
@@ -129,7 +136,7 @@ QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
 
 /**
  * wmi_unified_enable_enhance_multicast_offload() - enhance multicast offload
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @vdev_id: vdev id
  * @action: true for enable else false
  *
@@ -138,7 +145,7 @@ QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
 QDF_STATUS wmi_unified_enable_enhance_multicast_offload_cmd(
-		void *wmi_hdl, uint8_t vdev_id, bool action);
+		wmi_unified_t wmi_handle, uint8_t vdev_id, bool action);
 
 /**
  * wmi_extract_gtk_rsp_event() - extract gtk rsp params from event
@@ -149,17 +156,20 @@ QDF_STATUS wmi_unified_enable_enhance_multicast_offload_cmd(
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_extract_gtk_rsp_event(void *wmi_hdl, void *evt_buf,
+QDF_STATUS wmi_extract_gtk_rsp_event(
+	wmi_unified_t wmi_hdl, void *evt_buf,
 	struct pmo_gtk_rsp_params *gtk_rsp_param, uint32_t len);
 
 /**
  * wmi_unified_process_gtk_offload_getinfo_cmd() - send GTK offload cmd to fw
  * @wmi_handle: wmi handle
- * @params: GTK offload params
+ * @vdev_id: vdev id
+ * @offload_req_opcode: gtk offload flag
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(
+				wmi_unified_t wmi_handle,
 				uint8_t vdev_id,
 				uint64_t offload_req_opcode);
 
@@ -170,7 +180,8 @@ QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(void *wmi_hdl,
  *
  * Return: 0 for success, otherwise appropriate error code
  */
-QDF_STATUS wmi_unified_action_frame_patterns_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_action_frame_patterns_cmd(
+			wmi_unified_t wmi_handle,
 			struct pmo_action_wakeup_set_params *action_params);
 
 /**
@@ -178,10 +189,13 @@ QDF_STATUS wmi_unified_action_frame_patterns_cmd(void *wmi_hdl,
  * @wmi_handle: wmi handle
  * @vdev_id: vdev id
  * @params: GTK offload parameters
+ * @enable_offload: flag to enable offload
+ * @gtk_offload_opcode: gtk offload flag
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_send_gtk_offload_cmd(void *wmi_hdl, uint8_t vdev_id,
+QDF_STATUS wmi_unified_send_gtk_offload_cmd(wmi_unified_t wmi_handle,
+					    uint8_t vdev_id,
 					    struct pmo_gtk_req *params,
 					    bool enable_offload,
 					    uint32_t gtk_offload_opcode);
@@ -189,38 +203,42 @@ QDF_STATUS wmi_unified_send_gtk_offload_cmd(void *wmi_hdl, uint8_t vdev_id,
 /**
  * wmi_unified_enable_arp_ns_offload_cmd() - enable ARP NS offload
  * @wmi_hdl: wmi handle
- * @param: offload request
+ * @arp_offload_req: arp offload request
+ * @ns_offload_req: ns offload request
+ * @vdev_id: vdev id
  *
  * To configure ARP NS off load data to firmware
  * when target goes to wow mode.
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl,
-			   struct pmo_arp_offload_params *arp_offload_req,
-			   struct pmo_ns_offload_params *ns_offload_req,
-			   uint8_t vdev_id);
+QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(
+			wmi_unified_t wmi_handle,
+			struct pmo_arp_offload_params *arp_offload_req,
+			struct pmo_ns_offload_params *ns_offload_req,
+			uint8_t vdev_id);
 
 /**
  * wmi_unified_conf_hw_filter_cmd() - Configure hardware filter in DTIM mode
- * @opaque_wmi: wmi handle
+ * @wmi_handle: wmi handle
  * @req: request parameters to configure to firmware
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS wmi_unified_conf_hw_filter_cmd(void *opaque_wmi,
+QDF_STATUS wmi_unified_conf_hw_filter_cmd(wmi_unified_t wmi_handle,
 					  struct pmo_hw_filter_params *req);
 
 #ifdef FEATURE_WLAN_LPHB
 /**
  * wmi_unified_lphb_config_hbenable_cmd() - enable command of LPHB configuration
  * @wmi_handle: wmi handle
- * @lphb_conf_req: configuration info
+ * @params: configuration info
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(void *wmi_hdl,
-				wmi_hb_set_enable_cmd_fixed_param *params);
+QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(
+		wmi_unified_t wmi_handle,
+		wmi_hb_set_enable_cmd_fixed_param *params);
 
 /**
  * wmi_unified_lphb_config_tcp_params_cmd() - set tcp params of LPHB config req
@@ -229,17 +247,19 @@ QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_lphb_config_tcp_params_cmd(void *wmi_hdl,
-		    wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req);
+QDF_STATUS wmi_unified_lphb_config_tcp_params_cmd(
+		wmi_unified_t wmi_handle,
+		wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req);
 
 /**
  * wmi_unified_lphb_config_tcp_pkt_filter_cmd() - config LPHB tcp packet filter
  * @wmi_handle: wmi handle
- * @lphb_conf_req: lphb config request
+ * @g_hb_tcp_filter_fp: lphb config request
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(
+		wmi_unified_t wmi_handle,
 		wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp);
 
 /**
@@ -249,8 +269,9 @@ QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(void *wmi_hdl,
-		    wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req);
+QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(
+		wmi_unified_t wmi_handle,
+		wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req);
 
 /**
  * wmi_unified_lphb_config_udp_pkt_filter_cmd() - configure LPHB udp pkt filter
@@ -259,7 +280,8 @@ QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(
+		wmi_unified_t wmi_handle,
 		wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req);
 #endif /* FEATURE_WLAN_LPHB */
 
@@ -272,9 +294,10 @@ QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_enable_disable_packet_filter_cmd(void *wmi_hdl,
-							uint8_t vdev_id,
-							bool enable);
+QDF_STATUS
+wmi_unified_enable_disable_packet_filter_cmd(wmi_unified_t wmi_handle,
+					     uint8_t vdev_id,
+					     bool enable);
 
 /**
  * wmi_unified_config_packet_filter_cmd() - configure packet filter in target
@@ -286,7 +309,8 @@ QDF_STATUS wmi_unified_enable_disable_packet_filter_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_config_packet_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_config_packet_filter_cmd(
+		wmi_unified_t wmi_handle,
 		uint8_t vdev_id, struct pmo_rcv_pkt_fltr_cfg *rcv_filter_param,
 		uint8_t filter_id, bool enable);
 #endif /* WLAN_FEATURE_PACKET_FILTERING */
@@ -299,7 +323,8 @@ QDF_STATUS wmi_unified_config_packet_filter_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
+QDF_STATUS wmi_unified_wow_delete_pattern_cmd(wmi_unified_t wmi_handle,
+					      uint8_t ptrn_id,
 					      uint8_t vdev_id);
 
 /**
@@ -311,7 +336,7 @@ QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl);
+QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(wmi_unified_t wmi_handle);
 
 /**
  * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that
@@ -324,7 +349,8 @@ QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl);
  *
  * Return: QDF status
  */
-QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
+QDF_STATUS wmi_unified_wow_timer_pattern_cmd(wmi_unified_t wmi_handle,
+					     uint8_t vdev_id,
 					     uint32_t cookie, uint32_t time);
 
 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
@@ -335,7 +361,7 @@ QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
  *
  * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_enable_ext_wow_cmd(wmi_unified_t wmi_handle,
 					  struct ext_wow_params *params);
 
 /**
@@ -345,7 +371,8 @@ QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(
+				wmi_unified_t wmi_handle,
 				struct app_type2_params *appType2Params);
 
 /**
@@ -355,8 +382,9 @@ QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
-				   struct app_type1_params *app_type1_params);
+QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(
+				wmi_unified_t wmi_handle,
+				struct app_type1_params *app_type1_params);
 #endif /* WLAN_FEATURE_EXTWOW_SUPPORT */
 
 #endif /* _WMI_UNIFIED_PMO_API_H_ */

+ 7 - 11
wmi/src/wmi_unified_nan_api.c

@@ -55,11 +55,10 @@ QDF_STATUS wmi_extract_nan_event_rsp(wmi_unified_t wmi_handle, void *evt_buf,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
-					struct nan_datapath_initiator_req *req)
+QDF_STATUS
+wmi_unified_ndp_initiator_req_cmd_send(wmi_unified_t wmi_handle,
+				       struct nan_datapath_initiator_req *req)
 {
-	wmi_unified_t wmi_handle = wmi_hdl;
-
 	if (wmi_handle->ops->send_ndp_initiator_req_cmd)
 		return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle,
 								   req);
@@ -67,11 +66,10 @@ QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
-				struct nan_datapath_responder_req *req)
+QDF_STATUS
+wmi_unified_ndp_responder_req_cmd_send(wmi_unified_t wmi_handle,
+				       struct nan_datapath_responder_req *req)
 {
-	wmi_unified_t wmi_handle = wmi_hdl;
-
 	if (wmi_handle->ops->send_ndp_responder_req_cmd)
 		return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle,
 								   req);
@@ -90,11 +88,9 @@ QDF_STATUS wmi_unified_terminate_all_ndps_req_cmd(wmi_unified_t wmi_handle,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
+QDF_STATUS wmi_unified_ndp_end_req_cmd_send(wmi_unified_t wmi_handle,
 					    struct nan_datapath_end_req *req)
 {
-	wmi_unified_t wmi_handle = wmi_hdl;
-
 	if (wmi_handle->ops->send_ndp_end_req_cmd)
 		return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle,
 							     req);

+ 13 - 25
wmi/src/wmi_unified_p2p_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019 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,11 +22,9 @@
 #include <wmi_unified_priv.h>
 #include <wmi_unified_p2p_api.h>
 
-QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_p2pgo_oppps_req(wmi_unified_t wmi_handle,
 					   struct p2p_ps_params *oppps)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
 		return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
 								     oppps);
@@ -34,11 +32,9 @@ QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(wmi_unified_t wmi_handle,
 					     struct p2p_ps_params *noa)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
 		return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
 								   noa);
@@ -46,11 +42,10 @@ QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
+QDF_STATUS wmi_extract_p2p_noa_ev_param(wmi_unified_t wmi_handle,
+					void *evt_buf,
 					struct p2p_noa_info *param)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (!wmi_handle) {
 		WMI_LOGE("wmi handle is null");
 		return QDF_STATUS_E_INVAL;
@@ -64,11 +59,9 @@ QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
 }
 
 QDF_STATUS
-wmi_send_set_mac_addr_rx_filter_cmd(void *wmi_hdl,
+wmi_send_set_mac_addr_rx_filter_cmd(wmi_unified_t wmi_handle,
 				    struct p2p_set_mac_filter *param)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (!wmi_handle) {
 		WMI_LOGE("wmi handle is null");
 		return QDF_STATUS_E_INVAL;
@@ -82,11 +75,10 @@ wmi_send_set_mac_addr_rx_filter_cmd(void *wmi_hdl,
 }
 
 QDF_STATUS
-wmi_extract_mac_addr_rx_filter_evt_param(void *wmi_hdl, void *evt_buf,
+wmi_extract_mac_addr_rx_filter_evt_param(wmi_unified_t wmi_handle,
+					 void *evt_buf,
 					 struct p2p_set_mac_filter_evt *param)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (!wmi_handle) {
 		WMI_LOGE("wmi handle is null");
 		return QDF_STATUS_E_INVAL;
@@ -100,11 +92,9 @@ wmi_extract_mac_addr_rx_filter_evt_param(void *wmi_hdl, void *evt_buf,
 }
 
 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
-QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_p2p_lo_start_cmd(wmi_unified_t wmi_handle,
 					struct p2p_lo_start *param)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (!wmi_handle) {
 		WMI_LOGE("wmi handle is null");
 		return QDF_STATUS_E_INVAL;
@@ -117,10 +107,9 @@ QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
+QDF_STATUS wmi_unified_p2p_lo_stop_cmd(wmi_unified_t wmi_handle,
+				       uint8_t vdev_id)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (!wmi_handle) {
 		WMI_LOGE("wmi handle is null");
 		return QDF_STATUS_E_INVAL;
@@ -133,11 +122,10 @@ QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
+QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(wmi_unified_t wmi_handle,
+					    void *evt_buf,
 					    struct p2p_lo_event *param)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (!wmi_handle) {
 		WMI_LOGE("wmi handle is null");
 		return QDF_STATUS_E_INVAL;

+ 64 - 97
wmi/src/wmi_unified_pmo_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 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
@@ -26,11 +26,9 @@
 #include "wlan_pmo_hw_filter_public_struct.h"
 
 #ifdef FEATURE_WLAN_D0WOW
-QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
+QDF_STATUS wmi_unified_d0wow_enable_send(wmi_unified_t wmi_handle,
 					 uint8_t mac_id)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_d0wow_enable_cmd)
 		return wmi_handle->ops->send_d0wow_enable_cmd(wmi_handle,
 							      mac_id);
@@ -38,11 +36,9 @@ QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
+QDF_STATUS wmi_unified_d0wow_disable_send(wmi_unified_t wmi_handle,
 					  uint8_t mac_id)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_d0wow_disable_cmd)
 		return wmi_handle->ops->send_d0wow_disable_cmd(wmi_handle,
 							       mac_id);
@@ -51,13 +47,11 @@ QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
 }
 #endif /* FEATURE_WLAN_D0WOW */
 
-QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(wmi_unified_t wmi_handle,
 						uint32_t vdev_id,
 						uint32_t *bitmap,
 						bool enable)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
-
 	if (wmi_handle->ops->send_add_wow_wakeup_event_cmd)
 		return wmi_handle->ops->send_add_wow_wakeup_event_cmd(
 				wmi_handle, vdev_id, bitmap, enable);
@@ -65,15 +59,14 @@ QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(
+				wmi_unified_t wmi_handle,
 				uint8_t vdev_id, uint8_t ptrn_id,
 				const uint8_t *ptrn, uint8_t ptrn_len,
 				uint8_t ptrn_offset, const uint8_t *mask,
 				uint8_t mask_len, bool user,
 				uint8_t default_patterns)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
-
 	if (wmi_handle->ops->send_wow_patterns_to_fw_cmd)
 		return wmi_handle->ops->send_wow_patterns_to_fw_cmd(wmi_handle,
 				vdev_id, ptrn_id, ptrn,
@@ -83,13 +76,12 @@ QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl,
-			   struct pmo_arp_offload_params *arp_offload_req,
-			   struct pmo_ns_offload_params *ns_offload_req,
-			   uint8_t vdev_id)
+QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(
+			wmi_unified_t wmi_handle,
+			struct pmo_arp_offload_params *arp_offload_req,
+			struct pmo_ns_offload_params *ns_offload_req,
+			uint8_t vdev_id)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_enable_arp_ns_offload_cmd)
 		return wmi_handle->ops->send_enable_arp_ns_offload_cmd(
 				wmi_handle,
@@ -98,26 +90,24 @@ QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_add_clear_mcbc_filter_cmd(void *wmi_hdl,
-				     uint8_t vdev_id,
-				     struct qdf_mac_addr multicast_addr,
-				     bool clearList)
+QDF_STATUS wmi_unified_add_clear_mcbc_filter_cmd(
+				wmi_unified_t wmi_handle,
+				uint8_t vdev_id,
+				struct qdf_mac_addr multicast_addr,
+				bool clear_list)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_add_clear_mcbc_filter_cmd)
 		return wmi_handle->ops->send_add_clear_mcbc_filter_cmd(
-				wmi_handle, vdev_id, multicast_addr, clearList);
+			wmi_handle, vdev_id, multicast_addr, clear_list);
 
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_multiple_add_clear_mcbc_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_multiple_add_clear_mcbc_filter_cmd(
+				wmi_unified_t wmi_handle,
 				uint8_t vdev_id,
 				struct pmo_mcast_filter_params *filter_param)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_multiple_add_clear_mcbc_filter_cmd)
 		return wmi_handle->ops->send_multiple_add_clear_mcbc_filter_cmd(
 				wmi_handle, vdev_id, filter_param);
@@ -125,24 +115,21 @@ QDF_STATUS wmi_unified_multiple_add_clear_mcbc_filter_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_conf_hw_filter_cmd(void *opaque_wmi,
+QDF_STATUS wmi_unified_conf_hw_filter_cmd(wmi_unified_t wmi_handle,
 					  struct pmo_hw_filter_params *req)
 {
-	struct wmi_unified *wmi = opaque_wmi;
-
-	if (!wmi->ops->send_conf_hw_filter_cmd)
+	if (!wmi_handle->ops->send_conf_hw_filter_cmd)
 		return QDF_STATUS_E_NOSUPPORT;
 
-	return wmi->ops->send_conf_hw_filter_cmd(wmi, req);
+	return wmi_handle->ops->send_conf_hw_filter_cmd(wmi_handle, req);
 }
 
-QDF_STATUS wmi_unified_send_gtk_offload_cmd(void *wmi_hdl, uint8_t vdev_id,
+QDF_STATUS wmi_unified_send_gtk_offload_cmd(wmi_unified_t wmi_handle,
+					    uint8_t vdev_id,
 					    struct pmo_gtk_req  *params,
 					    bool enable_offload,
 					    uint32_t gtk_offload_opcode)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_gtk_offload_cmd)
 		return wmi_handle->ops->send_gtk_offload_cmd(wmi_handle,
 				vdev_id, params, enable_offload,
@@ -151,12 +138,11 @@ QDF_STATUS wmi_unified_send_gtk_offload_cmd(void *wmi_hdl, uint8_t vdev_id,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(
+				wmi_unified_t wmi_handle,
 				uint8_t vdev_id,
 				uint64_t offload_req_opcode)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_process_gtk_offload_getinfo_cmd)
 		return wmi_handle->ops->send_process_gtk_offload_getinfo_cmd(
 				wmi_handle, vdev_id, offload_req_opcode);
@@ -165,9 +151,8 @@ QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(void *wmi_hdl,
 }
 
 QDF_STATUS wmi_unified_enable_enhance_multicast_offload_cmd(
-		void *wmi_hdl, uint8_t vdev_id, bool action)
+		wmi_unified_t wmi_handle, uint8_t vdev_id, bool action)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
 	struct wmi_ops *ops;
 
 	ops = wmi_handle->ops;
@@ -178,11 +163,10 @@ QDF_STATUS wmi_unified_enable_enhance_multicast_offload_cmd(
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_extract_gtk_rsp_event(void *wmi_hdl, void *evt_buf,
+QDF_STATUS wmi_extract_gtk_rsp_event(
+	wmi_unified_t wmi_handle, void *evt_buf,
 	struct pmo_gtk_rsp_params *gtk_rsp_param, uint32_t len)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->extract_gtk_rsp_event)
 		return wmi_handle->ops->extract_gtk_rsp_event(wmi_handle,
 				evt_buf, gtk_rsp_param, len);
@@ -191,13 +175,12 @@ QDF_STATUS wmi_extract_gtk_rsp_event(void *wmi_hdl, void *evt_buf,
 }
 
 #ifdef FEATURE_WLAN_RA_FILTERING
-QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
-				uint8_t vdev_id, uint8_t default_pattern,
-				uint16_t rate_limit_interval)
+QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(wmi_unified_t wmi_handle,
+					     uint8_t vdev_id,
+					     uint8_t default_pattern,
+					     uint16_t rate_limit_interval)
 {
 
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_wow_sta_ra_filter_cmd)
 		return wmi_handle->ops->send_wow_sta_ra_filter_cmd(wmi_handle,
 			    vdev_id, default_pattern, rate_limit_interval);
@@ -207,11 +190,10 @@ QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
 }
 #endif /* FEATURE_WLAN_RA_FILTERING */
 
-QDF_STATUS wmi_unified_action_frame_patterns_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_action_frame_patterns_cmd(
+		wmi_unified_t wmi_handle,
 		struct pmo_action_wakeup_set_params *action_params)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_action_frame_patterns_cmd)
 		return wmi_handle->ops->send_action_frame_patterns_cmd(
 				wmi_handle, action_params);
@@ -220,11 +202,10 @@ QDF_STATUS wmi_unified_action_frame_patterns_cmd(void *wmi_hdl,
 }
 
 #ifdef FEATURE_WLAN_LPHB
-QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(void *wmi_hdl,
-				wmi_hb_set_enable_cmd_fixed_param *params)
+QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(
+		wmi_unified_t wmi_handle,
+		wmi_hb_set_enable_cmd_fixed_param *params)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_lphb_config_hbenable_cmd)
 		return wmi_handle->ops->send_lphb_config_hbenable_cmd(
 				wmi_handle, params);
@@ -232,11 +213,10 @@ QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_lphb_config_tcp_params_cmd(void *wmi_hdl,
-		    wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req)
+QDF_STATUS wmi_unified_lphb_config_tcp_params_cmd(
+		wmi_unified_t wmi_handle,
+		wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_lphb_config_tcp_params_cmd)
 		return wmi_handle->ops->send_lphb_config_tcp_params_cmd(
 				wmi_handle, lphb_conf_req);
@@ -244,11 +224,10 @@ QDF_STATUS wmi_unified_lphb_config_tcp_params_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(
+		wmi_unified_t wmi_handle,
 		wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd)
 		return wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd(
 				wmi_handle, g_hb_tcp_filter_fp);
@@ -256,11 +235,10 @@ QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(
+			wmi_unified_t wmi_handle,
 			wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_lphb_config_udp_params_cmd)
 		return wmi_handle->ops->send_lphb_config_udp_params_cmd(
 				wmi_handle, lphb_conf_req);
@@ -268,11 +246,10 @@ QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(
+		wmi_unified_t wmi_handle,
 		wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle->ops->send_lphb_config_udp_pkt_filter_cmd)
 		return wmi_handle->ops->send_lphb_config_udp_pkt_filter_cmd(
 				wmi_handle, lphb_conf_req);
@@ -282,11 +259,10 @@ QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(void *wmi_hdl,
 #endif /* FEATURE_WLAN_LPHB */
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING
-QDF_STATUS wmi_unified_enable_disable_packet_filter_cmd(void *wmi_hdl,
-		uint8_t vdev_id, bool enable)
+QDF_STATUS
+wmi_unified_enable_disable_packet_filter_cmd(wmi_unified_t wmi_handle,
+					     uint8_t vdev_id, bool enable)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_enable_disable_packet_filter_cmd)
 		return wmi_handle->ops->send_enable_disable_packet_filter_cmd(
 				wmi_handle, vdev_id, enable);
@@ -294,12 +270,11 @@ QDF_STATUS wmi_unified_enable_disable_packet_filter_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_config_packet_filter_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_config_packet_filter_cmd(
+		wmi_unified_t wmi_handle,
 		uint8_t vdev_id, struct pmo_rcv_pkt_fltr_cfg *rcv_filter_param,
 		uint8_t filter_id, bool enable)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_config_packet_filter_cmd)
 		return wmi_handle->ops->send_config_packet_filter_cmd(
 		wmi_handle, vdev_id, rcv_filter_param, filter_id, enable);
@@ -308,11 +283,10 @@ QDF_STATUS wmi_unified_config_packet_filter_cmd(void *wmi_hdl,
 }
 #endif /* WLAN_FEATURE_PACKET_FILTERING */
 
-QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
-					uint8_t vdev_id)
+QDF_STATUS wmi_unified_wow_delete_pattern_cmd(wmi_unified_t wmi_handle,
+					      uint8_t ptrn_id,
+					      uint8_t vdev_id)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_wow_delete_pattern_cmd)
 		return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
 								    ptrn_id,
@@ -321,21 +295,18 @@ QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
+QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(wmi_unified_t wmi_handle)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
 		return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
 
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
+QDF_STATUS wmi_unified_wow_timer_pattern_cmd(wmi_unified_t wmi_handle,
+					     uint8_t vdev_id,
 					     uint32_t cookie, uint32_t time)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_wow_timer_pattern_cmd)
 		return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle,
 							vdev_id, cookie, time);
@@ -344,11 +315,9 @@ QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
 }
 
 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
-QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_enable_ext_wow_cmd(wmi_unified_t wmi_handle,
 					  struct ext_wow_params *params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_enable_ext_wow_cmd)
 		return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
 								params);
@@ -356,11 +325,10 @@ QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(
+				wmi_unified_t wmi_handle,
 				struct app_type2_params *appType2Params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
 		return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(
 				wmi_handle, appType2Params);
@@ -368,11 +336,10 @@ QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
-				   struct app_type1_params *app_type1_params)
+QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(
+				wmi_unified_t wmi_handle,
+				struct app_type1_params *app_type1_params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
 		return wmi_handle->ops->send_app_type1_params_in_fw_cmd(
 				wmi_handle, app_type1_params);