diff options
| -rw-r--r-- | drivers/bluetooth/bfusb.c | 3 | ||||
| -rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 3 | ||||
| -rw-r--r-- | drivers/bluetooth/bpa10x.c | 5 | ||||
| -rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 3 | ||||
| -rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 4 | ||||
| -rw-r--r-- | drivers/bluetooth/btsdio.c | 3 | ||||
| -rw-r--r-- | drivers/bluetooth/btuart_cs.c | 3 | ||||
| -rw-r--r-- | drivers/bluetooth/btusb.c | 5 | ||||
| -rw-r--r-- | drivers/bluetooth/btwilink.c | 5 | ||||
| -rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 3 | ||||
| -rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 3 | ||||
| -rw-r--r-- | drivers/bluetooth/hci_ll.c | 1 | ||||
| -rw-r--r-- | drivers/bluetooth/hci_vhci.c | 3 | ||||
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 2 | ||||
| -rw-r--r-- | net/bluetooth/hci_core.c | 4 |
15 files changed, 18 insertions, 32 deletions
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index b7b5bb879f08..a6758490fa61 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c | |||
| @@ -464,9 +464,8 @@ static int bfusb_close(struct hci_dev *hdev) | |||
| 464 | return 0; | 464 | return 0; |
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | static int bfusb_send_frame(struct sk_buff *skb) | 467 | static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 468 | { | 468 | { |
| 469 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
| 470 | struct bfusb_data *data; | 469 | struct bfusb_data *data; |
| 471 | struct sk_buff *nskb; | 470 | struct sk_buff *nskb; |
| 472 | unsigned char buf[3]; | 471 | unsigned char buf[3]; |
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 395acde99d78..9194a1ba897f 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
| @@ -658,10 +658,9 @@ static int bluecard_hci_close(struct hci_dev *hdev) | |||
| 658 | } | 658 | } |
| 659 | 659 | ||
| 660 | 660 | ||
| 661 | static int bluecard_hci_send_frame(struct sk_buff *skb) | 661 | static int bluecard_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 662 | { | 662 | { |
| 663 | bluecard_info_t *info; | 663 | bluecard_info_t *info; |
| 664 | struct hci_dev *hdev = (struct hci_dev *)(skb->dev); | ||
| 665 | 664 | ||
| 666 | if (!hdev) { | 665 | if (!hdev) { |
| 667 | BT_ERR("Frame for unknown HCI device (hdev=NULL)"); | 666 | BT_ERR("Frame for unknown HCI device (hdev=NULL)"); |
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 3188fb48bf4b..b9e4e621fb10 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c | |||
| @@ -350,9 +350,8 @@ static int bpa10x_flush(struct hci_dev *hdev) | |||
| 350 | return 0; | 350 | return 0; |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | static int bpa10x_send_frame(struct sk_buff *skb) | 353 | static int bpa10x_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 354 | { | 354 | { |
| 355 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
| 356 | struct bpa10x_data *data = hci_get_drvdata(hdev); | 355 | struct bpa10x_data *data = hci_get_drvdata(hdev); |
| 357 | struct usb_ctrlrequest *dr; | 356 | struct usb_ctrlrequest *dr; |
| 358 | struct urb *urb; | 357 | struct urb *urb; |
| @@ -364,6 +363,8 @@ static int bpa10x_send_frame(struct sk_buff *skb) | |||
| 364 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 363 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
| 365 | return -EBUSY; | 364 | return -EBUSY; |
| 366 | 365 | ||
| 366 | skb->dev = (void *) hdev; | ||
| 367 | |||
| 367 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 368 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
| 368 | if (!urb) | 369 | if (!urb) |
| 369 | return -ENOMEM; | 370 | return -ENOMEM; |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index d8e4b0d7926e..fcd5fe993ad0 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
| @@ -415,10 +415,9 @@ static int bt3c_hci_close(struct hci_dev *hdev) | |||
| 415 | } | 415 | } |
| 416 | 416 | ||
| 417 | 417 | ||
| 418 | static int bt3c_hci_send_frame(struct sk_buff *skb) | 418 | static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 419 | { | 419 | { |
| 420 | bt3c_info_t *info; | 420 | bt3c_info_t *info; |
| 421 | struct hci_dev *hdev = (struct hci_dev *)(skb->dev); | ||
| 422 | unsigned long flags; | 421 | unsigned long flags; |
| 423 | 422 | ||
| 424 | if (!hdev) { | 423 | if (!hdev) { |
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 8ac4d938d89c..547a447149d3 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c | |||
| @@ -187,7 +187,6 @@ static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no, | |||
| 187 | 187 | ||
| 188 | bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; | 188 | bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; |
| 189 | 189 | ||
| 190 | skb->dev = (void *) priv->btmrvl_dev.hcidev; | ||
| 191 | skb_queue_head(&priv->adapter->tx_queue, skb); | 190 | skb_queue_head(&priv->adapter->tx_queue, skb); |
| 192 | 191 | ||
| 193 | priv->btmrvl_dev.sendcmdflag = true; | 192 | priv->btmrvl_dev.sendcmdflag = true; |
| @@ -356,9 +355,8 @@ static void btmrvl_free_adapter(struct btmrvl_private *priv) | |||
| 356 | priv->adapter = NULL; | 355 | priv->adapter = NULL; |
| 357 | } | 356 | } |
| 358 | 357 | ||
| 359 | static int btmrvl_send_frame(struct sk_buff *skb) | 358 | static int btmrvl_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 360 | { | 359 | { |
| 361 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
| 362 | struct btmrvl_private *priv = NULL; | 360 | struct btmrvl_private *priv = NULL; |
| 363 | 361 | ||
| 364 | BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len); | 362 | BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len); |
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index 72fe49e60359..b61440aaee65 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c | |||
| @@ -254,9 +254,8 @@ static int btsdio_flush(struct hci_dev *hdev) | |||
| 254 | return 0; | 254 | return 0; |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | static int btsdio_send_frame(struct sk_buff *skb) | 257 | static int btsdio_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 258 | { | 258 | { |
| 259 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
| 260 | struct btsdio_data *data = hci_get_drvdata(hdev); | 259 | struct btsdio_data *data = hci_get_drvdata(hdev); |
| 261 | 260 | ||
| 262 | BT_DBG("%s", hdev->name); | 261 | BT_DBG("%s", hdev->name); |
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index d0b89ecf1c59..f567cd8424c3 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
| @@ -423,10 +423,9 @@ static int btuart_hci_close(struct hci_dev *hdev) | |||
| 423 | } | 423 | } |
| 424 | 424 | ||
| 425 | 425 | ||
| 426 | static int btuart_hci_send_frame(struct sk_buff *skb) | 426 | static int btuart_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 427 | { | 427 | { |
| 428 | btuart_info_t *info; | 428 | btuart_info_t *info; |
| 429 | struct hci_dev *hdev = (struct hci_dev *)(skb->dev); | ||
| 430 | 429 | ||
| 431 | if (!hdev) { | 430 | if (!hdev) { |
| 432 | BT_ERR("Frame for unknown HCI device (hdev=NULL)"); | 431 | BT_ERR("Frame for unknown HCI device (hdev=NULL)"); |
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); |
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c index 5e10fb0a7e05..f038dba19e36 100644 --- a/drivers/bluetooth/btwilink.c +++ b/drivers/bluetooth/btwilink.c | |||
| @@ -251,14 +251,11 @@ static int ti_st_close(struct hci_dev *hdev) | |||
| 251 | return err; | 251 | return err; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | static int ti_st_send_frame(struct sk_buff *skb) | 254 | static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 255 | { | 255 | { |
| 256 | struct hci_dev *hdev; | ||
| 257 | struct ti_st *hst; | 256 | struct ti_st *hst; |
| 258 | long len; | 257 | long len; |
| 259 | 258 | ||
| 260 | hdev = (struct hci_dev *)skb->dev; | ||
| 261 | |||
| 262 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 259 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
| 263 | return -EBUSY; | 260 | return -EBUSY; |
| 264 | 261 | ||
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 29451413bc04..ad1a2f9dc772 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
| @@ -382,10 +382,9 @@ static int dtl1_hci_close(struct hci_dev *hdev) | |||
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | 384 | ||
| 385 | static int dtl1_hci_send_frame(struct sk_buff *skb) | 385 | static int dtl1_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 386 | { | 386 | { |
| 387 | dtl1_info_t *info; | 387 | dtl1_info_t *info; |
| 388 | struct hci_dev *hdev = (struct hci_dev *)(skb->dev); | ||
| 389 | struct sk_buff *s; | 388 | struct sk_buff *s; |
| 390 | nsh_t nsh; | 389 | nsh_t nsh; |
| 391 | 390 | ||
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index bc68a440d432..b04054675c48 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
| @@ -234,9 +234,8 @@ static int hci_uart_close(struct hci_dev *hdev) | |||
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | /* Send frames from HCI layer */ | 236 | /* Send frames from HCI layer */ |
| 237 | static int hci_uart_send_frame(struct sk_buff *skb) | 237 | static int hci_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 238 | { | 238 | { |
| 239 | struct hci_dev* hdev = (struct hci_dev *) skb->dev; | ||
| 240 | struct hci_uart *hu; | 239 | struct hci_uart *hu; |
| 241 | 240 | ||
| 242 | if (!hdev) { | 241 | if (!hdev) { |
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index 58a9541feba6..69a90b1b5ff5 100644 --- a/drivers/bluetooth/hci_ll.c +++ b/drivers/bluetooth/hci_ll.c | |||
| @@ -110,7 +110,6 @@ static int send_hcill_cmd(u8 cmd, struct hci_uart *hu) | |||
| 110 | /* prepare packet */ | 110 | /* prepare packet */ |
| 111 | hcill_packet = (struct hcill_cmd *) skb_put(skb, 1); | 111 | hcill_packet = (struct hcill_cmd *) skb_put(skb, 1); |
| 112 | hcill_packet->cmd = cmd; | 112 | hcill_packet->cmd = cmd; |
| 113 | skb->dev = (void *) hu->hdev; | ||
| 114 | 113 | ||
| 115 | /* send packet */ | 114 | /* send packet */ |
| 116 | skb_queue_tail(&ll->txq, skb); | 115 | skb_queue_tail(&ll->txq, skb); |
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 0fd522e85a71..e6f591969d95 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
| @@ -81,9 +81,8 @@ static int vhci_flush(struct hci_dev *hdev) | |||
| 81 | return 0; | 81 | return 0; |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | static int vhci_send_frame(struct sk_buff *skb) | 84 | static int vhci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
| 85 | { | 85 | { |
| 86 | struct hci_dev* hdev = (struct hci_dev *) skb->dev; | ||
| 87 | struct vhci_data *data; | 86 | struct vhci_data *data; |
| 88 | 87 | ||
| 89 | if (!hdev) { | 88 | if (!hdev) { |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 29b81476424c..0e01dc257880 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -285,7 +285,7 @@ struct hci_dev { | |||
| 285 | int (*close)(struct hci_dev *hdev); | 285 | int (*close)(struct hci_dev *hdev); |
| 286 | int (*flush)(struct hci_dev *hdev); | 286 | int (*flush)(struct hci_dev *hdev); |
| 287 | int (*setup)(struct hci_dev *hdev); | 287 | int (*setup)(struct hci_dev *hdev); |
| 288 | int (*send)(struct sk_buff *skb); | 288 | int (*send)(struct hci_dev *hdev, struct sk_buff *skb); |
| 289 | void (*notify)(struct hci_dev *hdev, unsigned int evt); | 289 | void (*notify)(struct hci_dev *hdev, unsigned int evt); |
| 290 | }; | 290 | }; |
| 291 | 291 | ||
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 4f0d4b443171..a097a623912a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
| @@ -2713,9 +2713,7 @@ static void hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) | |||
| 2713 | /* Get rid of skb owner, prior to sending to the driver. */ | 2713 | /* Get rid of skb owner, prior to sending to the driver. */ |
| 2714 | skb_orphan(skb); | 2714 | skb_orphan(skb); |
| 2715 | 2715 | ||
| 2716 | skb->dev = (void *) hdev; | 2716 | if (hdev->send(hdev, skb) < 0) |
| 2717 | |||
| 2718 | if (hdev->send(skb) < 0) | ||
| 2719 | BT_ERR("%s sending frame failed", hdev->name); | 2717 | BT_ERR("%s sending frame failed", hdev->name); |
| 2720 | } | 2718 | } |
| 2721 | 2719 | ||
