提交 0fc1a726 编写于 作者: J Joseph Hwang 提交者: 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: NJoseph Hwang <josephsih@chromium.org>
Reviewed-by: NAlain Michaud <alainm@chromium.org>
Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: NPali Rohár <pali@kernel.org>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册