Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1929291iob; Thu, 19 May 2022 19:32:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPXLO3JWTUlhsTCBSlqiifikIauAJqLMWO+4UO74auRJaf+id3XVn5B0esMSjmSqJQgjfx X-Received: by 2002:a05:6a00:1a53:b0:510:a045:b92e with SMTP id h19-20020a056a001a5300b00510a045b92emr7507755pfv.64.1653013924761; Thu, 19 May 2022 19:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653013924; cv=none; d=google.com; s=arc-20160816; b=HDJkJt2KuuZl24xIHL+VKTPfyF/wxax2u9zK0REEfSL1Uda5v1Mel0cgQ6nbO1lGmj rHb1sHoDPFJSrA8QjWmey9m8o/Bc5N8Ft7namYXMf5PVd/LFo3PvZBBh8kDY4ouqPW0l E9P2yl1tlIBm6lIYbumeaD06zuUpAwbXNwpiOmaxwrtVGwSMjGpKF6k+HMTWrBsJ8Yc0 jLbcnrCO0WXxkR7EzUWrPhoPt4XO9Q0eoqjZ/ohBZJCC04GXH5n6Q55qeYPUq67LhwAY BSxmvnjLu9iS1F4hv6AaKQQZoV+SiqGRHUwKrzCXeULb0DmqG0FckuZbRQeYkQEKEsh+ RF0g== 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=qdN7kX6gtg59GiEPD4pwZac2Oz5xropt2h9Xzi0szOk=; b=i1Ssy12twGp9Av9tZSbm+BihK2g11gl422/xGw9yQWf3PKplpUApu8+HjnuMbRtdHS 35y0F1QPz2Tx8cQd99SdmfYg4wV83mC5RTKsCgTTD+5OGDo3U0Fm+c6tuGKO22FMXy63 RUGgN3P1/jRVYXdgzLQS2l0777QTx/xRu182XoTKkIK9ijfZYgaENyYQcfWeJXWDwrXi M0pa0OOqJJj5se+FJWAWhRzZPFML+2GmjD8covAJo40Q85Z1/M0gAfpLR5ndKtQ27s1F T2HbVh0MzAgxvp4aiTJFTZEUjxm6XEq0e5B+6nUicNuvqAoSJkssHkWzog1oEbCiscGb yZGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=oIdtimg3; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s26-20020a63ff5a000000b003c6bf875c80si8471812pgk.679.2022.05.19.19.31.48; Thu, 19 May 2022 19:32:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=oIdtimg3; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241258AbiESPfb (ORCPT + 69 others); Thu, 19 May 2022 11:35:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241155AbiESPe1 (ORCPT ); Thu, 19 May 2022 11:34:27 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61B77ED790 for ; Thu, 19 May 2022 08:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qdN7kX6gtg59GiEPD4pwZac2Oz5xropt2h9Xzi0szOk=; b=oIdtimg3tkSPoUPgEVYuDZtdmN 7uJjpEqvJ77FneYTrCZ5CUhB1SG8CBNhgCd5RoK3fw9ovz2+iJNl6TcT3Rj/FzYrROQCnOkCtN+En QCTbheKSF+HRb40u5aWrrnnDJ7e5fFQ7EGfo/O15fzcsegZ43MTh+RWL5OaUK77SM11U=; Received: from [217.114.218.28] (helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nri9b-0001tZ-6Z; Thu, 19 May 2022 17:33:31 +0200 Message-ID: <8207b98b-0c10-aff4-55c4-6c7118454832@nbd.name> Date: Thu, 19 May 2022 17:33:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 3/3] mt76: mt7921: introduce BIOS SAR config in tx power Content-Language: en-US To: Deren Wu , Lorenzo Bianconi Cc: Sean Wang , Soul Huang , YN Chen , Leon Yen , Eric-SY Chang , KM Lin , Robin Chiu , CH Yeh , Posh Sun , Eric Liang , Stella Chang , Evelyn Tsai , Ryder Lee , Shayne Chen , linux-wireless , linux-mediatek , Ming Yen Hsieh References: <2e6b69a763d60897639101506e39a2b1a81d8eab.1652941276.git.deren.wu@mediatek.com> From: Felix Fietkau In-Reply-To: <2e6b69a763d60897639101506e39a2b1a81d8eab.1652941276.git.deren.wu@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 19.05.22 08:38, Deren Wu wrote: > From: Deren Wu > > Add new function mt7921_set_tx_sar_pwr() to update SAR power from > .set_sar_specs and BIOS setting. Both settings would be merged into > mt76_freq_range_power for final tx power value. > > Reviewed-by: Sean Wang > Co-developed-by: Ming Yen Hsieh > Signed-off-by: Ming Yen Hsieh > Signed-off-by: Deren Wu > --- > .../net/wireless/mediatek/mt76/mt7921/init.c | 3 +- > .../net/wireless/mediatek/mt76/mt7921/main.c | 32 +++++++++++++------ > .../wireless/mediatek/mt76/mt7921/mt7921.h | 2 ++ > 3 files changed, 26 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c > index 80279f342109..c86d8805f291 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c > @@ -1469,20 +1469,34 @@ static void mt7921_ipv6_addr_change(struct ieee80211_hw *hw, > } > #endif > > +int mt7921_set_tx_sar_pwr(struct ieee80211_hw *hw, > + const struct cfg80211_sar_specs *sar) > +{ > + struct mt76_phy *mphy = hw->priv; > + int err; > + > + if (sar) { > + err = mt76_init_sar_power(hw, sar); > + if (err) > + return err; > + } > + > + mt7921_init_bios_sar_power(mt7921_hw_phy(hw), !sar); > + > + err = mt76_connac_mcu_set_rate_txpower(mphy); > + > + return err; > +} > +EXPORT_SYMBOL_GPL(mt7921_set_tx_sar_pwr); Why is this exported? - Felix