Selaa lähdekoodia

qcacmn: Fix wifi_pos_send_rsp pointer cast

Update the wifi_pos_send_rsp function pointer cast to have the
same parameters as the actual function pointer.

Change-Id: I7e9f5f9972fe96f74c76ffb0fa069a93c98db72b
CRs-fixed: 2685627
Lincoln Tran 5 vuotta sitten
vanhempi
sitoutus
64db569708

+ 3 - 2
umac/wifi_pos/inc/wifi_pos_api.h

@@ -25,6 +25,7 @@
 
 /* Include files */
 #include "wifi_pos_utils_pub.h"
+#include "../src/wifi_pos_utils_i.h"
 
 /* forward reference */
 struct wlan_objmgr_psoc;
@@ -159,8 +160,8 @@ struct wifi_pos_req_msg {
  * Return: status of operation
  */
 QDF_STATUS ucfg_wifi_pos_process_req(struct wlan_objmgr_psoc *psoc,
-		struct wifi_pos_req_msg *req,
-		void (*send_rsp_cb)(uint32_t, uint32_t, uint32_t, uint8_t *));
+				     struct wifi_pos_req_msg *req,
+				     wifi_pos_send_rsp_handler send_rsp_cb);
 
 /**
  * wifi_pos_init: initializes WIFI POS component, called by dispatcher init

+ 1 - 1
umac/wifi_pos/src/wifi_pos_main.c

@@ -776,7 +776,7 @@ int wifi_pos_oem_rsp_handler(struct wlan_objmgr_psoc *psoc,
 	uint32_t app_pid;
 	struct wifi_pos_psoc_priv_obj *priv =
 					wifi_pos_get_psoc_priv_obj(psoc);
-	void (*wifi_pos_send_rsp)(uint32_t, uint32_t, uint32_t, uint8_t *);
+	wifi_pos_send_rsp_handler wifi_pos_send_rsp;
 
 	if (!priv) {
 		wifi_pos_err("private object is NULL");

+ 2 - 3
umac/wifi_pos/src/wifi_pos_ucfg.c

@@ -26,9 +26,8 @@
 #include "wlan_ptt_sock_svc.h"
 
 QDF_STATUS ucfg_wifi_pos_process_req(struct wlan_objmgr_psoc *psoc,
-		struct wifi_pos_req_msg *req,
-		void (*send_rsp_cb)(uint32_t, enum wifi_pos_cmd_ids,
-		uint32_t, uint8_t *))
+				     struct wifi_pos_req_msg *req,
+				     wifi_pos_send_rsp_handler send_rsp_cb)
 {
 	uint8_t err;
 	uint32_t app_pid;

+ 3 - 3
umac/wifi_pos/src/wifi_pos_ucfg_i.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017, 2020 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
@@ -41,7 +41,7 @@ struct wifi_pos_req_msg;
  * Return: status of operation
  */
 QDF_STATUS ucfg_wifi_pos_process_req(struct wlan_objmgr_psoc *psoc,
-		struct wifi_pos_req_msg *req,
-		void (*send_rsp_cb)(uint32_t, uint32_t, uint32_t, uint8_t *));
+				     struct wifi_pos_req_msg *req,
+				     wifi_pos_send_rsp_handler send_rsp_cb);
 
 #endif /* _WIFI_POS_UCFG_H_ */

+ 4 - 2
umac/wifi_pos/src/wifi_pos_utils_i.h

@@ -207,6 +207,9 @@ struct wifi_pos_dma_rings_cfg {
 	void *srng;
 };
 
+typedef void (*wifi_pos_send_rsp_handler)(uint32_t, enum wifi_pos_cmd_ids,
+					  uint32_t, uint8_t *);
+
 /**
  * struct wifi_pos_psoc_priv_obj - psoc obj data for wifi_pos
  * @app_pid: pid of app registered to host driver
@@ -278,8 +281,7 @@ struct wifi_pos_psoc_priv_obj {
 	bool oem_6g_support_disable;
 	QDF_STATUS (*wifi_pos_req_handler)(struct wlan_objmgr_psoc *psoc,
 				    struct wifi_pos_req_msg *req);
-	void (*wifi_pos_send_rsp)(uint32_t, enum wifi_pos_cmd_ids,
-				  uint32_t, uint8_t *);
+	wifi_pos_send_rsp_handler wifi_pos_send_rsp;
 	void (*wifi_pos_get_phy_mode)(uint8_t, uint32_t, uint32_t *);
 	void (*wifi_pos_get_fw_phy_mode_for_freq)(uint32_t, uint32_t,
 						  uint32_t *);