Bluetooth: log advertisement packet length if it gets corrected
authorDaniels Umanovskis <du@axentia.se>
Thu, 9 Apr 2020 11:18:29 +0000 (13:18 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 9 Apr 2020 17:57:28 +0000 (19:57 +0200)
The error could indicate a problem with the Bluetooth device. It
is easier to investigate if the packet's actual length gets logged,
not just the fact that a discrepancy occurred.

Signed-off-by: Daniels Umanovskis <du@axentia.se>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index 51e6461f0b71213c707de264b7986d6aa5de0f8d..966fc543c01da2d84296b2c285c79b10beceb961 100644 (file)
@@ -5396,7 +5396,8 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
 
        /* Adjust for actual length */
        if (len != real_len) {
-               bt_dev_err_ratelimited(hdev, "advertising data len corrected");
+               bt_dev_err_ratelimited(hdev, "advertising data len corrected %u -> %u",
+                                      len, real_len);
                len = real_len;
        }