aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchie Pusaka <apusaka@chromium.org>2024-04-22 17:20:28 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-04-24 16:10:50 -0400
commit085643037f72cf7751a44843d3fcc0613ab96b20 (patch)
tree81da8c16de9c848fa4abe6670bc52e8aae60b6cc
parent18e32d19a61bc330280bac22406519be9f873d81 (diff)
downloadbluetooth-next-085643037f72cf7751a44843d3fcc0613ab96b20.tar.gz
Bluetooth: Populate hci_set_hw_info for Intel and Realtek
Notice: this object is not reachable from any branch.
The hardware information surfaced via debugfs might be usable by the userspace to set some configuration knobs. This patch sets the hw_info for Intel and Realtek chipsets. Below are some possible output of the hardware_info debugfs file. INTEL platform=55 variant=24 RTL lmp_subver=34898 hci_rev=10 hci_ver=11 hci_bus=1 Signed-off-by: Archie Pusaka <apusaka@chromium.org> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@google.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Notice: this object is not reachable from any branch.
-rw-r--r--drivers/bluetooth/btintel.c9
-rw-r--r--drivers/bluetooth/btrtl.c7
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index a19ebe47bd9510..dc48352166a524 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2956,6 +2956,11 @@ static int btintel_setup_combined(struct hci_dev *hdev)
err = -EINVAL;
}
+ hci_set_hw_info(hdev,
+ "INTEL platform=%u variant=%u revision=%u",
+ ver.hw_platform, ver.hw_variant,
+ ver.hw_revision);
+
goto exit_error;
}
@@ -3060,6 +3065,10 @@ static int btintel_setup_combined(struct hci_dev *hdev)
break;
}
+ hci_set_hw_info(hdev, "INTEL platform=%u variant=%u",
+ INTEL_HW_PLATFORM(ver_tlv.cnvi_bt),
+ INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
+
exit_error:
kfree_skb(skb);
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index cc50de69e8dc98..4f1e37b4f7802d 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -1339,6 +1339,13 @@ int btrtl_setup_realtek(struct hci_dev *hdev)
btrtl_set_quirks(hdev, btrtl_dev);
+ hci_set_hw_info(hdev,
+ "RTL lmp_subver=%u hci_rev=%u hci_ver=%u hci_bus=%u",
+ btrtl_dev->ic_info->lmp_subver,
+ btrtl_dev->ic_info->hci_rev,
+ btrtl_dev->ic_info->hci_ver,
+ btrtl_dev->ic_info->hci_bus);
+
btrtl_free(btrtl_dev);
return ret;
}