git: 7a7ab347fc65 - main - rtlbtfw(8): Add Mercusys MA530 VID/PID for Realtek 8761BUV

From: Vladimir Kondratyev <wulf_at_FreeBSD.org>
Date: Tue, 29 Apr 2025 20:29:36 UTC
The branch main has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=7a7ab347fc6535a8c91d458dda76a61019163869

commit 7a7ab347fc6535a8c91d458dda76a61019163869
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2025-04-29 20:28:53 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2025-04-29 20:28:53 +0000

    rtlbtfw(8): Add Mercusys MA530 VID/PID for Realtek 8761BUV
    
    Tested by:      Yusuf Yaman <nxjoseph@protonmail.com>
    PR:             286369
    MFC after:      1 week
---
 sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c | 1 +
 usr.sbin/bluetooth/rtlbtfw/main.c               | 1 +
 usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf         | 8 ++++++++
 3 files changed, 10 insertions(+)

diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c
index b9fbc1c12a29..c3fb98b46e6a 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c
@@ -127,6 +127,7 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] =
 	{ USB_VPI(0x2ff8, 0xb011, 0) },
 
 	/* Realtek 8761BUV Bluetooth devices */
+	{ USB_VPI(0x2c4e, 0x0115, 0) },
 	{ USB_VPI(0x2357, 0x0604, 0) },
 	{ USB_VPI(0x0b05, 0x190e, 0) },
 	{ USB_VPI(0x2550, 0x8761, 0) },
diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c
index 029c04f98b26..e0445726c3a2 100644
--- a/usr.sbin/bluetooth/rtlbtfw/main.c
+++ b/usr.sbin/bluetooth/rtlbtfw/main.c
@@ -112,6 +112,7 @@ static struct rtlbt_devid rtlbt_list[] = {
 	{ .vendor_id = 0x2ff8, .product_id = 0xb011 },
 
 	/* Realtek 8761BUV Bluetooth devices */
+	{ .vendor_id = 0x2c4e, .product_id = 0x0115 },
 	{ .vendor_id = 0x2357, .product_id = 0x0604 },
 	{ .vendor_id = 0x0b05, .product_id = 0x190e },
 	{ .vendor_id = 0x2550, .product_id = 0x8761 },
diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
index d544913aaa12..d45ba0bd92c4 100644
--- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
+++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
@@ -213,6 +213,14 @@ notify 100 {
 };
 
 # Realtek 8761BUV Bluetooth devices
+notify 100 {
+	match "system"		"USB";
+	match "subsystem"	"DEVICE";
+	match "type"		"ATTACH";
+	match "vendor"		"0x2c4e";
+	match "product"		"0x0115";
+	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
+};
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";