Skip to content

Commit 6ac034a

Browse files
moore-brosholtmann
authored andcommitted
Bluetooth: btmtkuart: fix the conflict between mtk and msft vendor event
There is a conflict between MediaTek wmt event and msft vendor extension logic in the core layer since 145373c ("Bluetooth: Add framework for Microsoft vendor extension") was introduced because we changed the type of mediatek wmt event to the type of msft vendor event in the driver. But the purpose we reported mediatek event to the core layer is for the diagnostic purpose with that we are able to see the full packet trace via monitoring socket with btmon. Thus, it is harmless we keep the original type of mediatek vendor event here to avoid breaking the msft extension function especially they can be supported by Mediatek future devices. Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 3640e7f commit 6ac034a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/bluetooth/btmtkuart.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,6 @@ static int btmtkuart_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
192192
struct hci_event_hdr *hdr = (void *)skb->data;
193193
int err;
194194

195-
/* Fix up the vendor event id with 0xff for vendor specific instead
196-
* of 0xe4 so that event send via monitoring socket can be parsed
197-
* properly.
198-
*/
199-
if (hdr->evt == 0xe4)
200-
hdr->evt = HCI_EV_VENDOR;
201-
202195
/* When someone waits for the WMT event, the skb is being cloned
203196
* and being processed the events from there then.
204197
*/
@@ -214,7 +207,7 @@ static int btmtkuart_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
214207
if (err < 0)
215208
goto err_free_skb;
216209

217-
if (hdr->evt == HCI_EV_VENDOR) {
210+
if (hdr->evt == HCI_EV_WMT) {
218211
if (test_and_clear_bit(BTMTKUART_TX_WAIT_VND_EVT,
219212
&bdev->tx_state)) {
220213
/* Barrier to sync with other CPUs */

0 commit comments

Comments
 (0)