diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 23487b0be26b..8e72ec1519df 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -10695,7 +10696,6 @@ static QDF_STATUS extract_profile_data_tlv(wmi_unified_t wmi_handle, { WMI_WLAN_PROFILE_DATA_EVENTID_param_tlvs *param_buf; wmi_wlan_profile_t *ev; - uint8_t *buf_ptr; param_buf = (WMI_WLAN_PROFILE_DATA_EVENTID_param_tlvs *)evt_buf; if (!param_buf) { @@ -10703,12 +10703,7 @@ static QDF_STATUS extract_profile_data_tlv(wmi_unified_t wmi_handle, return QDF_STATUS_E_INVAL; } - buf_ptr = (uint8_t *)param_buf->profile_ctx; - buf_ptr = buf_ptr + sizeof(wmi_wlan_profile_ctx_t) + WMI_TLV_HDR_SIZE; - - buf_ptr = buf_ptr + (sizeof(wmi_wlan_profile_t) * idx); - ev = (wmi_wlan_profile_t *)buf_ptr; - + ev = ¶m_buf->profile_data[idx]; profile_data->id = ev->id; profile_data->cnt = ev->cnt; profile_data->tot = ev->tot;