diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-08-05 15:54:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-05 15:54:28 -0400 |
commit | c0068c85897f06205d4c35cf4bf9161be90690e9 (patch) | |
tree | ae8a186fff44a29454008a5d1f5891b10a861f2c | |
parent | 2411054ae9eb7e7ef488a39912abfc4ebadbe3ad (diff) | |
parent | adb08edea0119f7a5484a9f6a385fbcecdf85a63 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
-rw-r--r-- | include/net/bluetooth/hci_core.h | 2 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/hci_sock.c | 8 | ||||
-rw-r--r-- | net/bluetooth/hci_sysfs.c | 3 | ||||
-rw-r--r-- | net/bluetooth/l2cap.c | 24 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 2 |
6 files changed, 28 insertions, 13 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 8b28962e737e..4568b938ca35 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -132,7 +132,7 @@ struct hci_dev { | |||
132 | 132 | ||
133 | struct inquiry_cache inq_cache; | 133 | struct inquiry_cache inq_cache; |
134 | struct hci_conn_hash conn_hash; | 134 | struct hci_conn_hash conn_hash; |
135 | struct bdaddr_list blacklist; | 135 | struct list_head blacklist; |
136 | 136 | ||
137 | struct hci_dev_stats stat; | 137 | struct hci_dev_stats stat; |
138 | 138 | ||
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 8303f1c9ef54..c52f091ee6de 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -924,7 +924,7 @@ int hci_register_dev(struct hci_dev *hdev) | |||
924 | 924 | ||
925 | hci_conn_hash_init(hdev); | 925 | hci_conn_hash_init(hdev); |
926 | 926 | ||
927 | INIT_LIST_HEAD(&hdev->blacklist.list); | 927 | INIT_LIST_HEAD(&hdev->blacklist); |
928 | 928 | ||
929 | memset(&hdev->stat, 0, sizeof(struct hci_dev_stats)); | 929 | memset(&hdev->stat, 0, sizeof(struct hci_dev_stats)); |
930 | 930 | ||
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 4f170a595934..83acd164d39e 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -168,9 +168,8 @@ static int hci_sock_release(struct socket *sock) | |||
168 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) | 168 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) |
169 | { | 169 | { |
170 | struct list_head *p; | 170 | struct list_head *p; |
171 | struct bdaddr_list *blacklist = &hdev->blacklist; | ||
172 | 171 | ||
173 | list_for_each(p, &blacklist->list) { | 172 | list_for_each(p, &hdev->blacklist) { |
174 | struct bdaddr_list *b; | 173 | struct bdaddr_list *b; |
175 | 174 | ||
176 | b = list_entry(p, struct bdaddr_list, list); | 175 | b = list_entry(p, struct bdaddr_list, list); |
@@ -202,7 +201,7 @@ static int hci_blacklist_add(struct hci_dev *hdev, void __user *arg) | |||
202 | 201 | ||
203 | bacpy(&entry->bdaddr, &bdaddr); | 202 | bacpy(&entry->bdaddr, &bdaddr); |
204 | 203 | ||
205 | list_add(&entry->list, &hdev->blacklist.list); | 204 | list_add(&entry->list, &hdev->blacklist); |
206 | 205 | ||
207 | return 0; | 206 | return 0; |
208 | } | 207 | } |
@@ -210,9 +209,8 @@ static int hci_blacklist_add(struct hci_dev *hdev, void __user *arg) | |||
210 | int hci_blacklist_clear(struct hci_dev *hdev) | 209 | int hci_blacklist_clear(struct hci_dev *hdev) |
211 | { | 210 | { |
212 | struct list_head *p, *n; | 211 | struct list_head *p, *n; |
213 | struct bdaddr_list *blacklist = &hdev->blacklist; | ||
214 | 212 | ||
215 | list_for_each_safe(p, n, &blacklist->list) { | 213 | list_for_each_safe(p, n, &hdev->blacklist) { |
216 | struct bdaddr_list *b; | 214 | struct bdaddr_list *b; |
217 | 215 | ||
218 | b = list_entry(p, struct bdaddr_list, list); | 216 | b = list_entry(p, struct bdaddr_list, list); |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index ce44c47eeac1..8fb967beee80 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -439,12 +439,11 @@ static const struct file_operations inquiry_cache_fops = { | |||
439 | static int blacklist_show(struct seq_file *f, void *p) | 439 | static int blacklist_show(struct seq_file *f, void *p) |
440 | { | 440 | { |
441 | struct hci_dev *hdev = f->private; | 441 | struct hci_dev *hdev = f->private; |
442 | struct bdaddr_list *blacklist = &hdev->blacklist; | ||
443 | struct list_head *l; | 442 | struct list_head *l; |
444 | 443 | ||
445 | hci_dev_lock_bh(hdev); | 444 | hci_dev_lock_bh(hdev); |
446 | 445 | ||
447 | list_for_each(l, &blacklist->list) { | 446 | list_for_each(l, &hdev->blacklist) { |
448 | struct bdaddr_list *b; | 447 | struct bdaddr_list *b; |
449 | bdaddr_t bdaddr; | 448 | bdaddr_t bdaddr; |
450 | 449 | ||
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 9ba1e8eee37c..3e3cd9d4e52c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2527,6 +2527,10 @@ done: | |||
2527 | if (pi->imtu != L2CAP_DEFAULT_MTU) | 2527 | if (pi->imtu != L2CAP_DEFAULT_MTU) |
2528 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu); | 2528 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->imtu); |
2529 | 2529 | ||
2530 | if (!(pi->conn->feat_mask & L2CAP_FEAT_ERTM) && | ||
2531 | !(pi->conn->feat_mask & L2CAP_FEAT_STREAMING)) | ||
2532 | break; | ||
2533 | |||
2530 | rfc.mode = L2CAP_MODE_BASIC; | 2534 | rfc.mode = L2CAP_MODE_BASIC; |
2531 | rfc.txwin_size = 0; | 2535 | rfc.txwin_size = 0; |
2532 | rfc.max_transmit = 0; | 2536 | rfc.max_transmit = 0; |
@@ -2534,6 +2538,8 @@ done: | |||
2534 | rfc.monitor_timeout = 0; | 2538 | rfc.monitor_timeout = 0; |
2535 | rfc.max_pdu_size = 0; | 2539 | rfc.max_pdu_size = 0; |
2536 | 2540 | ||
2541 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2542 | (unsigned long) &rfc); | ||
2537 | break; | 2543 | break; |
2538 | 2544 | ||
2539 | case L2CAP_MODE_ERTM: | 2545 | case L2CAP_MODE_ERTM: |
@@ -2546,6 +2552,9 @@ done: | |||
2546 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) | 2552 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) |
2547 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); | 2553 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); |
2548 | 2554 | ||
2555 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2556 | (unsigned long) &rfc); | ||
2557 | |||
2549 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) | 2558 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) |
2550 | break; | 2559 | break; |
2551 | 2560 | ||
@@ -2566,6 +2575,9 @@ done: | |||
2566 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) | 2575 | if (L2CAP_DEFAULT_MAX_PDU_SIZE > pi->conn->mtu - 10) |
2567 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); | 2576 | rfc.max_pdu_size = cpu_to_le16(pi->conn->mtu - 10); |
2568 | 2577 | ||
2578 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2579 | (unsigned long) &rfc); | ||
2580 | |||
2569 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) | 2581 | if (!(pi->conn->feat_mask & L2CAP_FEAT_FCS)) |
2570 | break; | 2582 | break; |
2571 | 2583 | ||
@@ -2577,9 +2589,6 @@ done: | |||
2577 | break; | 2589 | break; |
2578 | } | 2590 | } |
2579 | 2591 | ||
2580 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), | ||
2581 | (unsigned long) &rfc); | ||
2582 | |||
2583 | /* FIXME: Need actual value of the flush timeout */ | 2592 | /* FIXME: Need actual value of the flush timeout */ |
2584 | //if (flush_to != L2CAP_DEFAULT_FLUSH_TO) | 2593 | //if (flush_to != L2CAP_DEFAULT_FLUSH_TO) |
2585 | // l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO, 2, pi->flush_to); | 2594 | // l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO, 2, pi->flush_to); |
@@ -3339,6 +3348,15 @@ static inline int l2cap_information_rsp(struct l2cap_conn *conn, struct l2cap_cm | |||
3339 | 3348 | ||
3340 | del_timer(&conn->info_timer); | 3349 | del_timer(&conn->info_timer); |
3341 | 3350 | ||
3351 | if (result != L2CAP_IR_SUCCESS) { | ||
3352 | conn->info_state |= L2CAP_INFO_FEAT_MASK_REQ_DONE; | ||
3353 | conn->info_ident = 0; | ||
3354 | |||
3355 | l2cap_conn_start(conn); | ||
3356 | |||
3357 | return 0; | ||
3358 | } | ||
3359 | |||
3342 | if (type == L2CAP_IT_FEAT_MASK) { | 3360 | if (type == L2CAP_IT_FEAT_MASK) { |
3343 | conn->feat_mask = get_unaligned_le32(rsp->data); | 3361 | conn->feat_mask = get_unaligned_le32(rsp->data); |
3344 | 3362 | ||
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 026205c18b78..befc3a52aa04 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -1183,7 +1183,7 @@ int __init rfcomm_init_ttys(void) | |||
1183 | return 0; | 1183 | return 0; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | void __exit rfcomm_cleanup_ttys(void) | 1186 | void rfcomm_cleanup_ttys(void) |
1187 | { | 1187 | { |
1188 | tty_unregister_driver(rfcomm_tty_driver); | 1188 | tty_unregister_driver(rfcomm_tty_driver); |
1189 | put_tty_driver(rfcomm_tty_driver); | 1189 | put_tty_driver(rfcomm_tty_driver); |