diff options
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r-- | net/bluetooth/l2cap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index f0441b0b0335..6094870d5d2a 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -1912,6 +1912,11 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, char __us | |||
1912 | break; | 1912 | break; |
1913 | } | 1913 | } |
1914 | 1914 | ||
1915 | if (opts.txwin_size > L2CAP_DEFAULT_TX_WINDOW) { | ||
1916 | err = -EINVAL; | ||
1917 | break; | ||
1918 | } | ||
1919 | |||
1915 | l2cap_pi(sk)->mode = opts.mode; | 1920 | l2cap_pi(sk)->mode = opts.mode; |
1916 | switch (l2cap_pi(sk)->mode) { | 1921 | switch (l2cap_pi(sk)->mode) { |
1917 | case L2CAP_MODE_BASIC: | 1922 | case L2CAP_MODE_BASIC: |