aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-04-20 20:47:07 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-20 20:47:07 -0400
commit828d7d7b19446bf5a40928da47955c575a454c75 (patch)
treefd006445c562749de9a07fe6e5363bab5d285a20 /net/bluetooth
parent26954c7f26068b6ced108806fdd39aee5cd54e6f (diff)
parent069f40fc07f6df3da325e7ea1698a0d6247983d5 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6
Conflicts: net/bluetooth/l2cap_core.c net/bluetooth/l2cap_sock.c net/bluetooth/mgmt.c
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c1
-rw-r--r--net/bluetooth/hci_event.c2
-rw-r--r--net/bluetooth/l2cap_core.c1
-rw-r--r--net/bluetooth/sco.c9
4 files changed, 11 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a80bc1cdb35b..98aa24b92c58 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -590,6 +590,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
590 del_timer_sync(&hdev->cmd_timer); 590 del_timer_sync(&hdev->cmd_timer);
591 591
592 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { 592 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
593 del_timer_sync(&hdev->cmd_timer);
593 hci_req_unlock(hdev); 594 hci_req_unlock(hdev);
594 return 0; 595 return 0;
595 } 596 }
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c7eb073fe633..cb25628c0583 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2419,8 +2419,6 @@ static inline void hci_io_capa_reply_evt(struct hci_dev *hdev, struct sk_buff *s
2419 if (!conn) 2419 if (!conn)
2420 goto unlock; 2420 goto unlock;
2421 2421
2422 hci_conn_hold(conn);
2423
2424 conn->remote_cap = ev->capability; 2422 conn->remote_cap = ev->capability;
2425 conn->remote_oob = ev->oob_data; 2423 conn->remote_oob = ev->oob_data;
2426 conn->remote_auth = ev->authentication; 2424 conn->remote_auth = ev->authentication;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index d47de2b04b2e..9e8dc136ef16 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1079,6 +1079,7 @@ static void l2cap_retransmit_one_frame(struct l2cap_chan *chan, u8 tx_seq)
1079 tx_skb = skb_clone(skb, GFP_ATOMIC); 1079 tx_skb = skb_clone(skb, GFP_ATOMIC);
1080 bt_cb(skb)->retries++; 1080 bt_cb(skb)->retries++;
1081 control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE); 1081 control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE);
1082 control &= L2CAP_CTRL_SAR;
1082 1083
1083 if (chan->conn_state & L2CAP_CONN_SEND_FBIT) { 1084 if (chan->conn_state & L2CAP_CONN_SEND_FBIT) {
1084 control |= L2CAP_CTRL_FINAL; 1085 control |= L2CAP_CTRL_FINAL;
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 42fdffd1d76c..94954c74f6ae 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -369,6 +369,15 @@ static void __sco_sock_close(struct sock *sk)
369 369
370 case BT_CONNECTED: 370 case BT_CONNECTED:
371 case BT_CONFIG: 371 case BT_CONFIG:
372 if (sco_pi(sk)->conn) {
373 sk->sk_state = BT_DISCONN;
374 sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT);
375 hci_conn_put(sco_pi(sk)->conn->hcon);
376 sco_pi(sk)->conn = NULL;
377 } else
378 sco_chan_del(sk, ECONNRESET);
379 break;
380
372 case BT_CONNECT: 381 case BT_CONNECT:
373 case BT_DISCONN: 382 case BT_DISCONN:
374 sco_chan_del(sk, ECONNRESET); 383 sco_chan_del(sk, ECONNRESET);