Skip to content

Commit b39910b

Browse files
apusakaVudentz
authored andcommitted
Bluetooth: Populate hci_set_hw_info for Intel and Realtek
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 <[email protected]> Reviewed-by: Abhishek Pandit-Subedi <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 94c603c commit b39910b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/bluetooth/btintel.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2956,6 +2956,11 @@ static int btintel_setup_combined(struct hci_dev *hdev)
29562956
err = -EINVAL;
29572957
}
29582958

2959+
hci_set_hw_info(hdev,
2960+
"INTEL platform=%u variant=%u revision=%u",
2961+
ver.hw_platform, ver.hw_variant,
2962+
ver.hw_revision);
2963+
29592964
goto exit_error;
29602965
}
29612966

@@ -3060,6 +3065,10 @@ static int btintel_setup_combined(struct hci_dev *hdev)
30603065
break;
30613066
}
30623067

3068+
hci_set_hw_info(hdev, "INTEL platform=%u variant=%u",
3069+
INTEL_HW_PLATFORM(ver_tlv.cnvi_bt),
3070+
INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
3071+
30633072
exit_error:
30643073
kfree_skb(skb);
30653074

drivers/bluetooth/btrtl.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,13 @@ int btrtl_setup_realtek(struct hci_dev *hdev)
13391339

13401340
btrtl_set_quirks(hdev, btrtl_dev);
13411341

1342+
hci_set_hw_info(hdev,
1343+
"RTL lmp_subver=%u hci_rev=%u hci_ver=%u hci_bus=%u",
1344+
btrtl_dev->ic_info->lmp_subver,
1345+
btrtl_dev->ic_info->hci_rev,
1346+
btrtl_dev->ic_info->hci_ver,
1347+
btrtl_dev->ic_info->hci_bus);
1348+
13421349
btrtl_free(btrtl_dev);
13431350
return ret;
13441351
}

0 commit comments

Comments
 (0)