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

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

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

Change-Id: I96309658dd12964c74062418a2b32deb1e915c10
CRs-Fixed: 2482632
Himanshu Batra 5 éve
szülő
commit
213192233b

+ 16 - 12
wmi/inc/wmi_unified_reg_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
@@ -26,17 +26,18 @@
 #include "reg_services_public_struct.h"
 /**
  * reg_chan_list_update_handler() - function to update channel list
- * @handle: wma handle
+ * @wmi_handle: wmi handle
  * @event_buf: event buffer
+ * @reg_info regulatory info
  * @len: length of buffer
  *
  * Return: 0 for success or error code
  */
-QDF_STATUS wmi_extract_reg_chan_list_update_event(void *wmi_hdl,
-						  uint8_t *evt_buf,
-						  struct cur_regulatory_info
-						  *reg_info,
-						  uint32_t len);
+QDF_STATUS wmi_extract_reg_chan_list_update_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct cur_regulatory_info *reg_info,
+		uint32_t len);
 
 /*
  * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan
@@ -60,14 +61,15 @@ QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle,
 
 /**
  * wmi_extract_reg_11d_new_cc_event() - function to extract the 11d new country
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @evt_buf: event buffer
  * @reg_11d_new_cc: pointer to new 11d country info
  * @len: length of buffer
  *
  * Return: 0 for success or error code
  */
-QDF_STATUS wmi_extract_reg_11d_new_cc_event(void *wmi_hdl,
+QDF_STATUS wmi_extract_reg_11d_new_cc_event(
+		wmi_unified_t wmi_handle,
 		uint8_t *evt_buf,
 		struct reg_11d_new_country *reg_11d_new_cc,
 		uint32_t len);
@@ -80,19 +82,21 @@ QDF_STATUS wmi_extract_reg_11d_new_cc_event(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_set_user_country_code_cmd_send(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_user_country_code_cmd_send(
+		wmi_unified_t wmi_handle,
 		uint8_t pdev_id, struct cc_regdmn_s *rd);
 
 /**
  * wmi_extract_reg_ch_avoid_event() - process freq avoid event
- * @wmi_hdl: wmi handle.
+ * @wmi_handle: wmi handle.
  * @evt_buf: event buffer
  * @ch_avoid_ind: buffer pointer to save the event processed data
  * @len: length of buffer
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_extract_reg_ch_avoid_event(void *wmi_hdl,
+QDF_STATUS wmi_extract_reg_ch_avoid_event(
+		wmi_unified_t wmi_handle,
 		uint8_t *evt_buf,
 		struct ch_avoid_ind_type *ch_avoid_ind,
 		uint32_t len);

+ 76 - 61
wmi/inc/wmi_unified_roam_api.h

@@ -27,7 +27,7 @@
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 /**
  * wmi_unified_set_gateway_params_cmd() - set gateway parameters
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @req: gateway parameter update request structure
  *
  * This function reads the incoming @req and fill in the destination
@@ -36,14 +36,15 @@
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
  *         error number otherwise
  */
-QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
-					struct gateway_update_req_param *req);
+QDF_STATUS
+wmi_unified_set_gateway_params_cmd(wmi_unified_t wmi_handle,
+				   struct gateway_update_req_param *req);
 #endif
 
 #ifdef FEATURE_RSSI_MONITOR
 /**
  * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @req: rssi monitoring request structure
  *
  * This function reads the incoming @req and fill in the destination
@@ -52,14 +53,15 @@ QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
  *         error number otherwise
  */
-QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
-					struct rssi_monitor_param *req);
+QDF_STATUS
+wmi_unified_set_rssi_monitoring_cmd(wmi_unified_t wmi_handle,
+				    struct rssi_monitor_param *req);
 #endif
 
 /**
  * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
  *							parameters
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @roam_req: roam rssi related parameters
  *
  * This function reads the incoming @roam_req and fill in the destination
@@ -67,12 +69,13 @@ QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
-				struct roam_offload_scan_rssi_params *roam_req);
+QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
+		wmi_unified_t wmi_handle,
+		struct roam_offload_scan_rssi_params *roam_req);
 
 /**
  * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @params: Parameters to be configured
  *
  * Pass the MAWC(Motion Aided wireless connectivity) related roaming
@@ -80,13 +83,14 @@ QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl,
-			struct wmi_mawc_roam_params *params);
+QDF_STATUS
+wmi_unified_roam_mawc_params_cmd(wmi_unified_t wmi_handle,
+				 struct wmi_mawc_roam_params *params);
 
 /**
  * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
  *                                      blacklist and preferred list
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @roam_req: roam scan lists related parameters
  *
  * This function reads the incoming @roam_req and fill in the destination
@@ -94,39 +98,41 @@ QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
-				struct roam_scan_filter_params *roam_req);
+QDF_STATUS
+wmi_unified_roam_scan_filter_cmd(wmi_unified_t wmi_handle,
+				 struct roam_scan_filter_params *roam_req);
 
 #ifdef FEATURE_WLAN_ESE
 /**
  * wmi_unified_plm_stop_cmd() - plm stop request
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @plm: plm request parameters
  *
  * This function request FW to stop PLM.
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_plm_stop_cmd(wmi_unified_t wmi_handle,
 				    const struct plm_req_params *plm);
 
 /**
  * wmi_unified_plm_start_cmd() - plm start request
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @plm: plm request parameters
+ * @gchannel_list: gchannel list
  *
  * This function request FW to start PLM.
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_plm_start_cmd(wmi_unified_t wmi_handle,
 				     const struct plm_req_params *plm,
 				     uint32_t *gchannel_list);
 #endif /* FEATURE_WLAN_ESE */
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /* wmi_unified_set_ric_req_cmd() - set ric request element
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @msg: message
  * @is_add_ts: is addts required
  *
@@ -134,38 +140,40 @@ QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
+QDF_STATUS wmi_unified_set_ric_req_cmd(wmi_unified_t wmi_handle, void *msg,
 				       uint8_t is_add_ts);
 
 /**
  * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @vdev_id: vdev id
  *
  * This function sends roam synch complete event to fw.
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_roam_synch_complete_cmd(wmi_unified_t wmi_handle,
 					       uint8_t vdev_id);
 
 /**
  * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @roaminvoke: roam invoke command
+ * @ch_hz: channel
  *
  * Send roam invoke command to fw for fastreassoc.
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
-		struct wmi_roam_invoke_cmd *roaminvoke,
-		uint32_t ch_hz);
+QDF_STATUS
+wmi_unified_roam_invoke_cmd(wmi_unified_t wmi_handle,
+			    struct wmi_roam_invoke_cmd *roaminvoke,
+			    uint32_t ch_hz);
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 
 /**
  * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @scan_cmd_fp: scan related parameters
  * @roam_req: roam related parameters
  *
@@ -174,25 +182,27 @@ QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(
+				wmi_unified_t wmi_handle,
 				wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
 				struct roam_offload_scan_params *roam_req);
 
 /**
  * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @ap_profile: ap profile params
  *
  * Send WMI_ROAM_AP_PROFILE to firmware
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
-				   struct ap_profile_params *ap_profile);
+QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(
+				wmi_unified_t wmi_handle,
+				struct ap_profile_params *ap_profile);
 
 /**
  * wmi_unified_roam_scan_offload_cmd() - set roam offload command
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @command: command
  * @vdev_id: vdev id
  *
@@ -200,7 +210,7 @@ QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_roam_scan_offload_cmd(wmi_unified_t wmi_handle,
 					     uint32_t command,
 					     uint32_t vdev_id);
 
@@ -229,15 +239,16 @@ wmi_unified_roam_scan_offload_scan_period(wmi_unified_t wmi_handle,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
-						       uint8_t chan_count,
-						       uint32_t *chan_list,
-						       uint8_t list_type,
-						       uint32_t vdev_id);
+QDF_STATUS
+wmi_unified_roam_scan_offload_chan_list_cmd(wmi_unified_t wmi_handle,
+					    uint8_t chan_count,
+					    uint32_t *chan_list,
+					    uint8_t list_type,
+					    uint32_t vdev_id);
 
 /**
  * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @rssi_change_thresh: RSSI Change threshold
  * @bcn_rssi_weight: beacon RSSI weight
  * @vdev_id: vdev id
@@ -246,63 +257,66 @@ QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
-			  uint32_t vdev_id,
-			  int32_t rssi_change_thresh,
-			  uint32_t bcn_rssi_weight,
-			  uint32_t hirssi_delay_btw_scans);
+QDF_STATUS
+wmi_unified_roam_scan_offload_rssi_change_cmd(wmi_unified_t wmi_handle,
+					      uint32_t vdev_id,
+					      int32_t rssi_change_thresh,
+					      uint32_t bcn_rssi_weight,
+					      uint32_t hirssi_delay_btw_scans);
 
 /**
  * wmi_unified_set_per_roam_config() - set PER roam config in FW
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @req_buf: per roam config request buffer
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
-		struct wmi_per_roam_config_req *req_buf);
+QDF_STATUS
+wmi_unified_set_per_roam_config(wmi_unified_t wmi_handle,
+				struct wmi_per_roam_config_req *req_buf);
 
 /**
  * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
  * configuration params
- * @wmi_hdl:  wmi handler
- * @limit_off_chan_param: pointer to wmi_limit_off_chan_param
+ * @wmi_handle:  wmi handler
+ * @wmi_param: pointer to wmi_limit_off_chan_param
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
  */
-QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_send_limit_off_chan_cmd(
+		wmi_unified_t wmi_handle,
 		struct wmi_limit_off_chan_param *wmi_param);
 
 #ifdef WLAN_FEATURE_FILS_SK
 /*
  * wmi_unified_roam_send_hlp_cmd() -send HLP command info
- * @wmi_hdl: wma handle
+ * @wmi_handle: wma handle
  * @req_buf: Pointer to HLP params
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_roam_send_hlp_cmd(wmi_unified_t wmi_handle,
 					 struct hlp_params *req_buf);
 #endif /* WLAN_FEATURE_FILS_SK */
 
 /**
  * wmi_unified_send_btm_config() - Send BTM config to fw
- * @wmi_hdl:  wmi handle
+ * @wmi_handle:  wmi handle
  * @params: pointer to wmi_btm_config
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
+QDF_STATUS wmi_unified_send_btm_config(wmi_unified_t wmi_handle,
 				       struct wmi_btm_config *params);
 
 /**
  * wmi_unified_send_bss_load_config() - Send bss load trigger params to fw
- * @wmi_hdl:  wmi handle
+ * @wmi_handle:  wmi handle
  * @params: pointer to wmi_bss_load_config
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS wmi_unified_send_bss_load_config(void *wmi_hdl,
+QDF_STATUS wmi_unified_send_bss_load_config(wmi_unified_t wmi_handle,
 					    struct wmi_bss_load_config *params);
 
 /**
@@ -330,25 +344,26 @@ wmi_unified_send_idle_roam_params(wmi_unified_t wmi_handle,
 
 /**
  * wmi_unified_offload_11k_cmd() - send 11k offload command
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @params: 11k offload params
  *
  * This function passes the 11k offload command params to FW
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_offload_11k_cmd(wmi_unified_t wmi_handle,
 				       struct wmi_11k_offload_params *params);
 /**
  * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd
- * @wmi_hdl: wmi handle
+ * @wmi_handle: wmi handle
  * @params: invoke neighbor report params
  *
  * This function passes the invoke neighbor report command to fw
  *
  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  */
-QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(
+			wmi_unified_t wmi_handle,
 			struct wmi_invoke_neighbor_report_params *params);
 
 #endif /* _WMI_UNIFIED_ROAM_API_H_ */

+ 12 - 17
wmi/src/wmi_unified_reg_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
@@ -27,14 +27,12 @@
 #include <wmi_unified_priv.h>
 #include <wmi_unified_reg_api.h>
 
-QDF_STATUS wmi_extract_reg_chan_list_update_event(void *wmi_hdl,
-						  uint8_t *evt_buf,
-						  struct cur_regulatory_info
-						  *reg_info,
-						  uint32_t len)
+QDF_STATUS wmi_extract_reg_chan_list_update_event(
+		wmi_unified_t wmi_handle,
+		uint8_t *evt_buf,
+		struct cur_regulatory_info *reg_info,
+		uint32_t len)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle && wmi_handle->ops->extract_reg_chan_list_update_event)
 		return wmi_handle->ops->extract_reg_chan_list_update_event
 			(wmi_handle,
@@ -80,13 +78,12 @@ QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle,
 }
 qdf_export_symbol(wmi_unified_send_stop_11d_scan_cmd);
 
-QDF_STATUS wmi_extract_reg_11d_new_cc_event(void *wmi_hdl,
+QDF_STATUS wmi_extract_reg_11d_new_cc_event(
+		wmi_unified_t wmi_handle,
 		uint8_t *evt_buf,
 		struct reg_11d_new_country *reg_11d_new_cc,
 		uint32_t len)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle && wmi_handle->ops->extract_reg_11d_new_country_event)
 		return wmi_handle->ops->extract_reg_11d_new_country_event(
 				wmi_handle, evt_buf, reg_11d_new_cc, len);
@@ -95,11 +92,10 @@ QDF_STATUS wmi_extract_reg_11d_new_cc_event(void *wmi_hdl,
 }
 qdf_export_symbol(wmi_extract_reg_11d_new_cc_event);
 
-QDF_STATUS wmi_unified_set_user_country_code_cmd_send(void *wmi_hdl,
+QDF_STATUS wmi_unified_set_user_country_code_cmd_send(
+		wmi_unified_t wmi_handle,
 		uint8_t pdev_id, struct cc_regdmn_s *rd)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
-
 	if (wmi_handle->ops->send_user_country_code_cmd)
 		return wmi_handle->ops->send_user_country_code_cmd(
 				wmi_handle, pdev_id, rd);
@@ -108,13 +104,12 @@ QDF_STATUS wmi_unified_set_user_country_code_cmd_send(void *wmi_hdl,
 }
 qdf_export_symbol(wmi_unified_set_user_country_code_cmd_send);
 
-QDF_STATUS wmi_extract_reg_ch_avoid_event(void *wmi_hdl,
+QDF_STATUS wmi_extract_reg_ch_avoid_event(
+		wmi_unified_t wmi_handle,
 		uint8_t *evt_buf,
 		struct ch_avoid_ind_type *ch_avoid_ind,
 		uint32_t len)
 {
-	struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
-
 	if (wmi_handle && wmi_handle->ops->extract_reg_ch_avoid_event)
 		return wmi_handle->ops->extract_reg_ch_avoid_event(
 				wmi_handle, evt_buf, ch_avoid_ind, len);

+ 56 - 87
wmi/src/wmi_unified_roam_api.c

@@ -24,11 +24,10 @@
 #include <wmi_unified_roam_api.h>
 
 #ifdef FEATURE_LFR_SUBNET_DETECTION
-QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
-					struct gateway_update_req_param *req)
+QDF_STATUS
+wmi_unified_set_gateway_params_cmd(wmi_unified_t wmi_handle,
+				   struct gateway_update_req_param *req)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_set_gateway_params_cmd)
 		return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
 								    req);
@@ -38,11 +37,10 @@ QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
 #endif /* FEATURE_LFR_SUBNET_DETECTION */
 
 #ifdef FEATURE_RSSI_MONITOR
-QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
-					struct rssi_monitor_param *req)
+QDF_STATUS
+wmi_unified_set_rssi_monitoring_cmd(wmi_unified_t wmi_handle,
+				    struct rssi_monitor_param *req)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
 		return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
 								     req);
@@ -51,12 +49,10 @@ QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
 }
 #endif /* FEATURE_RSSI_MONITOR */
 
-QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
-					struct roam_offload_scan_rssi_params
-					*roam_req)
+QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(
+		wmi_unified_t wmi_handle,
+		struct roam_offload_scan_rssi_params *roam_req)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
 		return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
 				wmi_handle, roam_req);
@@ -65,10 +61,9 @@ QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
 }
 
 QDF_STATUS wmi_unified_roam_mawc_params_cmd(
-			void *wmi_hdl, struct wmi_mawc_roam_params *params)
+			wmi_unified_t wmi_handle,
+			struct wmi_mawc_roam_params *params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_mawc_params_cmd)
 		return wmi_handle->ops->send_roam_mawc_params_cmd(wmi_handle,
 								  params);
@@ -76,11 +71,10 @@ QDF_STATUS wmi_unified_roam_mawc_params_cmd(
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
-				struct roam_scan_filter_params *roam_req)
+QDF_STATUS
+wmi_unified_roam_scan_filter_cmd(wmi_unified_t wmi_handle,
+				 struct roam_scan_filter_params *roam_req)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_filter_cmd)
 		return wmi_handle->ops->send_roam_scan_filter_cmd(wmi_handle,
 								  roam_req);
@@ -89,23 +83,19 @@ QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
 }
 
 #ifdef FEATURE_WLAN_ESE
-QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
-			  const struct plm_req_params *plm)
+QDF_STATUS wmi_unified_plm_stop_cmd(wmi_unified_t wmi_handle,
+				    const struct plm_req_params *plm)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_plm_stop_cmd)
 		return wmi_handle->ops->send_plm_stop_cmd(wmi_handle, plm);
 
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
-			  const struct plm_req_params *plm,
-			  uint32_t *gchannel_list)
+QDF_STATUS wmi_unified_plm_start_cmd(wmi_unified_t wmi_handle,
+				     const struct plm_req_params *plm,
+				     uint32_t *gchannel_list)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_plm_start_cmd)
 		return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
 							   plm,
@@ -116,11 +106,9 @@ QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
 #endif /* FEATURE_WLAN_ESE */
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
-QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
-		uint8_t is_add_ts)
+QDF_STATUS wmi_unified_set_ric_req_cmd(wmi_unified_t wmi_handle, void *msg,
+				       uint8_t is_add_ts)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_set_ric_req_cmd)
 		return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
 							     is_add_ts);
@@ -128,11 +116,9 @@ QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
-		 uint8_t vdev_id)
+QDF_STATUS wmi_unified_roam_synch_complete_cmd(wmi_unified_t wmi_handle,
+					       uint8_t vdev_id)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
 		return wmi_handle->ops->send_process_roam_synch_complete_cmd(
 				wmi_handle, vdev_id);
@@ -140,12 +126,10 @@ QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_roam_invoke_cmd(wmi_unified_t wmi_handle,
 				       struct wmi_roam_invoke_cmd *roaminvoke,
 				       uint32_t ch_hz)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_invoke_cmd)
 		return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
 							     roaminvoke,
@@ -155,12 +139,11 @@ QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
 }
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 
-QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(
+				wmi_unified_t wmi_handle,
 				wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
 				struct roam_offload_scan_params *roam_req)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
 		return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
 				wmi_handle, scan_cmd_fp, roam_req);
@@ -168,11 +151,10 @@ QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
-					   struct ap_profile_params *ap_profile)
+QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(
+				wmi_unified_t wmi_handle,
+				struct ap_profile_params *ap_profile)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
 		return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(
 				  wmi_handle, ap_profile);
@@ -180,11 +162,10 @@ QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
-					 uint32_t command, uint32_t vdev_id)
+QDF_STATUS wmi_unified_roam_scan_offload_cmd(wmi_unified_t wmi_handle,
+					     uint32_t command,
+					     uint32_t vdev_id)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_offload_cmd)
 		return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
 								   command,
@@ -204,13 +185,13 @@ wmi_unified_roam_scan_offload_scan_period(wmi_unified_t wmi_handle,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
-				   uint8_t chan_count,
-				   uint32_t *chan_list,
-				   uint8_t list_type, uint32_t vdev_id)
+QDF_STATUS
+wmi_unified_roam_scan_offload_chan_list_cmd(wmi_unified_t wmi_handle,
+					    uint8_t chan_count,
+					    uint32_t *chan_list,
+					    uint8_t list_type,
+					    uint32_t vdev_id)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
 		return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
 				  chan_count, chan_list,
@@ -219,14 +200,13 @@ QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
-	uint32_t vdev_id,
-	int32_t rssi_change_thresh,
-	uint32_t bcn_rssi_weight,
-	uint32_t hirssi_delay_btw_scans)
+QDF_STATUS
+wmi_unified_roam_scan_offload_rssi_change_cmd(wmi_unified_t wmi_handle,
+					      uint32_t vdev_id,
+					      int32_t rssi_change_thresh,
+					      uint32_t bcn_rssi_weight,
+					      uint32_t hirssi_delay_btw_scans)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
 		return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
 				  vdev_id, rssi_change_thresh,
@@ -235,11 +215,10 @@ QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
-		struct wmi_per_roam_config_req *req_buf)
+QDF_STATUS
+wmi_unified_set_per_roam_config(wmi_unified_t wmi_handle,
+				struct wmi_per_roam_config_req *req_buf)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_per_roam_config_cmd)
 		return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
 								 req_buf);
@@ -247,11 +226,10 @@ QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_send_limit_off_chan_cmd(
+		wmi_unified_t wmi_handle,
 		struct wmi_limit_off_chan_param *limit_off_chan_param)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_limit_off_chan_cmd)
 		return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle,
 				limit_off_chan_param);
@@ -260,11 +238,9 @@ QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
 }
 
 #ifdef WLAN_FEATURE_FILS_SK
-QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_roam_send_hlp_cmd(wmi_unified_t wmi_handle,
 					 struct hlp_params *req_buf)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_scan_hlp_cmd)
 		return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle,
 							       req_buf);
@@ -273,11 +249,9 @@ QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
 }
 #endif /* WLAN_FEATURE_FILS_SK */
 
-QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
+QDF_STATUS wmi_unified_send_btm_config(wmi_unified_t wmi_handle,
 				       struct wmi_btm_config *params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_btm_config)
 		return wmi_handle->ops->send_btm_config(wmi_handle,
 							params);
@@ -285,11 +259,9 @@ QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_send_bss_load_config(void *wmi_hdl,
+QDF_STATUS wmi_unified_send_bss_load_config(wmi_unified_t wmi_handle,
 					    struct wmi_bss_load_config *params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
-
 	if (wmi_handle->ops->send_roam_bss_load_config)
 		return wmi_handle->ops->send_roam_bss_load_config(wmi_handle,
 								  params);
@@ -317,11 +289,9 @@ wmi_unified_send_idle_roam_params(wmi_unified_t wmi_handle,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
-				struct wmi_11k_offload_params *params)
+QDF_STATUS wmi_unified_offload_11k_cmd(wmi_unified_t wmi_handle,
+				       struct wmi_11k_offload_params *params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_offload_11k_cmd)
 		return wmi_handle->ops->send_offload_11k_cmd(wmi_handle,
 							     params);
@@ -329,11 +299,10 @@ QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
-QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
+QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(
+			wmi_unified_t wmi_handle,
 			struct wmi_invoke_neighbor_report_params *params)
 {
-	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
-
 	if (wmi_handle->ops->send_invoke_neighbor_report_cmd)
 		return wmi_handle->ops->send_invoke_neighbor_report_cmd(
 				wmi_handle, params);