Skip to content

Commit

Permalink
Bluetooth: sco: new getsockopt options BT_SNDMTU/BT_RCVMTU
Browse files Browse the repository at this point in the history
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: Joseph Hwang <josephsih@chromium.org>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
josephsih authored and holtmann committed Sep 11, 2020
1 parent 3eec158 commit 0fc1a72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/bluetooth/sco.c
Expand Up @@ -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;
Expand Down

0 comments on commit 0fc1a72

Please sign in to comment.