mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
a34255b795
Removed upstreamed: bcm27xx/patches-5.15/950-0446-drm-vc4-Fix-timings-for-VEC-modes.patch[1] Manually rebased: patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch All other patches automatically rebased 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.75&id=2810061452f9b748b096ad023d318690ca519aa3 Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <therealgraysky@proton.me>
52 lines
1.6 KiB
Diff
52 lines
1.6 KiB
Diff
From 5cb03751455c299b1bf10cb48631bf359cfb11b5 Mon Sep 17 00:00:00 2001
|
|
From: "mark-yw.chen" <mark-yw.chen@mediatek.com>
|
|
Date: Wed, 1 Sep 2021 11:32:25 +0800
|
|
Subject: [PATCH 1/5] Bluetooth: btusb: Support public address configuration
|
|
for MediaTek Chip.
|
|
|
|
The MediaTek chip support vendor specific HCI command(0xfc1a) to
|
|
change the public address. Add hdev->set_bdaddr handler for MediaTek
|
|
Chip. After doing a power cycle or MediaTek Bluetooth reset, BD_ADDR
|
|
will bring back the original one.
|
|
|
|
Signed-off-by: mark-yw.chen <mark-yw.chen@mediatek.com>
|
|
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
---
|
|
drivers/bluetooth/btusb.c | 18 ++++++++++++++++++
|
|
1 file changed, 18 insertions(+)
|
|
|
|
--- a/drivers/bluetooth/btusb.c
|
|
+++ b/drivers/bluetooth/btusb.c
|
|
@@ -2263,6 +2263,23 @@ struct btmtk_section_map {
|
|
};
|
|
} __packed;
|
|
|
|
+static int btusb_set_bdaddr_mtk(struct hci_dev *hdev, const bdaddr_t *bdaddr)
|
|
+{
|
|
+ struct sk_buff *skb;
|
|
+ long ret;
|
|
+
|
|
+ skb = __hci_cmd_sync(hdev, 0xfc1a, sizeof(bdaddr), bdaddr, HCI_INIT_TIMEOUT);
|
|
+ if (IS_ERR(skb)) {
|
|
+ ret = PTR_ERR(skb);
|
|
+ bt_dev_err(hdev, "changing Mediatek device address failed (%ld)",
|
|
+ ret);
|
|
+ return ret;
|
|
+ }
|
|
+ kfree_skb(skb);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
static void btusb_mtk_wmt_recv(struct urb *urb)
|
|
{
|
|
struct hci_dev *hdev = urb->context;
|
|
@@ -3914,6 +3931,7 @@ static int btusb_probe(struct usb_interf
|
|
hdev->shutdown = btusb_mtk_shutdown;
|
|
hdev->manufacturer = 70;
|
|
hdev->cmd_timeout = btusb_mtk_cmd_timeout;
|
|
+ hdev->set_bdaddr = btusb_set_bdaddr_mtk;
|
|
set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
|
|
data->recv_acl = btusb_recv_acl_mtk;
|
|
}
|