From: John W. Linville Date: Mon, 11 Jul 2011 18:58:22 +0000 (-0400) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetoot... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4b42c542afbc119c4012324ea80e0c5a89afea4f;p=linux-beck.git Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6 Conflicts: net/bluetooth/l2cap_core.c --- 4b42c542afbc119c4012324ea80e0c5a89afea4f diff --cc net/bluetooth/l2cap_core.c index fc219ec28711,52c791ed038d..f7f8e2cd3f70 --- a/net/bluetooth/l2cap_core.c +++ b/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;