Commit acce90d6a957812081b83ac4d1133e93a43569c6
Committed by
Marcel Holtmann
1 parent
fe1aff7107
Exists in
master
and in
4 other branches
Bluetooth: Use the proper function cast to get hdr data
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
drivers/bluetooth/hci_ll.c
... | ... | @@ -402,7 +402,7 @@ |
402 | 402 | continue; |
403 | 403 | |
404 | 404 | case HCILL_W4_EVENT_HDR: |
405 | - eh = (struct hci_event_hdr *) ll->rx_skb->data; | |
405 | + eh = hci_event_hdr(ll->rx_skb); | |
406 | 406 | |
407 | 407 | BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen); |
408 | 408 | |
... | ... | @@ -410,7 +410,7 @@ |
410 | 410 | continue; |
411 | 411 | |
412 | 412 | case HCILL_W4_ACL_HDR: |
413 | - ah = (struct hci_acl_hdr *) ll->rx_skb->data; | |
413 | + ah = hci_acl_hdr(ll->rx_skb); | |
414 | 414 | dlen = __le16_to_cpu(ah->dlen); |
415 | 415 | |
416 | 416 | BT_DBG("ACL header: dlen %d", dlen); |
... | ... | @@ -419,7 +419,7 @@ |
419 | 419 | continue; |
420 | 420 | |
421 | 421 | case HCILL_W4_SCO_HDR: |
422 | - sh = (struct hci_sco_hdr *) ll->rx_skb->data; | |
422 | + sh = hci_sco_hdr(ll->rx_skb); | |
423 | 423 | |
424 | 424 | BT_DBG("SCO header: dlen %d", sh->dlen); |
425 | 425 |