mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 15:18:15 +00:00
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>
This commit is contained in:
parent
2e47cc2b3a
commit
bcaa7d72df
1 changed files with 2 additions and 2 deletions
|
@ -391,8 +391,6 @@ static int btmtksdio_rx_packet(struct btmtksdio_dev *bdev, u16 rx_size)
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_kfree_skb;
|
goto err_kfree_skb;
|
||||||
|
|
||||||
bdev->hdev->stat.byte_rx += rx_size;
|
|
||||||
|
|
||||||
sdio_hdr = (void *)skb->data;
|
sdio_hdr = (void *)skb->data;
|
||||||
|
|
||||||
/* We assume the default error as -EILSEQ simply to make the error path
|
/* 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 */
|
/* Complete frame */
|
||||||
(&pkts[i])->recv(bdev->hdev, skb);
|
(&pkts[i])->recv(bdev->hdev, skb);
|
||||||
|
|
||||||
|
bdev->hdev->stat.byte_rx += rx_size;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_kfree_skb:
|
err_kfree_skb:
|
||||||
|
|
Loading…
Add table
Reference in a new issue