diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2009-11-17 18:40:39 -0500 |
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-03 13:34:20 -0500 |
| commit | 76bca88012e1d27de794f32cc551d6314d38b6d9 (patch) | |
| tree | b2c78fd6f9946ea67abd5b4d0fe5a66061990fa8 | |
| parent | 7e21addcd0ad87696c17409399e56e874931da57 (diff) | |
Bluetooth: Turn hci_recv_frame into an exported function
For future simplification it is important that the hci_recv_frame
function is no longer an inline function. So move it into the module
itself and export it.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| -rw-r--r-- | include/net/bluetooth/hci_core.h | 23 | ||||
| -rw-r--r-- | net/bluetooth/hci_core.c | 23 |
2 files changed, 24 insertions, 22 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 7b640aeddb64..8460f2283089 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -437,28 +437,7 @@ int hci_inquiry(void __user *arg); | |||
| 437 | 437 | ||
| 438 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); | 438 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); |
| 439 | 439 | ||
| 440 | /* Receive frame from HCI drivers */ | 440 | int hci_recv_frame(struct sk_buff *skb); |
| 441 | static inline int hci_recv_frame(struct sk_buff *skb) | ||
| 442 | { | ||
| 443 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
| 444 | if (!hdev || (!test_bit(HCI_UP, &hdev->flags) | ||
| 445 | && !test_bit(HCI_INIT, &hdev->flags))) { | ||
| 446 | kfree_skb(skb); | ||
| 447 | return -ENXIO; | ||
| 448 | } | ||
| 449 | |||
| 450 | /* Incomming skb */ | ||
| 451 | bt_cb(skb)->incoming = 1; | ||
| 452 | |||
| 453 | /* Time stamp */ | ||
| 454 | __net_timestamp(skb); | ||
| 455 | |||
| 456 | /* Queue frame for rx task */ | ||
| 457 | skb_queue_tail(&hdev->rx_q, skb); | ||
| 458 | hci_sched_rx(hdev); | ||
| 459 | return 0; | ||
| 460 | } | ||
| 461 | |||
| 462 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); | 441 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); |
| 463 | 442 | ||
| 464 | int hci_register_sysfs(struct hci_dev *hdev); | 443 | int hci_register_sysfs(struct hci_dev *hdev); |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index e1da8f68759c..3fc90e543ec1 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
| @@ -987,6 +987,29 @@ int hci_resume_dev(struct hci_dev *hdev) | |||
| 987 | } | 987 | } |
| 988 | EXPORT_SYMBOL(hci_resume_dev); | 988 | EXPORT_SYMBOL(hci_resume_dev); |
| 989 | 989 | ||
| 990 | /* Receive frame from HCI drivers */ | ||
| 991 | int hci_recv_frame(struct sk_buff *skb) | ||
| 992 | { | ||
| 993 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
| 994 | if (!hdev || (!test_bit(HCI_UP, &hdev->flags) | ||
| 995 | && !test_bit(HCI_INIT, &hdev->flags))) { | ||
| 996 | kfree_skb(skb); | ||
| 997 | return -ENXIO; | ||
| 998 | } | ||
| 999 | |||
| 1000 | /* Incomming skb */ | ||
| 1001 | bt_cb(skb)->incoming = 1; | ||
| 1002 | |||
| 1003 | /* Time stamp */ | ||
| 1004 | __net_timestamp(skb); | ||
| 1005 | |||
| 1006 | /* Queue frame for rx task */ | ||
| 1007 | skb_queue_tail(&hdev->rx_q, skb); | ||
| 1008 | hci_sched_rx(hdev); | ||
| 1009 | return 0; | ||
| 1010 | } | ||
| 1011 | EXPORT_SYMBOL(hci_recv_frame); | ||
| 1012 | |||
| 990 | /* Receive packet type fragment */ | 1013 | /* Receive packet type fragment */ |
| 991 | #define __reassembly(hdev, type) ((hdev)->reassembly[(type) - 2]) | 1014 | #define __reassembly(hdev, type) ((hdev)->reassembly[(type) - 2]) |
| 992 | 1015 | ||
