aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-10-05 06:23:48 -0400
committerMarcel Holtmann <marcel@holtmann.org>2009-12-03 13:34:26 -0500
commiteae38eede2e5f70d65f09327297bd698b0d3ea7e (patch)
tree695cfeaaa240d4ad9c91b7fb40edfbe8c343534c /net/bluetooth
parent5fbcd3d1a07e234583e17830e8aef47282c22141 (diff)
Bluetooth: Add RFCOMM option to use L2CAP ERTM mode
By default the RFCOMM layer would still use L2CAP basic mode. For testing purposes this option enables RFCOMM to select enhanced retransmission mode. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/rfcomm/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 25692bc0a342..fc5ee3296e22 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -51,6 +51,7 @@
51static int disable_cfc = 0; 51static int disable_cfc = 0;
52static int channel_mtu = -1; 52static int channel_mtu = -1;
53static unsigned int l2cap_mtu = RFCOMM_MAX_L2CAP_MTU; 53static unsigned int l2cap_mtu = RFCOMM_MAX_L2CAP_MTU;
54static int l2cap_ertm = 0;
54 55
55static struct task_struct *rfcomm_thread; 56static struct task_struct *rfcomm_thread;
56 57
@@ -702,6 +703,8 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src, bdaddr_t *dst
702 sk = sock->sk; 703 sk = sock->sk;
703 lock_sock(sk); 704 lock_sock(sk);
704 l2cap_pi(sk)->imtu = l2cap_mtu; 705 l2cap_pi(sk)->imtu = l2cap_mtu;
706 if (l2cap_ertm)
707 l2cap_pi(sk)->mode = L2CAP_MODE_ERTM;
705 release_sock(sk); 708 release_sock(sk);
706 709
707 s = rfcomm_session_add(sock, BT_BOUND); 710 s = rfcomm_session_add(sock, BT_BOUND);
@@ -2185,6 +2188,9 @@ MODULE_PARM_DESC(channel_mtu, "Default MTU for the RFCOMM channel");
2185module_param(l2cap_mtu, uint, 0644); 2188module_param(l2cap_mtu, uint, 0644);
2186MODULE_PARM_DESC(l2cap_mtu, "Default MTU for the L2CAP connection"); 2189MODULE_PARM_DESC(l2cap_mtu, "Default MTU for the L2CAP connection");
2187 2190
2191module_param(l2cap_ertm, bool, 0644);
2192MODULE_PARM_DESC(l2cap_ertm, "Use L2CAP ERTM mode for connection");
2193
2188MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 2194MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
2189MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION); 2195MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION);
2190MODULE_VERSION(VERSION); 2196MODULE_VERSION(VERSION);