Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetoot...
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jul 2011 18:58:22 +0000 (14:58 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jul 2011 18:58:22 +0000 (14:58 -0400)
Conflicts:
net/bluetooth/l2cap_core.c

1  2 
net/bluetooth/l2cap_core.c

index fc219ec287117f7035c0a49a9f0f00639c31ecd6,52c791ed038dd943f624e84e78315570fd29497d..f7f8e2cd3f701b2588b1f1bfd98ca250745c4796
@@@ -2530,11 -2523,13 +2523,14 @@@ static inline int l2cap_config_req(stru
  
        sk = chan->sk;
  
 -      if (chan->state != BT_CONFIG) {
 +      if ((bt_sk(sk)->defer_setup && chan->state != BT_CONNECT2) ||
 +               (!bt_sk(sk)->defer_setup && chan->state != BT_CONFIG)) {
-               struct l2cap_cmd_rej rej;
+               struct l2cap_cmd_rej_cid rej;
+               rej.reason = cpu_to_le16(L2CAP_REJ_INVALID_CID);
+               rej.scid = cpu_to_le16(chan->scid);
+               rej.dcid = cpu_to_le16(chan->dcid);
  
-               rej.reason = cpu_to_le16(0x0002);
                l2cap_send_cmd(conn, cmd->ident, L2CAP_COMMAND_REJ,
                                sizeof(rej), &rej);
                goto unlock;