diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-11 09:19:18 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-11 09:28:03 -0400 |
commit | 7bd8f09f69f8a190f9b8334a07bb0a9237612314 (patch) | |
tree | a5d892d5129194953e29eb9dc986f5773e59ef14 /drivers/bluetooth/btusb.c | |
parent | e1a26170692dc1e5fbe0ccd98ef86cc9fcd31a64 (diff) |
Bluetooth: Add hdev parameter to hdev->send driver callback
Instead of masking hdev inside the skb->dev parameter, hand it
directly to the driver as a parameter to hdev->send. This makes
the driver interface more clear and simpler.
This patch fixes all drivers to accept and handle the new parameter
of hdev->send callback. Special care has been taken for bpa10x
and btusb drivers that require having skb->dev set to hdev for
the URB transmit complete handlers.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r-- | drivers/bluetooth/btusb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index faa429f7d8a1..621069cb3053 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -716,9 +716,8 @@ static int btusb_flush(struct hci_dev *hdev) | |||
716 | return 0; | 716 | return 0; |
717 | } | 717 | } |
718 | 718 | ||
719 | static int btusb_send_frame(struct sk_buff *skb) | 719 | static int btusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
720 | { | 720 | { |
721 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
722 | struct btusb_data *data = hci_get_drvdata(hdev); | 721 | struct btusb_data *data = hci_get_drvdata(hdev); |
723 | struct usb_ctrlrequest *dr; | 722 | struct usb_ctrlrequest *dr; |
724 | struct urb *urb; | 723 | struct urb *urb; |
@@ -730,6 +729,8 @@ static int btusb_send_frame(struct sk_buff *skb) | |||
730 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 729 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
731 | return -EBUSY; | 730 | return -EBUSY; |
732 | 731 | ||
732 | skb->dev = (void *) hdev; | ||
733 | |||
733 | switch (bt_cb(skb)->pkt_type) { | 734 | switch (bt_cb(skb)->pkt_type) { |
734 | case HCI_COMMAND_PKT: | 735 | case HCI_COMMAND_PKT: |
735 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 736 | urb = usb_alloc_urb(0, GFP_ATOMIC); |