Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: btmrvl: don't consume all vendor specific events

If vendor specific HCI commands are received from application,
we should send corresponding events to stack.
These events should be consumed in driver, only if they are for
the internal HCI commands generated by driver.

This patch fixes the vendor command 0x3f stuck problem with
above mentioned change. For example,

hcitool cmd 3f 22 fe 06 22 21 20 43 50 00

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Amitkumar Karwar and committed by
Marcel Holtmann
d986b4a6 61b1a7fb

+6 -5
+6 -5
drivers/bluetooth/btmrvl_main.c
··· 59 59 priv->btmrvl_dev.sendcmdflag = false; 60 60 priv->adapter->cmd_complete = true; 61 61 wake_up_interruptible(&priv->adapter->cmd_wait_q); 62 - } 63 62 64 - if (hci_opcode_ogf(opcode) == 0x3F) { 65 - BT_DBG("vendor event skipped: opcode=%#4.4x", opcode); 66 - kfree_skb(skb); 67 - return false; 63 + if (hci_opcode_ogf(opcode) == 0x3F) { 64 + BT_DBG("vendor event skipped: opcode=%#4.4x", 65 + opcode); 66 + kfree_skb(skb); 67 + return false; 68 + } 68 69 } 69 70 } 70 71