From: Gustavo F. Padovan Date: Thu, 21 Apr 2011 00:47:07 +0000 (-0300) Subject: Merge master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=828d7d7b19446bf5a40928da47955c575a454c75;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Merge /linux/kernel/git/padovan/bluetooth-2.6 Conflicts: net/bluetooth/l2cap_core.c net/bluetooth/l2cap_sock.c net/bluetooth/mgmt.c --- 828d7d7b19446bf5a40928da47955c575a454c75 diff --cc net/bluetooth/hci_core.c index a80bc1cdb35b,e7dced9080a5..98aa24b92c58 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@@ -586,10 -587,8 +586,11 @@@ static int hci_dev_do_close(struct hci_ hci_req_cancel(hdev, ENODEV); hci_req_lock(hdev); + /* Stop timer, it might be running */ + del_timer_sync(&hdev->cmd_timer); + if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { + del_timer_sync(&hdev->cmd_timer); hci_req_unlock(hdev); return 0; } diff --cc net/bluetooth/l2cap_core.c index d47de2b04b2e,2c8dd4494c63..9e8dc136ef16 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@@ -1079,13 -1051,14 +1079,14 @@@ static void l2cap_retransmit_one_frame( tx_skb = skb_clone(skb, GFP_ATOMIC); bt_cb(skb)->retries++; control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE); + control &= L2CAP_CTRL_SAR; - if (pi->conn_state & L2CAP_CONN_SEND_FBIT) { + if (chan->conn_state & L2CAP_CONN_SEND_FBIT) { control |= L2CAP_CTRL_FINAL; - pi->conn_state &= ~L2CAP_CONN_SEND_FBIT; + chan->conn_state &= ~L2CAP_CONN_SEND_FBIT; } - control |= (pi->buffer_seq << L2CAP_CTRL_REQSEQ_SHIFT) + control |= (chan->buffer_seq << L2CAP_CTRL_REQSEQ_SHIFT) | (tx_seq << L2CAP_CTRL_TXSEQ_SHIFT); put_unaligned_le16(control, tx_skb->data + L2CAP_HDR_SIZE);