Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1223364rdb; Wed, 20 Sep 2023 03:19:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqjA/n+kP/D18VidBZYMLp0IQ1gaB/IS+o70tFR6zl8BT92R3xZWx+r+eu3zSmrcZiqWLP X-Received: by 2002:a05:6358:50cc:b0:133:a55:7e26 with SMTP id m12-20020a05635850cc00b001330a557e26mr3130604rwm.7.1695205169354; Wed, 20 Sep 2023 03:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695205169; cv=none; d=google.com; s=arc-20160816; b=wgXjDJdxW1oLI15VNQ+Jzk4UDhrAMa++WDKkssiAzeg2i+SnLHHjjfrmCWIR4FcAbN D2zPlqWlH4TCyWMJsMUDUMLmzJPdbikmjpHd8Abk1j+Gk724DjLvP8eZhjqqY8b/w68A y3BbzRxvodpUuljwBPJAexLQJAyqbC3AiJEb8obO8ejzGUfp6vqle2XQHa3TdaH7LRYs Ju3A7FCpvGozposUdZbsptW5ji9GuEaXRmYlof7I81Y1k4QowLHPhD1vuwMsa84v3U1K p1Y0qu8UV6yUzBBwTQj2RTotePtVPZTHetQ8KaTDdmdUrYqjK6Hp2ajlAoAl1Kxu6KH6 m6eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=22gE0UneMpSPEfGCZk25Flb4zpT5bu4R4eyJz0EczH4=; fh=a9RQep1hjU/4gjvnAyyZ/jgKZXxYhr894cgqq3v+6lI=; b=qen0yh8F61uTB9FWaO3z/NqB78H4hiPDu1xt/q4BZknS/ngklaM9E7QxeisKK8RGFE nl/DxHFszDG6TMklHk+dpy35OQGRaTu+0tPhnvFyP9Hffh3AYIwBrn1gRG8W1ecgxB1o Dk8qjtekCDEI1d5vfZu+ZpHbm2BAZAwKqwez2rkSPCSVECN/MIz6bG2F4naP0QT86Dtk X04Oe2pql4QxZMV5R5rBqGE13tPY3Zq5XtMX6Hwnw1UXtaYTz3Z2niWbF5VICV3V3Kkd g6OV++p8PHtriTty9y2/Yy+34g9SRrc74JUQmtMjXuG0TUp2YEH9muTjtDjCL4z0pBEd X8vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fBTA5kXR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 14-20020a63020e000000b00578d78f2a70si1567326pgc.388.2023.09.20.03.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 03:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fBTA5kXR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 637918023934; Wed, 20 Sep 2023 01:24:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233419AbjITIYd (ORCPT + 56 others); Wed, 20 Sep 2023 04:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233508AbjITIYd (ORCPT ); Wed, 20 Sep 2023 04:24:33 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7529AF for ; Wed, 20 Sep 2023 01:24:25 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38K6e5jh029693; Wed, 20 Sep 2023 08:24:22 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=22gE0UneMpSPEfGCZk25Flb4zpT5bu4R4eyJz0EczH4=; b=fBTA5kXR4ykdCnn5mknfni2yySyMJDd2y+3URniPAl59F80woKV/8S+sJ+dsZ3tgjAv7 wTBLRS2PfjMEAe9vlVLIs7i7iB+fepwXna7/qw8RyF9yl+2MyOvSQ6LANtZN5qACuN1j cGcOb5fCPJ5p8tz9n8IgbcdckJ3qSq/zNZDq06smjoLL+wNW2lfWnBSbuV9r2p6G2tTA X4enUYgWYUzFNk0q6RQJZ1Xr85sMzBkvYlt4wgobZF+1VzbOZSatydZAsnBSBpuR+Wrb VRMVvvE/BAiwPl22jumAcCjdgZGTNwF9tUeK7ActyYk+tf91IVUa/vST2f5DcD5Mc0/q hA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t7qj90pun-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 08:24:22 +0000 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 38K8OLlU006170 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 08:24:21 GMT Received: from wgong-HP3-Z230-SFF-Workstation.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.36; Wed, 20 Sep 2023 01:24:19 -0700 From: Wen Gong To: CC: , , , Subject: [PATCH v6 08/13] wifi: ath11k: save max tx power in vdev start response event from firmware Date: Wed, 20 Sep 2023 04:23:44 -0400 Message-ID: <20230920082349.29111-9-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230920082349.29111-1-quic_wgong@quicinc.com> References: <20230920082349.29111-1-quic_wgong@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: WgkyEezJ9ZbWWCkK8DQOogcsMHjCvMBh X-Proofpoint-ORIG-GUID: WgkyEezJ9ZbWWCkK8DQOogcsMHjCvMBh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-20_02,2023-09-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 impostorscore=0 suspectscore=0 mlxlogscore=975 mlxscore=0 phishscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309200067 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 01:24:33 -0700 (PDT) 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 --- 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 42e02df0526c..ebbea4719572 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -775,6 +775,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 c427299b7202..d93ed92335c7 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5033,6 +5033,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; @@ -7425,7 +7426,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 a34a04bd4612..106e1d672b9a 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -4143,6 +4143,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.40.1