diff options
author | Sean Wang <sean.wang@mediatek.com> | 2019-04-18 11:08:01 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2019-04-23 18:36:20 +0200 |
commit | bcaa7d72dffddfa4196a37108d67fc12fb4edfca (patch) | |
tree | cced42a9de4a526f3d509d4c15c0206947cdd56b /drivers/bluetooth/btmtksdio.c | |
parent | Bluetooth: btmtksdio: Add a bit definition for CHLPCR (diff) | |
download | linux-bcaa7d72dffddfa4196a37108d67fc12fb4edfca.tar.xz linux-bcaa7d72dffddfa4196a37108d67fc12fb4edfca.zip |
Bluetooth: btmtksdio: Fix hdev->stat.byte_rx accumulation
Accumulate hdev->stat.byte_rx only for valid packets as btmtkuart doing.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btmtksdio.c')
-rw-r--r-- | drivers/bluetooth/btmtksdio.c | 4 |
1 files 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: |