Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp68536rdh; Wed, 25 Oct 2023 16:35:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVDzwLF70CiFPn34VKTxGa6GAaShTm36QV/vWoKsnqxsvS35SVYlv5XOpAqmEs+Mvtf4fl X-Received: by 2002:a25:b9cf:0:b0:d9a:5908:a29 with SMTP id y15-20020a25b9cf000000b00d9a59080a29mr15317231ybj.64.1698276908205; Wed, 25 Oct 2023 16:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698276908; cv=none; d=google.com; s=arc-20160816; b=zGn/6O8jh6cH2FIhp1o7QuoJxnNGY5Oe8g9cgEqu7bMtp1Ola5Zwn82Fu00r86q7pN jkM3vFkZ3OgA7sOUwv8Wv9Zs0nyMLPJ8z/oe1wiiYsZ/gindR8HQCyC2UgEHrStq+WSC jEcWhWJ9kiVpxTOeag/cLf6fHhgVPht2WAWSAycCztj60s3a+DS3sDvqHWjd5CPGt4Zd VowX0sxtKIKhD3ECH7zuVOyI7Hmr073e/3SbDMh7+wn/0LAvD+5kPe8j0IUuK5F3EFor 46MyURM8vYcdNw091hTIK24XU0F1wAijxqfm+KR7YNvPrNKZJAzB/Oeq+dOCvDYcADei NIEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=qKS4mAxzCwofgV5lrkCv+67Ih4jlWyJk35U0DrEJjmE=; fh=6QKJRjrPikOGvkZ/bc/LdS4hhQb1R/wCG4eC8xwcxLg=; b=W/U0KUMtt+dhJWicu5O2ppjKlRuqwxNJHF1uT72CegMqAp283684mwObMzzYrkPlt9 pYwfttq1IAV4v2ngDmzJSZAZwNvLNP03ui2GXZ1s4aS2O4uCEEuYhiB+ZneDyohbYMmQ ggh7hdw+ZpcGQDu8bN85Mg0FczjtMt3PfXMcxkY0unoAqsm/3vy6YY7dZ8uUjDP3DyUL nTmm1+faf1Pvxijz5/j9GaIVJJLVjlv4TXFxhO77woI/lnCs1f4DF3GI8R43XM5aICiZ LZus7/rLZktbk6n+s016+SjO92j30EcDB2vLu0z53jGx8WEjFTEIo8oD397vujqkO//M FbQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ATb1dGHL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p127-20020a25d885000000b00d9a4ad7170fsi12448770ybg.507.2023.10.25.16.34.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 16:35:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ATb1dGHL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id C689C8065806; Wed, 25 Oct 2023 16:34:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjJYXei (ORCPT + 52 others); Wed, 25 Oct 2023 19:34:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjJYXeh (ORCPT ); Wed, 25 Oct 2023 19:34:37 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B22B13D for ; Wed, 25 Oct 2023 16:34:31 -0700 (PDT) X-UUID: 0838c444738f11ee8051498923ad61e6-20231026 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=qKS4mAxzCwofgV5lrkCv+67Ih4jlWyJk35U0DrEJjmE=; b=ATb1dGHLp8bZGIilV8/wOF5hhgypsrQ3FRkXE5HjEPE+BhKkWHs1k/rqMe6FN8ccwbDLUOESvyY4a+QLb3WXoMu4wEniAeTtUNPsdpWkiDeyu0zj+Ui/0Q/kA/XmN+LHFA1g5Qrw90xnqXQDwqsoPGMkQQMtxwtI9N/VHtIj1qU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:fad995c1-5e0f-4b1c-ac5b-792abb7b37a8,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5f78ec9,CLOUDID:9a8552d7-04a0-4e50-8742-3543eab8cb8e,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 0838c444738f11ee8051498923ad61e6-20231026 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 369469362; Thu, 26 Oct 2023 07:34:25 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 26 Oct 2023 07:34:23 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 26 Oct 2023 07:34:23 +0800 From: Ryder Lee To: Felix Fietkau , CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , , Ryder Lee Subject: [PATCH 2/2] wifi: mt76: mt7915: fix missing CH144 support for mt7915 pre-calibration Date: Thu, 26 Oct 2023 07:34:21 +0800 Message-ID: <30c279a4c3d937a592f95951ec22c8591b24e275.1698274193.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--6.565200-8.000000 X-TMASE-MatchedRID: 8d+rTuw6A/ZYXTxImR5ZvAPZZctd3P4B7f6JAS2hKPg3nZaS9VtZrqPF jJEFr+olwXCBO/GKkVr3FLeZXNZS4EZLVcXaUbdiuR7xzqovR/1Di9mwshcj9kaBOIZIqgk0Shp LTU8kT8ieqD9WtJkSIw== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.565200-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 35BD9C14BD588542D622D01B6322A5A8C56C379A6B195B0D85543D01262456772000:8 X-MTK: N X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 25 Oct 2023 16:34:48 -0700 (PDT) Sync from MTK SDK. The current mt7915 pre-calibration data lacks CH144@BW20 so we fallback to apply adjacent channel's data as an alternative. Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data") Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index da3ee9f91704..01f208fec73e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -2990,6 +2990,8 @@ static int mt7915_dpd_freq_idx(struct mt7915_dev *dev, u16 freq, u8 bw) if (is_mt7915(&dev->mt76)) { freq_list = freq_list_v1; n_freqs = ARRAY_SIZE(freq_list_v1); + /* NOTE: apply adjacent channel data for the missing ch144 */ + freq = (freq == 5720) ? 5700: freq; } else { freq_list = freq_list_v2; n_freqs = ARRAY_SIZE(freq_list_v2); -- 2.39.0