Skip to content

Commit b23d98d

Browse files
zijun-huVudentz
authored andcommitted
Bluetooth: btusb: Fix triggering coredump implementation for QCA
btusb_coredump_qca() uses __hci_cmd_sync() to send a vendor-specific command to trigger firmware coredump, but the command does not have any event as its sync response, so it is not suitable to use __hci_cmd_sync(), fixed by using __hci_cmd_send(). Fixes: 20981ce ("Bluetooth: btusb: Add WCN6855 devcoredump support") Signed-off-by: Zijun Hu <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent d1a5a7e commit b23d98d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/bluetooth/btusb.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,13 +3482,12 @@ static void btusb_dump_hdr_qca(struct hci_dev *hdev, struct sk_buff *skb)
34823482

34833483
static void btusb_coredump_qca(struct hci_dev *hdev)
34843484
{
3485+
int err;
34853486
static const u8 param[] = { 0x26 };
3486-
struct sk_buff *skb;
34873487

3488-
skb = __hci_cmd_sync(hdev, 0xfc0c, 1, param, HCI_CMD_TIMEOUT);
3489-
if (IS_ERR(skb))
3490-
bt_dev_err(hdev, "%s: triggle crash failed (%ld)", __func__, PTR_ERR(skb));
3491-
kfree_skb(skb);
3488+
err = __hci_cmd_send(hdev, 0xfc0c, 1, param);
3489+
if (err < 0)
3490+
bt_dev_err(hdev, "%s: triggle crash failed (%d)", __func__, err);
34923491
}
34933492

34943493
/*

0 commit comments

Comments
 (0)