[BLUETOOTH]: Introduce skb->data accessor methods for hci_{acl,event,sco}_hdr
For consistency with other skb data accessors, reducing the number of direct accesses to skb->data. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
David S. Miller
parent
03d4f879b9
commit
2a123b86e2
@@ -188,7 +188,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
|
||||
continue;
|
||||
|
||||
case H4_W4_EVENT_HDR:
|
||||
eh = (struct hci_event_hdr *) h4->rx_skb->data;
|
||||
eh = hci_event_hdr(h4->rx_skb);
|
||||
|
||||
BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen);
|
||||
|
||||
@@ -196,7 +196,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
|
||||
continue;
|
||||
|
||||
case H4_W4_ACL_HDR:
|
||||
ah = (struct hci_acl_hdr *) h4->rx_skb->data;
|
||||
ah = hci_acl_hdr(h4->rx_skb);
|
||||
dlen = __le16_to_cpu(ah->dlen);
|
||||
|
||||
BT_DBG("ACL header: dlen %d", dlen);
|
||||
@@ -205,7 +205,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
|
||||
continue;
|
||||
|
||||
case H4_W4_SCO_HDR:
|
||||
sh = (struct hci_sco_hdr *) h4->rx_skb->data;
|
||||
sh = hci_sco_hdr(h4->rx_skb);
|
||||
|
||||
BT_DBG("SCO header: dlen %d", sh->dlen);
|
||||
|
||||
|
Reference in New Issue
Block a user