Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp343780yba; Thu, 18 Apr 2019 02:09:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKUrteajW6f8M6MtST7Vaj5wsRRoswKPwZGwWP8FovH6ed/QonsxHN+WtvJE8//EfyLm5K X-Received: by 2002:a63:185a:: with SMTP id 26mr60887215pgy.337.1555578597356; Thu, 18 Apr 2019 02:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555578597; cv=none; d=google.com; s=arc-20160816; b=jCMu38x+P93NxwtttBIa6GWVZBYwzyqUtqkwDUtY1EDf/ativPX1NX6ZA6tkXgOMXM z+7G6p58n6txoOkH8p4JB8KDzWO92VtHsBEX1bczp0zXrm1+StfL+XResnTA4AtL+yIY GxpXTAf2vC/H8hUnE669ha9iCuhquKCrQnXz7c36+6wkUvbuAXxYwi1N/gboC5wTbN/5 gbDRGOmkeGthdHnFxhSGofYNJcdV+qbKPFUj4kYmNIigohjFBOxWBozlng5oqfOmXbQ5 avq3AI9wyviYK4B8Lx6FIWabE8K9MW+pRZ1T/VOsginPNj96YsprUFkFkNQssH1T8ddb UQOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=I9KG0yLx/TqpzV86Re75ocJRYUawqmbvh9kgeUkMdeE=; b=EM1q+wXFvTem0uZJ0tPwiMfSWox/hyOGS6YkRviXEty9juSuaa95lMwhJq5c4KRz0o A3QBcRad5/KzO24RGYPnGtNN11bkrdfZQFqlq7GkbhWqgLi8sUqgqw4T8vKRd8N8NKyI fg3di4hMew0LkQs0k9sSaAwwgrvgPfOfdx3vYl9gUTh9neDVA2SQs4f6mvhkFdj/4Dla x6oGNAQuhnL0cHIKIs8fgEdncmfY3Th1Ii7ySLH61tsWFx/kOzVHRQpb6Fy1c/M0ZKOS ge+X6SjiOZUCx0BDtvHCxPkrLtNCV0+dfEJBp3wRiD9KtzuoKJZFonlBL4MWjtq1wD0/ Q2HA== ARC-Authentication-Results: i=1; mx.google.com; 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 f16si1406614pgj.149.2019.04.18.02.09.40; Thu, 18 Apr 2019 02:09:57 -0700 (PDT) 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; 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 S2388725AbfDRJIR (ORCPT + 99 others); Thu, 18 Apr 2019 05:08:17 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:60465 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2388303AbfDRJIO (ORCPT ); Thu, 18 Apr 2019 05:08:14 -0400 X-UUID: 0d444f95a246432192204ce05d600cbd-20190418 X-UUID: 0d444f95a246432192204ce05d600cbd-20190418 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 478835297; Thu, 18 Apr 2019 17:08:05 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 18 Apr 2019 17:08:04 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 18 Apr 2019 17:08:04 +0800 From: To: , CC: , , , , , Sean Wang Subject: [PATCH v1 3/4] Bluetooth: btmtksdio: Fix hdev->stat.byte_rx accumulation Date: Thu, 18 Apr 2019 17:08:01 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang Accumulate hdev->stat.byte_rx only for valid packets as btmtkuart doing. Signed-off-by: Sean Wang --- drivers/bluetooth/btmtksdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index 9c123a9de673..877c0a831775 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -391,8 +391,6 @@ static int btmtksdio_rx_packet(struct btmtksdio_dev *bdev, u16 rx_size) if (err < 0) goto err_kfree_skb; - bdev->hdev->stat.byte_rx += rx_size; - sdio_hdr = (void *)skb->data; /* We assume the default error as -EILSEQ simply to make the error path @@ -457,6 +455,8 @@ static int btmtksdio_rx_packet(struct btmtksdio_dev *bdev, u16 rx_size) /* Complete frame */ (&pkts[i])->recv(bdev->hdev, skb); + bdev->hdev->stat.byte_rx += rx_size; + return 0; err_kfree_skb: -- 2.18.0