diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-11-15 14:18:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-11-15 14:18:45 -0500 |
commit | 32019c739c95d056575e0bb2381f2846c0c49944 (patch) | |
tree | a3134c8c8c74094b936b73906954c7e77f531cf9 /net/bluetooth/rfcomm/sock.c | |
parent | 8e3ffa471091c560deb6738ed9ab7445b7a5fd04 (diff) | |
parent | 86ca9eac31d0d8c4fe61b5726e6d63197bc435a6 (diff) | |
download | linux-32019c739c95d056575e0bb2381f2846c0c49944.tar.bz2 |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Diffstat (limited to 'net/bluetooth/rfcomm/sock.c')
-rw-r--r-- | net/bluetooth/rfcomm/sock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index c4d3d423f89b..0be7619c5e5e 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c @@ -739,8 +739,9 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; + struct sock *l2cap_sk; + struct l2cap_conn *conn; struct rfcomm_conninfo cinfo; - struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn; int len, err = 0; u32 opt; @@ -783,6 +784,9 @@ static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __u break; } + l2cap_sk = rfcomm_pi(sk)->dlc->session->sock->sk; + conn = l2cap_pi(l2cap_sk)->chan->conn; + memset(&cinfo, 0, sizeof(cinfo)); cinfo.hci_handle = conn->hcon->handle; memcpy(cinfo.dev_class, conn->hcon->dev_class, 3); |