Commit 1b197574 authored by Loic Poulain's avatar Loic Poulain Committed by Marcel Holtmann

Bluetooth: hci_intel: Show error in case of invalid LPM packet size

Don't hide this packet size error.
Signed-off-by: default avatarLoic Poulain <loic.poulain@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 74cdad37
...@@ -1010,8 +1010,11 @@ static int intel_recv_lpm(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -1010,8 +1010,11 @@ static int intel_recv_lpm(struct hci_dev *hdev, struct sk_buff *skb)
switch (lpm->opcode) { switch (lpm->opcode) {
case LPM_OP_TX_NOTIFY: case LPM_OP_TX_NOTIFY:
if (lpm->dlen) if (lpm->dlen < 1) {
intel_recv_lpm_notify(hdev, lpm->data[0]); bt_dev_err(hu->hdev, "Invalid LPM notification packet");
break;
}
intel_recv_lpm_notify(hdev, lpm->data[0]);
break; break;
case LPM_OP_SUSPEND_ACK: case LPM_OP_SUSPEND_ACK:
set_bit(STATE_SUSPENDED, &intel->flags); set_bit(STATE_SUSPENDED, &intel->flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment