Message ID | 20200409111829.9508-1-daniels@umanovskis.se (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Marcel Holtmann |
Headers | show |
Series | Bluetooth: log advertisement packet length if it gets corrected | expand |
On Thu, Apr 9, 2020 at 7:28 AM <daniels@umanovskis.se> wrote: > > From: Daniels Umanovskis <du@axentia.se> > > 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> > --- > net/bluetooth/hci_event.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c > index 0a591be8b0ae..af7fa7ef94ed 100644 > --- a/net/bluetooth/hci_event.c > +++ b/net/bluetooth/hci_event.c > @@ -5353,7 +5353,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; > } > > -- > 2.20.1 > Reviewed-by: Alain Michaud <alainm@chromium.org>
Hi Daniels, > 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> > --- > net/bluetooth/hci_event.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 0a591be8b0ae..af7fa7ef94ed 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5353,7 +5353,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; }