Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3714480rdb; Sun, 10 Dec 2023 18:26:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKH1nGXONMnlTZYtuKnseEbaIWomlpueMfbAQxpDoXyiYUjrTklp482sq+O3UZNSpw/y4K X-Received: by 2002:a05:6870:858d:b0:1fa:f418:d071 with SMTP id f13-20020a056870858d00b001faf418d071mr3208070oal.23.1702261577462; Sun, 10 Dec 2023 18:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702261577; cv=none; d=google.com; s=arc-20160816; b=jAo+5WAgw+vkfZVplg6CoutJhZZ3AUTmqBIZe4rj/rOxy4VAwRHUiW/4kPvNBs5zhS ZXQt1Q5rJ6gStM2UJeKbdsujf1dg7j2N7fS/Cz/SMVv4T/54iXGFlEkj2rN02eqffb9s yl7dbksPB696f12KoNw3tHXZqlA/Nb8LPwJxbsvU3PPJqX45qtzwFI0DJkvGdC4fdaXj hotrj6gp/VG3RMvndkIApuN91HKJlU/1hLkrcneMN7DMzfQAWZjAvtNoHt6kGb9fPEpA ADkpxwnY2dgQSOWgJawl8zyQjCbG0o6EdHIpCqFuH5yQqLWwdAoEfTsB9jd0kPpkCmNL im0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=iQ5X4DUNJe0BI6nqEp4pBb9gnbMu/M+dpl7v2q5uUNg=; fh=ButIhbx1gSzOa5IVu79uEYTV53aLtDez71oIZPYs8ko=; b=Wh559Ki8QvjxPkVnyggg1srT5zYZupq9Peug5hwG+G0xMGH6azBArYoM71mkLdiFM0 9MhV2SIp3cs6xKMVpJOaYxwACxpIH9qbw2dEDz5FMD+lxQ2Rz2zAcCShYcu1fgc37lY+ zHyVnAZUqhJHxa0Z/id2GvCovZ4opPhwncLPJOWNdN6/e84XjElMVWAcypFUECujjhKZ kFyKe6lpVrKMaQORx+rx9kGMrw4gxPR5yXk77pTIJL2z/Y+nTjFPVsOfx2+ShKJ3c2Pl jp8o71iLLinjSmYvjeTcDqvytGhFGAiUCRz30PdM2vFP6mO3ItZHH38lvCZiVSXrEEpE /fVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=p3wwrV88; spf=pass (google.com: domain of linux-wireless+bounces-613-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-613-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k25-20020a6568d9000000b005c207717411si5278771pgt.864.2023.12.10.18.26.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 18:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-613-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=p3wwrV88; spf=pass (google.com: domain of linux-wireless+bounces-613-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-613-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 78985280C2F for ; Mon, 11 Dec 2023 02:26:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44BC0EAC9; Mon, 11 Dec 2023 02:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="p3wwrV88" 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 677EEBD for ; Sun, 10 Dec 2023 18:26:10 -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 3BB1pJFS027756; Mon, 11 Dec 2023 02:26:06 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=iQ5X4DUNJe0BI6nqEp4pBb9gnbMu/M+dpl7v2q5uUNg=; b=p3 wwrV889jcshXc8KgKWH3NFQEwRfTsFoBYWnntG3D3rC5MAkxCBo/i3LpRQJXzXln IGTRu0S6eXptmeBqzLLl2ZQouuA1pimpRF4nQWMImCkiZJLvBRyn0961xi4k/4+8 zg1l7D1FELEFM8F00+VPJL6xz7sC5a69xyG5mJL78FZ/3T0VtGAQDCja01jYkqyw WMJpMkMHrd6gEfWeE6sDK/GkL+Uvuz5SudrWeEVV1mRgrlYebdDtN9LneZF4Psn6 yWMETyR8AH3On7rjI1m0Vw8IxeUhJhA4Fd1nYgcWGw04BF9vl9MHy8XyUI3gbOSo B/zbsjNO0JOo6Vc8K2zw== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uvnuvj3a4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2023 02:26:05 +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 3BB2Q5Vq032330 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Dec 2023 02:26:05 GMT Received: from [10.231.195.68] (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 18:26:03 -0800 Message-ID: <06123d7c-8f70-4ab7-8e0d-e308caa612ec@quicinc.com> Date: Mon, 11 Dec 2023 10:26:00 +0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 12/12] wifi: ath11k: discard BSS_CHANGED_TXPOWER when EXT_TPC_REG_SUPPORT for 6 GHz Content-Language: en-US To: Aditya Kumar Singh , CC: References: <20231204081323.5582-1-quic_bqiang@quicinc.com> <20231204081323.5582-13-quic_bqiang@quicinc.com> <33d629b1-674e-42c1-8969-18fa636d370c@quicinc.com> <2337a414-4aa2-47ad-8cc4-a631de15ea6f@quicinc.com> <189b7768-4783-48e9-9a3d-a986b70a2508@quicinc.com> From: Baochen Qiang In-Reply-To: <189b7768-4783-48e9-9a3d-a986b70a2508@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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: U1KWPVRpuViI9vwSNLC_8BOp91i9-7QF X-Proofpoint-ORIG-GUID: U1KWPVRpuViI9vwSNLC_8BOp91i9-7QF 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=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312110019 On 12/7/2023 11:31 AM, Aditya Kumar Singh wrote: > On 12/6/23 11:04, Baochen Qiang wrote: >> >> >> On 12/4/2023 11:53 PM, Aditya Kumar Singh wrote: >>> On 12/4/23 13:43, Baochen Qiang wrote: >>>> From: Wen Gong >>>> >>>> When station is connected to a 6 GHz AP, it has 2 ways to configure >>>> the power limit to firmware. The first way is to send 2 WMI commands >>>> 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. >>>> >>>> When firmware support SERVICE_EXT_TPC_REG, it means firmware support >>>> the second way for WMI_VDEV_SET_TPC_POWER_CMDID, then ath11k discard >>>> BSS_CHANGED_TXPOWER flag from mac80211 which is used to the first way >>>> for 6 GHz band and select the second way. >>>> >>>> Tested-on: WCN6855 hw2.0 PCI >>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 >>>> >>>> Signed-off-by: Wen Gong >>>> Signed-off-by: Baochen Qiang >>>> --- >>> ...snip... >>>> @@ -3596,9 +3608,13 @@ static void >>>> ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw, >>>>       if (changed & BSS_CHANGED_TXPOWER) { >>>>           ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "vdev_id %i txpower %d\n", >>>>                  arvif->vdev_id, info->txpower); >>>> - >>>> -        arvif->txpower = info->txpower; >>>> -        ath11k_mac_txpower_recalc(ar); >>>> +        if (ath11k_mac_supports_station_tpc(ar, arvif, >>>> &info->chandef)) { >>>> +            ath11k_dbg(ar->ab, ATH11K_DBG_MAC, >>>> +                   "discard tx power, change to set TPC power\n"); >>>> +        } else { >>>> +            arvif->txpower = info->txpower; >>>> +            ath11k_mac_txpower_recalc(ar); >>>> +        } >>> >>> Could you check v6 once? I remember Wen told he would drop this check >>> and let FW take the min value. If we do like this, then user could >>> not set his own desired value even if that is well inside the reg >>> limits. >> I did notice this comment in V6, but came out of a different opinion: >> it is OK to discard the TX power here, because that will be sent to >> firmware using WMI_VDEV_SET_TPC_POWER_CMDID command in another patch. >> Please correct me if wrong. > Yeah that is correct but applies only during initial bring up. What if > after client gets connected and user still wants to lower power level by > giving command "iw wlanX set txpower fixed 1000" something like this? > This time again it will be ignored but it won't be sent to FW. Exactly, will drop this patch in V9. >