aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-07-18 15:25:54 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:13 -0400
commitd1c4a17d58a6dfacb48935aa430aa986559a885f (patch)
tree395fd1b32327ad6a862dd8ef9432053e8413df39 /net/bluetooth
parent893ef9711286d01763f3c175385d70076d5f9546 (diff)
Bluetooth: Enable L2CAP Extended features by default
Change the enable_ertm param to disable_ertm and default value to 0. That means that L2CAP Extended features are enabled by default now. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index d175cc262833..9ba1e8eee37c 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -57,7 +57,7 @@
57 57
58#define VERSION "2.15" 58#define VERSION "2.15"
59 59
60static int enable_ertm = 0; 60static int disable_ertm = 0;
61 61
62static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN; 62static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN;
63static u8 l2cap_fixed_chan[8] = { 0x02, }; 63static u8 l2cap_fixed_chan[8] = { 0x02, };
@@ -464,7 +464,7 @@ static void l2cap_do_start(struct sock *sk)
464static inline int l2cap_mode_supported(__u8 mode, __u32 feat_mask) 464static inline int l2cap_mode_supported(__u8 mode, __u32 feat_mask)
465{ 465{
466 u32 local_feat_mask = l2cap_feat_mask; 466 u32 local_feat_mask = l2cap_feat_mask;
467 if (enable_ertm) 467 if (!disable_ertm)
468 local_feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING; 468 local_feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING;
469 469
470 switch (mode) { 470 switch (mode) {
@@ -903,7 +903,7 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
903 } else { 903 } else {
904 pi->imtu = L2CAP_DEFAULT_MTU; 904 pi->imtu = L2CAP_DEFAULT_MTU;
905 pi->omtu = 0; 905 pi->omtu = 0;
906 if (enable_ertm && sk->sk_type == SOCK_STREAM) { 906 if (!disable_ertm && sk->sk_type == SOCK_STREAM) {
907 pi->mode = L2CAP_MODE_ERTM; 907 pi->mode = L2CAP_MODE_ERTM;
908 pi->conf_state |= L2CAP_CONF_STATE2_DEVICE; 908 pi->conf_state |= L2CAP_CONF_STATE2_DEVICE;
909 } else { 909 } else {
@@ -1160,7 +1160,7 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
1160 break; 1160 break;
1161 case L2CAP_MODE_ERTM: 1161 case L2CAP_MODE_ERTM:
1162 case L2CAP_MODE_STREAMING: 1162 case L2CAP_MODE_STREAMING:
1163 if (enable_ertm) 1163 if (!disable_ertm)
1164 break; 1164 break;
1165 /* fall through */ 1165 /* fall through */
1166 default: 1166 default:
@@ -1226,7 +1226,7 @@ static int l2cap_sock_listen(struct socket *sock, int backlog)
1226 break; 1226 break;
1227 case L2CAP_MODE_ERTM: 1227 case L2CAP_MODE_ERTM:
1228 case L2CAP_MODE_STREAMING: 1228 case L2CAP_MODE_STREAMING:
1229 if (enable_ertm) 1229 if (!disable_ertm)
1230 break; 1230 break;
1231 /* fall through */ 1231 /* fall through */
1232 default: 1232 default:
@@ -1986,7 +1986,7 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, char __us
1986 break; 1986 break;
1987 case L2CAP_MODE_ERTM: 1987 case L2CAP_MODE_ERTM:
1988 case L2CAP_MODE_STREAMING: 1988 case L2CAP_MODE_STREAMING:
1989 if (enable_ertm) 1989 if (!disable_ertm)
1990 break; 1990 break;
1991 /* fall through */ 1991 /* fall through */
1992 default: 1992 default:
@@ -3302,7 +3302,7 @@ static inline int l2cap_information_req(struct l2cap_conn *conn, struct l2cap_cm
3302 struct l2cap_info_rsp *rsp = (struct l2cap_info_rsp *) buf; 3302 struct l2cap_info_rsp *rsp = (struct l2cap_info_rsp *) buf;
3303 rsp->type = cpu_to_le16(L2CAP_IT_FEAT_MASK); 3303 rsp->type = cpu_to_le16(L2CAP_IT_FEAT_MASK);
3304 rsp->result = cpu_to_le16(L2CAP_IR_SUCCESS); 3304 rsp->result = cpu_to_le16(L2CAP_IR_SUCCESS);
3305 if (enable_ertm) 3305 if (!disable_ertm)
3306 feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING 3306 feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING
3307 | L2CAP_FEAT_FCS; 3307 | L2CAP_FEAT_FCS;
3308 put_unaligned_le32(feat_mask, rsp->data); 3308 put_unaligned_le32(feat_mask, rsp->data);
@@ -4850,8 +4850,8 @@ EXPORT_SYMBOL(l2cap_load);
4850module_init(l2cap_init); 4850module_init(l2cap_init);
4851module_exit(l2cap_exit); 4851module_exit(l2cap_exit);
4852 4852
4853module_param(enable_ertm, bool, 0644); 4853module_param(disable_ertm, bool, 0644);
4854MODULE_PARM_DESC(enable_ertm, "Enable enhanced retransmission mode"); 4854MODULE_PARM_DESC(disable_ertm, "Disable enhanced retransmission mode");
4855 4855
4856MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 4856MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
4857MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION); 4857MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);