From patchwork Mon Jul 15 09:47:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WangYuli X-Patchwork-Id: 13733217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1540BC3DA59 for ; Mon, 15 Jul 2024 09:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=A4X3RVWF4rjn4rp6pZS1mnQHtxJgZ3taz/52O8AUygM=; b=lBHIJRqb5MHpXZXe3TABVp+Njh tgRFcDtLguwhW1ZGDq3BQvJfGVmnLuOgNM2H+fRyT4Jpk8k6DQHb05R7eHPIG8n0XbL8AxzuMaFjq NO3/LeH7GekKM/fMF0B5Ph9ekm57r8hNGgX1pPnfAV8SQglx+p8ukNI5u09OyWMw9O7dx41aXiOOr wAS2RSIjkFQ++Uh3DQyHbOct6g91l46PalCOY6xMV+q5XpNv2/d0Wouy8WBXDQ01ZnaGVNJoEDUYZ 1ilfq6YJiS9Zp9lbGUs0wfP3WmM5kMeSy1rbJjFWY8KY/rjJfItQLqhErdR4aB8tJiEy6lG8ldpml 9XrCF/TQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTIKC-00000006b1D-2jdJ; Mon, 15 Jul 2024 09:48:52 +0000 Received: from smtpbguseast3.qq.com ([54.243.244.52]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTIJs-00000006avB-1Ab5; Mon, 15 Jul 2024 09:48:34 +0000 X-QQ-mid: bizesmtp89t1721036861toicl6cc X-QQ-Originating-IP: +1vDfVCq/sJoRCMWUwHIAZGyJFSNel82oHF6cTZdGjs= Received: from localhost.localdomain ( [113.57.152.160]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 15 Jul 2024 17:47:38 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 11744980703197485822 From: WangYuli To: kuba@kernel.org, kvalo@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, guanwentao@uniontech.com, sergio.it.consultant@gmail.com, nbd@nbd.name, lorenzo@kernel.org, shayne.chen@mediatek.com, deren.wu@mediatek.com, mingyen.hsieh@mediatek.com, chui-hao.chiu@mediatek.com Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, WangYuli Subject: [RESEND. PATCH] drivers/mediatek: Fix some mt7601u vendor could not connect Date: Mon, 15 Jul 2024 17:47:14 +0800 Message-ID: X-Mailer: git-send-email 2.43.4 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_024832_846032_34C3E987 X-CRM114-Status: UNSURE ( 8.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some mt7601 devices cannot establish a connection properly. This patch fixes the issue. We do not know why, but it just works. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716301/comments/52 Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716301/comments/53 Link: https://github.com/kuba-moo/mt7601u/issues/64 Link: https://www.mediatek.com/products/broadband-wifi/mt7601u Signed-off-by: Wentao Guan Signed-off-by: WangYuli --- drivers/net/wireless/mediatek/mt7601u/mcu.c | 1 - drivers/net/wireless/mediatek/mt7601u/phy.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt7601u/mcu.c b/drivers/net/wireless/mediatek/mt7601u/mcu.c index 1b5cc271a9e1..15751d11b4dc 100644 --- a/drivers/net/wireless/mediatek/mt7601u/mcu.c +++ b/drivers/net/wireless/mediatek/mt7601u/mcu.c @@ -446,7 +446,6 @@ static int mt7601u_load_firmware(struct mt7601u_dev *dev) mt7601u_wr(dev, 0x94c, 0); mt7601u_wr(dev, MT_FCE_PSE_CTRL, 0); - mt7601u_vendor_reset(dev); msleep(5); mt7601u_wr(dev, 0xa44, 0); diff --git a/drivers/net/wireless/mediatek/mt7601u/phy.c b/drivers/net/wireless/mediatek/mt7601u/phy.c index d4cd2215aba9..f3c14a1552df 100644 --- a/drivers/net/wireless/mediatek/mt7601u/phy.c +++ b/drivers/net/wireless/mediatek/mt7601u/phy.c @@ -589,8 +589,6 @@ void mt7601u_phy_recalibrate_after_assoc(struct mt7601u_dev *dev) if (test_bit(MT7601U_STATE_REMOVED, &dev->state)) return; - mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->curr_temp); - mt7601u_rxdc_cal(dev); } @@ -1160,9 +1158,6 @@ static int mt7601u_init_cal(struct mt7601u_dev *dev) if (ret) return ret; ret = mt7601u_mcu_calibrate(dev, MCU_CAL_RXIQ, 0); - if (ret) - return ret; - ret = mt7601u_mcu_calibrate(dev, MCU_CAL_DPD, dev->dpd_temp); if (ret) return ret;