diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-02-05 00:04:38 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-07-22 23:20:52 +0300 |
commit | dfe6d5c3ec23c5b999261d989059aa35403d791d (patch) | |
tree | ecfb0dc1c15880dd2590c9ae3ccf79672ce14cac /net/bluetooth/hci_event.c | |
parent | 0ef08313cefdd60d7be1e21c405f8f8e544d8ee9 (diff) | |
download | linux-dfe6d5c3ec23c5b999261d989059aa35403d791d.tar.xz |
Bluetooth: hci_core: Introduce hci_recv_event_data
This introduces hci_recv_event_data to make it simpler to access the
contents of last received event rather than having to pass its contents
to the likes of *_ind/*_cfm callbacks.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index b32ca92fc692..bab52ee99b11 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -6936,6 +6936,9 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) goto done; } + kfree_skb(hdev->recv_event); + hdev->recv_event = skb_clone(skb, GFP_KERNEL); + event = hdr->evt; if (!event) { bt_dev_warn(hdev, "Received unexpected HCI Event 0x%2.2x", |