aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btintel.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-07-05 15:02:07 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-07-23 17:10:50 +0200
commit7feb99e1308204e4d849dada3443bc410ce5026b (patch)
treebda1dc9655e5453a544db5daa4b34c16b496b3ec /drivers/bluetooth/btintel.c
parentBluetooth: btintel: Create common Intel Secure Send function (diff)
downloadlinux-dev-7feb99e1308204e4d849dada3443bc410ce5026b.tar.xz
linux-dev-7feb99e1308204e4d849dada3443bc410ce5026b.zip
Bluetooth: btintel: Create common function for Intel version info
The Intel version information is shared between USB and UART drivers and with that move it into a generic function of the Intel module. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/btintel.c')
-rw-r--r--drivers/bluetooth/btintel.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index d3b0fb55e340..1ce4ac16c7fa 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -123,6 +123,27 @@ void btintel_hw_error(struct hci_dev *hdev, u8 code)
}
EXPORT_SYMBOL_GPL(btintel_hw_error);
+void btintel_version_info(struct hci_dev *hdev, struct intel_version *ver)
+{
+ const char *variant;
+
+ switch (ver->fw_variant) {
+ case 0x06:
+ variant = "Bootloader";
+ break;
+ case 0x23:
+ variant = "Firmware";
+ break;
+ default:
+ return;
+ }
+
+ BT_INFO("%s: %s revision %u.%u build %u week %u %u", hdev->name,
+ variant, ver->fw_revision >> 4, ver->fw_revision & 0x0f,
+ ver->fw_build_num, ver->fw_build_ww, 2000 + ver->fw_build_yy);
+}
+EXPORT_SYMBOL_GPL(btintel_version_info);
+
int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
const void *param)
{