Received: by 2002:a05:7412:b112:b0:f9:3106:f1c0 with SMTP id az18csp128218rdb; Mon, 18 Dec 2023 00:59:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpQs6gWWu3fql8mmRfyXB+OaYMhpDM7bBb5MxR8emn0jO0tt75KnGTLZo8oETMSKGENWnG X-Received: by 2002:a05:6512:3e07:b0:50b:fcd1:2b70 with SMTP id i7-20020a0565123e0700b0050bfcd12b70mr10059710lfv.59.1702889980264; Mon, 18 Dec 2023 00:59:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702889980; cv=none; d=google.com; s=arc-20160816; b=Gy0xsz5yw83kbwfP1yCQcoewK7B95ndI2zgY86pOs+L5EAVsIZ0Y1E/ITX0/C/1YoP U20r1TQdGw3UEdSPLFIK6EKUYMjBhd015u/Q6XSK1FUpFTb5i/fwvjE3JmJMFGCE0pi7 Tm0wh4Yg5XHwf2Z3fGzyO6v6t6KsmYZFeZ1HwXiSqIf2RQyBTR+MYr+V1Zr+XnwTfaXd 1/dF8s7HyPgweIQsKBHjjaLWZmrKuBQQHrlcOUPsZk/RBgVHw8R9TDznae+eFjZsqFHJ kfXUDs6F+1dOMghxm1Lo1DgqEV9+Wyy1y00aFtLnQPJcwaEXogwhTIVJKawi52BcqDcC br7g== 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=0ImJ+PneLzphkfdx/5GgHIfr35j6cY/ykE9aBtu/Nks=; fh=HNEfiow5aIDtnUkYYiB/tbonwaEcG8+i6SMa583BOko=; b=Hp9VauOnLyleedorzI4T91y0IR+8W53fA+pmpzBMcMU4lgb0AgpszdrmD8Z+iBH+Uk PDMoIzEVE1nV5hr7tqYqu7Jhd3Hip5WXT5D32rKuE2/A0J8ozbt94s2VMH+1Ws8hZ6wy xBZzy76KRNjpv8SJzNTgw0L3r6C36aBbn2bd50JVMIW8gJEJT8vhxb/KKG/CMjwIWwUQ it+09SyAYzPv4UzWtv5i9B6+K9n4SO73hD0glzkZobUMppTv+k9Az4MQ5hNXhwZPTbzJ A5tS5HzojumHT7w8MhxYazIjUpDeCQMM7+aKTMOgoSc2kmiz47nb9WJrYiiTfhPoRixY tACw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lDxOuo9h; spf=pass (google.com: domain of linux-wireless+bounces-901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-901-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y27-20020a170906071b00b00a1db7b2db24si9431716ejb.184.2023.12.18.00.59.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 00:59:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lDxOuo9h; spf=pass (google.com: domain of linux-wireless+bounces-901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-901-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EEB971F22FA7 for ; Mon, 18 Dec 2023 08:59:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8474911CAA; Mon, 18 Dec 2023 08:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="lDxOuo9h" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2927C11CA0 for ; Mon, 18 Dec 2023 08:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BI6SNeV013819; Mon, 18 Dec 2023 08:59:07 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=0ImJ+PneLzphkfdx/5GgHIfr35j6cY/ykE9aBtu/Nks=; b=lD xOuo9hRFHlIHiYUk+IEv0Q9OQu7hU1M4YIL+IVHHgowo0ByPCDpO4Kcz9L9oOfjr 8O9TYpB2TGGaGiE91d7cqExWUCqa1g8/GWX6Uk7bmL08MN3uH4bvLoHiCwZ5t9g9 8IQdWg/oekkLH7lcuOyzJJ9GX25cv6OTiuSflSoJPf4oC+wSzW91QPZF+zKGSEkB nLqwYE8E8oqP9niApXVa7u+0YtEUuaXjGMMELtB6ShBcwHTEEDYZN/KOXJNbyQXu Z+QdRMAm9P+iT8KRNsmJzQJWNkLMW0khMKdQafQnviufD/N0lbFwiWoZds1rdE01 ct1/cECgmnmgphc53JjQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v14xy3se2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Dec 2023 08:59:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BI8x6kw004625 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Dec 2023 08:59:06 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; Mon, 18 Dec 2023 00:59:04 -0800 From: Baochen Qiang To: CC: Subject: [PATCH v10 08/12] wifi: ath11k: save max tx power in vdev start response event from firmware Date: Mon, 18 Dec 2023 16:58:40 +0800 Message-ID: <20231218085844.2658-9-quic_bqiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231218085844.2658-1-quic_bqiang@quicinc.com> References: <20231218085844.2658-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: dH5UzohA8Y8PXhPK6vyOYzGMEpnZLbrl X-Proofpoint-ORIG-GUID: dH5UzohA8Y8PXhPK6vyOYzGMEpnZLbrl 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 adultscore=0 malwarescore=0 phishscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=984 impostorscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312180063 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 --- v10: no change. 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 717b6c8897ad..593b1d17b9ba 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