Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3707414imu; Mon, 28 Jan 2019 09:22:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN4KKnxJ4wiZtiyxrZs68TDf2rzZA7JHC+i5Iwat43bjeUxTtu1jvqfN7z+jx2KtKIMsYUcw X-Received: by 2002:a62:520b:: with SMTP id g11mr23035145pfb.53.1548696163890; Mon, 28 Jan 2019 09:22:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696163; cv=none; d=google.com; s=arc-20160816; b=VbrEnxeiY99Y3zAcfJPWfTXRJqchHV9H9vnnwzqfHPnEkg7pgUpsrPt3gLV5ZrtCfF 3o5RtdG7N9BB4ZT9TbBEJqJSR5FTqpuI2nK5x7xGH6roflSDy+1MTO41aXDLvlXMVHeL wBh/fDPbhCe1/q92IhLoFIitnUjlxZYzPBuZfz1eQw2BeCevqZ2LtElInuovA+R61KBR 6bucSFFBCw8zy3YG6nmoMzmDL8kDh+IK0BhcA2lN4qQXv5Ss4VU1OR6UYXiMGSZx1wkz rNyL+7lHGX5DaYSZGPakrE1nVOeuhnitB6s05yPNrUKa5LGCUTdmkDf3Y24XXyup9WXd lCyQ== 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=DO96liWO6rF1OlzGVtCbhxalJXNxdBHuyKivrBWbN48=; b=dLz2DSl0fy5q0WrhvFPtaFk4e3Lstbi6UotZlDgEm7W+/dq+LUPC4qJtjGCZDP9RNA PdJLZ3tvPdT8odqhYMp0lxX+Fh9RfNXbMvVAFomZXEEd1/2N6aRg/pjz2G9E/eD5YkT0 dWByaQGO9kGhj61V1kg5OHU7mwcEEyv4Rar1w9CV5I3xTB2vaEc6nIUk6HuJuoWB0zDH qiFa4EClzEuLguTo48hTacJTS+Uzfn1a0FXyRi1yinIWcFOG9/LQ5WUZj67Bn6c12axI e9Sh/nO8HM9DsCrjMviERWGcyz4hEgQ0zHwUdlWFHKmv3KScmJX/ucD+8MT7xOSQ4ydL LZWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XaxoxciE; 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 i39si34928586plb.256.2019.01.28.09.22.28; Mon, 28 Jan 2019 09:22:43 -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=XaxoxciE; 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 S1730505AbfA1QDr (ORCPT + 99 others); Mon, 28 Jan 2019 11:03:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:49078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731445AbfA1QDo (ORCPT ); Mon, 28 Jan 2019 11:03:44 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 A963E21848; Mon, 28 Jan 2019 16:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691424; bh=A7WDGFTLK0OQcfMCjuXWalBxp6YrHZ94yrc5rCLBssI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XaxoxciEXX13PLoxRw8uobXVzZOiuFl4ddquAkKnO7ahz/dRnyOT6+NBGqefqG5es vtnpVMUVzdCiBKQUagOOP85aDmH7fRTZV3lcDVQ0k3vhwZothVmngGFoIEFtqvWKPV 8thLHBMxxff+rmaM1Py1f3BapBkyA0apRBzv2fWQ= 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 090/258] mt76x0: dfs: fix IBI_R11 configuration on non-radar channels Date: Mon, 28 Jan 2019 10:56:36 -0500 Message-Id: <20190128155924.51521-90-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 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 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_dfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c index 374cc655c11d..16e6b6970e28 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c @@ -799,7 +799,7 @@ static void mt76x2_dfs_set_bbp_params(struct mt76x2_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 mt76x2_dev *dev) @@ -842,7 +842,11 @@ void mt76x2_dfs_init_params(struct mt76x2_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); mt76x2_irq_disable(dev, MT_INT_GPTIMER); mt76_rmw_field(dev, MT_INT_TIMER_EN, -- 2.19.1