Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2815641rdb; Fri, 22 Sep 2023 09:04:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFljijRpOcKyjREtkQjYyPMzOqirWLCGJmeOYhoi3TAU/triJ1V8qBQ7ir54HiGOYhrB1tG X-Received: by 2002:a05:6358:9313:b0:141:3fd:2441 with SMTP id x19-20020a056358931300b0014103fd2441mr16411rwa.30.1695398687585; Fri, 22 Sep 2023 09:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695398687; cv=none; d=google.com; s=arc-20160816; b=e/2JKxBttkdHk88wsjMlGK0+bd+BKAf5k1d01JGo70K1OdVlKWlK57Cfu/WPvJh6TG qZSjsR/oI/2dKzSCDY3pBiEh2z/v3+gYFobh95h4nVe8BV470FQhAW2nL+WtseWU6RJA 3Y84urpOFvSVTLaZXiBxV5lUC+SqUtlD2L/YocdxvbvF8KU80ngqt6Ux+q+woq1WUS57 HDV1mkv0YL/ejf1mt3nJG3mG0N9D9LSvGQA2hwR9tRVVyVxIlqqzIB8+YgwutvXCFASN 3t4PZOTlVxbrLOLuZBRh+vfYFL/QwgLnOoBjqt9rLZSIUtzQcVqalOiOIPtpUt/2d+GE 32Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/eKwPIz2gXZ4b63PmpgUAmyLWGcBGO8dMc3g3NXXtXc=; fh=75CDHJDuowxspHrWYGyFkxqtTsCAv36FxKet5aSzFkk=; b=Kq8c3DIHSZXZyerr85y/iVaNviYViCTTjM5j8BHsq7X8BCEOjtMgqhSNDZXu9iErmk RF/HHPG/rUr6jXB5R+x5UfSL0X00E656Fmy/jys1ZtQ6kDxL44yvoglb1sUyzoxoTb2J PVij/adKx94M2gHYJcksnMqRWmzkmO/F5xufenlkjK31pRGUfmDHT2wFnIf57SIxy3qa ZB3Lj6IrH3AbozkCr08Yxu+aLoDHOAk98iw7K1PWzHEJKx37m9dYjXSo7AY0DNuDVFb4 mM7BEjAnop9BPiIbITMHRcS8GcHJu98l6fChtbQyFBX9uanmo+SlTmCCwrRh08y/lChP OJ1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=n+87IQ23; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id m1-20020a656a01000000b0057749f3cbe1si4460677pgu.673.2023.09.22.09.04.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 09:04:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=n+87IQ23; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id E5E8D8237872; Fri, 22 Sep 2023 02:24:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbjIVJYj (ORCPT + 56 others); Fri, 22 Sep 2023 05:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjIVJYi (ORCPT ); Fri, 22 Sep 2023 05:24:38 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11861196 for ; Fri, 22 Sep 2023 02:24:32 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38M90PQO010273; Fri, 22 Sep 2023 09:24:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=/eKwPIz2gXZ4b63PmpgUAmyLWGcBGO8dMc3g3NXXtXc=; b=n+87IQ23QN7boezVPSvHEvhv2CF9u6Ots9gGqWGwlleLVoEhqkJIEHYA+JOfDmGSc+dl gPorWOlFwB9zj01OlM/9kwMzw75GlQM6ctflL9Mixsw+ZUNC1qXBK7inEBy1Db3U3WKp 0Q7heRt4041WhdurqOif1tI9iUgbTEQ1hZxUdlJzIf6X33TdyIgqYV7tLL1L1n7yWKzx QG1dPBG/iDdiiHAaDLrKzH5yf8/Yr1AVDQ6SE/mOk1OpSXp15/AH+o9NOLBinhfUl20H Ao558J70f4499I6+JCmjuH6oWL7FatyrpE4wHskRzDOnFsQt4WOXzc9mDkmAff6W6Acf eQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t8u6rse3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 09:24:26 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38M9OPMM012809 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 09:24:25 GMT Received: from [10.216.13.153] (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; Fri, 22 Sep 2023 02:24:22 -0700 Message-ID: Date: Fri, 22 Sep 2023 14:54:19 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 13/13] wifi: ath11k: send TPC power to firmware for 6 GHz station Content-Language: en-US To: Wen Gong , CC: , , References: <20230920082349.29111-1-quic_wgong@quicinc.com> <20230920082349.29111-14-quic_wgong@quicinc.com> From: Aditya Kumar Singh In-Reply-To: <20230920082349.29111-14-quic_wgong@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] 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: JguvL1PUYhKVDAg9hTNwREq6eKpVXBEj X-Proofpoint-ORIG-GUID: JguvL1PUYhKVDAg9hTNwREq6eKpVXBEj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-22_07,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 mlxlogscore=999 impostorscore=0 malwarescore=0 mlxscore=0 spamscore=0 bulkscore=0 phishscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309220077 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 02:24:45 -0700 (PDT) On 9/20/23 13:53, Wen Gong wrote: > When station is connected to a 6 GHz AP, it has 2 way to configure > the power limit to firmware. The first way is to send 2 wmi command > WMI_PDEV_PARAM_TXPOWER_LIMIT2G/WMI_PDEV_PARAM_TXPOWER_LIMIT5G to > firmware, the second way is to send WMI_VDEV_SET_TPC_POWER_CMDID to > firmware which include more parameters for power control. > > The first way is disabled in previous patch > "ath11k: discard BSS_CHANGED_TXPOWER when EXT_TPC_REG_SUPPORT for 6 GHz". > > Prepare the parameter for wmi command WMI_VDEV_SET_TPC_POWER_CMDID and > send the firmware after vdev start response success from firmware, it > is for the second way of power control. > > 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/mac.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c > index a8ae281d2635..f8b907a758b1 100644 > --- a/drivers/net/wireless/ath/ath11k/mac.c > +++ b/drivers/net/wireless/ath/ath11k/mac.c > @@ -7296,6 +7296,12 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, > return ret; > } > > + if (ath11k_mac_supports_station_tpc(ar, arvif, chandef)) { > + ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx); So we are passing local copy of channel context stored in arvif->chanctx. Do we need to update it when channel changes? I see that during assignment time, we are copying/updating it and accordingly the command will be sent to firmware, but what about when STA moves channel? arvif->chanctx should be updated and tpc command should be sent again in that case? > + ath11k_wmi_send_vdev_set_tpc_power(ar, arvif->vdev_id, > + &arvif->reg_tpc_info); > + } > + > if (!restart) > ar->num_started_vdevs++; > > @@ -8108,7 +8114,7 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, > if (power_type == IEEE80211_REG_UNSET_AP) > power_type = IEEE80211_REG_LPI_AP; > ath11k_reg_handle_chan_list(ab, reg_info, power_type); > - > + arvif->chanctx = *ctx; > ath11k_mac_parse_tx_pwr_env(ar, vif, ctx); > } >