Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1075772rdh; Mon, 25 Sep 2023 02:27:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9G7mNswctK12pqF9COdLalaIPAwk2nKirRjmZfMpj74tLbuE6Z6X5apjT+5HvzD1kLwQq X-Received: by 2002:a05:6a21:9996:b0:14c:ca25:3b53 with SMTP id ve22-20020a056a21999600b0014cca253b53mr5013239pzb.27.1695634030831; Mon, 25 Sep 2023 02:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695634030; cv=none; d=google.com; s=arc-20160816; b=YE2LZVH56+c3qj1q3hzeXY2S5gbmxS2moYKEKOW6aAUISPwT7SHdcLZU18+aIevPI9 j8iij2WNLvFmY/eamBU4aoJXNmsQU75RnFSaILpIhe0ZgBS5camlsjBoP7FPn7SB58Hg gMld/jR++5wqsCWpQ1feGYlRUG0wNMfpqTvnd4iKH1R3IQb92JJvWe/0z/kEnxbQOkmB WN+BvwqYf72gYLGJyga3guiOVWJCgVdEYUaBj+oj1HOXcYTgvRLB43Sw67MmKF+irqdT r3RnkR4phBsgvXjP6nIOWcfufuf2eDdViUN4E/xl6SGdtO9D/ZbHn9bRvBULR2ojUuoB jrIQ== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EIUxD9SZcufmEDOSneOgGCFeMWo6xO3+8PnvzM8rsdY=; fh=80A7fuSME+wBGjpxA3/LEcYXj9i0vCe/2UKtsLOgrhw=; b=uB6+2rP8Rp/hI6EYyIIKtzizkMSXJvRHLBEqA2NOhcZdUQSQE3W4qiRODqB30TFDaa 59V2P8ggk9ZmUU7Jpzd2HLu3F8eEpMiuIHQ3g6mi9FHrDR/Lq8wKHxpxByO3m8oovuS+ JKwtmg2fM9YEDt7+BnTmliVVi7e7uU04RE+UWfmHEgigH1asqOVLdx4LPZ6rWEroXbqq WVzkYdZ06Q3/LEXTf7jUw0iiHwvZDXA/ZCC2Stam44UHVwuNmRK/Q62idQtEGSvTT2S/ Fevb48w6oZQWN3KxYdDU48wV2L0Ajx/2luThdLjM43IBu1CC7ZtN/85V0Eb/y+nVGAro yKOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=eXZ+Tdnc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g64-20020a636b43000000b00578fe1bdfcasi9367546pgc.860.2023.09.25.02.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 02:27:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=eXZ+Tdnc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id AF7638029D3D; Sun, 24 Sep 2023 19:16:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231421AbjIYCQK (ORCPT + 56 others); Sun, 24 Sep 2023 22:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjIYCQJ (ORCPT ); Sun, 24 Sep 2023 22:16:09 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E3ADC6 for ; Sun, 24 Sep 2023 19:16:03 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38P2EGUB003550; Mon, 25 Sep 2023 02:15:49 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=EIUxD9SZcufmEDOSneOgGCFeMWo6xO3+8PnvzM8rsdY=; b=eXZ+Tdnc791kqSdKn8ZB8c5A56QQPVdb2re35zDogKeiInwKFThIyZzE/utgp0euaN/V P2yv73H/0q+EDkfmluVZoqfVt4ZH8Ij4LLOocrfWp072IcFsVHxgmvMRzxZgwQDi9TDf rZiLU1wGYdI1gtQTYjHk+wVNBVahBR1AOWXs587+KgErTU/vbGFAYSHJV/OECkbCcsEH IUpzmFCQSwI4Rvz0vkrJpSlX0gVxtI/Wl1wwiI8JzRN8wl9+AeUZY+Iymvkg6Y0hM+M/ KzeTedsyXtWoaevdFHtOu+MaZ+mtmgrfLkz4ufoStSmsG+WZJCTnRlCGT+Wto9Hmt14+ bQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tajapgwst-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2023 02:15:49 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38P2Fm9s006759 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2023 02:15:48 GMT Received: from [10.231.195.204] (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; Sun, 24 Sep 2023 19:15:46 -0700 Message-ID: <145e9534-6610-9c11-b2b9-87fb8e50ef81@quicinc.com> Date: Mon, 25 Sep 2023 10:15:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v6 13/13] wifi: ath11k: send TPC power to firmware for 6 GHz station To: Aditya Kumar Singh , CC: , , References: <20230920082349.29111-1-quic_wgong@quicinc.com> <20230920082349.29111-14-quic_wgong@quicinc.com> <60aaa1fc-99cf-476c-af51-e5ad425792f9@quicinc.com> Content-Language: en-US From: Wen Gong In-Reply-To: <60aaa1fc-99cf-476c-af51-e5ad425792f9@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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-ORIG-GUID: iqi3JornSTpE9WFtoQvfefM_oX1yCIZ1 X-Proofpoint-GUID: iqi3JornSTpE9WFtoQvfefM_oX1yCIZ1 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-24_21,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 phishscore=0 spamscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309250011 X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Sun, 24 Sep 2023 19:16:06 -0700 (PDT) On 9/22/2023 9:25 PM, Aditya Kumar Singh wrote: > On 9/22/23 15:42, Wen Gong wrote: >> On 9/22/2023 5:24 PM, Aditya Kumar Singh wrote: >>> 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? >> >> This has been discussed before here per question of Johannes:"Could >> this information change? Should we track it in beacons?": >> >> [PATCH 9/9] mac80211: save transmit power envelope element and power >> constraint >> >> https://lore.kernel.org/linux-wireless/38e7d9d2eebafa7245a36a0a0396094526eb3efd.camel@sipsolutions.net/ >> > That's fine. That's w.r.t to TX power change. I'm saying here about > CSA? What when AP tries to switch channel? For that client need not > disassociate and associate back right? > > In that case, channel context in mac80211 layer will change. But our > driver's arvif->chanctx will have previous one only. We are using > channel context to get the ieee80211_channel which has the PSD value, > and that value we are sending to firmware via TPC command during > intial association time. So when channel changes, firmware also should > be updated with the latest PSD values via TPC command for the latest > channel right? > You are right. CSA may be change channel bandwidth. Currently we could keep NOT support CSA as well as CSA for MLO since these are the basic TPC support feature. We could make new patch later to support CSA fro TPC power, OK? > >