Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp768535ybc; Sat, 16 Nov 2019 08:21:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwa4q35Pll/4MCJLIaAEJlJJmz4cWJC4lXvoUV3WDnQN9z8KAOY2dRFSH3GQrl85y7nLtkY X-Received: by 2002:a17:906:cca:: with SMTP id l10mr10948799ejh.161.1573921276758; Sat, 16 Nov 2019 08:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921276; cv=none; d=google.com; s=arc-20160816; b=uQ2fljzxbuTvnqbgKKhErnN3uMtTkDsMRpDRax2zJYSVbCMlYCrc2QXnAwDRZXe+X3 OuS+XIKXyV/A3dGpVLvrw6xbK3PTh0LzOPHOWtSkl6SX0VK25dKR18o+LOAy2GOG8DJz xyjmvpg4STbUhAYxac3pcsLP3suE/5B6k+cnOdSZlBK/gvGEiLt0ru8pYYRYjN3tMBZt Zg4UeLjXT2NhNY7qLgFVkhbthYNRipopN8TKXP+6B0EEB+YqqFdtGELIQezZWQ2ulINn ZzP7/GAgm1zDPj98ltHBEhR2nlN8UcQIdT5uLPTuFHp6UBSHbnS7Gq0+LzdSvDEWtrCd dUAg== 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=kNNSlpDDhSL6CIh7LKxfAStwKaNdev6Bjj30/e9u2PY=; b=mC6IseulicVkh37vR+3Ah5Rjf5HsJRtoh8xvZHijCJdJ0HLI4EkHpakR3HJkXw9io1 3SQljaOw10vy1/laLGPviYPCawerHDz3ji7XlxEuPu3pu0QSISaqEcaeJhn6RFLwIDwk JVQ610Uw9eYg6x4cawFTdtzgWRZt6zM/orm15Pv2Vap/onA7kNgqtmgIeM8e/+qly6Wk cXQJORMJ2c4g9IlKSvGwPZ906BtlWfAKEoPB4+cvnQXOk1V/NciOhiph8naAZIFj/2Od 5kfjy5sZd9hn1OQUJaps/FTBLJQFEFVA5VgD37YBqSXO2e/LYZIidO7OR61dVxj/5o5+ +ddQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mGlWnYCB; 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 r6si1016762ejx.115.2019.11.16.08.20.51; Sat, 16 Nov 2019 08:21:16 -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=mGlWnYCB; 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 S1732033AbfKPQSd (ORCPT + 99 others); Sat, 16 Nov 2019 11:18:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:52822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729280AbfKPPq3 (ORCPT ); Sat, 16 Nov 2019 10:46:29 -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 65B9B2083B; Sat, 16 Nov 2019 15:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919188; bh=nOskZj0L/b7ymmq40aLThte2XvXczGSoKhi6G9WlnOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mGlWnYCBBIA5NHgiP9+8EHBgGPsBWvG/OIVsMAwuz2ry7CCV9FWTiqcZ/B2Xnj4lt 0AOx+ZAYqi6wIrH7Oryhx4lS49s7hYUG1su9kQs38SnQb0iFXO0k18El9e9t7JxeYa 0CaX9vJijIFD1kvC8ZiEp7XmxtsGGEuCoaSJHpyk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maya Erez , Kalle Valo , Sasha Levin , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 197/237] wil6210: fix L2 RX status handling Date: Sat, 16 Nov 2019 10:40:32 -0500 Message-Id: <20191116154113.7417-197-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: Maya Erez [ Upstream commit 04de15010aa42a92add66b159e3ae44b4287390f ] L2 RX status errors should not be treated as a bitmap and the actual error values should be checked. Print L2 errors as wil_err_ratelimited for easier debugging when such errors occurs. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/wil6210/txrx_edma.c | 23 ++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c index 409a6fa8b6c8f..5fa8d6ad66482 100644 --- a/drivers/net/wireless/ath/wil6210/txrx_edma.c +++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c @@ -808,23 +808,24 @@ static int wil_rx_error_check_edma(struct wil6210_priv *wil, wil_dbg_txrx(wil, "L2 RX error, l2_rx_status=0x%x\n", l2_rx_status); /* Due to HW issue, KEY error will trigger a MIC error */ - if (l2_rx_status & WIL_RX_EDMA_ERROR_MIC) { - wil_dbg_txrx(wil, - "L2 MIC/KEY error, dropping packet\n"); + if (l2_rx_status == WIL_RX_EDMA_ERROR_MIC) { + wil_err_ratelimited(wil, + "L2 MIC/KEY error, dropping packet\n"); stats->rx_mic_error++; } - if (l2_rx_status & WIL_RX_EDMA_ERROR_KEY) { - wil_dbg_txrx(wil, "L2 KEY error, dropping packet\n"); + if (l2_rx_status == WIL_RX_EDMA_ERROR_KEY) { + wil_err_ratelimited(wil, + "L2 KEY error, dropping packet\n"); stats->rx_key_error++; } - if (l2_rx_status & WIL_RX_EDMA_ERROR_REPLAY) { - wil_dbg_txrx(wil, - "L2 REPLAY error, dropping packet\n"); + if (l2_rx_status == WIL_RX_EDMA_ERROR_REPLAY) { + wil_err_ratelimited(wil, + "L2 REPLAY error, dropping packet\n"); stats->rx_replay++; } - if (l2_rx_status & WIL_RX_EDMA_ERROR_AMSDU) { - wil_dbg_txrx(wil, - "L2 AMSDU error, dropping packet\n"); + if (l2_rx_status == WIL_RX_EDMA_ERROR_AMSDU) { + wil_err_ratelimited(wil, + "L2 AMSDU error, dropping packet\n"); stats->rx_amsdu_error++; } return -EFAULT; -- 2.20.1