Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1583393rdb; Wed, 20 Sep 2023 13:22:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtvW1ijpENeHGYQOoI2+psXN9mClonNfayqON7lSuceOaBA6liK1H2VKIGq6RkzGcAarDe X-Received: by 2002:a05:6a21:195:b0:14c:d494:77c5 with SMTP id le21-20020a056a21019500b0014cd49477c5mr4277700pzb.13.1695241331745; Wed, 20 Sep 2023 13:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695241331; cv=none; d=google.com; s=arc-20160816; b=SPwJya6XyosLVpzFIi3N0hdlfbpGhsNrAAkRqMBK8tgAHiw9bofzLpry3kQO+s2OnH orGnwynC6xPSCM5qnFa67TuBb0X1zGSzKgnp+qhMqO+cWJGp9IFrHGiRWZE1hEamfK3u EMPfj9s9M1L+HWfb1EJtdp7nR4jkfB//rJ2zXUuVBlJVq/qEaMXPRJ6WInVVMEKr08jQ BgbMRPK6I1yvQgX2ISdCbMPWnAPS3hW4hBug7v+bjFccL2wx3cRKwXTta34awnuCjSnn XbhrLbVvST4E3IbQ8dOK7OLkR3kL9alyqMe8kzqoV9MyOm9mf3AfefTwkCe4AJDUFEgx dk7w== 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=Hg02OMcJCgfMeWcl4dRBQECMF5bUoX6ksOcKFmxQwgI=; fh=a9RQep1hjU/4gjvnAyyZ/jgKZXxYhr894cgqq3v+6lI=; b=ZXvbcF3rW7szC2ZbUBXbFzg0I946LWhEjeeo+A3mVL5E3t++zkD6uyCFd4yINf8AD8 NW2EwtIXB2+xvqa0rbl6BESzsddTvNaX9GiVxNEfLg0Ekk0XnbPp5WiKbhYlGrMOmILe vaVI4tWAwYEHAtfwdhPRN72fTt7z5n3IhUbmQnE1rg0ZxxpimYeI8AUNx51ZGXAItl6O +PzN+NabJckyDGlIYDEv+LYooyE/+K26RBsmZElWnhCemfttEhEpNkYMVFjnX5YFRio0 WY6wo0mizJrcD/A4ykz6hsIT1HxJrbUJURVCFAVYDZRnzdURW3nOyh6sJwtGX08yum0x uGfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=P2yx9zIF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n5-20020a170902e54500b001c5d09c7b0bsi101694plf.486.2023.09.20.13.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 13:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=P2yx9zIF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 64E9B826A917; Wed, 20 Sep 2023 01:36:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbjITIga (ORCPT + 56 others); Wed, 20 Sep 2023 04:36:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233853AbjITIYw (ORCPT ); Wed, 20 Sep 2023 04:24:52 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0135011C for ; Wed, 20 Sep 2023 01:24:36 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38K8Ib41008570; Wed, 20 Sep 2023 08:24:33 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=Hg02OMcJCgfMeWcl4dRBQECMF5bUoX6ksOcKFmxQwgI=; b=P2yx9zIFJ8x5NjBQoiDOxrh2WipSmcmWMg2gSD4Sgy8Z9j62lCHybpXDz6YbiYaFFLSH ifjSfemvPR7bh9KS3m+nTBWOh4+VHlkNULltusLqfh5VeWhPIuUjDqmv4bOqsQRr9l8o lLGM+NRvW9YSYdO9xg0gF/zauv/ViWLb2oht3hjQLJXHOwTHcfFQZ35yAHC69xTBxMjf 07S73r6eT/tItC6y20q4NZeo5OSb9JmpYEZSzizobPzIcq4cBUEh4+qPc+0keEtGxP6P 0nfZBebG3YUe+w51OOWdRg2G9v2nKklmLX9cxs3jtZVn8DtucmV6tAiIQGxxqbl1geEd AQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t79182my7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 08:24:33 +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 38K8OWls031582 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 08:24:32 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:30 -0700 From: Wen Gong To: CC: , , , Subject: [PATCH v6 13/13] wifi: ath11k: send TPC power to firmware for 6 GHz station Date: Wed, 20 Sep 2023 04:23:49 -0400 Message-ID: <20230920082349.29111-14-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-ORIG-GUID: 2SFhI-71_y9o4sOji9avXRGOT-secx0I X-Proofpoint-GUID: 2SFhI-71_y9o4sOji9avXRGOT-secx0I 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 phishscore=0 priorityscore=1501 adultscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 bulkscore=0 impostorscore=0 suspectscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309200067 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 01:36:27 -0700 (PDT) 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); + 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); } -- 2.40.1