Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3038426ybe; Sun, 8 Sep 2019 05:58:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzK4PtVqnudo7TwWl1+xm2PMhwcDYWbocusOHF3S1pE2OkcTYnytrJwp8VbQaPYyXZJF8h X-Received: by 2002:a17:906:5915:: with SMTP id h21mr14866498ejq.28.1567947499951; Sun, 08 Sep 2019 05:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947499; cv=none; d=google.com; s=arc-20160816; b=ZkcHQxvBuIRsBls47oQyDToITrD7aPFLZi2Fjq7unRT+9HRAlByoDANokuzT4OpHD7 yujASld9yIM8q5rgxTATe+OkdKtFA2sJxzsFBtn66Lml3KK1VgXoVZtgOEM3BdP08cVK AA5TqRpINendrypvZXAoNjBSkci8r9JlmPw5hN0YHUhDypPxUUkPR1/10/dUizc2OQPa MCstoPezkYAArkpZzYIH7eqdXU6A2kJktDCZNO9EBRDVHDI3A3gxhbAXSEBy7DAnnzNM QvtcOOb00YoLb40hmafR/Qv4Y0U3F4CScSX0MWWxVZ50TMVvmRa5i9HNP1E8muXNxbNe CFPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=K1RJekK1WvauAhuRQgYn2INlfZTnbJnEDOz4CHJFjm4=; b=NM3GEuoWGZzLCP/E5HQBj3rIuXcQXUC2gSEVTg/rtik9D/kF+2BZyxIbTStRCmwM9S QqvaYZDDOumpYl5PEGLyXuN2CYO1ROKugqF28z2sAnuVu876gCv8AmOk0Y2julA0V9TR 0Al7+xAxxf8getfbRwOrg5CVr0M10cXxRg64+U8EDW8hAPqC4XqvyBBS61B1Bf/YNN0v Z60i934EZQsLSlJ9t72Kcxa8uRNgfwXrFd0jmf9c3tTs49MESRRlG0aJFdquJ8kZtAu8 rU4BjXCp/UBxpU5TpcxG+PUWQhWu4tHrAhz0K8/PCIWRR+cbRPix9FBA+D+asiS8mD8A XLig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 w14si5989404eju.353.2019.09.08.05.57.55; Sun, 08 Sep 2019 05:58:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbfIHIj0 (ORCPT + 99 others); Sun, 8 Sep 2019 04:39:26 -0400 Received: from alexa-out-ams-02.qualcomm.com ([185.23.61.163]:7549 "EHLO alexa-out-ams-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727443AbfIHIjU (ORCPT ); Sun, 8 Sep 2019 04:39:20 -0400 Received: from ironmsg03-ams.qualcomm.com ([10.251.56.4]) by alexa-out-ams-02.qualcomm.com with ESMTP; 08 Sep 2019 10:33:06 +0200 Received: from lx-merez1.mea.qualcomm.com ([10.18.173.103]) by ironmsg03-ams.qualcomm.com with ESMTP; 08 Sep 2019 10:33:04 +0200 From: Maya Erez To: Kalle Valo Cc: Lior David , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com, Maya Erez Subject: [PATCH 10/11] wil6210: fix RX short frame check Date: Sun, 8 Sep 2019 11:32:54 +0300 Message-Id: <1567931575-27984-11-git-send-email-merez@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1567931575-27984-1-git-send-email-merez@codeaurora.org> References: <1567931575-27984-1-git-send-email-merez@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Lior David The short frame check in wil_sring_reap_rx_edma uses skb->len which store the maximum frame length. Fix this to use dmalen which is the actual length of the received frame. Signed-off-by: Lior David Signed-off-by: Maya Erez --- drivers/net/wireless/ath/wil6210/txrx_edma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c index f21b2fa..04d576d 100644 --- a/drivers/net/wireless/ath/wil6210/txrx_edma.c +++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c @@ -964,8 +964,8 @@ static struct sk_buff *wil_sring_reap_rx_edma(struct wil6210_priv *wil, } stats = &wil->sta[cid].stats; - if (unlikely(skb->len < ETH_HLEN)) { - wil_dbg_txrx(wil, "Short frame, len = %d\n", skb->len); + if (unlikely(dmalen < ETH_HLEN)) { + wil_dbg_txrx(wil, "Short frame, len = %d\n", dmalen); stats->rx_short_frame++; rxdata->skipping = true; goto skipping; -- 1.9.1