|
@@ -461,20 +461,20 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
|
|
switch (info->rx_state) {
|
|
switch (info->rx_state) {
|
|
|
|
|
|
case RECV_WAIT_EVENT_HEADER:
|
|
case RECV_WAIT_EVENT_HEADER:
|
|
- eh = (struct hci_event_hdr *)(info->rx_skb->data);
|
|
|
|
|
|
+ eh = hci_event_hdr(info->rx_skb);
|
|
info->rx_state = RECV_WAIT_DATA;
|
|
info->rx_state = RECV_WAIT_DATA;
|
|
info->rx_count = eh->plen;
|
|
info->rx_count = eh->plen;
|
|
break;
|
|
break;
|
|
|
|
|
|
case RECV_WAIT_ACL_HEADER:
|
|
case RECV_WAIT_ACL_HEADER:
|
|
- ah = (struct hci_acl_hdr *)(info->rx_skb->data);
|
|
|
|
|
|
+ ah = hci_acl_hdr(info->rx_skb);
|
|
dlen = __le16_to_cpu(ah->dlen);
|
|
dlen = __le16_to_cpu(ah->dlen);
|
|
info->rx_state = RECV_WAIT_DATA;
|
|
info->rx_state = RECV_WAIT_DATA;
|
|
info->rx_count = dlen;
|
|
info->rx_count = dlen;
|
|
break;
|
|
break;
|
|
|
|
|
|
case RECV_WAIT_SCO_HEADER:
|
|
case RECV_WAIT_SCO_HEADER:
|
|
- sh = (struct hci_sco_hdr *)(info->rx_skb->data);
|
|
|
|
|
|
+ sh = hci_sco_hdr(info->rx_skb);
|
|
info->rx_state = RECV_WAIT_DATA;
|
|
info->rx_state = RECV_WAIT_DATA;
|
|
info->rx_count = sh->dlen;
|
|
info->rx_count = sh->dlen;
|
|
break;
|
|
break;
|