From patchwork Fri Apr 9 22:51:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 419142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D537C43460 for ; Fri, 9 Apr 2021 22:52:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53BBA610D1 for ; Fri, 9 Apr 2021 22:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235137AbhDIWwd (ORCPT ); Fri, 9 Apr 2021 18:52:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:43572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235105AbhDIWwc (ORCPT ); Fri, 9 Apr 2021 18:52:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E46C610D1; Fri, 9 Apr 2021 22:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618008738; bh=WeRIurobnQ3/hlMp5vMAM6xs6GS+WI9TFRpl83nl4/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BP7EYWRqFCrVIu4aGS7XRPCH88xJWmHHe8/exp+HnCQgMICAvVmEyMcxU3YaAAFkU mNc3h9jUBcnxr514pUprPCnAr7WRAcrSN9mWlwyhMOhHCdwc2WGBXxqYPpFYCaq/nh khPeMMHOg3FU3oU9LL5zg8xlz/Q8PAbCg44Ap0zfW82D/jSwyUNX9MjWqifS41BAAM vjG+poC+l++YlL1Zll0I3EGHBeHERJjUPqF1H8eoWgGU2QDrWkBWhGhDo9pQpKy3Ab YzuhjyBBmtTAxA4YU1MBvEEOCOdMjt9BlOlBg6QDw4ktYVJxJehvPQLiDdfjYGIDK8 BqgHpYj48lxjQ== From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, sean.wang@mediatek.com, ryder.lee@mediatek.com, shayne.chen@mediatek.com, devicetree@vger.kernel.org, robh@kernel.org Subject: [PATCH v2 5/7] mt76: mt7615: do not use mt7615 single-sku values for mt7663 Date: Sat, 10 Apr 2021 00:51:50 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org mt7663 mcu relies on different APIs to configure APIs per-rate power limit respect to mt7615 driver. Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 8c0a21e243db..195596194b51 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -2202,6 +2202,11 @@ static void mt7615_mcu_set_txpower_sku(struct mt7615_phy *phy, u8 *sku) &limits, tx_power); mphy->txpower_cur = tx_power; + if (is_mt7663(mphy->dev)) { + memset(sku, tx_power, MT_SKU_4SS_DELTA + 1); + return; + } + for (i = 0; i < MT_SKU_1SS_DELTA; i++) sku[i] = limits_array[sku_mapping[i]];