diff options
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r-- | net/bluetooth/hci_request.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 7e17907effb3..d6025d6e6d59 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c | |||
@@ -34,7 +34,8 @@ void hci_req_init(struct hci_request *req, struct hci_dev *hdev) | |||
34 | req->err = 0; | 34 | req->err = 0; |
35 | } | 35 | } |
36 | 36 | ||
37 | int hci_req_run(struct hci_request *req, hci_req_complete_t complete) | 37 | static int req_run(struct hci_request *req, hci_req_complete_t complete, |
38 | hci_req_complete_skb_t complete_skb) | ||
38 | { | 39 | { |
39 | struct hci_dev *hdev = req->hdev; | 40 | struct hci_dev *hdev = req->hdev; |
40 | struct sk_buff *skb; | 41 | struct sk_buff *skb; |
@@ -56,6 +57,7 @@ int hci_req_run(struct hci_request *req, hci_req_complete_t complete) | |||
56 | 57 | ||
57 | skb = skb_peek_tail(&req->cmd_q); | 58 | skb = skb_peek_tail(&req->cmd_q); |
58 | bt_cb(skb)->req.complete = complete; | 59 | bt_cb(skb)->req.complete = complete; |
60 | bt_cb(skb)->req.complete_skb = complete_skb; | ||
59 | 61 | ||
60 | spin_lock_irqsave(&hdev->cmd_q.lock, flags); | 62 | spin_lock_irqsave(&hdev->cmd_q.lock, flags); |
61 | skb_queue_splice_tail(&req->cmd_q, &hdev->cmd_q); | 63 | skb_queue_splice_tail(&req->cmd_q, &hdev->cmd_q); |
@@ -66,6 +68,16 @@ int hci_req_run(struct hci_request *req, hci_req_complete_t complete) | |||
66 | return 0; | 68 | return 0; |
67 | } | 69 | } |
68 | 70 | ||
71 | int hci_req_run(struct hci_request *req, hci_req_complete_t complete) | ||
72 | { | ||
73 | return req_run(req, complete, NULL); | ||
74 | } | ||
75 | |||
76 | int hci_req_run_skb(struct hci_request *req, hci_req_complete_skb_t complete) | ||
77 | { | ||
78 | return req_run(req, NULL, complete); | ||
79 | } | ||
80 | |||
69 | struct sk_buff *hci_prepare_cmd(struct hci_dev *hdev, u16 opcode, u32 plen, | 81 | struct sk_buff *hci_prepare_cmd(struct hci_dev *hdev, u16 opcode, u32 plen, |
70 | const void *param) | 82 | const void *param) |
71 | { | 83 | { |