diff options
Diffstat (limited to 'drivers/bluetooth/hci_usb.c')
-rw-r--r-- | drivers/bluetooth/hci_usb.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index 65740346de36..67d96b5cbb96 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -443,7 +443,7 @@ static int __tx_submit(struct hci_usb *husb, struct _urb *_urb) | |||
443 | 443 | ||
444 | static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb) | 444 | static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb) |
445 | { | 445 | { |
446 | struct _urb *_urb = __get_completed(husb, skb->pkt_type); | 446 | struct _urb *_urb = __get_completed(husb, bt_cb(skb)->pkt_type); |
447 | struct usb_ctrlrequest *dr; | 447 | struct usb_ctrlrequest *dr; |
448 | struct urb *urb; | 448 | struct urb *urb; |
449 | 449 | ||
@@ -451,7 +451,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb) | |||
451 | _urb = _urb_alloc(0, GFP_ATOMIC); | 451 | _urb = _urb_alloc(0, GFP_ATOMIC); |
452 | if (!_urb) | 452 | if (!_urb) |
453 | return -ENOMEM; | 453 | return -ENOMEM; |
454 | _urb->type = skb->pkt_type; | 454 | _urb->type = bt_cb(skb)->pkt_type; |
455 | 455 | ||
456 | dr = kmalloc(sizeof(*dr), GFP_ATOMIC); | 456 | dr = kmalloc(sizeof(*dr), GFP_ATOMIC); |
457 | if (!dr) { | 457 | if (!dr) { |
@@ -479,7 +479,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb) | |||
479 | 479 | ||
480 | static inline int hci_usb_send_bulk(struct hci_usb *husb, struct sk_buff *skb) | 480 | static inline int hci_usb_send_bulk(struct hci_usb *husb, struct sk_buff *skb) |
481 | { | 481 | { |
482 | struct _urb *_urb = __get_completed(husb, skb->pkt_type); | 482 | struct _urb *_urb = __get_completed(husb, bt_cb(skb)->pkt_type); |
483 | struct urb *urb; | 483 | struct urb *urb; |
484 | int pipe; | 484 | int pipe; |
485 | 485 | ||
@@ -487,7 +487,7 @@ static inline int hci_usb_send_bulk(struct hci_usb *husb, struct sk_buff *skb) | |||
487 | _urb = _urb_alloc(0, GFP_ATOMIC); | 487 | _urb = _urb_alloc(0, GFP_ATOMIC); |
488 | if (!_urb) | 488 | if (!_urb) |
489 | return -ENOMEM; | 489 | return -ENOMEM; |
490 | _urb->type = skb->pkt_type; | 490 | _urb->type = bt_cb(skb)->pkt_type; |
491 | } | 491 | } |
492 | 492 | ||
493 | urb = &_urb->urb; | 493 | urb = &_urb->urb; |
@@ -505,14 +505,14 @@ static inline int hci_usb_send_bulk(struct hci_usb *husb, struct sk_buff *skb) | |||
505 | #ifdef CONFIG_BT_HCIUSB_SCO | 505 | #ifdef CONFIG_BT_HCIUSB_SCO |
506 | static inline int hci_usb_send_isoc(struct hci_usb *husb, struct sk_buff *skb) | 506 | static inline int hci_usb_send_isoc(struct hci_usb *husb, struct sk_buff *skb) |
507 | { | 507 | { |
508 | struct _urb *_urb = __get_completed(husb, skb->pkt_type); | 508 | struct _urb *_urb = __get_completed(husb, bt_cb(skb)->pkt_type); |
509 | struct urb *urb; | 509 | struct urb *urb; |
510 | 510 | ||
511 | if (!_urb) { | 511 | if (!_urb) { |
512 | _urb = _urb_alloc(HCI_MAX_ISOC_FRAMES, GFP_ATOMIC); | 512 | _urb = _urb_alloc(HCI_MAX_ISOC_FRAMES, GFP_ATOMIC); |
513 | if (!_urb) | 513 | if (!_urb) |
514 | return -ENOMEM; | 514 | return -ENOMEM; |
515 | _urb->type = skb->pkt_type; | 515 | _urb->type = bt_cb(skb)->pkt_type; |
516 | } | 516 | } |
517 | 517 | ||
518 | BT_DBG("%s skb %p len %d", husb->hdev->name, skb, skb->len); | 518 | BT_DBG("%s skb %p len %d", husb->hdev->name, skb, skb->len); |
@@ -601,11 +601,11 @@ static int hci_usb_send_frame(struct sk_buff *skb) | |||
601 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 601 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
602 | return -EBUSY; | 602 | return -EBUSY; |
603 | 603 | ||
604 | BT_DBG("%s type %d len %d", hdev->name, skb->pkt_type, skb->len); | 604 | BT_DBG("%s type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len); |
605 | 605 | ||
606 | husb = (struct hci_usb *) hdev->driver_data; | 606 | husb = (struct hci_usb *) hdev->driver_data; |
607 | 607 | ||
608 | switch (skb->pkt_type) { | 608 | switch (bt_cb(skb)->pkt_type) { |
609 | case HCI_COMMAND_PKT: | 609 | case HCI_COMMAND_PKT: |
610 | hdev->stat.cmd_tx++; | 610 | hdev->stat.cmd_tx++; |
611 | break; | 611 | break; |
@@ -627,7 +627,7 @@ static int hci_usb_send_frame(struct sk_buff *skb) | |||
627 | 627 | ||
628 | read_lock(&husb->completion_lock); | 628 | read_lock(&husb->completion_lock); |
629 | 629 | ||
630 | skb_queue_tail(__transmit_q(husb, skb->pkt_type), skb); | 630 | skb_queue_tail(__transmit_q(husb, bt_cb(skb)->pkt_type), skb); |
631 | hci_usb_tx_wakeup(husb); | 631 | hci_usb_tx_wakeup(husb); |
632 | 632 | ||
633 | read_unlock(&husb->completion_lock); | 633 | read_unlock(&husb->completion_lock); |
@@ -682,7 +682,7 @@ static inline int __recv_frame(struct hci_usb *husb, int type, void *data, int c | |||
682 | return -ENOMEM; | 682 | return -ENOMEM; |
683 | } | 683 | } |
684 | skb->dev = (void *) husb->hdev; | 684 | skb->dev = (void *) husb->hdev; |
685 | skb->pkt_type = type; | 685 | bt_cb(skb)->pkt_type = type; |
686 | 686 | ||
687 | __reassembly(husb, type) = skb; | 687 | __reassembly(husb, type) = skb; |
688 | 688 | ||
@@ -702,6 +702,7 @@ static inline int __recv_frame(struct hci_usb *husb, int type, void *data, int c | |||
702 | if (!scb->expect) { | 702 | if (!scb->expect) { |
703 | /* Complete frame */ | 703 | /* Complete frame */ |
704 | __reassembly(husb, type) = NULL; | 704 | __reassembly(husb, type) = NULL; |
705 | bt_cb(skb)->pkt_type = type; | ||
705 | hci_recv_frame(skb); | 706 | hci_recv_frame(skb); |
706 | } | 707 | } |
707 | 708 | ||