Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp776856ybc; Sat, 16 Nov 2019 08:30:10 -0800 (PST) X-Google-Smtp-Source: APXvYqz3uSYR1U4Pwkj3dYA2Nnha1MtRwpJ+C7l3odTZPZN3sXsNmiIBWNe1I1t5z/g7PRgXiyJN X-Received: by 2002:a17:906:d9c4:: with SMTP id qk4mr10696745ejb.214.1573921810520; Sat, 16 Nov 2019 08:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921810; cv=none; d=google.com; s=arc-20160816; b=D5BC34D4tnNSbn/WvFo1ui+fScqchFRu+F7YPpB3Ber9m8+ezbKcE7jsTwDklJD+Hn Cn/+lQWP7rHzdw/i3ntY+eAmWdcOWcC93LGdVrH4izf5E9PbuK5q/X5oYWLhwhntQug1 8Ox+n4GHgGk8e+Zf761Ju+6jZavVrdvQRSbCv2/Tpd4+iFmBQ65RhiL3BS1jGOBnzBvm Xz3F+r6sVpmWDSjgVns4hWOEwme2o58uZGsN2Osnfrnxyfwe0PUQJzFhkfzctBD8vE+q KfH/G8lN6kPJO7+fHGj+UhlWEeV5rPbjvY+V7l1sMIqSDWLOE/guzyqew8+9pr919NRY jwzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T/+sngwATla7YSrDrD3wB9BGTVwJICKM5z4BekHD7QM=; b=VsPQxdngrx+fAIcCFZh15Q/NrGki52Xu5vZk0b8iXV5CbfJnJgpaAR40sAw6KjO2Ho eOnlXOWznQoCRIvO7ZnPobtWMaaHg8DS4Ott/ngZYMBWN5uF90vcIjGRshDcjzAydfor FZXGnBELwPWHIIUc9Rj9zSjxEMupkIVgJYS40uGYCwBueDln0YiEdTC+OlxDD0FFQlDW 3SLeS5YEDMj6lEkRba1w6bQMHdsG5HvuXIgqnVzih4VQbaawEoi+Og6r91fMkPUyCFl6 hRCcJgv7prxbBjSy+K8f1j6Zme1e9X8ydTZZsBDn5YFKcINlLlqcDd0AwYshzotrrDDT EgHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vtY9IZdF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si9029411edz.393.2019.11.16.08.29.44; Sat, 16 Nov 2019 08:30:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vtY9IZdF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727954AbfKPPli (ORCPT + 99 others); Sat, 16 Nov 2019 10:41:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:44542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727885AbfKPPla (ORCPT ); Sat, 16 Nov 2019 10:41:30 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E5FD20740; Sat, 16 Nov 2019 15:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573918889; bh=30FkFKk0NxEOy+6Bj802DFapeTmG8/Wur0OjpwyjWbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vtY9IZdFdJzGwXWS/EYR5+OKH5pgagk35dtji48Q6oXHrKRM9SUJo7SFlguFyY8Pv BZjwrlFvpAP73+CGEX1eNRYpH3h8DWVE0h7mmxNFFuYqEBE6AB7LwilfM5C+esBLe0 mBMIMBhqPq2zsWWCxepTllV23/znIFPu0P8M0CLw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lorenzo Bianconi , Felix Fietkau , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 017/237] mt76x0: phy: fix restore phase in mt76x0_phy_recalibrate_after_assoc Date: Sat, 16 Nov 2019 10:37:32 -0500 Message-Id: <20191116154113.7417-17-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Bianconi [ Upstream commit 4df942733fd26d9378a4a00619be348c771e0190 ] Fix restore value configured in MT_BBP(IBI, 9) register in mt76x0_phy_recalibrate_after_assoc routine. Fixes: 10de7a8b4ab9 ("mt76x0: phy files") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c index 14e8c575f6c3e..924c761f34fd9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c @@ -793,9 +793,8 @@ void mt76x0_phy_recalibrate_after_assoc(struct mt76x0_dev *dev) mt76_wr(dev, MT_TX_ALC_CFG_0, 0); usleep_range(500, 700); - reg_val = mt76_rr(dev, 0x2124); - reg_val &= 0xffffff7e; - mt76_wr(dev, 0x2124, reg_val); + reg_val = mt76_rr(dev, MT_BBP(IBI, 9)); + mt76_wr(dev, MT_BBP(IBI, 9), 0xffffff7e); mt76x0_mcu_calibrate(dev, MCU_CAL_RXDCOC, 0); @@ -806,7 +805,7 @@ void mt76x0_phy_recalibrate_after_assoc(struct mt76x0_dev *dev) mt76x0_mcu_calibrate(dev, MCU_CAL_RXIQ, is_5ghz); mt76x0_mcu_calibrate(dev, MCU_CAL_RX_GROUP_DELAY, is_5ghz); - mt76_wr(dev, 0x2124, reg_val); + mt76_wr(dev, MT_BBP(IBI, 9), reg_val); mt76_wr(dev, MT_TX_ALC_CFG_0, tx_alc); msleep(100); -- 2.20.1