Commit 9b7655ea authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann

Bluetooth: Enable LE L2CAP CoC support by default

Now that the LE L2CAP Connection Oriented Channel support has undergone a
decent amount of testing we can make it officially supported. This patch
removes the enable_lecoc module parameter which was previously needed to
enable support for LE L2CAP CoC.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 4292f1f3
...@@ -857,7 +857,6 @@ static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan) ...@@ -857,7 +857,6 @@ static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan)
} }
extern bool disable_ertm; extern bool disable_ertm;
extern bool enable_lecoc;
int l2cap_init_sockets(void); int l2cap_init_sockets(void);
void l2cap_cleanup_sockets(void); void l2cap_cleanup_sockets(void);
......
...@@ -5544,17 +5544,6 @@ static inline int l2cap_le_sig_cmd(struct l2cap_conn *conn, ...@@ -5544,17 +5544,6 @@ static inline int l2cap_le_sig_cmd(struct l2cap_conn *conn,
{ {
int err = 0; int err = 0;
if (!enable_lecoc) {
switch (cmd->code) {
case L2CAP_LE_CONN_REQ:
case L2CAP_LE_CONN_RSP:
case L2CAP_LE_CREDITS:
case L2CAP_DISCONN_REQ:
case L2CAP_DISCONN_RSP:
return -EINVAL;
}
}
switch (cmd->code) { switch (cmd->code) {
case L2CAP_COMMAND_REJ: case L2CAP_COMMAND_REJ:
l2cap_le_command_rej(conn, cmd, cmd_len, data); l2cap_le_command_rej(conn, cmd, cmd_len, data);
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
#include "smp.h" #include "smp.h"
bool enable_lecoc;
static struct bt_sock_list l2cap_sk_list = { static struct bt_sock_list l2cap_sk_list = {
.lock = __RW_LOCK_UNLOCKED(l2cap_sk_list.lock) .lock = __RW_LOCK_UNLOCKED(l2cap_sk_list.lock)
}; };
...@@ -111,8 +109,6 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) ...@@ -111,8 +109,6 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
} }
if (bdaddr_type_is_le(la.l2_bdaddr_type)) { if (bdaddr_type_is_le(la.l2_bdaddr_type)) {
if (!enable_lecoc && la.l2_psm)
return -EINVAL;
/* We only allow ATT user space socket */ /* We only allow ATT user space socket */
if (la.l2_cid && if (la.l2_cid &&
la.l2_cid != __constant_cpu_to_le16(L2CAP_CID_ATT)) la.l2_cid != __constant_cpu_to_le16(L2CAP_CID_ATT))
...@@ -229,8 +225,6 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, ...@@ -229,8 +225,6 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr,
return -EINVAL; return -EINVAL;
if (bdaddr_type_is_le(la.l2_bdaddr_type)) { if (bdaddr_type_is_le(la.l2_bdaddr_type)) {
if (!enable_lecoc && la.l2_psm)
return -EINVAL;
/* We only allow ATT user space socket */ /* We only allow ATT user space socket */
if (la.l2_cid && if (la.l2_cid &&
la.l2_cid != __constant_cpu_to_le16(L2CAP_CID_ATT)) la.l2_cid != __constant_cpu_to_le16(L2CAP_CID_ATT))
...@@ -578,11 +572,6 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, ...@@ -578,11 +572,6 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname,
break; break;
case BT_SNDMTU: case BT_SNDMTU:
if (!enable_lecoc) {
err = -EPROTONOSUPPORT;
break;
}
if (!bdaddr_type_is_le(chan->src_type)) { if (!bdaddr_type_is_le(chan->src_type)) {
err = -EINVAL; err = -EINVAL;
break; break;
...@@ -598,11 +587,6 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, ...@@ -598,11 +587,6 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname,
break; break;
case BT_RCVMTU: case BT_RCVMTU:
if (!enable_lecoc) {
err = -EPROTONOSUPPORT;
break;
}
if (!bdaddr_type_is_le(chan->src_type)) { if (!bdaddr_type_is_le(chan->src_type)) {
err = -EINVAL; err = -EINVAL;
break; break;
...@@ -919,11 +903,6 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ...@@ -919,11 +903,6 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
break; break;
case BT_SNDMTU: case BT_SNDMTU:
if (!enable_lecoc) {
err = -EPROTONOSUPPORT;
break;
}
if (!bdaddr_type_is_le(chan->src_type)) { if (!bdaddr_type_is_le(chan->src_type)) {
err = -EINVAL; err = -EINVAL;
break; break;
...@@ -936,11 +915,6 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ...@@ -936,11 +915,6 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
break; break;
case BT_RCVMTU: case BT_RCVMTU:
if (!enable_lecoc) {
err = -EPROTONOSUPPORT;
break;
}
if (!bdaddr_type_is_le(chan->src_type)) { if (!bdaddr_type_is_le(chan->src_type)) {
err = -EINVAL; err = -EINVAL;
break; break;
...@@ -1643,6 +1617,3 @@ void l2cap_cleanup_sockets(void) ...@@ -1643,6 +1617,3 @@ void l2cap_cleanup_sockets(void)
bt_sock_unregister(BTPROTO_L2CAP); bt_sock_unregister(BTPROTO_L2CAP);
proto_unregister(&l2cap_proto); proto_unregister(&l2cap_proto);
} }
module_param(enable_lecoc, bool, 0644);
MODULE_PARM_DESC(enable_lecoc, "Enable support for LE CoC");
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