Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2767862imj; Mon, 11 Feb 2019 08:10:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IbFoUKg5Bic2JHaWgomdlUWehxNFbUopZCtj5X2N4KBlirTuwc88CPhOi7h3wrEa1/yx78x X-Received: by 2002:a63:2706:: with SMTP id n6mr17913533pgn.352.1549901442396; Mon, 11 Feb 2019 08:10:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901442; cv=none; d=google.com; s=arc-20160816; b=F4VwBqkVMnM8ik/niWgNo9rHXz+BCbhWuuzPxyR6xOXjjiNAH3sBTITpVnROo26o3r dd3wKRMjJE7hiUIzeSoAO8MGgLvO+H0XDAIQdptRQ82TMQlIMhG2+ATGABjKOqZq+5IU 7sV+lolLZnlEzzhsrCCO7i6zNNKjoIUSDpZz41mzWXEm8tWiGJwh2GzPVlJmUJaTQfae +z7GT62Ekexlx7PBSZN9diZykCPTxO4FINo02jNhh6VuFrXqrznp9ntp2pp6o64HtCTX NEtMvTJVslmLcRQwV7oFppzBWk9B+ZaUPxiRyH6VqKwm/+Nx3E/rbToSe1KWmaPRPXK9 w+Rw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y+Pcn7/FehsxL6cHD64aNLSzCSYB4mXzYFIsdNeLZDc=; b=VtOTOvZyZ5HpvGZWNgiAYfViJ/YgozK7vTU3Sy9gobKrVwTAJO+Wi6XmmXGF71rWF3 9pETGrvT1dJ9zGMXTVC3JrXyO7k532sAsRju49lFRRzdlxMKkzjdZkDwdw3u/AOBl8Q5 zeRhRbj5NJrawKlqVJ/r5gLDciK/mb/Bl6nf/ibVkaddcHGW6RsKVrwNZNSMAMJSQgfl N1SFPLUWqimZpbagu6oXahEFC1O0hik9ZLRuQARfoqZdKgXIwC4jzBYyngtuLQbhkYL0 1sVY3I4vO71RsMbO0EVsdFTKaVnZm4GU88I5dVJ03Fhl/EeI+FuU7AM0cfVUfjBf4HUX BTqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AAJ4B+sk; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g132si5665332pfb.23.2019.02.11.08.10.26; Mon, 11 Feb 2019 08:10:42 -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=AAJ4B+sk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729369AbfBKOZW (ORCPT + 99 others); Mon, 11 Feb 2019 09:25:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:58680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728526AbfBKOZR (ORCPT ); Mon, 11 Feb 2019 09:25:17 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88D9A20821; Mon, 11 Feb 2019 14:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895117; bh=EehrWLcbKerHAtfAAk9m4siQDbdq6ELgMkbhOojJxdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AAJ4B+skqn+KiaqHtIG73+70OxA6nYb6BtqDQ6XTijRoxwoLtwaltnDuXHTCRglZ2 UnkyEnMxXBAJhuTida12TQGMUxi5EkVa51iJd/6JxA1309MiirNjCJCaY40RvCdIaa bvAl+JkcTYTQE3awlfmqT49bf1Eqig9QT9Qm29gY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 4.20 097/352] mt76x0: dfs: fix IBI_R11 configuration on non-radar channels Date: Mon, 11 Feb 2019 15:15:24 +0100 Message-Id: <20190211141852.007113662@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 6bf4a8e902aad7df55d7f2b10b850cfa3f880996 ] Fix IBI_R11 configuration on non-radar channels for mt76x0e driver. This patch improve system stability under heavy load. Moreover use IBI_R11 name and remove magic numbers for 0x212c register Fixes: 0c3b3abc9251 ("mt76x0: pci: add DFS support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt76x2/pci_dfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_dfs.c index b56febae8945..764528c9f48a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_dfs.c @@ -800,7 +800,7 @@ static void mt76x2_dfs_set_bbp_params(struct mt76x02_dev *dev) /* enable detection*/ mt76_wr(dev, MT_BBP(DFS, 0), MT_DFS_CH_EN << 16); - mt76_wr(dev, 0x212c, 0x0c350001); + mt76_wr(dev, MT_BBP(IBI, 11), 0x0c350001); } void mt76x2_dfs_adjust_agc(struct mt76x02_dev *dev) @@ -843,7 +843,11 @@ void mt76x2_dfs_init_params(struct mt76x02_dev *dev) mt76_wr(dev, MT_BBP(DFS, 0), 0); /* clear detector status */ mt76_wr(dev, MT_BBP(DFS, 1), 0xf); - mt76_wr(dev, 0x212c, 0); + if (mt76_chip(&dev->mt76) == 0x7610 || + mt76_chip(&dev->mt76) == 0x7630) + mt76_wr(dev, MT_BBP(IBI, 11), 0xfde8081); + else + mt76_wr(dev, MT_BBP(IBI, 11), 0); mt76x02_irq_disable(dev, MT_INT_GPTIMER); mt76_rmw_field(dev, MT_INT_TIMER_EN, -- 2.19.1