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

Configure Feed

Select the types of activity you want to include in your feed.

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 145373cb1b1f ("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 <sean.wang@mediatek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Sean Wang and committed by
Marcel Holtmann
6ac034a7 3640e7f4

+1 -8
+1 -8
drivers/bluetooth/btmtkuart.c
··· 192 192 struct hci_event_hdr *hdr = (void *)skb->data; 193 193 int err; 194 194 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 - 202 195 /* When someone waits for the WMT event, the skb is being cloned 203 196 * and being processed the events from there then. 204 197 */ ··· 207 214 if (err < 0) 208 215 goto err_free_skb; 209 216 210 - if (hdr->evt == HCI_EV_VENDOR) { 217 + if (hdr->evt == HCI_EV_WMT) { 211 218 if (test_and_clear_bit(BTMTKUART_TX_WAIT_VND_EVT, 212 219 &bdev->tx_state)) { 213 220 /* Barrier to sync with other CPUs */