]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Add BT_DBG to l2cap_sock_shutdown()
authorDean Jenkins <Dean_Jenkins@mentor.com>
Tue, 23 Jun 2015 16:59:37 +0000 (17:59 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 23 Jul 2015 15:10:51 +0000 (17:10 +0200)
Add helpful BT_DBG debug to l2cap_sock_shutdown()
and __l2cap_wait_ack() so that the code flow can
be analysed.

Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_sock.c

index 29042880c449d24d8fd5d18fceb4387f0835aafa..d915e4a963131fe2992770ad633b80273ccfdb32 100644 (file)
@@ -1063,6 +1063,8 @@ static int __l2cap_wait_ack(struct sock *sk, struct l2cap_chan *chan)
        add_wait_queue(sk_sleep(sk), &wait);
        set_current_state(TASK_INTERRUPTIBLE);
        do {
+               BT_DBG("Waiting for %d ACKs", chan->unacked_frames);
+
                if (!timeo)
                        timeo = HZ/5;
 
@@ -1146,6 +1148,8 @@ static int l2cap_sock_shutdown(struct socket *sock, int how)
        l2cap_chan_put(chan);
        sock_put(sk);
 
+       BT_DBG("err: %d", err);
+
        return err;
 }