Ver código fonte

qcacld-3.0: Modify the arguments of wmi_unified_attach

The params are passed individually as argument in wmi_unified_attach.
Instead of individual params, use a struct for wmi attach params.
Also pass max commands as param in wmi attach.

CRs-Fixed: 2192801
Change-Id: I28d5985655b436da048d72d33fe0fb4f57e85a50
Surabhi Vishnoi 7 anos atrás
pai
commit
75b1a81aea
1 arquivos alterados com 10 adições e 5 exclusões
  1. 10 5
      core/wma/src/wma_main.c

+ 10 - 5
core/wma/src/wma_main.c

@@ -2894,10 +2894,9 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 	qdf_device_t qdf_dev;
 	void *wmi_handle;
 	QDF_STATUS qdf_status;
-	struct wmi_rx_ops ops;
+	struct wmi_unified_attach_params params;
 	struct policy_mgr_wma_cbacks wma_cbacks;
 	struct target_psoc_info *tgt_psoc_info;
-	bool use_cookie = false;
 	int i;
 	void *cds_context;
 	target_resource_config *wlan_res_cfg;
@@ -2975,13 +2974,19 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 	wma_target_if_open(wma_handle);
 	target_if_open(wma_get_psoc_from_scn_handle);
 
+	params.osdev = NULL;
+	params.target_type = WMI_TLV_TARGET;
+	params.use_cookie = false;
+	params.psoc = psoc;
+	params.max_commands = WMI_MAX_CMDS;
 	/* Attach mc_thread context processing function */
-	ops.wma_process_fw_event_handler_cbk = wma_process_fw_event_handler;
+	params.rx_ops->wma_process_fw_event_handler_cbk = wma_process_fw_event_handler;
+
 	/* initialize tlv attach */
 	wmi_tlv_init();
+
 	/* attach the wmi */
-	wmi_handle = wmi_unified_attach(wma_handle, NULL,
-					WMI_TLV_TARGET, use_cookie, &ops, psoc);
+	wmi_handle = wmi_unified_attach(wma_handle, &params);
 	if (!wmi_handle) {
 		WMA_LOGE("%s: failed to attach WMI", __func__);
 		qdf_status = QDF_STATUS_E_NOMEM;