diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /include/net/bluetooth | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 4 | ||||
-rw-r--r-- | include/net/bluetooth/hci.h | 6 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 44 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 2 |
4 files changed, 13 insertions, 43 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 718394e2c01e..ff77e8f882f1 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -121,7 +121,7 @@ struct bt_sock_list { | |||
121 | rwlock_t lock; | 121 | rwlock_t lock; |
122 | }; | 122 | }; |
123 | 123 | ||
124 | int bt_sock_register(int proto, struct net_proto_family *ops); | 124 | int bt_sock_register(int proto, const struct net_proto_family *ops); |
125 | int bt_sock_unregister(int proto); | 125 | int bt_sock_unregister(int proto); |
126 | void bt_sock_link(struct bt_sock_list *l, struct sock *s); | 126 | void bt_sock_link(struct bt_sock_list *l, struct sock *s); |
127 | void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); | 127 | void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); |
@@ -176,6 +176,6 @@ extern void hci_sock_cleanup(void); | |||
176 | extern int bt_sysfs_init(void); | 176 | extern int bt_sysfs_init(void); |
177 | extern void bt_sysfs_cleanup(void); | 177 | extern void bt_sysfs_cleanup(void); |
178 | 178 | ||
179 | extern struct class *bt_class; | 179 | extern struct dentry *bt_debugfs; |
180 | 180 | ||
181 | #endif /* __BLUETOOTH_H */ | 181 | #endif /* __BLUETOOTH_H */ |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index ed3aea1605e8..fc0c502d9fd1 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -43,7 +43,7 @@ | |||
43 | #define HCI_NOTIFY_CONN_DEL 2 | 43 | #define HCI_NOTIFY_CONN_DEL 2 |
44 | #define HCI_NOTIFY_VOICE_SETTING 3 | 44 | #define HCI_NOTIFY_VOICE_SETTING 3 |
45 | 45 | ||
46 | /* HCI device types */ | 46 | /* HCI bus types */ |
47 | #define HCI_VIRTUAL 0 | 47 | #define HCI_VIRTUAL 0 |
48 | #define HCI_USB 1 | 48 | #define HCI_USB 1 |
49 | #define HCI_PCCARD 2 | 49 | #define HCI_PCCARD 2 |
@@ -52,6 +52,10 @@ | |||
52 | #define HCI_PCI 5 | 52 | #define HCI_PCI 5 |
53 | #define HCI_SDIO 6 | 53 | #define HCI_SDIO 6 |
54 | 54 | ||
55 | /* HCI controller types */ | ||
56 | #define HCI_BREDR 0x00 | ||
57 | #define HCI_80211 0x01 | ||
58 | |||
55 | /* HCI device quirks */ | 59 | /* HCI device quirks */ |
56 | enum { | 60 | enum { |
57 | HCI_QUIRK_NO_RESET, | 61 | HCI_QUIRK_NO_RESET, |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 7b640aeddb64..ce3c99e5fa25 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -70,7 +70,8 @@ struct hci_dev { | |||
70 | char name[8]; | 70 | char name[8]; |
71 | unsigned long flags; | 71 | unsigned long flags; |
72 | __u16 id; | 72 | __u16 id; |
73 | __u8 type; | 73 | __u8 bus; |
74 | __u8 dev_type; | ||
74 | bdaddr_t bdaddr; | 75 | bdaddr_t bdaddr; |
75 | __u8 dev_name[248]; | 76 | __u8 dev_name[248]; |
76 | __u8 dev_class[3]; | 77 | __u8 dev_class[3]; |
@@ -134,6 +135,8 @@ struct hci_dev { | |||
134 | 135 | ||
135 | atomic_t promisc; | 136 | atomic_t promisc; |
136 | 137 | ||
138 | struct dentry *debugfs; | ||
139 | |||
137 | struct device *parent; | 140 | struct device *parent; |
138 | struct device dev; | 141 | struct device dev; |
139 | 142 | ||
@@ -367,22 +370,6 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
367 | } | 370 | } |
368 | } | 371 | } |
369 | 372 | ||
370 | /* ----- HCI tasks ----- */ | ||
371 | static inline void hci_sched_cmd(struct hci_dev *hdev) | ||
372 | { | ||
373 | tasklet_schedule(&hdev->cmd_task); | ||
374 | } | ||
375 | |||
376 | static inline void hci_sched_rx(struct hci_dev *hdev) | ||
377 | { | ||
378 | tasklet_schedule(&hdev->rx_task); | ||
379 | } | ||
380 | |||
381 | static inline void hci_sched_tx(struct hci_dev *hdev) | ||
382 | { | ||
383 | tasklet_schedule(&hdev->tx_task); | ||
384 | } | ||
385 | |||
386 | /* ----- HCI Devices ----- */ | 373 | /* ----- HCI Devices ----- */ |
387 | static inline void __hci_dev_put(struct hci_dev *d) | 374 | static inline void __hci_dev_put(struct hci_dev *d) |
388 | { | 375 | { |
@@ -437,28 +424,7 @@ int hci_inquiry(void __user *arg); | |||
437 | 424 | ||
438 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); | 425 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); |
439 | 426 | ||
440 | /* Receive frame from HCI drivers */ | 427 | 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); | 428 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); |
463 | 429 | ||
464 | int hci_register_sysfs(struct hci_dev *hdev); | 430 | int hci_register_sysfs(struct hci_dev *hdev); |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 9516f4b4a3c2..17a689f27a6a 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -324,7 +324,6 @@ struct l2cap_pinfo { | |||
324 | 324 | ||
325 | __u8 next_tx_seq; | 325 | __u8 next_tx_seq; |
326 | __u8 expected_ack_seq; | 326 | __u8 expected_ack_seq; |
327 | __u8 req_seq; | ||
328 | __u8 expected_tx_seq; | 327 | __u8 expected_tx_seq; |
329 | __u8 buffer_seq; | 328 | __u8 buffer_seq; |
330 | __u8 buffer_seq_srej; | 329 | __u8 buffer_seq_srej; |
@@ -375,6 +374,7 @@ struct l2cap_pinfo { | |||
375 | #define L2CAP_CONN_SEND_PBIT 0x10 | 374 | #define L2CAP_CONN_SEND_PBIT 0x10 |
376 | #define L2CAP_CONN_REMOTE_BUSY 0x20 | 375 | #define L2CAP_CONN_REMOTE_BUSY 0x20 |
377 | #define L2CAP_CONN_LOCAL_BUSY 0x40 | 376 | #define L2CAP_CONN_LOCAL_BUSY 0x40 |
377 | #define L2CAP_CONN_REJ_ACT 0x80 | ||
378 | 378 | ||
379 | #define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ | 379 | #define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ |
380 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); | 380 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); |