aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 1a32562adf46..bf5bb7dc6abf 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1814,9 +1814,22 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, char __us
1814 break; 1814 break;
1815 } 1815 }
1816 1816
1817 l2cap_pi(sk)->mode = opts.mode;
1818 switch (l2cap_pi(sk)->mode) {
1819 case L2CAP_MODE_BASIC:
1820 break;
1821 case L2CAP_MODE_ERTM:
1822 case L2CAP_MODE_STREAMING:
1823 if (enable_ertm)
1824 break;
1825 /* fall through */
1826 default:
1827 err = -EINVAL;
1828 break;
1829 }
1830
1817 l2cap_pi(sk)->imtu = opts.imtu; 1831 l2cap_pi(sk)->imtu = opts.imtu;
1818 l2cap_pi(sk)->omtu = opts.omtu; 1832 l2cap_pi(sk)->omtu = opts.omtu;
1819 l2cap_pi(sk)->mode = opts.mode;
1820 l2cap_pi(sk)->fcs = opts.fcs; 1833 l2cap_pi(sk)->fcs = opts.fcs;
1821 l2cap_pi(sk)->max_tx = opts.max_tx; 1834 l2cap_pi(sk)->max_tx = opts.max_tx;
1822 l2cap_pi(sk)->tx_win = (__u8)opts.txwin_size; 1835 l2cap_pi(sk)->tx_win = (__u8)opts.txwin_size;