aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 338ae977a31..4917919d86a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1,4 +1,4 @@
1/* 1/*
2 BlueZ - Bluetooth protocol stack for Linux 2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (C) 2000-2001 Qualcomm Incorporated 3 Copyright (C) 2000-2001 Qualcomm Incorporated
4 4
@@ -12,13 +12,13 @@
12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY 14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 19
20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
22 SOFTWARE IS DISCLAIMED. 22 SOFTWARE IS DISCLAIMED.
23*/ 23*/
24 24
@@ -116,7 +116,7 @@ static void hci_req_cancel(struct hci_dev *hdev, int err)
116} 116}
117 117
118/* Execute request and wait for completion. */ 118/* Execute request and wait for completion. */
119static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev, unsigned long opt), 119static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev, unsigned long opt),
120 unsigned long opt, __u32 timeout) 120 unsigned long opt, __u32 timeout)
121{ 121{
122 DECLARE_WAITQUEUE(wait, current); 122 DECLARE_WAITQUEUE(wait, current);
@@ -278,7 +278,7 @@ static void hci_encrypt_req(struct hci_dev *hdev, unsigned long opt)
278 hci_send_cmd(hdev, OGF_HOST_CTL, OCF_WRITE_ENCRYPT_MODE, 1, &encrypt); 278 hci_send_cmd(hdev, OGF_HOST_CTL, OCF_WRITE_ENCRYPT_MODE, 1, &encrypt);
279} 279}
280 280
281/* Get HCI device by index. 281/* Get HCI device by index.
282 * Device is held on return. */ 282 * Device is held on return. */
283struct hci_dev *hci_dev_get(int index) 283struct hci_dev *hci_dev_get(int index)
284{ 284{
@@ -405,7 +405,7 @@ int hci_inquiry(void __user *arg)
405 return -ENODEV; 405 return -ENODEV;
406 406
407 hci_dev_lock_bh(hdev); 407 hci_dev_lock_bh(hdev);
408 if (inquiry_cache_age(hdev) > INQUIRY_CACHE_AGE_MAX || 408 if (inquiry_cache_age(hdev) > INQUIRY_CACHE_AGE_MAX ||
409 inquiry_cache_empty(hdev) || 409 inquiry_cache_empty(hdev) ||
410 ir.flags & IREQ_CACHE_FLUSH) { 410 ir.flags & IREQ_CACHE_FLUSH) {
411 inquiry_cache_flush(hdev); 411 inquiry_cache_flush(hdev);
@@ -439,7 +439,7 @@ int hci_inquiry(void __user *arg)
439 if (copy_to_user(ptr, buf, sizeof(struct inquiry_info) * 439 if (copy_to_user(ptr, buf, sizeof(struct inquiry_info) *
440 ir.num_rsp)) 440 ir.num_rsp))
441 err = -EFAULT; 441 err = -EFAULT;
442 } else 442 } else
443 err = -EFAULT; 443 err = -EFAULT;
444 444
445 kfree(buf); 445 kfree(buf);
@@ -491,7 +491,7 @@ int hci_dev_open(__u16 dev)
491 hci_dev_hold(hdev); 491 hci_dev_hold(hdev);
492 set_bit(HCI_UP, &hdev->flags); 492 set_bit(HCI_UP, &hdev->flags);
493 hci_notify(hdev, HCI_DEV_UP); 493 hci_notify(hdev, HCI_DEV_UP);
494 } else { 494 } else {
495 /* Init failed, cleanup */ 495 /* Init failed, cleanup */
496 tasklet_kill(&hdev->rx_task); 496 tasklet_kill(&hdev->rx_task);
497 tasklet_kill(&hdev->tx_task); 497 tasklet_kill(&hdev->tx_task);
@@ -619,7 +619,7 @@ int hci_dev_reset(__u16 dev)
619 if (hdev->flush) 619 if (hdev->flush)
620 hdev->flush(hdev); 620 hdev->flush(hdev);
621 621
622 atomic_set(&hdev->cmd_cnt, 1); 622 atomic_set(&hdev->cmd_cnt, 1);
623 hdev->acl_cnt = 0; hdev->sco_cnt = 0; 623 hdev->acl_cnt = 0; hdev->sco_cnt = 0;
624 624
625 if (!test_bit(HCI_RAW, &hdev->flags)) 625 if (!test_bit(HCI_RAW, &hdev->flags))
@@ -841,7 +841,7 @@ int hci_register_dev(struct hci_dev *hdev)
841 break; 841 break;
842 head = p; id++; 842 head = p; id++;
843 } 843 }
844 844
845 sprintf(hdev->name, "hci%d", id); 845 sprintf(hdev->name, "hci%d", id);
846 hdev->id = id; 846 hdev->id = id;
847 list_add(&hdev->list, head); 847 list_add(&hdev->list, head);
@@ -1109,7 +1109,7 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags)
1109 __skb_queue_tail(&conn->data_q, skb); 1109 __skb_queue_tail(&conn->data_q, skb);
1110 do { 1110 do {
1111 skb = list; list = list->next; 1111 skb = list; list = list->next;
1112 1112
1113 skb->dev = (void *) hdev; 1113 skb->dev = (void *) hdev;
1114 bt_cb(skb)->pkt_type = HCI_ACLDATA_PKT; 1114 bt_cb(skb)->pkt_type = HCI_ACLDATA_PKT;
1115 hci_add_acl_hdr(skb, conn->handle, flags | ACL_CONT); 1115 hci_add_acl_hdr(skb, conn->handle, flags | ACL_CONT);
@@ -1164,7 +1164,7 @@ static inline struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type, int
1164 int num = 0, min = ~0; 1164 int num = 0, min = ~0;
1165 struct list_head *p; 1165 struct list_head *p;
1166 1166
1167 /* We don't have to lock device here. Connections are always 1167 /* We don't have to lock device here. Connections are always
1168 * added and removed with TX task disabled. */ 1168 * added and removed with TX task disabled. */
1169 list_for_each(p, &h->list) { 1169 list_for_each(p, &h->list) {
1170 struct hci_conn *c; 1170 struct hci_conn *c;
@@ -1306,7 +1306,7 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
1306 hci_dev_lock(hdev); 1306 hci_dev_lock(hdev);
1307 conn = hci_conn_hash_lookup_handle(hdev, handle); 1307 conn = hci_conn_hash_lookup_handle(hdev, handle);
1308 hci_dev_unlock(hdev); 1308 hci_dev_unlock(hdev);
1309 1309
1310 if (conn) { 1310 if (conn) {
1311 register struct hci_proto *hp; 1311 register struct hci_proto *hp;
1312 1312
@@ -1318,7 +1318,7 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
1318 return; 1318 return;
1319 } 1319 }
1320 } else { 1320 } else {
1321 BT_ERR("%s ACL packet for unknown connection handle %d", 1321 BT_ERR("%s ACL packet for unknown connection handle %d",
1322 hdev->name, handle); 1322 hdev->name, handle);
1323 } 1323 }
1324 1324
@@ -1353,7 +1353,7 @@ static inline void hci_scodata_packet(struct hci_dev *hdev, struct sk_buff *skb)
1353 return; 1353 return;
1354 } 1354 }
1355 } else { 1355 } else {
1356 BT_ERR("%s SCO packet for unknown connection handle %d", 1356 BT_ERR("%s SCO packet for unknown connection handle %d",
1357 hdev->name, handle); 1357 hdev->name, handle);
1358 } 1358 }
1359 1359