Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetoot...
John W. Linville [Mon, 11 Jul 2011 18:58:22 +0000 (14:58 -0400)]
Conflicts:
net/bluetooth/l2cap_core.c

1  2 
net/bluetooth/l2cap_core.c

@@@ -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;