Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Mar 2026 19:02:03 +0000
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Christos Longros <chris.longros@gmail.com>
Subject:   git: f3fc362c0fb2 - main - bluetooth: remove redundant 0x0bda entries from ng_ubt_rtl, rtlbtfw
Message-ID:  <69c9772b.1dda0.1df3ab64@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by wulf:

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

commit f3fc362c0fb27731e2c22523e0cedf1adec26c44
Author:     Christos Longros <chris.longros@gmail.com>
AuthorDate: 2026-03-29 19:00:59 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2026-03-29 19:00:59 +0000

    bluetooth: remove redundant 0x0bda entries from ng_ubt_rtl, rtlbtfw
    
    Generic Realtek vendor rules already match all 0x0bda Bluetooth devices.
    Remove the redundant per-product entries from ng_ubt_rtl.c,
    rtlbtfw main.c, and rtlbtfw.conf.
    
    Reviewed by:    wulf
    MFC after:      1 month
    Differential Revision:  https://reviews.freebsd.org/D56137
---
 sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c | 24 +++------
 usr.sbin/bluetooth/rtlbtfw/main.c               | 24 +++------
 usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf         | 68 -------------------------
 3 files changed, 12 insertions(+), 104 deletions(-)

diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c
index f5dcac0a6846..54c3659d0ac9 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c
@@ -74,21 +74,19 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] =
 	  USB_IFACE_SUBCLASS(UDSUBCLASS_RF),
 	  USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) },
 
+	/*
+	 * Non-Realtek vendors using Realtek Bluetooth chipsets.
+	 * Devices with vendor 0x0bda are already matched by the
+	 * generic rule above.
+	 */
+
 	/* Realtek 8821CE Bluetooth devices */
 	{ USB_VPI(0x13d3, 0x3529, 0) },
 
-	/* Realtek 8822CE Bluetooth devices */
-	{ USB_VPI(0x0bda, 0xb00c, 0) },
-	{ USB_VPI(0x0bda, 0xc822, 0) },
-
 	/* Realtek 8851BE Bluetooth devices */
 	{ USB_VPI(0x13d3, 0x3600, 0) },
 
 	/* Realtek 8852AE Bluetooth devices */
-	{ USB_VPI(0x0bda, 0x2852, 0) },
-	{ USB_VPI(0x0bda, 0xc852, 0) },
-	{ USB_VPI(0x0bda, 0x385a, 0) },
-	{ USB_VPI(0x0bda, 0x4852, 0) },
 	{ USB_VPI(0x04c5, 0x165c, 0) },
 	{ USB_VPI(0x04ca, 0x4006, 0) },
 	{ USB_VPI(0x0cb8, 0xc549, 0) },
@@ -105,9 +103,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] =
 
 	/* Realtek 8852BE Bluetooth devices */
 	{ USB_VPI(0x0cb8, 0xc559, 0) },
-	{ USB_VPI(0x0bda, 0x4853, 0) },
-	{ USB_VPI(0x0bda, 0x887b, 0) },
-	{ USB_VPI(0x0bda, 0xb85b, 0) },
 	{ USB_VPI(0x13d3, 0x3570, 0) },
 	{ USB_VPI(0x13d3, 0x3571, 0) },
 	{ USB_VPI(0x13d3, 0x3572, 0) },
@@ -115,11 +110,7 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] =
 	{ USB_VPI(0x0489, 0xe123, 0) },
 	{ USB_VPI(0x0489, 0xe125, 0) },
 
-	/* Realtek 8852BT/8852BE-VT Bluetooth devices */
-	{ USB_VPI(0x0bda, 0x8520, 0) },
-
 	/* Realtek 8922AE Bluetooth devices */
-	{ USB_VPI(0x0bda, 0x8922, 0) },
 	{ USB_VPI(0x13d3, 0x3617, 0) },
 	{ USB_VPI(0x13d3, 0x3616, 0) },
 	{ USB_VPI(0x0489, 0xe130, 0) },
@@ -141,7 +132,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] =
 	{ USB_VPI(0x7392, 0xa611, 0) },
 
 	/* Realtek 8723DE Bluetooth devices */
-	{ USB_VPI(0x0bda, 0xb009, 0) },
 	{ USB_VPI(0x2ff8, 0xb011, 0) },
 
 	/* Realtek 8761BUV Bluetooth devices */
@@ -149,7 +139,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] =
 	{ USB_VPI(0x2357, 0x0604, 0) },
 	{ USB_VPI(0x0b05, 0x190e, 0) },
 	{ USB_VPI(0x2550, 0x8761, 0) },
-	{ USB_VPI(0x0bda, 0x8771, 0) },
 	{ USB_VPI(0x6655, 0x8771, 0) },
 	{ USB_VPI(0x7392, 0xc611, 0) },
 	{ USB_VPI(0x2b89, 0x8761, 0) },
@@ -175,7 +164,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] =
 	{ USB_VPI(0x13d3, 0x3555, 0) },
 	{ USB_VPI(0x2ff8, 0x3051, 0) },
 	{ USB_VPI(0x1358, 0xc123, 0) },
-	{ USB_VPI(0x0bda, 0xc123, 0) },
 	{ USB_VPI(0x0cb5, 0xc547, 0) },
 };
 const size_t ubt_rtl_devs_sizeof = sizeof(ubt_rtl_devs);
diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c
index 37c902739206..dc9ccd6c5fcd 100644
--- a/usr.sbin/bluetooth/rtlbtfw/main.c
+++ b/usr.sbin/bluetooth/rtlbtfw/main.c
@@ -57,21 +57,19 @@ struct rtlbt_devid {
 };
 
 static struct rtlbt_devid rtlbt_list[] = {
+	/*
+	 * Non-Realtek vendors using Realtek Bluetooth chipsets.
+	 * Devices with vendor 0x0bda are already matched by the
+	 * generic check in rtlbt_find_device().
+	 */
+
 	/* Realtek 8821CE Bluetooth devices */
 	{ .vendor_id = 0x13d3, .product_id = 0x3529 },
 
-	/* Realtek 8822CE Bluetooth devices */
-	{ .vendor_id = 0x0bda, .product_id = 0xb00c },
-	{ .vendor_id = 0x0bda, .product_id = 0xc822 },
-
 	/* Realtek 8851BE Bluetooth devices */
 	{ .vendor_id = 0x13d3, .product_id = 0x3600 },
 
 	/* Realtek 8852AE Bluetooth devices */
-	{ .vendor_id = 0x0bda, .product_id = 0x2852 },
-	{ .vendor_id = 0x0bda, .product_id = 0xc852 },
-	{ .vendor_id = 0x0bda, .product_id = 0x385a },
-	{ .vendor_id = 0x0bda, .product_id = 0x4852 },
 	{ .vendor_id = 0x04c5, .product_id = 0x165c },
 	{ .vendor_id = 0x04ca, .product_id = 0x4006 },
 	{ .vendor_id = 0x0cb8, .product_id = 0xc549 },
@@ -88,9 +86,6 @@ static struct rtlbt_devid rtlbt_list[] = {
 
 	/* Realtek 8852BE Bluetooth devices */
 	{ .vendor_id = 0x0cb8, .product_id = 0xc559 },
-	{ .vendor_id = 0x0bda, .product_id = 0x4853 },
-	{ .vendor_id = 0x0bda, .product_id = 0x887b },
-	{ .vendor_id = 0x0bda, .product_id = 0xb85b },
 	{ .vendor_id = 0x13d3, .product_id = 0x3570 },
 	{ .vendor_id = 0x13d3, .product_id = 0x3571 },
 	{ .vendor_id = 0x13d3, .product_id = 0x3572 },
@@ -98,11 +93,7 @@ static struct rtlbt_devid rtlbt_list[] = {
 	{ .vendor_id = 0x0489, .product_id = 0xe123 },
 	{ .vendor_id = 0x0489, .product_id = 0xe125 },
 
-	/* Realtek 8852BT/8852BE-VT Bluetooth devices */
-	{ .vendor_id = 0x0bda, .product_id = 0x8520 },
-
 	/* Realtek 8922AE Bluetooth devices */
-	{ .vendor_id = 0x0bda, .product_id = 0x8922 },
 	{ .vendor_id = 0x13d3, .product_id = 0x3617 },
 	{ .vendor_id = 0x13d3, .product_id = 0x3616 },
 	{ .vendor_id = 0x0489, .product_id = 0xe130 },
@@ -124,7 +115,6 @@ static struct rtlbt_devid rtlbt_list[] = {
 	{ .vendor_id = 0x7392, .product_id = 0xa611 },
 
 	/* Realtek 8723DE Bluetooth devices */
-	{ .vendor_id = 0x0bda, .product_id = 0xb009 },
 	{ .vendor_id = 0x2ff8, .product_id = 0xb011 },
 
 	/* Realtek 8761BUV Bluetooth devices */
@@ -132,7 +122,6 @@ static struct rtlbt_devid rtlbt_list[] = {
 	{ .vendor_id = 0x2357, .product_id = 0x0604 },
 	{ .vendor_id = 0x0b05, .product_id = 0x190e },
 	{ .vendor_id = 0x2550, .product_id = 0x8761 },
-	{ .vendor_id = 0x0bda, .product_id = 0x8771 },
 	{ .vendor_id = 0x6655, .product_id = 0x8771 },
 	{ .vendor_id = 0x7392, .product_id = 0xc611 },
 	{ .vendor_id = 0x2b89, .product_id = 0x8761 },
@@ -158,7 +147,6 @@ static struct rtlbt_devid rtlbt_list[] = {
 	{ .vendor_id = 0x13d3, .product_id = 0x3555 },
 	{ .vendor_id = 0x2ff8, .product_id = 0x3051 },
 	{ .vendor_id = 0x1358, .product_id = 0xc123 },
-	{ .vendor_id = 0x0bda, .product_id = 0xc123 },
 	{ .vendor_id = 0x0cb5, .product_id = 0xc547 },
 };
 
diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
index 0a2b33d33b18..f27e0ee50ccc 100644
--- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
+++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
@@ -26,16 +26,6 @@ notify 100 {
 	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
 };
 
-# Realtek 8822CE Bluetooth devices
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"(0xb00c|0xc822)";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
-
 # Realtek 8851BE Bluetooth devices
 notify 100 {
 	match "system"		"USB";
@@ -47,14 +37,6 @@ notify 100 {
 };
 
 # Realtek 8852AE Bluetooth devices
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"(0x2852|0xc852|0x385a|0x4852)";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";
@@ -131,14 +113,6 @@ notify 100 {
 	match "product"		"0xc559";
 	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
 };
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"(0x4853|0x887b|0xb85b)";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";
@@ -156,25 +130,7 @@ notify 100 {
 	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
 };
 
-# Realtek 8852BT/8852BE-VT Bluetooth devices
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"0x8520";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
-
 # Realtek 8922AE Bluetooth devices
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"0x8922";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";
@@ -247,14 +203,6 @@ notify 100 {
 };
 
 # Realtek 8723DE Bluetooth devices
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"0xb009";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";
@@ -297,14 +245,6 @@ notify 100 {
 	match "product"		"0x8761";
 	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
 };
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"0x8771";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";
@@ -415,14 +355,6 @@ notify 100 {
 	match "product"		"0xc123";
 	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
 };
-notify 100 {
-	match "system"		"USB";
-	match "subsystem"	"DEVICE";
-	match "type"		"ATTACH";
-	match "vendor"		"0x0bda";
-	match "product"		"0xc123";
-	action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69c9772b.1dda0.1df3ab64>