Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Gustavo F. Padovan and committed by
Marcel Holtmann
d1c4a17d 893ef971

+9 -9
+9 -9
net/bluetooth/l2cap.c
··· 57 57 58 58 #define VERSION "2.15" 59 59 60 - static int enable_ertm = 0; 60 + static int disable_ertm = 0; 61 61 62 62 static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN; 63 63 static u8 l2cap_fixed_chan[8] = { 0x02, }; ··· 464 464 static inline int l2cap_mode_supported(__u8 mode, __u32 feat_mask) 465 465 { 466 466 u32 local_feat_mask = l2cap_feat_mask; 467 - if (enable_ertm) 467 + if (!disable_ertm) 468 468 local_feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING; 469 469 470 470 switch (mode) { ··· 903 903 } else { 904 904 pi->imtu = L2CAP_DEFAULT_MTU; 905 905 pi->omtu = 0; 906 - if (enable_ertm && sk->sk_type == SOCK_STREAM) { 906 + if (!disable_ertm && sk->sk_type == SOCK_STREAM) { 907 907 pi->mode = L2CAP_MODE_ERTM; 908 908 pi->conf_state |= L2CAP_CONF_STATE2_DEVICE; 909 909 } else { ··· 1160 1160 break; 1161 1161 case L2CAP_MODE_ERTM: 1162 1162 case L2CAP_MODE_STREAMING: 1163 - if (enable_ertm) 1163 + if (!disable_ertm) 1164 1164 break; 1165 1165 /* fall through */ 1166 1166 default: ··· 1226 1226 break; 1227 1227 case L2CAP_MODE_ERTM: 1228 1228 case L2CAP_MODE_STREAMING: 1229 - if (enable_ertm) 1229 + if (!disable_ertm) 1230 1230 break; 1231 1231 /* fall through */ 1232 1232 default: ··· 1986 1986 break; 1987 1987 case L2CAP_MODE_ERTM: 1988 1988 case L2CAP_MODE_STREAMING: 1989 - if (enable_ertm) 1989 + if (!disable_ertm) 1990 1990 break; 1991 1991 /* fall through */ 1992 1992 default: ··· 3302 3302 struct l2cap_info_rsp *rsp = (struct l2cap_info_rsp *) buf; 3303 3303 rsp->type = cpu_to_le16(L2CAP_IT_FEAT_MASK); 3304 3304 rsp->result = cpu_to_le16(L2CAP_IR_SUCCESS); 3305 - if (enable_ertm) 3305 + if (!disable_ertm) 3306 3306 feat_mask |= L2CAP_FEAT_ERTM | L2CAP_FEAT_STREAMING 3307 3307 | L2CAP_FEAT_FCS; 3308 3308 put_unaligned_le32(feat_mask, rsp->data); ··· 4850 4850 module_init(l2cap_init); 4851 4851 module_exit(l2cap_exit); 4852 4852 4853 - module_param(enable_ertm, bool, 0644); 4854 - MODULE_PARM_DESC(enable_ertm, "Enable enhanced retransmission mode"); 4853 + module_param(disable_ertm, bool, 0644); 4854 + MODULE_PARM_DESC(disable_ertm, "Disable enhanced retransmission mode"); 4855 4855 4856 4856 MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 4857 4857 MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);