Commit 330ad75f authored by Dan Carpenter's avatar Dan Carpenter Committed by Marcel Holtmann

Bluetooth: mediatek: pass correct size to h4_recv_buf()

We're supposed to pass the number of elements in the mtk_recv_pkts, not
the number of bytes.

Fixes: 7237c4c9 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent a487711a
...@@ -346,7 +346,7 @@ static int btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count) ...@@ -346,7 +346,7 @@ static int btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
bdev->rx_skb = h4_recv_buf(bdev->hdev, bdev->rx_skb, p_h4, bdev->rx_skb = h4_recv_buf(bdev->hdev, bdev->rx_skb, p_h4,
sz_h4, mtk_recv_pkts, sz_h4, mtk_recv_pkts,
sizeof(mtk_recv_pkts)); ARRAY_SIZE(mtk_recv_pkts));
if (IS_ERR(bdev->rx_skb)) { if (IS_ERR(bdev->rx_skb)) {
err = PTR_ERR(bdev->rx_skb); err = PTR_ERR(bdev->rx_skb);
bt_dev_err(bdev->hdev, bt_dev_err(bdev->hdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment