Commit 0fc1a726 authored by Joseph Hwang's avatar Joseph Hwang Committed by Marcel Holtmann

Bluetooth: sco: new getsockopt options BT_SNDMTU/BT_RCVMTU

This patch defines new getsockopt options BT_SNDMTU/BT_RCVMTU
for SCO socket to be compatible with other bluetooth sockets.
These new options return the same value as option SCO_OPTIONS
which is already present on existing kernels.
Signed-off-by: default avatarJoseph Hwang <josephsih@chromium.org>
Reviewed-by: default avatarAlain Michaud <alainm@chromium.org>
Reviewed-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: default avatarPali Rohár <pali@kernel.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 3eec158d
......@@ -1001,6 +1001,12 @@ static int sco_sock_getsockopt(struct socket *sock, int level, int optname,
err = -EFAULT;
break;
case BT_SNDMTU:
case BT_RCVMTU:
if (put_user(sco_pi(sk)->conn->mtu, (u32 __user *)optval))
err = -EFAULT;
break;
default:
err = -ENOPROTOOPT;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment