Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fbcd3d1 authored by Marcel Holtmann's avatar Marcel Holtmann
Browse files

Bluetooth: Add L2CAP option for max transmit value



For testing purposes it is important to modify the max transmit value.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 32fd6398
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -54,6 +54,7 @@
#define VERSION "2.14"
#define VERSION "2.14"


static int enable_ertm = 0;
static int enable_ertm = 0;
static int max_transmit = L2CAP_DEFAULT_MAX_TX;


static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN;
static u32 l2cap_feat_mask = L2CAP_FEAT_FIXED_CHAN;
static u8 l2cap_fixed_chan[8] = { 0x02, };
static u8 l2cap_fixed_chan[8] = { 0x02, };
@@ -2253,7 +2254,7 @@ static int l2cap_build_conf_req(struct sock *sk, void *data)
	case L2CAP_MODE_ERTM:
	case L2CAP_MODE_ERTM:
		rfc.mode            = L2CAP_MODE_ERTM;
		rfc.mode            = L2CAP_MODE_ERTM;
		rfc.txwin_size      = L2CAP_DEFAULT_TX_WINDOW;
		rfc.txwin_size      = L2CAP_DEFAULT_TX_WINDOW;
		rfc.max_transmit    = L2CAP_DEFAULT_MAX_TX;
		rfc.max_transmit    = max_transmit;
		rfc.retrans_timeout = 0;
		rfc.retrans_timeout = 0;
		rfc.monitor_timeout = 0;
		rfc.monitor_timeout = 0;
		rfc.max_pdu_size    = cpu_to_le16(L2CAP_DEFAULT_MAX_PDU_SIZE);
		rfc.max_pdu_size    = cpu_to_le16(L2CAP_DEFAULT_MAX_PDU_SIZE);
@@ -4060,6 +4061,9 @@ module_exit(l2cap_exit);
module_param(enable_ertm, bool, 0644);
module_param(enable_ertm, bool, 0644);
MODULE_PARM_DESC(enable_ertm, "Enable enhanced retransmission mode");
MODULE_PARM_DESC(enable_ertm, "Enable enhanced retransmission mode");


module_param(max_transmit, uint, 0644);
MODULE_PARM_DESC(max_transmit, "Max transmit value (default = 3)");

MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);
MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION);
MODULE_VERSION(VERSION);
MODULE_VERSION(VERSION);