Bluetooth: hci_event: Fix HCI_EV_VENDOR max_len
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Jan 2022 18:53:05 +0000 (10:53 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 25 Jan 2022 21:42:53 +0000 (22:42 +0100)
commit314d8cd2787418c5ac6b02035c344644f47b292b
tree9606351058a267a745bc3c0bc67bd0d1246b3637
parent2d4b37b67cacbbad6fdb8621333f5ce48ae0e5fd
Bluetooth: hci_event: Fix HCI_EV_VENDOR max_len

HCI_EV_VENDOR is in fact variable length since it acts as metaevent
where a vendor can implement their own event sets.

In addition to it this makes use of bt_dev_warn_ratelimited to supress
the amount of logging in case the event has more data than expected.

Fixes: 3e54c5890c87 ("Bluetooth: hci_event: Use of a function table to handle HCI event")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c