cnss2: Get hang event params over target cap qmi response
Add change to get hang event params over target cap response. With this change hard-coding of hang data address and offset is removed if valid hang data params are received over QMI. Change-Id: Ife163cf66d5880cd9a658a841e5d4a73816fd982
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
af5e427b47
commit
42f4e0431a
17
cnss2/qmi.c
17
cnss2/qmi.c
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -516,6 +516,18 @@ int cnss_wlfw_tgt_cap_send_sync(struct cnss_plat_data *plat_priv)
|
||||
plat_priv->fw_pcie_gen_switch =
|
||||
!!(resp->fw_caps & QMI_WLFW_HOST_PCIE_GEN_SWITCH_V01);
|
||||
|
||||
if (resp->hang_data_length_valid &&
|
||||
resp->hang_data_length &&
|
||||
resp->hang_data_length <= WLFW_MAX_HANG_EVENT_DATA_SIZE)
|
||||
plat_priv->hang_event_data_len = resp->hang_data_length;
|
||||
else
|
||||
plat_priv->hang_event_data_len = 0;
|
||||
|
||||
if (resp->hang_data_addr_offset_valid)
|
||||
plat_priv->hang_data_addr_offset = resp->hang_data_addr_offset;
|
||||
else
|
||||
plat_priv->hang_data_addr_offset = 0;
|
||||
|
||||
cnss_pr_dbg("Target capability: chip_id: 0x%x, chip_family: 0x%x, board_id: 0x%x, soc_id: 0x%x, otp_version: 0x%x\n",
|
||||
plat_priv->chip_info.chip_id,
|
||||
plat_priv->chip_info.chip_family,
|
||||
@@ -525,6 +537,9 @@ int cnss_wlfw_tgt_cap_send_sync(struct cnss_plat_data *plat_priv)
|
||||
plat_priv->fw_version_info.fw_version,
|
||||
plat_priv->fw_version_info.fw_build_timestamp,
|
||||
plat_priv->fw_build_id);
|
||||
cnss_pr_dbg("Hang event params, Length: 0x%x, Offset Address: 0x%x\n",
|
||||
plat_priv->hang_event_data_len,
|
||||
plat_priv->hang_data_addr_offset);
|
||||
|
||||
kfree(req);
|
||||
kfree(resp);
|
||||
|
Reference in New Issue
Block a user