Bluetooth: btintel_pcie: Do not generate coredump for diagnostic events
authorKiran K <kiran.k@intel.com>
Wed, 2 Apr 2025 02:11:48 +0000 (07:41 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 21 May 2025 14:27:05 +0000 (10:27 -0400)
All Intel diagnostic events are part of HCI traces and there is no need
to generate coredump for the same.

Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btintel.c
drivers/bluetooth/btintel.h
drivers/bluetooth/btintel_pcie.c

index 48e2f400957bc9f74b74448080c459f2ada42274..ae92490d0c78ad61d018ae4a57e7150971c31313 100644 (file)
@@ -3688,7 +3688,7 @@ int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name)
 }
 EXPORT_SYMBOL_GPL(btintel_configure_setup);
 
-int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
+static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
 {
        struct intel_tlv *tlv = (void *)&skb->data[5];
 
@@ -3716,7 +3716,6 @@ int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
 recv_frame:
        return hci_recv_frame(hdev, skb);
 }
-EXPORT_SYMBOL_GPL(btintel_diagnostics);
 
 int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
 {
index 2aece3effa4e997bb6b9aea91c0b8e550322c4ab..1d12c4113c669ea334ce98a5beab0b8ac13ca515 100644 (file)
@@ -277,7 +277,6 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
 int btintel_shutdown_combined(struct hci_dev *hdev);
 void btintel_hw_error(struct hci_dev *hdev, u8 code);
 void btintel_print_fseq_info(struct hci_dev *hdev);
-int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb);
 #else
 
 static inline int btintel_check_bdaddr(struct hci_dev *hdev)
@@ -411,9 +410,4 @@ static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
 static inline void btintel_print_fseq_info(struct hci_dev *hdev)
 {
 }
-
-static inline int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
-{
-       return -EOPNOTSUPP;
-}
 #endif
index 0a759ea26fd38f600ae9644842c46ebe95a3db54..c23823e2a3ec1efced76cf8e75377302b9480729 100644 (file)
@@ -889,7 +889,6 @@ static void btintel_pcie_msix_tx_handle(struct btintel_pcie_data *data)
 static int btintel_pcie_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
 {
        struct hci_event_hdr *hdr = (void *)skb->data;
-       const char diagnostics_hdr[] = { 0x87, 0x80, 0x03 };
        struct btintel_pcie_data *data = hci_get_drvdata(hdev);
 
        if (skb->len > HCI_EVENT_HDR_SIZE && hdr->evt == 0xff &&
@@ -945,15 +944,6 @@ static int btintel_pcie_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
                        }
                }
 
-               /* Handle all diagnostics events separately. May still call
-                * hci_recv_frame.
-                */
-               if (len >= sizeof(diagnostics_hdr) &&
-                   memcmp(&skb->data[2], diagnostics_hdr,
-                          sizeof(diagnostics_hdr)) == 0) {
-                       return btintel_diagnostics(hdev, skb);
-               }
-
                /* This is a debug event that comes from IML and OP image when it
                 * starts execution. There is no need pass this event to stack.
                 */