Commit b23d98d4 authored by Zijun Hu's avatar Zijun Hu Committed by Luiz Augusto von Dentz
Browse files

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: 20981ce2 ("Bluetooth: btusb: Add WCN6855 devcoredump support")
Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent d1a5a7ee
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -3482,13 +3482,12 @@ static void btusb_dump_hdr_qca(struct hci_dev *hdev, struct sk_buff *skb)

static void btusb_coredump_qca(struct hci_dev *hdev)
{
	int err;
	static const u8 param[] = { 0x26 };
	struct sk_buff *skb;

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

/*