Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6041516ybc; Wed, 27 Nov 2019 13:58:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzTEnQ7f8yBklYjtZjgBNKhEdOCqUoJ1+6RR0CpreThEK83ZhmaLG1fatXI7RuLKD1x6u0/ X-Received: by 2002:a50:da43:: with SMTP id a3mr34342033edk.229.1574891890113; Wed, 27 Nov 2019 13:58:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574891890; cv=none; d=google.com; s=arc-20160816; b=OZId8fJUOLJU/q5wfB8FEbyi+yHktfhicG/IJDQwB84wzGWY5uFhdd80zCNHJHPTz/ It2XYYFSgbB9RF3mDCGsuJ8zX0jNnvIlK0wskqEiesfE/368hV91GQDqDMJD3ni+MeYT feyfiD97Y5WrymqJXiFlBcnClG5+V4F/CDBLus2g5sAymTmuaA6/EPadxsAdBnyj7zez SAnE6AhjnnM5ELoDe5loOz8u/keX4nA0USDstM1FT6t6pa/L8LcVZYLmks24kIgPiGn+ ND4iqTxzbvhKg1UTrm6IWQrFmfoOO8iWQANFVWO//dBTA71hzPs2Uo+5F4P65h0iFvIN j+KA== 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=kNNSlpDDhSL6CIh7LKxfAStwKaNdev6Bjj30/e9u2PY=; b=zu6rdQaFD+7saYvqHF5acJi83aJnC+xNre7k5ScTZdVWD9/zEw0OM6dCf4M16nmbK0 Kty948L++VK4cNYQSJeHnf+PFAioDhKhMBovgqNBgDphS/PW6GPUwWfRSZcr3LEjnyd5 GEb9MrmFi3YvjkVxM8bzNd4wJ5lW1dnslDaDWGVzteGq4TY9gp/sUcw/vwyfp1iGfWLx iaC5jp/VXqhCLUxZ2oLiPq4oS9BhxgLl4aIdENJM5t4xPJD3UQ9bIWURoLhPHZjBp6aa xO4CH/vaT2GaVAfE94eIv8obmFZKVOyDvYnSo4U48UclQe7Eo0N7P6bu3NkYj/DeqXUI /27w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EbhwJjfz; 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 df27si12362665edb.110.2019.11.27.13.57.45; Wed, 27 Nov 2019 13:58: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=EbhwJjfz; 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 S1730981AbfK0VXt (ORCPT + 99 others); Wed, 27 Nov 2019 16:23:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:57450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727445AbfK0VEF (ORCPT ); Wed, 27 Nov 2019 16:04:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 29ADA2086A; Wed, 27 Nov 2019 21:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888644; bh=nOskZj0L/b7ymmq40aLThte2XvXczGSoKhi6G9WlnOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EbhwJjfzxGk2lVbWTqM+lTL7tAdJcxewXbBjovbTzS8REpIrB0Mwbq03KQ+Uy54mM 7lZiVAOhIPg3Z26q5rW8nXYVfoyzplCHdNMMMIJmDTufbsHvJpC/dLV+GzqghKMJFG eeAQS8pO2a2xoZamZu0O4su3rqctWrOGTKERcAjY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maya Erez , Kalle Valo , Sasha Levin Subject: [PATCH 4.19 214/306] wil6210: fix L2 RX status handling Date: Wed, 27 Nov 2019 21:31:04 +0100 Message-Id: <20191127203130.735558221@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 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 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