From patchwork Fri Nov 3 09:37:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaradhana Sahu X-Patchwork-Id: 13444428 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B810C4167D for ; Fri, 3 Nov 2023 09:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347245AbjKCJi1 (ORCPT ); Fri, 3 Nov 2023 05:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347220AbjKCJi0 (ORCPT ); Fri, 3 Nov 2023 05:38:26 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66342D47 for ; Fri, 3 Nov 2023 02:38:21 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A35qDtl031566; Fri, 3 Nov 2023 09:38:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=ixZh+eIbdHoJaWNN+NS3RAujvvs+h42kb1oCjsNDURI=; b=QKORiM8ulozhxE2moP7YODFaPOCS0/QEjGLimx9rqR4Jo+1K2PX80nbBsC10zjNMCwJQ vtea6ewexcA5SlS7QB/zXUoFyX1uqayv6lsQCikEJkNduhZdX6YaAwa/mCo8upOy5Wqk ZV8jWw7YlY1p8YKgk8cYLJe3cB/C5M9BM+32CQScHLVpwpVESCyT6e083AHbUMs2VphL Ysx1f/G5wXe1WzvJxW462RrOd2uvLCjE1F73+QES/fmEjp6AHU5Ab6XujUBfOxMiT7FD SRA0eIfWA2bZmL4jiIwvyqO/PCU4crDhvnzjMUU16VEGIFl3qI+i6GiagRsWfPyMVdbl tg== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u4qfygsvm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Nov 2023 09:38:16 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3A39cFWc026463 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 3 Nov 2023 09:38:15 GMT Received: from aarasahu-linux.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Fri, 3 Nov 2023 02:38:13 -0700 From: Aaradhana Sahu To: CC: , Rajat Soni , Aaradhana Sahu Subject: [PATCH v2 4/4] wifi: ath12k: Fill pdev id for fw test cmd Date: Fri, 3 Nov 2023 15:07:46 +0530 Message-ID: <20231103093746.24146-5-quic_aarasahu@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231103093746.24146-1-quic_aarasahu@quicinc.com> References: <20231103093746.24146-1-quic_aarasahu@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: S6SVqsa5Dobr4W87QDVuZd6b3RSOvqtt X-Proofpoint-GUID: S6SVqsa5Dobr4W87QDVuZd6b3RSOvqtt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-03_09,2023-11-02_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 mlxscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311030079 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Rajat Soni Currently pdev id is not set properly that can cause crash if pdev id is not equal to the pdev id when firmware test command is run during AP bring up or ping. Set pdev id in function ath12k_tm_cmd_wmi to resolve this issue. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00126-QCAHKSWPL_SILICONZ-1 Signed-off-by: Rajat Soni Signed-off-by: Aaradhana Sahu --- drivers/net/wireless/ath/ath12k/testmode.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/testmode.c b/drivers/net/wireless/ath/ath12k/testmode.c index cc5e482049a5..64f76e87064d 100644 --- a/drivers/net/wireless/ath/ath12k/testmode.c +++ b/drivers/net/wireless/ath/ath12k/testmode.c @@ -318,9 +318,10 @@ static int ath12k_tm_cmd_wmi(struct ath12k *ar, struct nlattr *tb[]) { struct ath12k_wmi_pdev *wmi = ar->wmi; struct sk_buff *skb; - u32 cmd_id, buf_len; - int ret; + struct wmi_pdev_set_param_cmd *cmd; + int ret, tag; void *buf; + u32 cmd_id, buf_len; mutex_lock(&ar->conf_mutex); @@ -345,6 +346,12 @@ static int ath12k_tm_cmd_wmi(struct ath12k *ar, struct nlattr *tb[]) cmd_id = nla_get_u32(tb[ATH_TM_ATTR_WMI_CMDID]); + cmd = buf; + tag = le32_get_bits(cmd->tlv_header, WMI_TLV_TAG); + + if (tag == WMI_TAG_PDEV_SET_PARAM_CMD) + cmd->pdev_id = cpu_to_le32(ar->pdev->pdev_id); + ath12k_dbg(ar->ab, ATH12K_DBG_TESTMODE, "testmode cmd wmi cmd_id %d buf length %d\n", cmd_id, buf_len);