Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3782578rdb; Sun, 10 Dec 2023 22:23:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwhZjUeyFLtPKFHMu7Xc8Vo+KyQKlb4l8tznIckC04Xi5PCjwZ0mMm4erJAOWw4nBwxwVC X-Received: by 2002:a05:6214:2af:b0:67a:a721:7219 with SMTP id m15-20020a05621402af00b0067aa7217219mr6008570qvv.54.1702275789171; Sun, 10 Dec 2023 22:23:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702275789; cv=none; d=google.com; s=arc-20160816; b=P0F2ygjx4xi+ZH3HllrScjnwpecVQWVMvN6EUDFT5j8WVovrvgCiEeP4gArgAyQnNu Nf1WlvBAiCTjtuK4QNWddXDNqw33rmYXXtPisaPMR2+rKbI00lWUfCrHEchP3a9vIjDg GpgO0pOMnkZRQegmlE23ipeluNdqVaeR5SfnsGl7bnqiW9N2rxx6GftV6Nr3slDoZGgI ms2xgzuREjAj+laVoUesZqmksJEHsHoiNQeJl47svHDErrGOQHmC/9y7RopAzXLxT0xn nfZQwn3Pzb+znk838iNYfooHmEGDpVpyiyCAgiExGZjv89QaAGhhbd/8fHEMBYEnBbIl zA6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3FKKOtT3ghXlTeGmxZmNCED6IGTSmKOD7cChKg3LS/I=; fh=HNEfiow5aIDtnUkYYiB/tbonwaEcG8+i6SMa583BOko=; b=V6yDT5ls8B7PjXSE172ihDQj8mx3Sn+Tjm0V3jqKOk5Ifo8+RTPPBZjxHvm34HTsbL zukRkvCwDNpPxEyC/77iR/sdsQDiNxiljAF5ZMg7rS9Wx9Tbpo5MA89QQez6obESHfkx OtdFrZg5fV94DkXtGXIblOAshQSTrG7DEr/PQqQwQ0RornAQDK3YS5H5vI3n3TuKeifO EpCxPiHA/MHpaddAQdrmg79JBL4kM71/It5xJxxe4gWzePrfjo/Dn0b6ypVQ5kL6HKZx Y1P/CJ3HsNyB5EiZSG51L6MqdGjJRhz0MhYWrIDSavnSVuy2RVneMyRKw9h8nv19XvNJ CiBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YEySVESs; spf=pass (google.com: domain of linux-wireless+bounces-625-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-625-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r18-20020ad44052000000b0067abd18c974si7753277qvp.325.2023.12.10.22.23.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 22:23:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-625-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YEySVESs; spf=pass (google.com: domain of linux-wireless+bounces-625-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-625-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E83B51C208D9 for ; Mon, 11 Dec 2023 06:23:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32A4D2033E; Mon, 11 Dec 2023 06:22:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="YEySVESs" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB5DBCD for ; Sun, 10 Dec 2023 22:22:39 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BB4d2T6006602; Mon, 11 Dec 2023 06:22:37 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-transfer-encoding:content-type; s= qcppdkim1; bh=3FKKOtT3ghXlTeGmxZmNCED6IGTSmKOD7cChKg3LS/I=; b=YE ySVESsPIxbrbLoiMgKnEzni7IoN+LI7tiIaX2rC9bKuIbTBRh2Q5szBXqLQW6Iji WVYiCPrXUfKqpqcB6zLg+raSgMNTgPVaFtuCkzQKSustvEvJmdavTdMNOW6AZMnw eW1RSgvHjTapGp7D1Qyr2/kfXCl4zt7eFruqINRgxy6SRt9mPWM8BHqZNaVK9Nbr bIGAtkbxsd8m+s4M9hSVG+24tothg8amvjydmG9s/g7rcoPV8m2pUNt76W/NJ/ce Ln0dIHPEP9MrqFSapynAHMvj0yhoyzROpa/7kspwt9t+JKEW2jaAx6RY2IADPXtM ff/o7XPfjelC5RGgIsaQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uvnuvjf2y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2023 06:22:37 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BB6Mab1010083 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2023 06:22:36 GMT Received: from bqiang-Celadon-RN.qca.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sun, 10 Dec 2023 22:22:35 -0800 From: Baochen Qiang To: CC: Subject: [PATCH v9 08/12] wifi: ath11k: save max tx power in vdev start response event from firmware Date: Mon, 11 Dec 2023 14:22:12 +0800 Message-ID: <20231211062216.382164-9-quic_bqiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231211062216.382164-1-quic_bqiang@quicinc.com> References: <20231211062216.382164-1-quic_bqiang@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Ybrm31w9hOgXE6Uxj5yhLSKt5L2z-E1C X-Proofpoint-ORIG-GUID: Ybrm31w9hOgXE6Uxj5yhLSKt5L2z-E1C X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 malwarescore=0 phishscore=0 mlxscore=0 clxscore=1015 bulkscore=0 impostorscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 mlxlogscore=986 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312110051 From: Wen Gong Save the max tx power received in the vdev start response event from firmware. A subsequent patch will use this to calculate the final power value for WMI_VDEV_SET_TPC_POWER_CMDID. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Signed-off-by: Wen Gong Acked-by: Jeff Johnson Signed-off-by: Baochen Qiang --- v9: no change. v8: add s-o-b tag v7: no change. drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/wmi.c | 3 ++- drivers/net/wireless/ath/ath11k/wmi.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 7774e487abcf..bc125a2c1eac 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -777,6 +777,7 @@ struct ath11k { /* protected by conf_mutex */ bool ps_state_enable; bool ps_timekeeper_enable; + s8 max_allowed_tx_power; }; struct ath11k_band_cap { diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index cd879eae6c92..4bdb71287f07 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5036,6 +5036,7 @@ static int ath11k_pull_vdev_start_resp_tlv(struct ath11k_base *ab, struct sk_buf vdev_rsp->mac_id = ev->mac_id; vdev_rsp->cfgd_tx_streams = ev->cfgd_tx_streams; vdev_rsp->cfgd_rx_streams = ev->cfgd_rx_streams; + vdev_rsp->max_allowed_tx_power = ev->max_allowed_tx_power; kfree(tb); return 0; @@ -7430,7 +7431,7 @@ static void ath11k_vdev_start_resp_event(struct ath11k_base *ab, struct sk_buff } ar->last_wmi_vdev_start_status = 0; - + ar->max_allowed_tx_power = vdev_start_resp.max_allowed_tx_power; status = vdev_start_resp.status; if (WARN_ON_ONCE(status)) { diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index fa85e6eb4ab4..a9a7d81236cb 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -4119,6 +4119,7 @@ struct wmi_vdev_start_resp_event { }; u32 cfgd_tx_streams; u32 cfgd_rx_streams; + s32 max_allowed_tx_power; } __packed; /* VDEV start response status codes */ -- 2.25.1