diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 0ffaac2..62968f6 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -39,6 +39,7 @@ define KernelPackage/bluetooth CONFIG_BT_RFCOMM \ CONFIG_BT_BNEP \ CONFIG_BT_HCIBTUSB \ + CONFIG_BT_HCIBTUSB_RTL=y \ CONFIG_BT_HCIBTUSB_BCM=n \ CONFIG_BT_HCIUART \ CONFIG_BT_HCIUART_BCM=n \ @@ -56,7 +57,8 @@ define KernelPackage/bluetooth $(LINUX_DIR)/drivers/bluetooth/btusb.ko ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,4.1.0)),1) FILES+= \ - $(LINUX_DIR)/drivers/bluetooth/btintel.ko + $(LINUX_DIR)/drivers/bluetooth/btintel.ko \ + $(LINUX_DIR)/drivers/bluetooth/btrtl.ko endif AUTOLOAD:=$(call AutoProbe,bluetooth rfcomm bnep hidp hci_uart btusb) endef diff --git a/target/linux/generic/pending-4.19/998-fix-endianness-in-ble-stack.patch b/target/linux/generic/pending-4.19/998-fix-endianness-in-ble-stack.patch new file mode 100644 index 0000000..9b32e02 --- /dev/null +++ b/target/linux/generic/pending-4.19/998-fix-endianness-in-ble-stack.patch @@ -0,0 +1,13 @@ +--- linux-4.19.82/net/bluetooth/hci_core.c 2021-05-25 13:45:22.818514761 +0100 ++++ linux-4.19.82/net/bluetooth/hci_core.c 2021-05-25 13:45:53.178610756 +0100 +@@ -841,8 +841,8 @@ + if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT) { + struct hci_cp_le_write_def_data_len cp; + +- cp.tx_len = hdev->le_max_tx_len; +- cp.tx_time = hdev->le_max_tx_time; ++ cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); ++ cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); + hci_req_add(req, HCI_OP_LE_WRITE_DEF_DATA_LEN, sizeof(cp), &cp); + } + diff --git a/target/linux/generic/pending-4.19/999-bt-rtl8761b-support.patch b/target/linux/generic/pending-4.19/999-bt-rtl8761b-support.patch new file mode 100644 index 0000000..a33ad82 --- /dev/null +++ b/target/linux/generic/pending-4.19/999-bt-rtl8761b-support.patch @@ -0,0 +1,31 @@ +--- linux-4.19.82/drivers/bluetooth/btrtl.c 2021-05-25 12:44:46.448016364 +0100 ++++ linux-4.19.82/drivers/bluetooth/btrtl.c 2021-05-25 12:46:38.296370040 +0100 +@@ -132,12 +132,19 @@ + .cfg_name = "rtl_bt/rtl8821c_config" }, + + /* 8761A */ +- { IC_MATCH_FL_LMPSUBV, RTL_ROM_LMP_8761A, 0x0, ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xa), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8761a_fw.bin", + .cfg_name = "rtl_bt/rtl8761a_config" }, + ++ /* 8761B */ ++ { IC_INFO(RTL_ROM_LMP_8761A, 0xb), ++ .config_needed = false, ++ .has_rom_version = true, ++ .fw_name = "rtl_bt/rtl8761b_fw.bin", ++ .cfg_name = "rtl_bt/rtl8761b_config" }, ++ + /* 8822B */ + { IC_INFO(RTL_ROM_LMP_8822B, 0xb), + .config_needed = true, +@@ -228,6 +235,7 @@ + { RTL_ROM_LMP_8822B, 8 }, + { RTL_ROM_LMP_8723B, 9 }, /* 8723D */ + { RTL_ROM_LMP_8821A, 10 }, /* 8821C */ ++ { RTL_ROM_LMP_8761A, 14 }, /* 8761B */ + }; + + min_size = sizeof(struct rtl_epatch_header) + sizeof(extension_sig) + 3;