Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: btintel_pcie: Do not generate coredump for diagnostic events

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>

authored by

Kiran K and committed by
Luiz Augusto von Dentz
689b5a80 bbf56029

+1 -18
+1 -2
drivers/bluetooth/btintel.c
··· 3688 3688 } 3689 3689 EXPORT_SYMBOL_GPL(btintel_configure_setup); 3690 3690 3691 - int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb) 3691 + static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb) 3692 3692 { 3693 3693 struct intel_tlv *tlv = (void *)&skb->data[5]; 3694 3694 ··· 3716 3716 recv_frame: 3717 3717 return hci_recv_frame(hdev, skb); 3718 3718 } 3719 - EXPORT_SYMBOL_GPL(btintel_diagnostics); 3720 3719 3721 3720 int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb) 3722 3721 {
-6
drivers/bluetooth/btintel.h
··· 277 277 int btintel_shutdown_combined(struct hci_dev *hdev); 278 278 void btintel_hw_error(struct hci_dev *hdev, u8 code); 279 279 void btintel_print_fseq_info(struct hci_dev *hdev); 280 - int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb); 281 280 #else 282 281 283 282 static inline int btintel_check_bdaddr(struct hci_dev *hdev) ··· 409 410 410 411 static inline void btintel_print_fseq_info(struct hci_dev *hdev) 411 412 { 412 - } 413 - 414 - static inline int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb) 415 - { 416 - return -EOPNOTSUPP; 417 413 } 418 414 #endif
-10
drivers/bluetooth/btintel_pcie.c
··· 889 889 static int btintel_pcie_recv_event(struct hci_dev *hdev, struct sk_buff *skb) 890 890 { 891 891 struct hci_event_hdr *hdr = (void *)skb->data; 892 - const char diagnostics_hdr[] = { 0x87, 0x80, 0x03 }; 893 892 struct btintel_pcie_data *data = hci_get_drvdata(hdev); 894 893 895 894 if (skb->len > HCI_EVENT_HDR_SIZE && hdr->evt == 0xff && ··· 942 943 kfree_skb(skb); 943 944 return 0; 944 945 } 945 - } 946 - 947 - /* Handle all diagnostics events separately. May still call 948 - * hci_recv_frame. 949 - */ 950 - if (len >= sizeof(diagnostics_hdr) && 951 - memcmp(&skb->data[2], diagnostics_hdr, 952 - sizeof(diagnostics_hdr)) == 0) { 953 - return btintel_diagnostics(hdev, skb); 954 946 } 955 947 956 948 /* This is a debug event that comes from IML and OP image when it