Bluetooth: Save hs_hchan instead of hs_hcon in loglink complete
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Wed, 31 Oct 2012 13:46:27 +0000 (15:46 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 1 Nov 2012 22:27:05 +0000 (20:27 -0200)
When logical link creation is completed we need to save hs_hchan
which represents logical link instead of hs_hcon representing
physical link. hs_hcon shall be saved when receiving physical link
complete event.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/l2cap_core.c

index c2fbaf9c6ac8472543477ca27dc0a889c6a5e810..4ef85d24797d5a59cd5d09c58cfec7ca697c86aa 100644 (file)
@@ -4375,7 +4375,7 @@ static void l2cap_logical_finish_create(struct l2cap_chan *chan,
 {
        struct l2cap_conf_rsp rsp;
 
-       chan->hs_hcon = hchan->conn;
+       chan->hs_hchan = hchan;
        chan->hs_hcon->l2cap_data = chan->conn;
 
        l2cap_send_efs_conf_rsp(chan, &rsp, chan->ident, 0);