Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1548736ybb; Thu, 9 Apr 2020 04:29:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKSe9WVWKtX+lwfTwyWEACCUtOYxNdltlNsAUN6kzCTQSOgwEn3J5MJQkXKkWiNyEzsL/j7 X-Received: by 2002:a4a:874f:: with SMTP id a15mr3328348ooi.8.1586431764951; Thu, 09 Apr 2020 04:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586431764; cv=none; d=google.com; s=arc-20160816; b=WG/V5oy67co2EVAd3Tx0c6o/4KCtHKEe81dllTqmKOCYwYBy0s2qTBFnIJArQ0D8Sn ntHj4d4XpEjAOqF68BQ7OONXpdMaDoUTZ4pjsWIeIeMsuAy+2hv3dh3Wc8P1mLUxg5Le hvqjPOIF1oumqZtGurbx1rTe6ZJLA/NUKUPI1cgLAoVNwmLiVP+f+zM3a7VQrwrqx8a+ 7XLm5GwQti9ZcZ6giAZI3AUbTLViXl5WTIh79W3ghyN4BuptQSJXrA11PbAwXTVs2Zt0 brwSGOiJMFSdnvCTtlASDk32vUbdLExCLP5ViDTcj3JJMrE0InuMy4L2i8TpvtHkpA3Q VPaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=emN963p/b6gAL0ZlK4PgYmmCwD70mbC1616E6wOyfAs=; b=toJeVinVKyDE+gJTprMPdPw6mz7irBjyrfVuB2Ui097KcfKvBJD+4/LWreTS6blA1h Ph//1Dw7B8sMxs82ipu6tsSiqYBbd81XYqSP8cI7yRiIm2MhG8WXccUyp4ZlBPQv5/Wn uZzhBAjzzb3W66Sv1s0BJEeYYCNHz2pcvU0WRWPqEy1Gax6lXdo7Uwam/jPDhRQVRmGC D0061vABxwNEjjS1698bbmuVqys3PGot5VtHVkd5XVwYLI2pqB89I/ObVZLpd8AAuXtb Wg0PLapy5ms6imiRZm63KI0dFjKCvENvYZdHPhbfrUlLET0ou2pSjFQwujh58e0PxwXm 5gNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m67si3171897oib.215.2020.04.09.04.28.56; Thu, 09 Apr 2020 04:29:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726663AbgDIL2R (ORCPT + 99 others); Thu, 9 Apr 2020 07:28:17 -0400 Received: from mail.weplayciv.com ([162.221.200.53]:60066 "EHLO mail.weplayciv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbgDIL2P (ORCPT ); Thu, 9 Apr 2020 07:28:15 -0400 X-Greylist: delayed 558 seconds by postgrey-1.27 at vger.kernel.org; Thu, 09 Apr 2020 07:28:15 EDT Received: from midgard.internal.axentia.se (h87-96-186-165.cust.a3fiber.se [87.96.186.165]) by mail.weplayciv.com (Postfix) with ESMTPA id CC82B208C716; Thu, 9 Apr 2020 04:18:54 -0700 (PDT) From: daniels@umanovskis.se To: marcel@holtmann.org, johan.hedberg@gmail.com Cc: linux-bluetooth@vger.kernel.org, Daniels Umanovskis Subject: [PATCH] Bluetooth: log advertisement packet length if it gets corrected Date: Thu, 9 Apr 2020 13:18:29 +0200 Message-Id: <20200409111829.9508-1-daniels@umanovskis.se> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Daniels Umanovskis 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 --- 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