From e1846078cdfd8a4e12814b5559cb728c79b58d73 Mon Sep 17 00:00:00 2001 From: Bapiraju Alla Date: Wed, 20 Jan 2021 13:29:40 +0530 Subject: [PATCH] qcacmn: Remove duplicate set packet len for QMI event buffer For QMI events qdf_nbuf_set_pktlen is invoked twice. Once in wmi_buf_alloc and again in __wmi_process_qmi_fw_event. Remove this duplicate set packet length. Change-Id: I06c7e077fb1d554215a5ebc52f9d69a333a25a84 CRs-Fixed: 2859036 --- wmi/src/wmi_unified.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index 3984b392b7..50fc2e9c84 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2021 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 @@ -2586,11 +2586,6 @@ static int __wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len) if (!evt_buf) return -ENOMEM; - /* - * Set the length of the buffer to match the allocation size. - */ - qdf_nbuf_set_pktlen(evt_buf, len); - qdf_mem_copy(qdf_nbuf_data(evt_buf), buf, len); evt_id = WMI_GET_FIELD(qdf_nbuf_data(evt_buf), WMI_CMD_HDR, COMMANDID); wmi_debug("Received WMI_EVT_ID: %d over qmi", evt_id);