提交 bcaa7d72 编写于 作者: S Sean Wang 提交者: Marcel Holtmann

Bluetooth: btmtksdio: Fix hdev->stat.byte_rx accumulation

Accumulate hdev->stat.byte_rx only for valid packets as btmtkuart doing.
Signed-off-by: NSean Wang <sean.wang@mediatek.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 2e47cc2b
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册