aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bluecard_cs.c6
-rw-r--r--drivers/bluetooth/bt3c_cs.c6
-rw-r--r--drivers/bluetooth/btuart_cs.c6
-rw-r--r--drivers/bluetooth/hci_h4.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index acfb6a430dcc..851de4d5b7de 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -461,20 +461,20 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
461 switch (info->rx_state) { 461 switch (info->rx_state) {
462 462
463 case RECV_WAIT_EVENT_HEADER: 463 case RECV_WAIT_EVENT_HEADER:
464 eh = (struct hci_event_hdr *)(info->rx_skb->data); 464 eh = hci_event_hdr(info->rx_skb);
465 info->rx_state = RECV_WAIT_DATA; 465 info->rx_state = RECV_WAIT_DATA;
466 info->rx_count = eh->plen; 466 info->rx_count = eh->plen;
467 break; 467 break;
468 468
469 case RECV_WAIT_ACL_HEADER: 469 case RECV_WAIT_ACL_HEADER:
470 ah = (struct hci_acl_hdr *)(info->rx_skb->data); 470 ah = hci_acl_hdr(info->rx_skb);
471 dlen = __le16_to_cpu(ah->dlen); 471 dlen = __le16_to_cpu(ah->dlen);
472 info->rx_state = RECV_WAIT_DATA; 472 info->rx_state = RECV_WAIT_DATA;
473 info->rx_count = dlen; 473 info->rx_count = dlen;
474 break; 474 break;
475 475
476 case RECV_WAIT_SCO_HEADER: 476 case RECV_WAIT_SCO_HEADER:
477 sh = (struct hci_sco_hdr *)(info->rx_skb->data); 477 sh = hci_sco_hdr(info->rx_skb);
478 info->rx_state = RECV_WAIT_DATA; 478 info->rx_state = RECV_WAIT_DATA;
479 info->rx_count = sh->dlen; 479 info->rx_count = sh->dlen;
480 break; 480 break;
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 18b0f3992c5b..39516074636b 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -303,20 +303,20 @@ static void bt3c_receive(bt3c_info_t *info)
303 switch (info->rx_state) { 303 switch (info->rx_state) {
304 304
305 case RECV_WAIT_EVENT_HEADER: 305 case RECV_WAIT_EVENT_HEADER:
306 eh = (struct hci_event_hdr *)(info->rx_skb->data); 306 eh = hci_event_hdr(info->rx_skb);
307 info->rx_state = RECV_WAIT_DATA; 307 info->rx_state = RECV_WAIT_DATA;
308 info->rx_count = eh->plen; 308 info->rx_count = eh->plen;
309 break; 309 break;
310 310
311 case RECV_WAIT_ACL_HEADER: 311 case RECV_WAIT_ACL_HEADER:
312 ah = (struct hci_acl_hdr *)(info->rx_skb->data); 312 ah = hci_acl_hdr(info->rx_skb);
313 dlen = __le16_to_cpu(ah->dlen); 313 dlen = __le16_to_cpu(ah->dlen);
314 info->rx_state = RECV_WAIT_DATA; 314 info->rx_state = RECV_WAIT_DATA;
315 info->rx_count = dlen; 315 info->rx_count = dlen;
316 break; 316 break;
317 317
318 case RECV_WAIT_SCO_HEADER: 318 case RECV_WAIT_SCO_HEADER:
319 sh = (struct hci_sco_hdr *)(info->rx_skb->data); 319 sh = hci_sco_hdr(info->rx_skb);
320 info->rx_state = RECV_WAIT_DATA; 320 info->rx_state = RECV_WAIT_DATA;
321 info->rx_count = sh->dlen; 321 info->rx_count = sh->dlen;
322 break; 322 break;
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index c1bce75148fe..d7d2ea0d86a1 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -250,20 +250,20 @@ static void btuart_receive(btuart_info_t *info)
250 switch (info->rx_state) { 250 switch (info->rx_state) {
251 251
252 case RECV_WAIT_EVENT_HEADER: 252 case RECV_WAIT_EVENT_HEADER:
253 eh = (struct hci_event_hdr *)(info->rx_skb->data); 253 eh = hci_event_hdr(info->rx_skb);
254 info->rx_state = RECV_WAIT_DATA; 254 info->rx_state = RECV_WAIT_DATA;
255 info->rx_count = eh->plen; 255 info->rx_count = eh->plen;
256 break; 256 break;
257 257
258 case RECV_WAIT_ACL_HEADER: 258 case RECV_WAIT_ACL_HEADER:
259 ah = (struct hci_acl_hdr *)(info->rx_skb->data); 259 ah = hci_acl_hdr(info->rx_skb);
260 dlen = __le16_to_cpu(ah->dlen); 260 dlen = __le16_to_cpu(ah->dlen);
261 info->rx_state = RECV_WAIT_DATA; 261 info->rx_state = RECV_WAIT_DATA;
262 info->rx_count = dlen; 262 info->rx_count = dlen;
263 break; 263 break;
264 264
265 case RECV_WAIT_SCO_HEADER: 265 case RECV_WAIT_SCO_HEADER:
266 sh = (struct hci_sco_hdr *)(info->rx_skb->data); 266 sh = hci_sco_hdr(info->rx_skb);
267 info->rx_state = RECV_WAIT_DATA; 267 info->rx_state = RECV_WAIT_DATA;
268 info->rx_count = sh->dlen; 268 info->rx_count = sh->dlen;
269 break; 269 break;
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 34f0afc42407..bfbae14cf93d 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -188,7 +188,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
188 continue; 188 continue;
189 189
190 case H4_W4_EVENT_HDR: 190 case H4_W4_EVENT_HDR:
191 eh = (struct hci_event_hdr *) h4->rx_skb->data; 191 eh = hci_event_hdr(h4->rx_skb);
192 192
193 BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen); 193 BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen);
194 194
@@ -196,7 +196,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
196 continue; 196 continue;
197 197
198 case H4_W4_ACL_HDR: 198 case H4_W4_ACL_HDR:
199 ah = (struct hci_acl_hdr *) h4->rx_skb->data; 199 ah = hci_acl_hdr(h4->rx_skb);
200 dlen = __le16_to_cpu(ah->dlen); 200 dlen = __le16_to_cpu(ah->dlen);
201 201
202 BT_DBG("ACL header: dlen %d", dlen); 202 BT_DBG("ACL header: dlen %d", dlen);
@@ -205,7 +205,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
205 continue; 205 continue;
206 206
207 case H4_W4_SCO_HDR: 207 case H4_W4_SCO_HDR:
208 sh = (struct hci_sco_hdr *) h4->rx_skb->data; 208 sh = hci_sco_hdr(h4->rx_skb);
209 209
210 BT_DBG("SCO header: dlen %d", sh->dlen); 210 BT_DBG("SCO header: dlen %d", sh->dlen);
211 211